Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Accessing material properties in shader function

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

  1. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    61
    Hi,

    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