Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Accessing material properties in shader function

Discussion in 'Graphics Experimental Previews' started by jonny2027, Jun 11, 2019.

  1. jonny2027


    Jul 16, 2013

    I have been working on extending the LWRP to add the ability to grey out specific layers, everything seems to be working but I want to be able to modify the level of grayscale. I have added a property to the shader but when I am trying to use it I get an undeclared identifier .

    I am very new to shader programming so not sure if I am doing something wrong

    This is where I have declared the value (Does that comment mean anything that could be causing the problem)

    The shader pass includes SimpleLitGrayscalePass.HLSL

    This is where I am trying to use the blend value