diff options
author | 2015-08-02 17:31:54 +0200 | |
---|---|---|
committer | 2015-08-02 17:31:54 +0200 | |
commit | 37f6ff0b653f840010a9b2dd18b5df9e6337aa2c (patch) | |
tree | c852c4b4fe4de4c4f46f858a4d8721ce0784c37a /hlsl/downsample.fx | |
parent | 4bcb0c13f50ddb1cd3fd0341b4bb31d9c3c7fc7a (diff) |
Refactoring and Fixes
- removed position offset in post.fx
- fixed texture offset caused by 0th level of bloom.fx
- fixed texture offset caused by focus.fx
- changed Passthrough parameter in phosphor.fx to boolean
- simplified defocus pass function and calling it twice
- removed CU_PHOSPHOR_IGNORE (Passthrough) uniform, which was only used
in phosphor pass function and is now directly set
- added CU_TARGET_DIMS (TargetDims) uniform based on the current render
target
- fixed missing Prescal parameter in downsample pass function
- some code cleanup
Diffstat (limited to 'hlsl/downsample.fx')
-rw-r--r-- | hlsl/downsample.fx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx index 18eaa8313c0..376e4b8802d 100644 --- a/hlsl/downsample.fx +++ b/hlsl/downsample.fx @@ -60,13 +60,14 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Position = float4(Input.Position.xyz, 1.0f); Output.Position.xy /= ScreenDims; - Output.Position.y = 1.0f - Output.Position.y; - Output.Position.xy -= 0.5f; - Output.Position.xy *= 2.0f; + Output.Position.y = 1.0f - Output.Position.y; // flip y + Output.Position.xy -= 0.5f; // center + Output.Position.xy *= 2.0f; // zoom Output.Color = Input.Color; float2 TexCoord = Input.Position.xy / ScreenDims; + Output.TexCoord01.xy = TexCoord + float2(-0.5f, -0.5f) * TargetTexelSize * Prescale; Output.TexCoord01.zw = TexCoord + float2( 0.5f, -0.5f) * TargetTexelSize * Prescale; Output.TexCoord23.xy = TexCoord + float2(-0.5f, 0.5f) * TargetTexelSize * Prescale; |