summaryrefslogtreecommitdiffstats
path: root/src/Runtime/res/effectlib/shadowMappingFragment.glsllib
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2017-12-07 10:56:06 +0100
committerTomi Korpipää <tomi.korpipaa@qt.io>2017-12-14 06:56:38 +0000
commitf28c93051d3bb9a800a4a3a04209aea5f16ab1a9 (patch)
tree9ca98aa63d57dea1adb6313f9a745a39caf1278d /src/Runtime/res/effectlib/shadowMappingFragment.glsllib
parent611f47ded9a119edb3a8bed39387958f5fc3a655 (diff)
Convert Tabs -> Spaces and Removed trailing whitespace from effectlib
This was done to make syncing the effectlib shaders in 3D Studio with the effectlib shaders in the 2.0 runtime where they had already been sanitized. This makes the diffing process easier, and will also bring things into line with the Qt coding standard. Change-Id: I0c45dcb7110cc31a24cce24d72b53e1d451b701b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Runtime/res/effectlib/shadowMappingFragment.glsllib')
-rw-r--r--src/Runtime/res/effectlib/shadowMappingFragment.glsllib12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Runtime/res/effectlib/shadowMappingFragment.glsllib b/src/Runtime/res/effectlib/shadowMappingFragment.glsllib
index 514d00e5..660d736a 100644
--- a/src/Runtime/res/effectlib/shadowMappingFragment.glsllib
+++ b/src/Runtime/res/effectlib/shadowMappingFragment.glsllib
@@ -1,10 +1,10 @@
#include "depthpass.glsllib"
float FragmentParaboloidDepth( vec4 inWorldPos, mat4 inMVP, vec2 inCameraProperties )
{
- if (inWorldPos.w < 0.0)
- discard;
- vec4 projVec = inMVP * vec4( inWorldPos.xyz, 1.0 );
- projVec /= projVec.w;
- projVec.z = depthValueToLinearDistance( 1.0 - projVec.z, inCameraProperties );
- return (projVec.z - inCameraProperties.x) / (inCameraProperties.y - inCameraProperties.x);
+ if (inWorldPos.w < 0.0)
+ discard;
+ vec4 projVec = inMVP * vec4( inWorldPos.xyz, 1.0 );
+ projVec /= projVec.w;
+ projVec.z = depthValueToLinearDistance( 1.0 - projVec.z, inCameraProperties );
+ return (projVec.z - inCameraProperties.x) / (inCameraProperties.y - inCameraProperties.x);
}