aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlbavoil <[email protected]>2016-12-06 10:21:06 +0100
committerlbavoil <[email protected]>2016-12-06 10:21:06 +0100
commitb1dbe7bc02bdc422fabebe30d82cd4e625d6c3b2 (patch)
tree1eaf590726e6548095e37f1762c8b1a5c0df7d40 /src
parentRevert previous change in CoarseAO_PS. Add comments in RotateDirection. (diff)
downloadhbaoplus-b1dbe7bc02bdc422fabebe30d82cd4e625d6c3b2.tar.xz
hbaoplus-b1dbe7bc02bdc422fabebe30d82cd4e625d6c3b2.zip
Polish HLSL. No functional change.
Diffstat (limited to 'src')
-rw-r--r--src/shaders/src/CoarseAO_PS.hlsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shaders/src/CoarseAO_PS.hlsl b/src/shaders/src/CoarseAO_PS.hlsl
index 4854acb..b884f47 100644
--- a/src/shaders/src/CoarseAO_PS.hlsl
+++ b/src/shaders/src/CoarseAO_PS.hlsl
@@ -64,13 +64,13 @@ float3 FetchQuarterResViewPos(float2 UV)
}
//----------------------------------------------------------------------------------
-float2 RotateDirection(float2 Direction, float2 RotationCosSin)
+float2 RotateDirection(float2 V, float2 RotationCosSin)
{
- // Dir is the normalized 2D direction to be rotated
+ // V is the normalized 2D vector to be rotated
// RotationCosSin is (cos(alpha),sin(alpha)) where alpha is the rotation angle
// A 2D rotation matrix is applied (see https://en.wikipedia.org/wiki/Rotation_matrix)
- return float2(Direction.x*RotationCosSin.x - Direction.y*RotationCosSin.y,
- Direction.x*RotationCosSin.y + Direction.y*RotationCosSin.x);
+ return float2(V.x*RotationCosSin.x - V.y*RotationCosSin.y,
+ V.x*RotationCosSin.y + V.y*RotationCosSin.x);
}
//----------------------------------------------------------------------------------