diff options
author | ImJezze <jezze@gmx.net> | 2016-03-12 16:03:28 +0100 |
---|---|---|
committer | ImJezze <jezze@gmx.net> | 2016-03-12 16:03:28 +0100 |
commit | 7add54760210313651c8a53a9ff6676512ce3fc8 (patch) | |
tree | e4e58b88feac19928cbb40479c9b799caead065c /hlsl/primary.fx | |
parent | a026a582f1a0ea8c1ede3acaddacef506ef3f3b0 (diff) |
Refactoring of render targes and vector texture coordinates
- implemented proper texture coordinates for vector quad primitive
- vector screen is now processed in texture coordinates
- revered workaround for raster screen, which is again processed in
texture coordinates
- known issue: cocktail mode for vector screen looks wrong
Diffstat (limited to 'hlsl/primary.fx')
-rw-r--r-- | hlsl/primary.fx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hlsl/primary.fx b/hlsl/primary.fx index 2086132a0e7..9f5a3c62faf 100644 --- a/hlsl/primary.fx +++ b/hlsl/primary.fx @@ -67,8 +67,8 @@ VS_OUTPUT vs_screen_main(VS_INPUT Input) Output.Position.xy -= 0.5f; // center Output.Position.xy *= 2.0f; // zoom - Output.TexCoord = Input.Position.xy / ScreenDims; - Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9) + Output.TexCoord = Input.TexCoord; + // Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9) Output.Color = Input.Color; @@ -85,7 +85,7 @@ VS_OUTPUT vs_vector_buffer_main(VS_INPUT Input) Output.Position.xy -= 0.5f; // center Output.Position.xy *= 2.0f; // zoom - Output.TexCoord = Input.Position.xy / ScreenDims; + Output.TexCoord = Input.TexCoord; Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9) Output.Color = Input.Color; @@ -104,6 +104,7 @@ VS_OUTPUT vs_ui_main(VS_INPUT Input) Output.Position.xy *= 2.0f; // zoom Output.TexCoord = Input.TexCoord; + // Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9) Output.Color = Input.Color; @@ -124,7 +125,6 @@ float4 ps_screen_main(PS_INPUT Input) : COLOR float4 ps_vector_buffer_main(PS_INPUT Input) : COLOR { float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord); - BaseTexel *= Input.Color + float4(1.0f, 1.0f, 1.0f, 0.0f); return BaseTexel; } |