diff --git a/examples/jsm/tsl/display/hashBlur.js b/examples/jsm/tsl/display/hashBlur.js index 5851cca5a58b39..af636996eb06f6 100644 --- a/examples/jsm/tsl/display/hashBlur.js +++ b/examples/jsm/tsl/display/hashBlur.js @@ -1,4 +1,4 @@ -import { float, Fn, vec2, sin, rand, degrees, cos, Loop, vec4 } from 'three/tsl'; +import { float, Fn, vec2, uv, sin, rand, degrees, cos, Loop, vec4 } from 'three/tsl'; // https://www.shadertoy.com/view/4lXXWn @@ -6,11 +6,9 @@ export const hashBlur = /*#__PURE__*/ Fn( ( [ textureNode, bluramount = float( 0 const draw = ( uv ) => textureNode.uv( uv ); - const targetUV = textureNode.uvNode; + const targetUV = textureNode.uvNode || uv(); const blurred_image = vec4( 0. ).toVar(); - //const map = textureNode.value; - Loop( { start: 0., end: repeats, type: 'float' }, ( { i } ) => { const q = vec2( vec2( cos( degrees( i.div( repeats ).mul( 360. ) ) ), sin( degrees( i.div( repeats ).mul( 360. ) ) ) ).mul( rand( vec2( i, targetUV.x.add( targetUV.y ) ) ).add( bluramount ) ) ); diff --git a/examples/screenshots/webgpu_backdrop_area.jpg b/examples/screenshots/webgpu_backdrop_area.jpg index 49cf5892e5319c..74825f4de301ac 100644 Binary files a/examples/screenshots/webgpu_backdrop_area.jpg and b/examples/screenshots/webgpu_backdrop_area.jpg differ diff --git a/examples/webgpu_backdrop_area.html b/examples/webgpu_backdrop_area.html index 5f17d0ec4197b8..61c65e8e59cf8b 100644 --- a/examples/webgpu_backdrop_area.html +++ b/examples/webgpu_backdrop_area.html @@ -50,7 +50,7 @@ clock = new THREE.Clock(); - const ambient = new THREE.AmbientLight( 0xffffff, 2 ); + const ambient = new THREE.AmbientLight( 0xffffff, 2.5 ); scene.add( ambient ); // model