hey folks
I'm trying to create a shader in strumpy shader editor and I'm way out of my depth..
I think it should be easy to make though, and I was hoping for some tips?
the first step is I want lights to affect the shader like 'area lights', or ambient- basically, they light the object purely by distance to the light, regardless of whether the surface is facing or not
secondly, I want to use a gradient ramp and apply it to this lighting method (specifying an image as the ramp)
can anyone here help with this idea?
thanks!
-Rich
Replies
I could probably knock it up in regular shader code for you if you need it?
I'd ideally prefer doing it in strumpy so I can tweak it.. I don't have a clue how to edit text shaders
(ps- thanks for the offer I may still accept, but I'll keep trying with strumpy first)
As for intensity, you can probably do that with the luminosity of the light's colour... which you can get if you dot product the colour rgb against float3(0.22, 0.707, 0.071).
Then multiply the two together and feed it into your ramp texture lookup as UV coordinates.