@@ -144,6 +144,6 @@ void main () {
gl_FragColor = raymarch(startLoc, step, normalize(cameraPos));
if (length(gl_FragColor.rgb) < 0.00001) discard;
#if defined(dRenderMode_volume)
- gl_FragColor.a = uAlpha;
+ gl_FragColor.a *= uAlpha;
#endif
}
@@ -226,7 +226,6 @@ async function prepareGaussianDensityData(ctx: RuntimeContext, position: Positio
-
const pad = maxRadius * 2 + resolution
const expandedBox = Box3D.expand(Box3D.empty(), box, Vec3.create(pad, pad, pad));
const extent = Vec3.sub(Vec3.zero(), expandedBox.max, expandedBox.min)