|
|
|
|
|
|
switch (m_ScreenSpaceType) |
|
|
|
{ |
|
|
|
case ScreenSpaceType.Raw: |
|
|
|
visitor.AddShaderChunk(string.Format("{0}4 {1} = In.{2};", precision, GetVariableNameForSlot(kOutputSlotId), |
|
|
|
visitor.AddShaderChunk(string.Format("{0}4 {1} = IN.{2};", precision, GetVariableNameForSlot(kOutputSlotId), |
|
|
|
string.Format("float4((In.{0}.xy / In.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4((IN.{0}.xy / IN.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4((In.{0}.xy / In.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4((IN.{0}.xy / IN.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4(In.{0}.x * _ScreenParams.x / _ScreenParams.y, In.{0}.y, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4(IN.{0}.x * _ScreenParams.x / _ScreenParams.y, IN.{0}.y, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4(In.{0}.xy / In.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
string.Format("float4(IN.{0}.xy / IN.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|