bfe
06-08-2006, 05:58 PM
Hi,
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?
Please...
Thanks in advance,
B
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?
Please...
Thanks in advance,
B
