Three.js: ShaderLib depthRGBA shader

Created on 2 Jul 2019  路  2Comments  路  Source: mrdoob/three.js

Description of the problem

I was trying to use depthRGBA from ShaderLib

It has typescript definition so autocomplete works but there is no implementation on javascript side.
See this line: https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib.d.ts#L21

This is not available on javascript file:
https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderLib.js

Is depthRGBA removed from implementation?

Three.js version
  • [ ] Dev
  • [x] r106
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [x] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Hardware Requirements (graphics card, VR Device, ...)

Most helpful comment

The depthRGBA shader was removed in #8573. The new pattern to use is:

material = new THREE.MeshDepthMaterial( {

    depthPacking: THREE.RGBADepthPacking

} );

See http://threejs.org/examples/webgl_materials_channels.html.

All 2 comments

The depthRGBA shader was removed in #8573. The new pattern to use is:

material = new THREE.MeshDepthMaterial( {

    depthPacking: THREE.RGBADepthPacking

} );

See http://threejs.org/examples/webgl_materials_channels.html.

@cihadturhan Thanks for pointing out the error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fuzihaofzh picture fuzihaofzh  路  3Comments

makc picture makc  路  3Comments

seep picture seep  路  3Comments

filharvey picture filharvey  路  3Comments

ghost picture ghost  路  3Comments