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 ...@@ -70,7 +70,7 @@ export async function StructureView(app: App, viewer: Viewer, models: ReadonlyAr
const active: { [k: string]: boolean } = { const active: { [k: string]: boolean } = {
cartoon: true, cartoon: true,
point: false, point: false,
surface: false, surface: true,
ballAndStick: false, ballAndStick: false,
carbohydrate: false, carbohydrate: false,
spacefill: false, spacefill: false,
......
...@@ -37,7 +37,7 @@ const BaseParams = { ...@@ -37,7 +37,7 @@ const BaseParams = {
...Geometry.Params, ...Geometry.Params,
isoValueAbsolute: RangeParam('Iso Value Absolute', '', 0.22, -1, 1, 0.01), isoValueAbsolute: RangeParam('Iso Value Absolute', '', 0.22, -1, 1, 0.01),
isoValueRelative: RangeParam('Iso Value Relative', '', 2, -10, 10, 0.1), 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'), controlPoints: TextParam('Control Points', '', '0.19:0.1, 0.2:0.5, 0.21:0.1, 0.4:0.3'),
} }
const DefaultBaseProps = paramDefaultValues(BaseParams) const DefaultBaseProps = paramDefaultValues(BaseParams)
......
...@@ -63,7 +63,7 @@ function DirectVolumeRenderable<T extends DirectVolumeBaseValues, S extends Dire ...@@ -63,7 +63,7 @@ function DirectVolumeRenderable<T extends DirectVolumeBaseValues, S extends Dire
const renderItem = createRenderItem(ctx, 'triangles', shaderCode, fullSchema, fullValues) const renderItem = createRenderItem(ctx, 'triangles', shaderCode, fullSchema, fullValues)
const renderable = createRenderable(renderItem, values, state); const renderable = createRenderable(renderItem, values, state);
Object.defineProperty(renderable, 'opaque', { get: () => true }); Object.defineProperty(renderable, 'opaque', { get: () => false });
return renderable return renderable
} }
......
...@@ -66,7 +66,7 @@ void main() { ...@@ -66,7 +66,7 @@ void main() {
float minDistance = decodeDistLog(1.0 - textureMinDist(fragPos).a); float minDistance = decodeDistLog(1.0 - textureMinDist(fragPos).a);
// TODO verify `length(uBboxSize / uGridDim) * 2.0` // TODO verify `length(uBboxSize / uGridDim) * 2.0`
// on some machines `* 2.0` is needed while on others `* 0.5` works // 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; discard;
gl_FragColor.rgb = encodeIdRGB(vGroup); gl_FragColor.rgb = encodeIdRGB(vGroup);
#endif #endif
......
...@@ -33,7 +33,6 @@ export async function GaussianDensityGPU(ctx: RuntimeContext, position: Position ...@@ -33,7 +33,6 @@ export async function GaussianDensityGPU(ctx: RuntimeContext, position: Position
const transform = Mat4.identity() const transform = Mat4.identity()
Mat4.fromScaling(transform, scale) Mat4.fromScaling(transform, scale)
Mat4.setTranslation(transform, bbox.min) Mat4.setTranslation(transform, bbox.min)
console.log(idField)
return { field, idField, transform } 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