Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

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

Discussion in 'General Graphics' started by Introfernal, Oct 14, 2021.

  1. Introfernal

    Introfernal

    Joined:
    Dec 5, 2017
    Posts:
    5
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    235
    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
     
    Introfernal likes this.
  3. Introfernal

    Introfernal

    Joined:
    Dec 5, 2017
    Posts:
    5
    but do

    hmmm interesting..
    Do you have any idea what is causing them to glitch to white?
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    28,389
    place saturate( ) around your output in fragment shader, see if it fixes it.
     
    Introfernal likes this.
  5. Introfernal

    Introfernal

    Joined:
    Dec 5, 2017
    Posts:
    5
    Thanks but its still not working :(

    upload_2021-10-15_1-34-2.png


    upload_2021-10-15_1-34-8.png
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    28,389
    Are the normals for the mesh OK? How does it look for a Unity sphere - lit correctly?
     
unityunity