From 32f0e6efac8b51dbdc11b390b64753227cbb6180 Mon Sep 17 00:00:00 2001 From: ImJezze Date: Wed, 13 Apr 2016 19:21:57 +0200 Subject: Removed hacks for vector screens from shaders (nw) - added handling of texture coordinates for vector screens to core render - added handling of orientation/rotation for vector screens to D3D renderer --- hlsl/post.fx | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'hlsl/post.fx') diff --git a/hlsl/post.fx b/hlsl/post.fx index c3966257c02..1ef59fcca39 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -175,27 +175,22 @@ float2 GetShadowCoord(float2 QuadCoord, float2 SourceCoord) float2 shadowUV = ShadowUV; float2 shadowCount = ShadowCount; - // swap x/y vector and raster in screen mode (not source mode) + // swap x/y in screen mode (not source mode) canvasCoord = ShadowTileMode == 0 && SwapXY ? canvasCoord.yx : canvasCoord.xy; - // swap x/y vector and raster in screen mode (not source mode) + // swap x/y in screen mode (not source mode) shadowCount = ShadowTileMode == 0 && SwapXY ? shadowCount.yx : shadowCount.xy; float2 shadowTile = canvasTexelDims * shadowCount; - // swap x/y vector in screen mode (not raster and not source mode) - shadowTile = VectorScreen && ShadowTileMode == 0 && SwapXY - ? shadowTile.yx - : shadowTile.xy; - float2 shadowFrac = frac(canvasCoord / shadowTile); - // swap x/y raster in screen mode (not vector and not source mode) - shadowFrac = !VectorScreen && ShadowTileMode == 0 && SwapXY + // swap x/y in screen mode (not source mode) + shadowFrac = ShadowTileMode == 0 && SwapXY ? shadowFrac.yx : shadowFrac.xy; @@ -215,12 +210,8 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 BaseColor = tex2D(DiffuseSampler, TexCoord); BaseColor.a = 1.0f; - // keep border - if (!PrepareBloom) - { - // clip border - clip(TexCoord < 0.0f || TexCoord > 1.0f ? -1 : 1); - } + // clip border + clip(TexCoord < 0.0f || TexCoord > 1.0f ? -1 : 1); // Mask Simulation (may not affect bloom) if (!PrepareBloom && ShadowAlpha > 0.0f) -- cgit v1.2.3-70-g09d2