Light2D.hlsl 478 B

12345678910111213141516171819202122
  1. #include "Uniforms.hlsl"
  2. #include "Samplers.hlsl"
  3. #include "Transform.hlsl"
  4. void VS(float4 iPos : POSITION,
  5. float2 iTexCoord : TEXCOORD0,
  6. float4 iColor : COLOR0,
  7. out float4 oColor : COLOR0,
  8. out float4 oPos : OUTPOSITION
  9. )
  10. {
  11. float4x3 modelMatrix = iModelMatrix;
  12. float3 worldPos = GetWorldPos(modelMatrix);
  13. oPos = GetClipPos(worldPos);
  14. oColor = iColor * iTexCoord.x;
  15. }
  16. void PS(float4 iColor : COLOR0, out float4 oColor : OUTCOLOR0)
  17. {
  18. oColor = iColor;
  19. }