Desperately trying to fix this point light bug on my grass!

I’m using this shader and when it collides with my pointlights it becomes extremely buggy and white-purple.

my shader code:

If anyone has an idea on how to fix this ill be eternally greatfull!

Blend OneMinusDstColor One

source color is multiplied by 1-Destination and added 1*Destination…

having trouble mentally seeing this but
(light * 1-grass) + grass?

OneMinusDstColor would turn green → magenta

It kinda looks like that can be part of the issue… but the instruction confuses me as to what it was trying to accomplish

1 Like

but do

hmmm interesting…
Do you have any idea what is causing them to glitch to white?

place saturate( ) around your output in fragment shader, see if it fixes it.

1 Like

Thanks but its still not working :frowning:

7573612--938014--upload_2021-10-15_1-34-2.jpg

7573612--938017--upload_2021-10-15_1-34-8.png

Are the normals for the mesh OK? How does it look for a Unity sphere - lit correctly?