Search Unity

why do we need "TEXCOORD0"????after "float2 uv"

Discussion in 'Scripting' started by JohnSonLi, Jan 8, 2013.

  1. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    what is the differncd between "struct v2f { and "struct v2f{ why do we need SV_POSITION and TEXCOORD0 stuff?
    float4 pos : SV_POSITION; float4 pos;
    float2 uv : TEXCOORD0; float2 uv;
    };" }"
     
  2. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    sorry something wrong with the margin.
    what is the difference between "float4 pos:SV_POSITION"and "float4 pos;"why do we need SV_POSITION and TEXCOORD0 stuff?
     
  3. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    This should really be in the Shader section. It defines the semantic for that parameter. It basically tells the shader where the data is coming from in the application.