1cbuffer MatrixBuffer 2{ 3 matrix worldViewProj; 4}; 5 6struct VS_OUTPUT { 7 float4 Pos : SV_Position; 8 float2 texCoord : TEXCOORD0; 9}; 10 11struct VS_OUTPUT2 { 12 float4 Pos : SV_Position; 13 float2 texCoord : TEXCOORD0; 14 float2 texCoord2 : TEXCOORD1; 15}; 16 17struct VS_OUTPUT3 { 18 float4 Pos : SV_Position; 19 float2 texCoord : TEXCOORD0; 20 float2 texCoord2 : TEXCOORD1; 21 float2 texCoord3 : TEXCOORD2; 22}; 23 24struct VS_OUTPUT4 { 25 float4 Pos : SV_Position; 26 float2 texCoord : TEXCOORD0; 27 float2 texCoord2 : TEXCOORD1; 28 float2 texCoord3 : TEXCOORD2; 29 float2 texCoord4 : TEXCOORD3; 30}; 31 32VS_OUTPUT StdQuad_vp 33( 34 float4 inPos : POSITION 35) 36{ 37 VS_OUTPUT Out; 38 // Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc) 39 inPos.w = 1.0f; 40 Out.Pos = mul(worldViewProj, inPos); 41 42 // The input positions adjusted by texel offsets, so clean up inaccuracies 43 inPos.xy = sign(inPos.xy); 44 45 // Convert to image-space 46 Out.texCoord = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f; 47 48 return Out; 49} 50 51VS_OUTPUT2 StdQuad_Tex2_vp 52( 53 float4 inPos : POSITION 54) 55{ 56 VS_OUTPUT2 Out; 57 // Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc) 58 inPos.w = 1.0f; 59 Out.Pos = mul(worldViewProj, inPos); 60 61 // The input positions adjusted by texel offsets, so clean up inaccuracies 62 inPos.xy = sign(inPos.xy); 63 64 // Convert to image-space 65 Out.texCoord = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f; 66 Out.texCoord2 = Out.texCoord; 67 68 return Out; 69} 70 71VS_OUTPUT2 StdQuad_Tex2a_vp 72( 73 float4 inPos : POSITION 74) 75{ 76 VS_OUTPUT2 Out; 77 // Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc) 78 inPos.w = 1.0f; 79 Out.Pos = mul(worldViewProj, inPos); 80 81 // The input positions adjusted by texel offsets, so clean up inaccuracies 82 inPos.xy = sign(inPos.xy); 83 84 // Convert to image-space 85 Out.texCoord = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f; 86 Out.texCoord2 = inPos.xy; 87 88 return Out; 89} 90 91VS_OUTPUT3 StdQuad_Tex3_vp 92( 93 float4 inPos : POSITION 94) 95{ 96 VS_OUTPUT3 Out; 97 // Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc) 98 inPos.w = 1.0f; 99 Out.Pos = mul(worldViewProj, inPos); 100 101 // The input positions adjusted by texel offsets, so clean up inaccuracies 102 inPos.xy = sign(inPos.xy); 103 104 // Convert to image-space 105 Out.texCoord = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f; 106 Out.texCoord2 = Out.texCoord; 107 Out.texCoord3 = Out.texCoord; 108 109 return Out; 110} 111 112VS_OUTPUT4 StdQuad_Tex4_vp 113( 114 float4 inPos : POSITION 115) 116{ 117 VS_OUTPUT4 Out; 118 // Use standardise transform, so work accord with render system specific (RS depth, requires texture flipping, etc) 119 inPos.w = 1.0f; 120 Out.Pos = mul(worldViewProj, inPos); 121 122 // The input positions adjusted by texel offsets, so clean up inaccuracies 123 inPos.xy = sign(inPos.xy); 124 125 // Convert to image-space 126 Out.texCoord = (float2(inPos.x, -inPos.y) + 1.0f) * 0.5f; 127 Out.texCoord2 = Out.texCoord; 128 Out.texCoord3 = Out.texCoord; 129 Out.texCoord4 = Out.texCoord; 130 131 return Out; 132} 133