Просмотр исходного кода

Update SSGINode.js

Add port comment.
Michael Herzog 8 месяцев назад
Родитель
Сommit
9f3ff3cff8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/jsm/tsl/display/SSGINode.js

+ 1 - 1
examples/jsm/tsl/display/SSGINode.js

@@ -499,7 +499,7 @@ class SSGINode extends TempNode {
 
 				let frontBackHorizon = vec2( dot( pixelToSample, viewDir ), dot( pixelToSampleBackface, viewDir ) );
 				frontBackHorizon = GTAOFastAcos( clamp( frontBackHorizon, - 1, 1 ) );
-				frontBackHorizon = clamp( div( mul( samplingDirection, frontBackHorizon.negate() ).sub( n.sub( HALF_PI ) ), PI ) );
+				frontBackHorizon = clamp( div( mul( samplingDirection, frontBackHorizon.negate() ).sub( n.sub( HALF_PI ) ), PI ) ); // Port note: subtract half pi instead of adding it
 				frontBackHorizon = directionIsRight.equal( true ).select( frontBackHorizon.yx, frontBackHorizon.xy ); // Front/Back get inverted depending on angle
 
 				const result = computeOccludedBitfield( frontBackHorizon.x, frontBackHorizon.y, occludedBitfield );

粤ICP备19079148号