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
At the moment, the engine by default creates a Depth layer, which is disabled. If this layer is added to a camera, and the layer is enabled, this triggers the rendering operation (render on webgl1, copying of depth buffer on webgl2) at the point the camera gets to render the Depth layer. After this point, the depth texture is accessible to following layers.
We should expose a simple API to manage this, perhaps
CameraComponent.renderDepth = true;
Perhaps some changes could be made to how the Depth layer is integrated into the camera. By default, the layer is automatically added to the default camera. And the user is responsible for adding it to other cameras (when rendering to texture). Perhaps the renderDepth API could automatically add / remove the layer for the camera as well.
It'd be also great to create an engine example showing how to use the rendered depth in some custom shader.
The text was updated successfully, but these errors were encountered:
At the moment, the engine by default creates a Depth layer, which is disabled. If this layer is added to a camera, and the layer is enabled, this triggers the rendering operation (render on webgl1, copying of depth buffer on webgl2) at the point the camera gets to render the Depth layer. After this point, the depth texture is accessible to following layers.
The way to enable the depth layer is this:
and to disable:
We should expose a simple API to manage this, perhaps
Perhaps some changes could be made to how the Depth layer is integrated into the camera. By default, the layer is automatically added to the default camera. And the user is responsible for adding it to other cameras (when rendering to texture). Perhaps the renderDepth API could automatically add / remove the layer for the camera as well.
It'd be also great to create an engine example showing how to use the rendered depth in some custom shader.
The text was updated successfully, but these errors were encountered: