Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/jsm/tsl/display/SSGINode.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ class SSGINode extends TempNode {

const sampleViewPosition = getViewPosition( sampleUV, sampleDepth( sampleUV ), this._cameraProjectionMatrixInverse ).toConst();
const pixelToSample = sampleViewPosition.sub( viewPosition ).normalize().toConst();
const linearThicknessMultiplier = this.useLinearThickness.equal( true ).select( sampleViewPosition.z.div( this._cameraFar ).clamp().mul( 100 ), float( 1 ) );
const linearThicknessMultiplier = this.useLinearThickness.equal( true ).select( sampleViewPosition.z.negate().div( this._cameraFar ).clamp().mul( 100 ), float( 1 ) );
const pixelToSampleBackface = normalize( sampleViewPosition.sub( linearThicknessMultiplier.mul( viewDir ).mul( THICKNESS ) ).sub( viewPosition ) );

let frontBackHorizon = vec2( dot( pixelToSample, viewDir ), dot( pixelToSampleBackface, viewDir ) );
Expand Down
2 changes: 1 addition & 1 deletion examples/webgpu_postprocessing_ssgi.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@
gui.add( giPass.backfaceLighting, 'value', 0, 1 ).name( 'backface lighting' );
gui.add( giPass.aoIntensity, 'value', 0, 4 ).name( 'AO intenstiy' );
gui.add( giPass.giIntensity, 'value', 0, 100 ).name( 'GI intenstiy' );
gui.add( giPass.useLinearThickness, 'value' ).name( 'use linear thickness' );
gui.add( giPass.useScreenSpaceSampling, 'value' ).name( 'screen-space sampling' );
gui.add( giPass, 'useTemporalFiltering' ).name( 'temporal filtering' );
//gui.add( giPass.useLinearThickness, 'value' ).name( 'use linear thickness' );

const params = {
output: 0
Expand Down
Loading