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

fix ignoreLight for direct-volume with webgl1

parent 108279c1
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ Note that since we don't clearly distinguish between a public and private interf ...@@ -11,6 +11,7 @@ Note that since we don't clearly distinguish between a public and private interf
- Fix ``allowTransparentBackfaces`` for per-group transparency - Fix ``allowTransparentBackfaces`` for per-group transparency
- Fix ``FormatRegistry.isApplicable`` returning true for unregistered formats - Fix ``FormatRegistry.isApplicable`` returning true for unregistered formats
- Fix: handle building of ``GridLookup3D`` with zero cell size - Fix: handle building of ``GridLookup3D`` with zero cell size
- Fix ``ignoreLight`` for direct-volume rendering with webgl1
## [v3.7.0] - 2022-04-13 ## [v3.7.0] - 2022-04-13
......
...@@ -289,6 +289,9 @@ vec4 raymarch(vec3 startLoc, vec3 step, vec3 rayDir) { ...@@ -289,6 +289,9 @@ vec4 raymarch(vec3 startLoc, vec3 step, vec3 rayDir) {
material.rgb = mix(material.rgb, overpaint.rgb, overpaint.a); material.rgb = mix(material.rgb, overpaint.rgb, overpaint.a);
#endif #endif
#ifdef dIgnoreLight
gl_FragColor.rgb = material.rgb;
#else
if (material.a >= 0.01) { if (material.a >= 0.01) {
#ifdef dPackedGroup #ifdef dPackedGroup
// compute gradient by central differences // compute gradient by central differences
...@@ -303,6 +306,7 @@ vec4 raymarch(vec3 startLoc, vec3 step, vec3 rayDir) { ...@@ -303,6 +306,7 @@ vec4 raymarch(vec3 startLoc, vec3 step, vec3 rayDir) {
} else { } else {
gl_FragColor.rgb = material.rgb; gl_FragColor.rgb = material.rgb;
} }
#endif
gl_FragColor.a = material.a * uAlpha * uTransferScale; gl_FragColor.a = material.a * uAlpha * uTransferScale;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment