diff options
author | 2011-05-27 23:24:53 +0000 | |
---|---|---|
committer | 2011-05-27 23:24:53 +0000 | |
commit | 3e437e09f04166aac3b9e6aa60ae4ea7865cccda (patch) | |
tree | 599dc89f1cbb94d706e15a3a72daf68b93139289 /hlsl/post.fx | |
parent | 6c3b5405709b314a0dc1ad616e2083eb3d5cae81 (diff) |
HLSL updates, nwn:
- Favor bilinear sampling on X and point sampling on Y. Best of both worlds.
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r-- | hlsl/post.fx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx index 9a22a7cdc9c..2128dc222e1 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -79,7 +79,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Color = Input.Color; Output.TexCoord = Input.TexCoord + 0.5f / float2(RawWidth, RawHeight); - //float Zoom = 1.0f; + //float Zoom = 32.0f; //Output.TexCoord /= Zoom; //Output.TexCoord += float2(0.175f * (1.0f - 1.0f / Zoom) / WidthRatio, 0.175f * (1.0f - 1.0f / Zoom) / HeightRatio); return Output; @@ -156,13 +156,14 @@ float4 ps_main(PS_INPUT Input) : COLOR // -- Scanline Simulation -- float InnerSine = BaseCoord.y * RawHeight * ScanlineScale + 0.5f; float3 ScanBrightness = lerp(1.0f, abs(sin(InnerSine * PI + ScanlineOffset * RawHeight)) * ScanlineBrightScale + 1.0f, ScanlineAmount); + //float3 Scanned = BaseTexel.rgb * ScanBrightness; float3 Scanned = BaseTexel.rgb * ScanBrightness; float2 ShadowDims = float2(ShadowWidth, ShadowHeight); float2 ShadowUV = float2(ShadowU, ShadowV); float2 ShadowMaskSize = float2(ShadowMaskSizeX, ShadowMaskSizeY); - float2 ShadowFrac = frac((ScreenCurveCoord * ShadowMaskSize * 0.5f) / Ratios); - float2 ShadowCoord = ShadowFrac * ShadowUV + 1.5f / ShadowDims; + float2 ShadowFrac = frac(BaseCoord * ShadowMaskSize * 0.5f); + float2 ShadowCoord = ShadowFrac * ShadowUV + float2(1.5f / ShadowWidth, 1.5f / ShadowHeight); float3 ShadowTexel = lerp(1.0f, tex2D(ShadowSampler, ShadowCoord), UseShadow); // -- Final Pixel -- |