summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/color.fx
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2013-08-28 00:36:02 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2013-08-28 00:36:02 +0000
commita86d35158c890edd96950f980c2a8545ba35e2f9 (patch)
tree3919411d8ad5aab33af091445588bea1275e0fb0 /hlsl/color.fx
parent80fa5fade3d0e8a56588d2a02713cc7715ee3fc2 (diff)
minor shader cleanup, nw
Diffstat (limited to 'hlsl/color.fx')
-rw-r--r--hlsl/color.fx9
1 files changed, 3 insertions, 6 deletions
diff --git a/hlsl/color.fx b/hlsl/color.fx
index 95881d71c2c..728e88ab85f 100644
--- a/hlsl/color.fx
+++ b/hlsl/color.fx
@@ -44,8 +44,7 @@ struct PS_INPUT
// Post-Processing Vertex Shader
//-----------------------------------------------------------------------------
-uniform float TargetWidth;
-uniform float TargetHeight;
+uniform float2 ScreenDims;
uniform float2 RawDims;
@@ -57,11 +56,9 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float2 invDims = 1.0f / RawDims;
Output.Position = float4(Input.Position.xyz, 1.0f);
- Output.Position.x /= TargetWidth;
- Output.Position.y /= TargetHeight;
+ Output.Position.xy /= ScreenDims;
Output.Position.y = 1.0f - Output.Position.y;
- Output.Position.x -= 0.5f;
- Output.Position.y -= 0.5f;
+ Output.Position.xy -= 0.5f;
Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
Output.Color = Input.Color;
Output.TexCoord = Input.TexCoord + 0.5f * invDims;