summaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/CAPI/Shaders/Distortion_vs.vsh
blob: 90a4aaade868ca719f6d2fdc65eefe9062be84e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
float2   EyeToSourceUVScale;
float2   EyeToSourceUVOffset;

void main(in float2 Position    : POSITION,
          in float4 Color       : COLOR0,
          in float2 TexCoord0   : TEXCOORD0,
          out float4 oPosition  : SV_Position,
          out float1 oColor     : COLOR,
          out float2 oTexCoord0 : TEXCOORD0)
{
    oPosition.x = Position.x;
    oPosition.y = Position.y;
    oPosition.z = 0.5;
    oPosition.w = 1.0;   
    oTexCoord0  = EyeToSourceUVScale * TexCoord0 + EyeToSourceUVOffset;
    oColor      = Color.r;      // Used for vignette fade.
}