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

direct volume rendering tweaks and fixes

parent a53090b2
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,8 @@ export namespace DirectVolume { ...@@ -74,8 +74,8 @@ export namespace DirectVolume {
isoValue: PD.Numeric(0.22, { min: -1, max: 1, step: 0.01 }), isoValue: PD.Numeric(0.22, { min: -1, max: 1, step: 0.01 }),
renderMode: PD.Select('volume', RenderModeOptions), renderMode: PD.Select('volume', RenderModeOptions),
controlPoints: PD.LineGraph([ controlPoints: PD.LineGraph([
Vec2.create(0.19, 0.0), Vec2.create(0.2, 0.15), Vec2.create(0.21, 0.0), Vec2.create(0.19, 0.0), Vec2.create(0.2, 0.05), Vec2.create(0.25, 0.05), Vec2.create(0.26, 0.0),
Vec2.create(0.79, 0.0), Vec2.create(0.8, 0.15), Vec2.create(0.81, 0.0), Vec2.create(0.79, 0.0), Vec2.create(0.8, 0.05), Vec2.create(0.85, 0.05), Vec2.create(0.86, 0.0),
]), ]),
list: PD.ColorScale<ColorListName>('RedYellowBlue', ColorListOptions), list: PD.ColorScale<ColorListName>('RedYellowBlue', ColorListOptions),
} }
......
...@@ -91,7 +91,7 @@ const float gradOffset = 0.5; ...@@ -91,7 +91,7 @@ const float gradOffset = 0.5;
vec4 raymarch(vec3 startLoc, vec3 step, vec3 viewDir) { vec4 raymarch(vec3 startLoc, vec3 step, vec3 viewDir) {
vec3 scaleVol = vec3(1.0) / uGridDim; vec3 scaleVol = vec3(1.0) / uGridDim;
vec3 pos = startLoc + scaleVol * 0.5; vec3 pos = startLoc;
float prevValue = -1.0; float prevValue = -1.0;
float value = 0.0; float value = 0.0;
vec4 src = vec4(0.0); vec4 src = vec4(0.0);
......
...@@ -22,8 +22,10 @@ import { GaussianDensityProps, computeUnitGaussianDensityCached } from './unit/g ...@@ -22,8 +22,10 @@ import { GaussianDensityProps, computeUnitGaussianDensityCached } from './unit/g
import { RuntimeContext } from 'mol-task'; import { RuntimeContext } from 'mol-task';
import { WebGLContext } from 'mol-gl/webgl/context'; import { WebGLContext } from 'mol-gl/webgl/context';
// A building block of a structure that corresponds to an atomic or a coarse grained representation /**
// 'conveniently grouped together'. * A building block of a structure that corresponds to an atomic or
* a coarse grained representation 'conveniently grouped together'.
*/
type Unit = Unit.Atomic | Unit.Spheres | Unit.Gaussians type Unit = Unit.Atomic | Unit.Spheres | Unit.Gaussians
namespace Unit { namespace Unit {
...@@ -114,13 +116,15 @@ namespace Unit { ...@@ -114,13 +116,15 @@ namespace Unit {
return (i: number) => 0; return (i: number) => 0;
} }
// A bulding block of a structure that corresponds /**
// to a "natural group of atoms" (most often a "chain") * A bulding block of a structure that corresponds
// together with a tranformation (rotation and translation) * to a "natural group of atoms" (most often a "chain")
// that is dynamically applied to the underlying atom set. * together with a tranformation (rotation and translation)
// * that is dynamically applied to the underlying atom set.
// An atom set can be referenced by multiple diffrent units which *
// makes construction of assemblies and spacegroups very efficient. * An atom set can be referenced by multiple diffrent units which
* makes construction of assemblies and spacegroups very efficient.
*/
export class Atomic implements Base { export class Atomic implements Base {
readonly kind = Kind.Atomic; readonly kind = Kind.Atomic;
...@@ -130,7 +134,7 @@ namespace Unit { ...@@ -130,7 +134,7 @@ namespace Unit {
readonly model: Model; readonly model: Model;
readonly conformation: SymmetryOperator.ArrayMapping<ElementIndex>; readonly conformation: SymmetryOperator.ArrayMapping<ElementIndex>;
// Reference some commonly accessed things for faster access. /** Reference some commonly accessed things for faster access. */
readonly residueIndex: ArrayLike<ResidueIndex>; readonly residueIndex: ArrayLike<ResidueIndex>;
readonly chainIndex: ArrayLike<ChainIndex>; readonly chainIndex: ArrayLike<ChainIndex>;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment