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

volume render tweaks

parent 3a1befb5
Branches
Tags
No related merge requests found
...@@ -144,6 +144,6 @@ void main () { ...@@ -144,6 +144,6 @@ void main () {
gl_FragColor = raymarch(startLoc, step, normalize(cameraPos)); gl_FragColor = raymarch(startLoc, step, normalize(cameraPos));
if (length(gl_FragColor.rgb) < 0.00001) discard; if (length(gl_FragColor.rgb) < 0.00001) discard;
#if defined(dRenderMode_volume) #if defined(dRenderMode_volume)
gl_FragColor.a = uAlpha; gl_FragColor.a *= uAlpha;
#endif #endif
} }
\ No newline at end of file
...@@ -226,7 +226,6 @@ async function prepareGaussianDensityData(ctx: RuntimeContext, position: Positio ...@@ -226,7 +226,6 @@ async function prepareGaussianDensityData(ctx: RuntimeContext, position: Positio
} }
} }
const pad = maxRadius * 2 + resolution const pad = maxRadius * 2 + resolution
const expandedBox = Box3D.expand(Box3D.empty(), box, Vec3.create(pad, pad, pad)); const expandedBox = Box3D.expand(Box3D.empty(), box, Vec3.create(pad, pad, pad));
const extent = Vec3.sub(Vec3.zero(), expandedBox.max, expandedBox.min) const extent = Vec3.sub(Vec3.zero(), expandedBox.max, expandedBox.min)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment