Skip to content
Snippets Groups Projects
Commit c83ce28b authored by Alexander Rose's avatar Alexander Rose
Browse files

no need for fragDepth in image shader

parent b9a3620a
No related branches found
No related tags found
No related merge requests found
...@@ -136,7 +136,7 @@ export const DirectVolumeShaderCode = ShaderCode('direct-volume', direct_volume_ ...@@ -136,7 +136,7 @@ export const DirectVolumeShaderCode = ShaderCode('direct-volume', direct_volume_
import image_vert from './shader/image.vert'; import image_vert from './shader/image.vert';
import image_frag from './shader/image.frag'; import image_frag from './shader/image.frag';
export const ImageShaderCode = ShaderCode('image', image_vert, image_frag, { fragDepth: true }); export const ImageShaderCode = ShaderCode('image', image_vert, image_frag);
// //
......
...@@ -111,11 +111,7 @@ void main() { ...@@ -111,11 +111,7 @@ void main() {
if (imageData.a < 0.05) if (imageData.a < 0.05)
discard; discard;
#ifdef enabledFragDepth gl_FragColor = packDepthToRGBA(gl_FragCoord.z);
gl_FragColor = packDepthToRGBA(gl_FragDepthEXT);
#else
gl_FragColor = packDepthToRGBA(gl_FragCoord.z);
#endif
#elif defined(dRenderVariant_color) #elif defined(dRenderVariant_color)
if (imageData.a < 0.05) if (imageData.a < 0.05)
discard; discard;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment