Explorar el Código

Examples: add underwater transition `webgpu_backdrop_water` (#29377)

sunag hace 1 año
padre
commit
e595739f4d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      examples/webgpu_backdrop_water.html

+ 1 - 1
examples/webgpu_backdrop_water.html

@@ -221,7 +221,7 @@
 				const scenePassColor = scenePass.getTextureNode();
 				const scenePassDepth = scenePass.getLinearDepthNode().remapClamp( .3, .5 );
 
-				const waterMask = objectPosition( camera ).y.greaterThan( 0 );
+				const waterMask = objectPosition( camera ).y.greaterThan( screenUV.y.sub( .5 ).mul( camera.near ) );
 
 				const scenePassColorBlurred = gaussianBlur( scenePassColor );
 				scenePassColorBlurred.directionNode = waterMask.select( scenePassDepth, scenePass.getLinearDepthNode().mul( 5 ) );

粤ICP备19079148号