View Full Version : Attaching a volumic to a custom light shader?

06 June 2006, 05:58 PM

I'm just writing a shader to simulate a laser beam (i.e. circular cross section - for now, parallel rays, etc). The shader (in an un-optimised form) works nicely, but I want to be able to attach a volumic property to it. I've tried doing this in the normal manner, but no matter what settings I put in the volumic properties box, it just isn't interested, and the render looks no different. Is there some piece of code I need to put into my shader to make sure that volumics can be attached.

I'm not attaching any renders, because there's not much to see, but for those who are interested, I took the basic spotlight shader code and modified it, using some basic geometry calculations to project the material point (which called the light shader) onto the plane of the light and calculate the distance of this projected point from the light centre. If the distance is less than the light radius, we illuminate it, otherwise we don't. I haven't had to make too many modifications to the original code, and there wasn't anything that I saw in there which was related to volume effects.

Any suggestions?


Thanks in advance,


CGTalk Moderation
06 June 2006, 05:58 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.