Skip to content

Commit 9f3ff3c

Browse files
authored
Update SSGINode.js
Add port comment.
1 parent 4e1e0d1 commit 9f3ff3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/jsm/tsl/display/SSGINode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ class SSGINode extends TempNode {
499499

500500
let frontBackHorizon = vec2( dot( pixelToSample, viewDir ), dot( pixelToSampleBackface, viewDir ) );
501501
frontBackHorizon = GTAOFastAcos( clamp( frontBackHorizon, - 1, 1 ) );
502-
frontBackHorizon = clamp( div( mul( samplingDirection, frontBackHorizon.negate() ).sub( n.sub( HALF_PI ) ), PI ) );
502+
frontBackHorizon = clamp( div( mul( samplingDirection, frontBackHorizon.negate() ).sub( n.sub( HALF_PI ) ), PI ) ); // Port note: subtract half pi instead of adding it
503503
frontBackHorizon = directionIsRight.equal( true ).select( frontBackHorizon.yx, frontBackHorizon.xy ); // Front/Back get inverted depending on angle
504504

505505
const result = computeOccludedBitfield( frontBackHorizon.x, frontBackHorizon.y, occludedBitfield );

0 commit comments

Comments
 (0)