#Making an unlit object smoothly fade to black using Amplify Shader Editor's light attenuation node
1 messages · Page 1 of 1 (latest)
here's what I want the models to do, going from fully white to fully gray until they are completely black once covered by a shade
as stated I am using Amplify Shader Editor, and that's a hard requirement. I can probably follow instructions using equivalent Shader Graph nodes
the effect pictured in the OP comes from this node, and I was hoping to get an average of every vertex to get the expected level of gray based on the environment
You can't really do that in one draw. Individual pixels basically have no idea what's going on in other pixels.
Attenuation is usually the result of lighting calculation, so it's based on the fragment normal, light direct, shadows and such.
With custom light attenuation it could be kind of done with a flattened light ramp
But shadows are way trickier because they cannot be inferred from the distance to the light or other light data available at that stage
I see. I'm way out of my depth here, so thanks for the help
what would be the best way to achieve a similar effect then?
My solution would probably be to create a secondary red channel texture that's identical to the model's UV map and populate these lighting values, then on a secondary pass you'd evaluate the texture then color accordingly.