Skip to content

Request function Render To Depth #13858

@osov

Description

@osov

You need a function similar to renderer.render, but with the ability to render it in depth.
Why is not standard use appropriate?

scene.overrideMaterial = overrideMaterial;
renderer.render (scene, camera, ...);
scene.overrideMaterial = null;

due to the fact that using this method for Skin mesh will be drawn a static position, i.e. without animation.

Why is not suitable use:
renderer.render (scene, camera, ...);
because of the fact that some objects have their own CustomDepthMaterial. And also due to the fact that too heavy shader can be, but in the depths it is not needed.

How did I do this? used something between renderer.render and WebGLShadowMap.renderObject, because in WebGLShadowMap.renderObject is implemented exactly as it should be done in WebGLRenderer.
I just do not want to make my edits to it after every update of the engine, so I ask you to do this, I think it will be useful to many, now it is not enough.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions