summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/post.fx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-04-13 19:21:57 +0200
committer ImJezze <jezze@gmx.net>2016-04-13 19:21:57 +0200
commit32f0e6efac8b51dbdc11b390b64753227cbb6180 (patch)
treeaf19990b09f731d098ca93781b732e0724ebf7e9 /hlsl/post.fx
parent6be4d8312ccf4d9b5fde5fc2b5094e637fbdf7d7 (diff)
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
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r--hlsl/post.fx21
1 files changed, 6 insertions, 15 deletions
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)