Skip to content

Commit

Permalink
Examples: Add background to webgpu_pmrem_scene (#30116)
Browse files Browse the repository at this point in the history
* Update WGSLNodeBuilder.js

Arrays are not currently taken into account by the wgslTypeLib. However, with the struct extension #29908, arrays will also become important as a type.

* enables the use of samplers in compute shaders

Since textureSampleLevel is usable in compute shaders, this small PR allows sampler to be used in compute shaders for this purpose

* Update webgpu_pmrem_scene.html

add background to environment reflection

* Update webgpu_pmrem_scene.html

* Update webgpu_pmrem_scene.html

* Update webgpu_pmrem_scene.html

* Update WGSLNodeBuilder.js

* Add files via upload
  • Loading branch information
Spiri0 authored Dec 13, 2024
1 parent fd6528b commit 724a8bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Binary file modified examples/screenshots/webgpu_pmrem_scene.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions examples/webgpu_pmrem_scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
controls.update();

//
const loader = new THREE.CubeTextureLoader().setPath( './textures/cube/Park3Med/' );

scene.background = new THREE.Color( 0x006699 );
scene.background = await loader.loadAsync( [ 'px.jpg', 'nx.jpg', 'py.jpg', 'ny.jpg', 'pz.jpg', 'nz.jpg' ] );

let model;

Expand Down Expand Up @@ -91,8 +92,6 @@

const sceneRT = new THREE.PMREMGenerator( renderer ).fromScene( scene );

scene.background = null;
scene.backgroundNode = null;

//

Expand Down

0 comments on commit 724a8bf

Please sign in to comment.