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

volume render tweaks

parent c5f08ace
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ export async function StructureView(app: App, viewer: Viewer, models: ReadonlyAr
const active: { [k: string]: boolean } = {
cartoon: true,
point: false,
surface: false,
surface: true,
ballAndStick: false,
carbohydrate: false,
spacefill: false,
......
......@@ -37,7 +37,7 @@ const BaseParams = {
...Geometry.Params,
isoValueAbsolute: RangeParam('Iso Value Absolute', '', 0.22, -1, 1, 0.01),
isoValueRelative: RangeParam('Iso Value Relative', '', 2, -10, 10, 0.1),
renderMode: SelectParam('Render Mode', '', 'volume', RenderModeOptions),
renderMode: SelectParam('Render Mode', '', 'isosurface', RenderModeOptions),
controlPoints: TextParam('Control Points', '', '0.19:0.1, 0.2:0.5, 0.21:0.1, 0.4:0.3'),
}
const DefaultBaseProps = paramDefaultValues(BaseParams)
......
......@@ -63,7 +63,7 @@ function DirectVolumeRenderable<T extends DirectVolumeBaseValues, S extends Dire
const renderItem = createRenderItem(ctx, 'triangles', shaderCode, fullSchema, fullValues)
const renderable = createRenderable(renderItem, values, state);
Object.defineProperty(renderable, 'opaque', { get: () => true });
Object.defineProperty(renderable, 'opaque', { get: () => false });
return renderable
}
......
......@@ -66,7 +66,7 @@ void main() {
float minDistance = decodeDistLog(1.0 - textureMinDist(fragPos).a);
// TODO verify `length(uBboxSize / uGridDim) * 2.0`
// on some machines `* 2.0` is needed while on others `* 0.5` works
if (dist > minDistance + length(uBboxSize / uGridDim) * 2.0)
if (dist > minDistance + length(uBboxSize / uGridDim) * 0.5)
discard;
gl_FragColor.rgb = encodeIdRGB(vGroup);
#endif
......
......@@ -33,7 +33,6 @@ export async function GaussianDensityGPU(ctx: RuntimeContext, position: Position
const transform = Mat4.identity()
Mat4.fromScaling(transform, scale)
Mat4.setTranslation(transform, bbox.min)
console.log(idField)
return { field, idField, transform }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment