summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/focus.fx
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-06-11 23:46:24 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-06-11 23:46:24 +0000
commit80d66bb1d6dee4f6e0d91ddf415d123b0aace1e2 (patch)
tree257920a2a6ab9e564982ab2e06b83d7f77ec976e /hlsl/focus.fx
parent5d2798215c21b68ac84dee11a6f6c7de53cc0ddc (diff)
HLSL Cleanup, no whatsnew:
- Fixed set_vector functionality and simplified shaders as a result - Fixed HLSL presets, 0 to 3, in increasing level of terribleness - Reduced options footprint from RGB triplets Next plan: Separate INI writing.
Diffstat (limited to 'hlsl/focus.fx')
-rw-r--r--hlsl/focus.fx20
1 files changed, 9 insertions, 11 deletions
diff --git a/hlsl/focus.fx b/hlsl/focus.fx
index c5e95baf6e8..de660af7d24 100644
--- a/hlsl/focus.fx
+++ b/hlsl/focus.fx
@@ -63,8 +63,7 @@ uniform float TargetHeight;
uniform float WidthRatio;
uniform float HeightRatio;
-uniform float DefocusX;
-uniform float DefocusY;
+uniform float2 Defocus = float2(0.0f, 0.0f);
uniform float FocusEnable;
float2 Coord0Offset = float2( 0.0f, 0.0f);
@@ -92,15 +91,14 @@ VS_OUTPUT vs_main(VS_INPUT Input)
float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
float2 TexCoord = Input.TexCoord;
TexCoord = TexCoord + 0.5f * InvTexSize;
- float2 DefocusVal = float2(DefocusX, DefocusY);
- Output.TexCoord0 = TexCoord + Coord0Offset * InvTexSize * DefocusVal;
- Output.TexCoord1 = TexCoord + Coord1Offset * InvTexSize * DefocusVal;
- Output.TexCoord2 = TexCoord + Coord2Offset * InvTexSize * DefocusVal;
- Output.TexCoord3 = TexCoord + Coord3Offset * InvTexSize * DefocusVal;
- Output.TexCoord4 = TexCoord + Coord4Offset * InvTexSize * DefocusVal;
- Output.TexCoord5 = TexCoord + Coord5Offset * InvTexSize * DefocusVal;
- Output.TexCoord6 = TexCoord + Coord6Offset * InvTexSize * DefocusVal;
- Output.TexCoord7 = TexCoord + Coord7Offset * InvTexSize * DefocusVal;
+ Output.TexCoord0 = TexCoord + Coord0Offset * InvTexSize * Defocus;
+ Output.TexCoord1 = TexCoord + Coord1Offset * InvTexSize * Defocus;
+ Output.TexCoord2 = TexCoord + Coord2Offset * InvTexSize * Defocus;
+ Output.TexCoord3 = TexCoord + Coord3Offset * InvTexSize * Defocus;
+ Output.TexCoord4 = TexCoord + Coord4Offset * InvTexSize * Defocus;
+ Output.TexCoord5 = TexCoord + Coord5Offset * InvTexSize * Defocus;
+ Output.TexCoord6 = TexCoord + Coord6Offset * InvTexSize * Defocus;
+ Output.TexCoord7 = TexCoord + Coord7Offset * InvTexSize * Defocus;
return Output;
}