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

Node for getting texel size in shadergraph.

Discussion in 'Graphics Experimental Previews' started by RosieGarden, May 26, 2018.

  1. RosieGarden

    RosieGarden

    Joined:
    May 4, 2013
    Posts:
    33
    I noticed the current shader graph implementation has no way to get the size of a texture within a shader graph.

    So I went ahead and added it. PR is here:

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/1405

    One issue with it currently, is that it adds the texture_TexelSize variable to all texture input nodes, regardless of if it's actually used or not. Not sure how to get around that, or even if it's a problem at all.