Description
Description
Based on my current understanding of how PointsNodeMaterial works, even though the user will still have to convert their Points object to a Sprite, it should somewhat work as a drop-in solution for the old PointsMaterial. Therefore, one might expect, with all other properties of the scene being equal, that this WebGL code...
// Used in WebGL (Standard Points) and WebGPU (Standard Points)
const pointGeo = new THREE.BufferGeometry();
const positions = new Float32Array( [ 1, 1, 1 ] );
pointGeo.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
const pointMaterial = new THREE.PointsMaterial( { size: 10.0 } );
const mesh = new THREE.Points( pointGeo, pointMaterial );
scene.add( mesh );
...would produce the same result asthis WebGPU code.
// Used in WebGPU (Pass PointsNodeMaterial to Sprite)
const pointMaterial = new THREE.PointsNodeMaterial( { positionNode: vec3( 1, 1, 1 ), sizeNode: 10.0 } );
const mesh = new THREE.Sprite( pointMaterial );
scene.add( mesh );
However, the sizes between the two versions are not the same. Is this an error in the output of the current version of PointsNodeMaterial or actually a misunderstanding of how PointsNodeMaterial is supposed to work?
// WebGL Version
// WebGPU Version
Reproduction steps
- Create two examples, derived from webgpu_water.html, one which uses the WebGLRenderer, and the other which uses the WebGPURenderer.
- Remove all code except the basic rendering/resizing code except for the scene's background.
- Apply the code seen above to the scene corresponding to that code's relevant renderer.
Code
//NA
Live example
WebGL Example (Standard Points)
WebGPU Example (Standard Points)
WebGPU Example (Pass PointsNodeMaterial to Sprite)
Screenshots
No response
Version
r178
Device
Desktop
Browser
Chrome
OS
Windows