-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Description
Description
My scene has a cube in it.
That cube's material.map is displaying a render target's texture.
A CubeCamera updates that texture every N frames.
// Add a cube to the scene
const box = new Mesh(new BoxGeometry(), new MeshStandardMaterial())
const rt = new WebGLCubeRenderTarget()
// Visualize the render target
box.map = rt.texture;
This is all in cube-camera-utils.js.
You can see the texture updating, but if you zoom around a bit, at a certain angle the texture displayed swaps to just be the plant texture -- which is not supplied to the box material in any way.
What exactly is happening here? It seems like when the object intersects the camera frustum's near plane it may cause this behavior.
Attached:
(1) The cube displaying the render from cube camera, as expected (6 faces and then mipmaps)
(2) The same cube after scrolling the mouse wheel to zoom when the image displayed switches.
r176, Chrome, Linux desktop
https://codesandbox.io/p/sandbox/pensive-moon-r8fm9c
Reproduction steps
Code
// code goes hereLive example
Screenshots
Version
0.176.0
Device
Desktop
Browser
Chrome
OS
Linux

