summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
authorGravatarGravatar Ryan Holtz <rholtz@batcountryentertainment.com>2011-08-28 09:10:53 +0000
committerGravatarGravatar Ryan Holtz <rholtz@batcountryentertainment.com>2011-08-28 09:10:53 +0000
commit4523bfa2d08b246da0fcbd4b4523aee7531b9170 (patch)
treef61ee8458b16ecb636bed88ceef5b53c8fca3fa3 /hlsl
parent1bf5ecd874d9404faa7988eaa1dba3924912431e (diff)
HLSL "Hurricain't Keep A Good Dev Down" Bugfix Extravaganza: [Ryan Holtz, Bat
Country Entertainment] - Created two flags, -hlsl_ini_write and -hlsl_ini_read. The former enables custom HLSL INI writing explicitly, the other enables loading of the same. - Fixed disappearing aperture effect when using custom INI files. - Fixed diagonal seam on some games, for serious real this time - Fixed phosphor simulation, now works as expected
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/phosphor.fx14
-rw-r--r--hlsl/prescale.fx4
2 files changed, 13 insertions, 5 deletions
diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx
index d1e4d4850db..40d97cbf3ee 100644
--- a/hlsl/phosphor.fx
+++ b/hlsl/phosphor.fx
@@ -64,6 +64,14 @@ uniform float TargetHeight;
uniform float RawWidth;
uniform float RawHeight;
+uniform float WidthRatio;
+uniform float HeightRatio;
+
+uniform float TextureWidth;
+uniform float TextureHeight;
+
+uniform float Passthrough;
+
VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
@@ -77,8 +85,8 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
Output.Color = Input.Color;
- float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
- Output.TexCoord = Input.TexCoord + 0.5f * InvTexSize;
+ float2 InvTexSize = float2(1.0f / TextureWidth, 1.0f / TextureHeight);
+ Output.TexCoord = Input.TexCoord + float2(0.5f, 0.5f) * InvTexSize;
Output.PrevCoord = Output.TexCoord;
return Output;
@@ -99,7 +107,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float GreenMax = max(CurrPix.g, PrevPix.g);
float BlueMax = max(CurrPix.b, PrevPix.b);
- return float4(RedMax, GreenMax, BlueMax, CurrPix.a);
+ return lerp(float4(RedMax, GreenMax, BlueMax, CurrPix.a), CurrPix, Passthrough);
}
//-----------------------------------------------------------------------------
diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx
index 6b3dff8d058..10420af1b85 100644
--- a/hlsl/prescale.fx
+++ b/hlsl/prescale.fx
@@ -58,8 +58,8 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.x -= 0.5f;
Output.Position.y -= 0.5f;
Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
-
- Output.TexCoord = Input.TexCoord;
+
+ Output.TexCoord = Input.TexCoord + 0.5f / float2(TargetWidth, TargetHeight);
return Output;
}