Search Unity

Resolved Projective Texturing and Matrix4x4 Property

Discussion in 'Shader Graph' started by insominx, Dec 20, 2019.

  1. insominx

    insominx

    Joined:
    Jan 23, 2012
    Posts:
    32
    First I'm trying to do projective texture but in order to do so I need to feed the shadergraph a Matrix4x4 property from C#. I've tried to set it the typical way using:
    Code (CSharp):
    1. myMaterial.SetMatrix("_specialViewProjection", someOtherCamera.worldToCameraMatrix)
    However, this doesn't seem to work because it has no reference value in the blackboard.

    upload_2019-12-19_16-30-27.png

    Am I missing something?
     
  2. insominx

    insominx

    Joined:
    Jan 23, 2012
    Posts:
    32
    For anyone else encountering this problem, you can get the reference value by right clicking on your master node and selecting "Show Generated Code".
     
    adamgffrd likes this.