Browse Source

better direct volume frag depth

Aron Kovacs 4 years ago
parent
commit
4073055d8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-gl/shader/direct-volume.frag.ts

+ 1 - 1
src/mol-gl/shader/direct-volume.frag.ts

@@ -431,7 +431,7 @@ void main () {
     #endif
 
     #if defined(dRenderVariant_color)
-        float absFragDepth = abs(calcDepth((uView * vec4(vBoundingSphere.xyz, 1.0)).xyz));
+        float absFragDepth = abs(calcDepth((uView * vec4(uCameraPosition + (d * rayDir), 1.0)).xyz));
         #include wboit_write
     #endif
 }