diff options
author | 2013-05-19 16:21:26 +0000 | |
---|---|---|
committer | 2013-05-19 16:21:26 +0000 | |
commit | e028e20476411120097970a13098ce57ebe66ced (patch) | |
tree | d1f2ee37875ee7ab1df3ef7cd864766b1f02884f /hlsl/downsample.fx | |
parent | ec5c9bc680ab64ab57f2e89312e80c0aefa2036c (diff) |
- "And he did give them CRT bloom, and it scorched their eyes so; and they wept
openly, for there was nothing left to see with" [MooglyGuy]
* Enabled vector bloom and associated .ini controls
* Added raster bloom and associated .ini controls, each bloom "level" is the
linear weight of successively half-sized render targets
* Removed D3D8 mode
* Mass renaming in D3D renderer to use namespaces, initial planning step to
HAL-based renderer implementation on Windows (i.e., GL on Windows)
* Converted d3d_info, d3d_poly_info, and d3d_texture_info into classes
* Added batching of vectors for possible speed increase
* Minor cleanup of shader state setting
Diffstat (limited to 'hlsl/downsample.fx')
-rw-r--r-- | hlsl/downsample.fx | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/hlsl/downsample.fx b/hlsl/downsample.fx index 5e0de0ca46d..9a77d12d6ac 100644 --- a/hlsl/downsample.fx +++ b/hlsl/downsample.fx @@ -54,31 +54,27 @@ struct PS_INPUT uniform float2 TargetSize; uniform float2 SourceSize; -uniform float2 Defocus = float2(0.0f, 0.0f); - -uniform float Brighten; - VS_OUTPUT vs_main(VS_INPUT Input) { VS_OUTPUT Output = (VS_OUTPUT)0; Output.Position = float4(Input.Position.xyz, 1.0f); - Output.Position.xy /= TargetSize; + Output.Position.xy /= SourceSize; Output.Position.y = 1.0f - Output.Position.y; - Output.Position.xy -= float2(0.5f, 0.5f); - Output.Position.xy *= float2(2.0f, 2.0f); + Output.Position.xy -= 0.5f; + Output.Position.xy *= 2.0f; Output.Color = Input.Color; float2 inversePixel = 1.0f / TargetSize; - Output.TexCoord01.xy = Input.Position.xy * inversePixel + float2(0.75f - 0.5f, 0.32f - 0.5f) * inversePixel; - Output.TexCoord01.zw = Input.Position.xy * inversePixel + float2(0.35f - 0.5f, 0.65f - 0.5f) * inversePixel; - Output.TexCoord23.xy = Input.Position.xy * inversePixel + float2(0.31f - 0.5f, 1.25f - 0.5f) * inversePixel; - Output.TexCoord23.zw = Input.Position.xy * inversePixel + float2(0.58f - 0.5f, 1.61f - 0.5f) * inversePixel; - Output.TexCoord45.xy = Input.Position.xy * inversePixel + float2(1.00f - 0.5f, 1.75f - 0.5f) * inversePixel; - Output.TexCoord45.zw = Input.Position.xy * inversePixel + float2(1.35f - 0.5f, 1.64f - 0.5f) * inversePixel; - Output.TexCoord67.xy = Input.Position.xy * inversePixel + float2(1.65f - 0.5f, 1.32f - 0.5f) * inversePixel; - Output.TexCoord67.zw = Input.Position.xy * inversePixel + float2(1.72f - 0.5f, 0.93f - 0.5f) * inversePixel; - Output.TexCoord89.xy = Input.Position.xy * inversePixel + float2(1.57f - 0.5f, 0.57f - 0.5f) * inversePixel; - Output.TexCoord89.zw = Input.Position.xy * inversePixel + float2(1.25f - 0.5f, 0.33f - 0.5f) * inversePixel; + Output.TexCoord01.xy = Input.Position.xy * inversePixel + float2(0.00f + 0.5f, 0.00f + 0.5f) * inversePixel; + Output.TexCoord01.zw = Input.Position.xy * inversePixel + float2(0.50f + 0.5f, 0.00f + 0.5f) * inversePixel; + Output.TexCoord23.xy = Input.Position.xy * inversePixel + float2(0.25f + 0.5f, 0.25f + 0.5f) * inversePixel; + Output.TexCoord23.zw = Input.Position.xy * inversePixel + float2(0.50f + 0.5f, 0.25f + 0.5f) * inversePixel; + Output.TexCoord45.xy = Input.Position.xy * inversePixel + float2(0.75f + 0.5f, 0.25f + 0.5f) * inversePixel; + Output.TexCoord45.zw = Input.Position.xy * inversePixel + float2(0.00f + 0.5f, 0.50f + 0.5f) * inversePixel; + Output.TexCoord67.xy = Input.Position.xy * inversePixel + float2(0.50f + 0.5f, 0.50f + 0.5f) * inversePixel; + Output.TexCoord67.zw = Input.Position.xy * inversePixel + float2(0.00f + 0.5f, 0.75f + 0.5f) * inversePixel; + Output.TexCoord89.xy = Input.Position.xy * inversePixel + float2(0.25f + 0.5f, 0.75f + 0.5f) * inversePixel; + Output.TexCoord89.zw = Input.Position.xy * inversePixel + float2(0.75f + 0.5f, 0.75f + 0.5f) * inversePixel; return Output; } |