You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a texture node from a Rendertarget's texture and resizing it via .setSize, the texture size is not recognized by wgsl shaders when doing textureDimensions(...).
Reproduction steps
Create a texture node from a RenderTarget's texture
Create a wgsl shader that makes use of that texture node
Make the shader behave in different ways depending on the size of the texture. It's always the same even if the size of the RenderTarget changes.
Code
See fiddle
Live example
WebGPURenderer - The color of the sphere should change from white to pink every 500ms, but it stays the same
Screenshots
No response
Version
r170
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered:
The RenderTarget is not updated while it is not rendered, in normal situations this should not happen since the resized RenderTarget will need to be re-rendered after resized, otherwise it would return an empty texture.
Oh I see, thanks. My issue still shows up when I am trying to create a custom postprocessing node based on the code at: examples/jsm/tsl/display/SMAANode.js but using wgslFn instead.
When creating the node seems the input scene pass gets wrapped into a RTTNode, and when I use this node as a uniform for the shader that performs the operations, the correct texture size is only recognized at the first render.
Here's a minimal fiddle of what I'm experiencing: Custom postprocessing fiddle (overlay should go from red to yellow, but stays red)
I wonder if I'm missing something or if there's something not updating as expected internally.
Description
When creating a
texture
node from aRendertarget
's texture and resizing it via.setSize
, the texture size is not recognized by wgsl shaders when doingtextureDimensions(...)
.Reproduction steps
Code
See fiddle
Live example
Screenshots
No response
Version
r170
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: