-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Closed
Description
Description
Resizing RenderTarget3D sets the isArrayTexture flag on its texture, and subsequent calls to textureSample on it cannot resolve overloaded functions. Manually setting isArrayTexture to false after resizing works around this issue.
Reproduction steps
- Resize a
RenderTarget3DusingsetSize(). - Build a new node to sample its texture with
texture3Dand avec3. - Open the developer console and see the error message:
no matching call to 'textureSample(texture_2d_array<f32>, sampler, vec3<f32>)'.
Code
material.fragmentNode = texture3D(renderTarget.texture).sample(vec3(0, 0, 0))
material.needsUpdate = true
void renderer.render(scene, camera)
// Resize the render target:
renderTarget.setSize(11, 11, 11)
material.fragmentNode = texture3D(renderTarget.texture).sample(vec3(0, 0, 0))
material.needsUpdate = true
void renderer.render(scene, camera)See also the fiddle below.
Live example
https://jsfiddle.net/shotamatsuda/fpvz0Lbm/
Screenshots
No response
Version
r179
Device
Desktop
Browser
Chrome
OS
Windows, MacOS