diff options
author | 2015-08-02 17:31:54 +0200 | |
---|---|---|
committer | 2015-08-02 17:31:54 +0200 | |
commit | 37f6ff0b653f840010a9b2dd18b5df9e6337aa2c (patch) | |
tree | c852c4b4fe4de4c4f46f858a4d8721ce0784c37a /hlsl/bloom.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/bloom.fx')
-rw-r--r-- | hlsl/bloom.fx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hlsl/bloom.fx b/hlsl/bloom.fx index 9ed97bbd936..e41a663b204 100644 --- a/hlsl/bloom.fx +++ b/hlsl/bloom.fx @@ -186,27 +186,27 @@ uniform float4 Level67Size; uniform float4 Level89Size; uniform float2 LevelASize; -uniform bool PrepareVector = false; - VS_OUTPUT vs_main(VS_INPUT Input) { VS_OUTPUT Output = (VS_OUTPUT)0; 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 = TexCoord.xyxy + Prescale.xyxy / Level01Size; + + Output.TexCoord01.xy = TexCoord.xy; + Output.TexCoord01.zw = TexCoord.xy + Prescale.xy / Level01Size.zw; Output.TexCoord23 = TexCoord.xyxy + Prescale.xyxy / Level23Size; Output.TexCoord45 = TexCoord.xyxy + Prescale.xyxy / Level45Size; Output.TexCoord67 = TexCoord.xyxy + Prescale.xyxy / Level67Size; Output.TexCoord89 = TexCoord.xyxy + Prescale.xyxy / Level89Size; - Output.TexCoordA = TexCoord.xy + Prescale.xy / LevelASize; + Output.TexCoordA = TexCoord.xy + Prescale.xy / LevelASize; return Output; } |