molstar 3.7.0 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +202 -202
- package/build/viewer/embedded.html +43 -43
- package/build/viewer/index.html +106 -106
- package/build/viewer/molstar.js +1 -1
- package/build/viewer/molstar.js.LICENSE.txt +0 -15
- package/lib/apps/docking-viewer/index.html +36 -36
- package/lib/apps/viewer/embedded.html +43 -43
- package/lib/apps/viewer/index.html +106 -106
- package/lib/cli/chem-comp-dict/create-ions.d.ts +2 -1
- package/lib/cli/chem-comp-dict/create-ions.js +3 -2
- package/lib/cli/cifschema/index.js +1 -1
- package/lib/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/cli/chem-comp-dict/create-ions.d.ts +2 -1
- package/lib/commonjs/cli/chem-comp-dict/create-ions.js +3 -2
- package/lib/commonjs/cli/cifschema/index.js +1 -1
- package/lib/commonjs/cli/cifschema/util/cif-dic.js +1 -0
- package/lib/commonjs/examples/proteopedia-wrapper/coloring.d.ts +20 -5
- package/lib/commonjs/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/commonjs/mol-canvas3d/canvas3d.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/canvas3d.js +4 -4
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/helper/camera-helper.js +7 -5
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/helper/handle-helper.js +7 -5
- package/lib/commonjs/mol-canvas3d/passes/draw.d.ts +4 -8
- package/lib/commonjs/mol-canvas3d/passes/draw.js +60 -103
- package/lib/commonjs/mol-canvas3d/passes/pick.d.ts +1 -1
- package/lib/commonjs/mol-canvas3d/passes/pick.js +1 -3
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/commonjs/mol-canvas3d/passes/postprocessing.js +17 -12
- package/lib/commonjs/mol-geo/geometry/color-data.d.ts +5 -2
- package/lib/commonjs/mol-geo/geometry/color-data.js +7 -17
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/commonjs/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/commonjs/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/commonjs/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/commonjs/mol-geo/geometry/transparency-data.d.ts +1 -1
- package/lib/commonjs/mol-geo/geometry/transparency-data.js +3 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/cylinders.js +1 -1
- package/lib/commonjs/mol-gl/renderable/mesh.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/mesh.js +1 -1
- package/lib/commonjs/mol-gl/renderable/schema.d.ts +2 -2
- package/lib/commonjs/mol-gl/renderable/schema.js +2 -2
- package/lib/commonjs/mol-gl/renderable/spheres.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/spheres.js +1 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.d.ts +1 -1
- package/lib/commonjs/mol-gl/renderable/texture-mesh.js +1 -1
- package/lib/commonjs/mol-gl/renderer.d.ts +5 -5
- package/lib/commonjs/mol-gl/renderer.js +64 -45
- package/lib/commonjs/mol-gl/scene.d.ts +2 -1
- package/lib/commonjs/mol-gl/scene.js +44 -11
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/image.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/outlines.frag.d.ts +3 -2
- package/lib/commonjs/mol-gl/shader/outlines.frag.js +3 -2
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/commonjs/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/commonjs/mol-gl/shader/ssao.frag.d.ts +2 -2
- package/lib/commonjs/mol-gl/shader/ssao.frag.js +2 -2
- package/lib/commonjs/mol-gl/webgl/program.js +10 -1
- package/lib/commonjs/mol-gl/webgl/render-target.d.ts +3 -1
- package/lib/commonjs/mol-gl/webgl/render-target.js +3 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.d.ts +2 -1
- package/lib/commonjs/mol-gl/webgl/renderbuffer.js +8 -1
- package/lib/commonjs/mol-gl/webgl/state.d.ts +7 -1
- package/lib/commonjs/mol-gl/webgl/state.js +28 -1
- package/lib/commonjs/mol-gl/webgl/texture.js +3 -0
- package/lib/commonjs/mol-gl/webgl/uniform.d.ts +1 -0
- package/lib/commonjs/mol-gl/webgl/uniform.js +5 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/cif-core.js +1 -1
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
- package/lib/commonjs/mol-io/reader/cif/schema/mmcif.js +2 -3
- package/lib/commonjs/mol-io/reader/dx/parser.js +1 -1
- package/lib/commonjs/mol-math/geometry/lookup3d/grid.d.ts +1 -1
- package/lib/commonjs/mol-math/geometry/lookup3d/grid.js +3 -3
- package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
- package/lib/commonjs/mol-model/structure/model/properties/seconday-structure.js +2 -1
- package/lib/commonjs/mol-model/structure/model/types/ions.d.ts +2 -2
- package/lib/commonjs/mol-model/structure/model/types/ions.js +2 -2
- package/lib/commonjs/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/commonjs/mol-model/structure/model/types.d.ts +1 -1
- package/lib/commonjs/mol-model/structure/model/types.js +43 -41
- package/lib/commonjs/mol-model-formats/structure/common/property.js +2 -0
- package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
- package/lib/commonjs/mol-model-formats/structure/property/secondary-structure.js +2 -2
- package/lib/commonjs/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/commonjs/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/commonjs/mol-repr/volume/slice.js +1 -1
- package/lib/commonjs/mol-script/language/builder.d.ts +0 -1
- package/lib/commonjs/mol-theme/color/volume-value.d.ts +3 -2
- package/lib/commonjs/mol-theme/color/volume-value.js +1 -3
- package/lib/commonjs/mol-theme/color.d.ts +47 -38
- package/lib/commonjs/mol-theme/theme.d.ts +8 -7
- package/lib/commonjs/mol-theme/theme.js +1 -1
- package/lib/examples/alpha-orbitals/index.html +61 -61
- package/lib/examples/basic-wrapper/index.html +137 -137
- package/lib/examples/lighting/index.html +88 -88
- package/lib/examples/proteopedia-wrapper/coloring.d.ts +20 -5
- package/lib/examples/proteopedia-wrapper/index.html +236 -236
- package/lib/extensions/rcsb/graphql/types.d.ts +284 -0
- package/lib/mol-canvas3d/canvas3d.d.ts +1 -1
- package/lib/mol-canvas3d/canvas3d.js +4 -4
- package/lib/mol-canvas3d/helper/camera-helper.d.ts +1 -1
- package/lib/mol-canvas3d/helper/camera-helper.js +8 -6
- package/lib/mol-canvas3d/helper/handle-helper.d.ts +1 -1
- package/lib/mol-canvas3d/helper/handle-helper.js +8 -6
- package/lib/mol-canvas3d/passes/draw.d.ts +4 -8
- package/lib/mol-canvas3d/passes/draw.js +57 -100
- package/lib/mol-canvas3d/passes/pick.d.ts +1 -1
- package/lib/mol-canvas3d/passes/pick.js +1 -3
- package/lib/mol-canvas3d/passes/postprocessing.d.ts +1 -0
- package/lib/mol-canvas3d/passes/postprocessing.js +17 -12
- package/lib/mol-geo/geometry/color-data.d.ts +5 -2
- package/lib/mol-geo/geometry/color-data.js +7 -17
- package/lib/mol-geo/geometry/cylinders/cylinders.d.ts +1 -1
- package/lib/mol-geo/geometry/cylinders/cylinders.js +2 -2
- package/lib/mol-geo/geometry/lines/lines.d.ts +1 -0
- package/lib/mol-geo/geometry/mesh/mesh.js +2 -2
- package/lib/mol-geo/geometry/points/points.d.ts +1 -1
- package/lib/mol-geo/geometry/spheres/spheres.js +2 -2
- package/lib/mol-geo/geometry/texture-mesh/texture-mesh.js +2 -2
- package/lib/mol-geo/geometry/transparency-data.d.ts +1 -1
- package/lib/mol-geo/geometry/transparency-data.js +3 -1
- package/lib/mol-gl/renderable/cylinders.d.ts +1 -1
- package/lib/mol-gl/renderable/cylinders.js +1 -1
- package/lib/mol-gl/renderable/mesh.d.ts +1 -1
- package/lib/mol-gl/renderable/mesh.js +1 -1
- package/lib/mol-gl/renderable/schema.d.ts +2 -2
- package/lib/mol-gl/renderable/schema.js +2 -2
- package/lib/mol-gl/renderable/spheres.d.ts +1 -1
- package/lib/mol-gl/renderable/spheres.js +1 -1
- package/lib/mol-gl/renderable/texture-mesh.d.ts +1 -1
- package/lib/mol-gl/renderable/texture-mesh.js +1 -1
- package/lib/mol-gl/renderer.d.ts +5 -5
- package/lib/mol-gl/renderer.js +64 -45
- package/lib/mol-gl/scene.d.ts +2 -1
- package/lib/mol-gl/scene.js +44 -11
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/apply-interior-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/assign-material-color.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/check-picking-alpha.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common-frag-params.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/common.glsl.js +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.d.ts +1 -1
- package/lib/mol-gl/shader/chunks/wboit-write.glsl.js +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.d.ts +1 -1
- package/lib/mol-gl/shader/direct-volume.frag.js +1 -1
- package/lib/mol-gl/shader/image.frag.d.ts +1 -1
- package/lib/mol-gl/shader/image.frag.js +1 -1
- package/lib/mol-gl/shader/outlines.frag.d.ts +3 -2
- package/lib/mol-gl/shader/outlines.frag.js +3 -2
- package/lib/mol-gl/shader/postprocessing.frag.d.ts +1 -1
- package/lib/mol-gl/shader/postprocessing.frag.js +1 -1
- package/lib/mol-gl/shader/ssao.frag.d.ts +2 -2
- package/lib/mol-gl/shader/ssao.frag.js +2 -2
- package/lib/mol-gl/webgl/program.js +11 -2
- package/lib/mol-gl/webgl/render-target.d.ts +3 -1
- package/lib/mol-gl/webgl/render-target.js +3 -1
- package/lib/mol-gl/webgl/renderbuffer.d.ts +2 -1
- package/lib/mol-gl/webgl/renderbuffer.js +8 -1
- package/lib/mol-gl/webgl/state.d.ts +7 -1
- package/lib/mol-gl/webgl/state.js +28 -1
- package/lib/mol-gl/webgl/texture.js +3 -0
- package/lib/mol-gl/webgl/uniform.d.ts +1 -0
- package/lib/mol-gl/webgl/uniform.js +3 -0
- package/lib/mol-io/reader/cif/schema/bird.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/bird.js +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/ccd.js +1 -1
- package/lib/mol-io/reader/cif/schema/cif-core.d.ts +1 -1
- package/lib/mol-io/reader/cif/schema/cif-core.js +1 -1
- package/lib/mol-io/reader/cif/schema/mmcif.d.ts +3 -4
- package/lib/mol-io/reader/cif/schema/mmcif.js +2 -3
- package/lib/mol-io/reader/dx/parser.js +1 -1
- package/lib/mol-math/geometry/lookup3d/grid.d.ts +1 -1
- package/lib/mol-math/geometry/lookup3d/grid.js +3 -3
- package/lib/mol-model/structure/model/properties/seconday-structure.d.ts +4 -2
- package/lib/mol-model/structure/model/properties/seconday-structure.js +2 -1
- package/lib/mol-model/structure/model/types/ions.d.ts +2 -2
- package/lib/mol-model/structure/model/types/ions.js +2 -2
- package/lib/mol-model/structure/model/types/saccharides.js +1 -1
- package/lib/mol-model/structure/model/types.d.ts +1 -1
- package/lib/mol-model/structure/model/types.js +43 -41
- package/lib/mol-model-formats/structure/common/property.js +2 -0
- package/lib/mol-model-formats/structure/property/secondary-structure.d.ts +1 -1
- package/lib/mol-model-formats/structure/property/secondary-structure.js +2 -2
- package/lib/mol-plugin/behavior/dynamic/volume-streaming/model.d.ts +3 -2
- package/lib/mol-plugin/version.js +2 -2
- package/lib/mol-plugin-state/helpers/root-structure.js +3 -1
- package/lib/mol-plugin-ui/skin/base/base.scss +32 -32
- package/lib/mol-plugin-ui/skin/base/components/controls-base.scss +333 -333
- package/lib/mol-plugin-ui/skin/base/components/controls.scss +418 -418
- package/lib/mol-plugin-ui/skin/base/components/help.scss +27 -27
- package/lib/mol-plugin-ui/skin/base/components/line-graph.scss +67 -67
- package/lib/mol-plugin-ui/skin/base/components/log.scss +100 -100
- package/lib/mol-plugin-ui/skin/base/components/misc.scss +643 -643
- package/lib/mol-plugin-ui/skin/base/components/sequence.scss +125 -125
- package/lib/mol-plugin-ui/skin/base/components/slider.scss +165 -165
- package/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -99
- package/lib/mol-plugin-ui/skin/base/components/toast.scss +83 -83
- package/lib/mol-plugin-ui/skin/base/components/transformer.scss +163 -163
- package/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -128
- package/lib/mol-plugin-ui/skin/base/layout/common.scss +71 -71
- package/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +89 -89
- package/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +98 -98
- package/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +108 -108
- package/lib/mol-plugin-ui/skin/base/layout.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/logo.scss +12 -12
- package/lib/mol-plugin-ui/skin/base/normalize.scss +209 -209
- package/lib/mol-plugin-ui/skin/base/ui.scss +40 -40
- package/lib/mol-plugin-ui/skin/base/variables.scss +85 -85
- package/lib/mol-plugin-ui/skin/blue.scss +1 -1
- package/lib/mol-plugin-ui/skin/colors/blue.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/dark.scss +23 -23
- package/lib/mol-plugin-ui/skin/colors/light.scss +29 -29
- package/lib/mol-plugin-ui/skin/dark.scss +1 -1
- package/lib/mol-plugin-ui/skin/light.scss +1 -1
- package/lib/mol-repr/volume/slice.js +1 -1
- package/lib/mol-script/language/builder.d.ts +0 -1
- package/lib/mol-theme/color/volume-value.d.ts +3 -2
- package/lib/mol-theme/color/volume-value.js +2 -4
- package/lib/mol-theme/color.d.ts +47 -38
- package/lib/mol-theme/theme.d.ts +8 -7
- package/lib/mol-theme/theme.js +1 -1
- package/package.json +162 -162
|
@@ -4,30 +4,14 @@
|
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
* @author Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
|
|
6
6
|
*/
|
|
7
|
-
import { __assign } from "tslib";
|
|
8
7
|
import { createNullRenderTarget } from '../../mol-gl/webgl/render-target';
|
|
9
|
-
import { QuadSchema, QuadValues } from '../../mol-gl/compute/util';
|
|
10
|
-
import { DefineSpec, TextureSpec, UniformSpec } from '../../mol-gl/renderable/schema';
|
|
11
|
-
import { createComputeRenderable } from '../../mol-gl/renderable';
|
|
12
|
-
import { ShaderCode } from '../../mol-gl/shader-code';
|
|
13
|
-
import { createComputeRenderItem } from '../../mol-gl/webgl/render-item';
|
|
14
8
|
import { ValueCell } from '../../mol-util';
|
|
15
9
|
import { Vec2 } from '../../mol-math/linear-algebra';
|
|
16
|
-
import { quad_vert } from '../../mol-gl/shader/quad.vert';
|
|
17
|
-
import { depthMerge_frag } from '../../mol-gl/shader/depth-merge.frag';
|
|
18
10
|
import { StereoCamera } from '../camera/stereo';
|
|
19
11
|
import { WboitPass } from './wboit';
|
|
20
12
|
import { AntialiasingPass, PostprocessingPass } from './postprocessing';
|
|
21
13
|
import { MarkingPass } from './marking';
|
|
22
14
|
import { createCopyRenderable } from '../../mol-gl/compute/util';
|
|
23
|
-
var DepthMergeSchema = __assign(__assign({}, QuadSchema), { tDepthPrimitives: TextureSpec('texture', 'depth', 'ushort', 'nearest'), tDepthVolumes: TextureSpec('texture', 'depth', 'ushort', 'nearest'), uTexSize: UniformSpec('v2'), dPackedDepth: DefineSpec('boolean') });
|
|
24
|
-
var DepthMergeShaderCode = ShaderCode('depth-merge', quad_vert, depthMerge_frag);
|
|
25
|
-
function getDepthMergeRenderable(ctx, depthTexturePrimitives, depthTextureVolumes, packedDepth) {
|
|
26
|
-
var values = __assign(__assign({}, QuadValues), { tDepthPrimitives: ValueCell.create(depthTexturePrimitives), tDepthVolumes: ValueCell.create(depthTextureVolumes), uTexSize: ValueCell.create(Vec2.create(depthTexturePrimitives.getWidth(), depthTexturePrimitives.getHeight())), dPackedDepth: ValueCell.create(packedDepth) });
|
|
27
|
-
var schema = __assign({}, DepthMergeSchema);
|
|
28
|
-
var renderItem = createComputeRenderItem(ctx, 'triangles', DepthMergeShaderCode, schema, values);
|
|
29
|
-
return createComputeRenderable(renderItem, values);
|
|
30
|
-
}
|
|
31
15
|
var DrawPass = /** @class */ (function () {
|
|
32
16
|
function DrawPass(webgl, width, height, enableWboit) {
|
|
33
17
|
this.webgl = webgl;
|
|
@@ -35,17 +19,13 @@ var DrawPass = /** @class */ (function () {
|
|
|
35
19
|
this.drawTarget = createNullRenderTarget(webgl.gl);
|
|
36
20
|
this.colorTarget = webgl.createRenderTarget(width, height, true, 'uint8', 'linear');
|
|
37
21
|
this.packedDepth = !extensions.depthTexture;
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.depthTexturePrimitives = this.depthTargetPrimitives ? this.depthTargetPrimitives.texture : resources.texture('image-depth', 'depth', isWebGL2 ? 'float' : 'ushort', 'nearest');
|
|
43
|
-
this.depthTextureVolumes = this.depthTargetVolumes ? this.depthTargetVolumes.texture : resources.texture('image-depth', 'depth', isWebGL2 ? 'float' : 'ushort', 'nearest');
|
|
22
|
+
this.depthTargetTransparent = webgl.createRenderTarget(width, height);
|
|
23
|
+
this.depthTextureTransparent = this.depthTargetTransparent.texture;
|
|
24
|
+
this.depthTargetOpaque = this.packedDepth ? webgl.createRenderTarget(width, height) : null;
|
|
25
|
+
this.depthTextureOpaque = this.depthTargetOpaque ? this.depthTargetOpaque.texture : resources.texture('image-depth', 'depth', isWebGL2 ? 'float' : 'ushort', 'nearest');
|
|
44
26
|
if (!this.packedDepth) {
|
|
45
|
-
this.
|
|
46
|
-
this.depthTextureVolumes.define(width, height);
|
|
27
|
+
this.depthTextureOpaque.define(width, height);
|
|
47
28
|
}
|
|
48
|
-
this.depthMerge = getDepthMergeRenderable(webgl, this.depthTexturePrimitives, this.depthTextureVolumes, this.packedDepth);
|
|
49
29
|
this.wboit = enableWboit ? new WboitPass(webgl, width, height) : undefined;
|
|
50
30
|
this.marking = new MarkingPass(webgl, width, height);
|
|
51
31
|
this.postprocessing = new PostprocessingPass(webgl, this);
|
|
@@ -71,20 +51,13 @@ var DrawPass = /** @class */ (function () {
|
|
|
71
51
|
var h = this.colorTarget.getHeight();
|
|
72
52
|
if (width !== w || height !== h) {
|
|
73
53
|
this.colorTarget.setSize(width, height);
|
|
74
|
-
this.
|
|
75
|
-
if (this.
|
|
76
|
-
this.
|
|
54
|
+
this.depthTargetTransparent.setSize(width, height);
|
|
55
|
+
if (this.depthTargetOpaque) {
|
|
56
|
+
this.depthTargetOpaque.setSize(width, height);
|
|
77
57
|
}
|
|
78
58
|
else {
|
|
79
|
-
this.
|
|
59
|
+
this.depthTextureOpaque.define(width, height);
|
|
80
60
|
}
|
|
81
|
-
if (this.depthTargetVolumes) {
|
|
82
|
-
this.depthTargetVolumes.setSize(width, height);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
this.depthTextureVolumes.define(width, height);
|
|
86
|
-
}
|
|
87
|
-
ValueCell.update(this.depthMerge.values.uTexSize, Vec2.set(this.depthMerge.values.uTexSize.ref.value, width, height));
|
|
88
61
|
ValueCell.update(this.copyFboTarget.values.uTexSize, Vec2.set(this.copyFboTarget.values.uTexSize.ref.value, width, height));
|
|
89
62
|
ValueCell.update(this.copyFboPostprocessing.values.uTexSize, Vec2.set(this.copyFboPostprocessing.values.uTexSize.ref.value, width, height));
|
|
90
63
|
if ((_a = this.wboit) === null || _a === void 0 ? void 0 : _a.supported) {
|
|
@@ -95,18 +68,6 @@ var DrawPass = /** @class */ (function () {
|
|
|
95
68
|
this.antialiasing.setSize(width, height);
|
|
96
69
|
}
|
|
97
70
|
};
|
|
98
|
-
DrawPass.prototype._depthMerge = function () {
|
|
99
|
-
var _a = this.webgl, state = _a.state, gl = _a.gl;
|
|
100
|
-
this.depthMerge.update();
|
|
101
|
-
this.depthTarget.bind();
|
|
102
|
-
state.disable(gl.BLEND);
|
|
103
|
-
state.disable(gl.DEPTH_TEST);
|
|
104
|
-
state.disable(gl.CULL_FACE);
|
|
105
|
-
state.depthMask(false);
|
|
106
|
-
state.clearColor(1, 1, 1, 1);
|
|
107
|
-
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
108
|
-
this.depthMerge.render();
|
|
109
|
-
};
|
|
110
71
|
DrawPass.prototype._renderWboit = function (renderer, camera, scene, transparentBackground, postprocessingProps) {
|
|
111
72
|
var _a;
|
|
112
73
|
if (!((_a = this.wboit) === null || _a === void 0 ? void 0 : _a.supported))
|
|
@@ -114,43 +75,44 @@ var DrawPass = /** @class */ (function () {
|
|
|
114
75
|
this.colorTarget.bind();
|
|
115
76
|
renderer.clear(true);
|
|
116
77
|
// render opaque primitives
|
|
117
|
-
this.
|
|
78
|
+
this.depthTextureOpaque.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
|
|
118
79
|
this.colorTarget.bind();
|
|
119
80
|
renderer.clearDepth();
|
|
120
81
|
renderer.renderWboitOpaque(scene.primitives, camera, null);
|
|
121
|
-
// render opaque volumes
|
|
122
|
-
this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
|
|
123
|
-
this.colorTarget.bind();
|
|
124
|
-
renderer.clearDepth();
|
|
125
|
-
renderer.renderWboitOpaque(scene.volumes, camera, this.depthTexturePrimitives);
|
|
126
|
-
// merge depth of opaque primitives and volumes
|
|
127
|
-
this._depthMerge();
|
|
128
82
|
if (PostprocessingPass.isEnabled(postprocessingProps)) {
|
|
83
|
+
if (PostprocessingPass.isOutlineEnabled(postprocessingProps)) {
|
|
84
|
+
this.depthTargetTransparent.bind();
|
|
85
|
+
renderer.clearDepth(true);
|
|
86
|
+
if (scene.opacityAverage < 1) {
|
|
87
|
+
renderer.renderDepthTransparent(scene.primitives, camera, this.depthTextureOpaque);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
129
90
|
this.postprocessing.render(camera, false, transparentBackground, renderer.props.backgroundColor, postprocessingProps);
|
|
130
91
|
}
|
|
131
92
|
// render transparent primitives and volumes
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
93
|
+
if (scene.opacityAverage < 1 || scene.volumes.renderables.length > 0) {
|
|
94
|
+
this.wboit.bind();
|
|
95
|
+
renderer.renderWboitTransparent(scene.primitives, camera, this.depthTextureOpaque);
|
|
96
|
+
renderer.renderWboitTransparent(scene.volumes, camera, this.depthTextureOpaque);
|
|
97
|
+
// evaluate wboit
|
|
98
|
+
if (PostprocessingPass.isEnabled(postprocessingProps)) {
|
|
99
|
+
this.postprocessing.target.bind();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.colorTarget.bind();
|
|
103
|
+
}
|
|
104
|
+
this.wboit.render();
|
|
143
105
|
}
|
|
144
|
-
this.wboit.render();
|
|
145
106
|
};
|
|
146
107
|
DrawPass.prototype._renderBlended = function (renderer, camera, scene, toDrawingBuffer, transparentBackground, postprocessingProps) {
|
|
108
|
+
var _a, _b;
|
|
147
109
|
if (toDrawingBuffer) {
|
|
148
110
|
this.drawTarget.bind();
|
|
149
111
|
}
|
|
150
112
|
else {
|
|
151
113
|
this.colorTarget.bind();
|
|
152
114
|
if (!this.packedDepth) {
|
|
153
|
-
this.
|
|
115
|
+
this.depthTextureOpaque.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
|
|
154
116
|
}
|
|
155
117
|
}
|
|
156
118
|
renderer.clear(true);
|
|
@@ -158,39 +120,35 @@ var DrawPass = /** @class */ (function () {
|
|
|
158
120
|
if (!toDrawingBuffer) {
|
|
159
121
|
// do a depth pass if not rendering to drawing buffer and
|
|
160
122
|
// extensions.depthTexture is unsupported (i.e. depthTarget is set)
|
|
161
|
-
if (this.
|
|
162
|
-
this.
|
|
163
|
-
renderer.
|
|
164
|
-
|
|
165
|
-
renderer.renderDepth(scene.primitives, camera, null);
|
|
166
|
-
this.colorTarget.bind();
|
|
167
|
-
}
|
|
168
|
-
// do direct-volume rendering
|
|
169
|
-
if (!this.packedDepth) {
|
|
170
|
-
this.depthTextureVolumes.attachFramebuffer(this.colorTarget.framebuffer, 'depth');
|
|
171
|
-
renderer.clearDepth(); // from previous frame
|
|
172
|
-
}
|
|
173
|
-
renderer.renderBlendedVolumeOpaque(scene.volumes, camera, this.depthTexturePrimitives);
|
|
174
|
-
// do volume depth pass if extensions.depthTexture is unsupported (i.e. depthTarget is set)
|
|
175
|
-
if (this.depthTargetVolumes) {
|
|
176
|
-
this.depthTargetVolumes.bind();
|
|
177
|
-
renderer.clear(false);
|
|
178
|
-
renderer.renderDepth(scene.volumes, camera, this.depthTexturePrimitives);
|
|
123
|
+
if (this.depthTargetOpaque) {
|
|
124
|
+
this.depthTargetOpaque.bind();
|
|
125
|
+
renderer.clearDepth(true);
|
|
126
|
+
renderer.renderDepthOpaque(scene.primitives, camera, null);
|
|
179
127
|
this.colorTarget.bind();
|
|
180
128
|
}
|
|
181
|
-
// merge depths from primitive and volume rendering
|
|
182
|
-
this._depthMerge();
|
|
183
|
-
this.colorTarget.bind();
|
|
184
129
|
if (PostprocessingPass.isEnabled(postprocessingProps)) {
|
|
130
|
+
if (!this.packedDepth) {
|
|
131
|
+
this.depthTextureOpaque.detachFramebuffer(this.postprocessing.target.framebuffer, 'depth');
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
(_a = this.colorTarget.depthRenderbuffer) === null || _a === void 0 ? void 0 : _a.detachFramebuffer(this.postprocessing.target.framebuffer);
|
|
135
|
+
}
|
|
136
|
+
if (PostprocessingPass.isOutlineEnabled(postprocessingProps)) {
|
|
137
|
+
this.depthTargetTransparent.bind();
|
|
138
|
+
renderer.clearDepth(true);
|
|
139
|
+
if (scene.opacityAverage < 1) {
|
|
140
|
+
renderer.renderDepthTransparent(scene.primitives, camera, this.depthTextureOpaque);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
185
143
|
this.postprocessing.render(camera, false, transparentBackground, renderer.props.backgroundColor, postprocessingProps);
|
|
144
|
+
if (!this.packedDepth) {
|
|
145
|
+
this.depthTextureOpaque.attachFramebuffer(this.postprocessing.target.framebuffer, 'depth');
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
(_b = this.colorTarget.depthRenderbuffer) === null || _b === void 0 ? void 0 : _b.attachFramebuffer(this.postprocessing.target.framebuffer);
|
|
149
|
+
}
|
|
186
150
|
}
|
|
187
|
-
renderer.
|
|
188
|
-
var target = PostprocessingPass.isEnabled(postprocessingProps)
|
|
189
|
-
? this.postprocessing.target : this.colorTarget;
|
|
190
|
-
if (!this.packedDepth) {
|
|
191
|
-
this.depthTexturePrimitives.attachFramebuffer(target.framebuffer, 'depth');
|
|
192
|
-
}
|
|
193
|
-
target.bind();
|
|
151
|
+
renderer.renderBlendedVolume(scene.volumes, camera, this.depthTextureOpaque);
|
|
194
152
|
}
|
|
195
153
|
renderer.renderBlendedTransparent(scene.primitives, camera, null);
|
|
196
154
|
};
|
|
@@ -222,10 +180,9 @@ var DrawPass = /** @class */ (function () {
|
|
|
222
180
|
this.drawTarget.bind();
|
|
223
181
|
}
|
|
224
182
|
if (markingEnabled) {
|
|
225
|
-
|
|
226
|
-
if (markerAverage > 0) {
|
|
183
|
+
if (scene.markerAverage > 0) {
|
|
227
184
|
var markingDepthTest = props.marking.ghostEdgeStrength < 1;
|
|
228
|
-
if (markingDepthTest && markerAverage !== 1) {
|
|
185
|
+
if (markingDepthTest && scene.markerAverage !== 1) {
|
|
229
186
|
this.marking.depthTarget.bind();
|
|
230
187
|
renderer.clear(false, true);
|
|
231
188
|
renderer.renderMarkingDepth(scene.primitives, camera, null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -44,11 +44,9 @@ var PickPass = /** @class */ (function () {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
PickPass.prototype.renderVariant = function (renderer, camera, scene, helper, variant, pickType) {
|
|
47
|
-
var depth = this.drawPass.depthTexturePrimitives;
|
|
48
47
|
renderer.clear(false);
|
|
49
48
|
renderer.update(camera);
|
|
50
49
|
renderer.renderPick(scene.primitives, camera, variant, null, pickType);
|
|
51
|
-
renderer.renderPick(scene.volumes, camera, variant, depth, pickType);
|
|
52
50
|
renderer.renderPick(helper.handle.scene, camera, variant, null, pickType);
|
|
53
51
|
if (helper.camera.isEnabled) {
|
|
54
52
|
helper.camera.update(camera);
|
|
@@ -38,6 +38,7 @@ export declare class PostprocessingPass {
|
|
|
38
38
|
private webgl;
|
|
39
39
|
private drawPass;
|
|
40
40
|
static isEnabled(props: PostprocessingProps): boolean;
|
|
41
|
+
static isOutlineEnabled(props: PostprocessingProps): boolean;
|
|
41
42
|
readonly target: RenderTarget;
|
|
42
43
|
private readonly outlinesTarget;
|
|
43
44
|
private readonly outlinesRenderable;
|
|
@@ -21,9 +21,11 @@ import { postprocessing_frag } from '../../mol-gl/shader/postprocessing.frag';
|
|
|
21
21
|
import { Color } from '../../mol-util/color';
|
|
22
22
|
import { FxaaParams, FxaaPass } from './fxaa';
|
|
23
23
|
import { SmaaParams, SmaaPass } from './smaa';
|
|
24
|
-
var OutlinesSchema = __assign(__assign({}, QuadSchema), {
|
|
25
|
-
function getOutlinesRenderable(ctx,
|
|
26
|
-
var
|
|
24
|
+
var OutlinesSchema = __assign(__assign({}, QuadSchema), { tDepthOpaque: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tDepthTransparent: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: UniformSpec('v2'), dOrthographic: DefineSpec('number'), uNear: UniformSpec('f'), uFar: UniformSpec('f'), uMaxPossibleViewZDiff: UniformSpec('f') });
|
|
25
|
+
function getOutlinesRenderable(ctx, depthTextureOpaque, depthTextureTransparent) {
|
|
26
|
+
var width = depthTextureOpaque.getWidth();
|
|
27
|
+
var height = depthTextureOpaque.getHeight();
|
|
28
|
+
var values = __assign(__assign({}, QuadValues), { tDepthOpaque: ValueCell.create(depthTextureOpaque), tDepthTransparent: ValueCell.create(depthTextureTransparent), uTexSize: ValueCell.create(Vec2.create(width, height)), dOrthographic: ValueCell.create(0), uNear: ValueCell.create(1), uFar: ValueCell.create(10000), uMaxPossibleViewZDiff: ValueCell.create(0.5) });
|
|
27
29
|
var schema = __assign({}, OutlinesSchema);
|
|
28
30
|
var shaderCode = ShaderCode('outlines', quad_vert, outlines_frag);
|
|
29
31
|
var renderItem = createComputeRenderItem(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -65,9 +67,9 @@ function getSamples(vectorSamples, nSamples) {
|
|
|
65
67
|
}
|
|
66
68
|
return samples;
|
|
67
69
|
}
|
|
68
|
-
var PostprocessingSchema = __assign(__assign({}, QuadSchema), { tSsaoDepth: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tColor: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'),
|
|
69
|
-
function getPostprocessingRenderable(ctx, colorTexture,
|
|
70
|
-
var values = __assign(__assign({}, QuadValues), { tSsaoDepth: ValueCell.create(ssaoDepthTexture), tColor: ValueCell.create(colorTexture),
|
|
70
|
+
var PostprocessingSchema = __assign(__assign({}, QuadSchema), { tSsaoDepth: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tColor: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tDepthOpaque: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tDepthTransparent: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), tOutlines: TextureSpec('texture', 'rgba', 'ubyte', 'nearest'), uTexSize: UniformSpec('v2'), dOrthographic: DefineSpec('number'), uNear: UniformSpec('f'), uFar: UniformSpec('f'), uFogNear: UniformSpec('f'), uFogFar: UniformSpec('f'), uFogColor: UniformSpec('v3'), uOutlineColor: UniformSpec('v3'), uTransparentBackground: UniformSpec('b'), uMaxPossibleViewZDiff: UniformSpec('f'), dOcclusionEnable: DefineSpec('boolean'), uOcclusionOffset: UniformSpec('v2'), dOutlineEnable: DefineSpec('boolean'), dOutlineScale: DefineSpec('number'), uOutlineThreshold: UniformSpec('f') });
|
|
71
|
+
function getPostprocessingRenderable(ctx, colorTexture, depthTextureOpaque, depthTextureTransparent, outlinesTexture, ssaoDepthTexture) {
|
|
72
|
+
var values = __assign(__assign({}, QuadValues), { tSsaoDepth: ValueCell.create(ssaoDepthTexture), tColor: ValueCell.create(colorTexture), tDepthOpaque: ValueCell.create(depthTextureOpaque), tDepthTransparent: ValueCell.create(depthTextureTransparent), tOutlines: ValueCell.create(outlinesTexture), uTexSize: ValueCell.create(Vec2.create(colorTexture.getWidth(), colorTexture.getHeight())), dOrthographic: ValueCell.create(0), uNear: ValueCell.create(1), uFar: ValueCell.create(10000), uFogNear: ValueCell.create(10000), uFogFar: ValueCell.create(10000), uFogColor: ValueCell.create(Vec3.create(1, 1, 1)), uOutlineColor: ValueCell.create(Vec3.create(0, 0, 0)), uTransparentBackground: ValueCell.create(false), uMaxPossibleViewZDiff: ValueCell.create(0.5), dOcclusionEnable: ValueCell.create(true), uOcclusionOffset: ValueCell.create(Vec2.create(0, 0)), dOutlineEnable: ValueCell.create(false), dOutlineScale: ValueCell.create(1), uOutlineThreshold: ValueCell.create(0.33) });
|
|
71
73
|
var schema = __assign({}, PostprocessingSchema);
|
|
72
74
|
var shaderCode = ShaderCode('postprocessing', quad_vert, postprocessing_frag);
|
|
73
75
|
var renderItem = createComputeRenderItem(ctx, 'triangles', shaderCode, schema, values);
|
|
@@ -103,7 +105,7 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
103
105
|
this.webgl = webgl;
|
|
104
106
|
this.drawPass = drawPass;
|
|
105
107
|
this.occlusionOffset = [0, 0];
|
|
106
|
-
var colorTarget = drawPass.colorTarget,
|
|
108
|
+
var colorTarget = drawPass.colorTarget, depthTextureTransparent = drawPass.depthTextureTransparent, depthTextureOpaque = drawPass.depthTextureOpaque;
|
|
107
109
|
var width = colorTarget.getWidth();
|
|
108
110
|
var height = colorTarget.getHeight();
|
|
109
111
|
this.nSamples = 1;
|
|
@@ -113,7 +115,7 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
113
115
|
// needs to be linear for anti-aliasing pass
|
|
114
116
|
this.target = webgl.createRenderTarget(width, height, false, 'uint8', 'linear');
|
|
115
117
|
this.outlinesTarget = webgl.createRenderTarget(width, height, false);
|
|
116
|
-
this.outlinesRenderable = getOutlinesRenderable(webgl,
|
|
118
|
+
this.outlinesRenderable = getOutlinesRenderable(webgl, depthTextureOpaque, depthTextureTransparent);
|
|
117
119
|
this.randomHemisphereVector = [];
|
|
118
120
|
for (var i = 0; i < 256; i++) {
|
|
119
121
|
var v = Vec3();
|
|
@@ -130,7 +132,7 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
130
132
|
var sw = Math.floor(width * this.ssaoScale);
|
|
131
133
|
var sh = Math.floor(height * this.ssaoScale);
|
|
132
134
|
this.downsampledDepthTarget = webgl.createRenderTarget(sw, sh, false, 'uint8', 'linear');
|
|
133
|
-
this.downsampleDepthRenderable = createCopyRenderable(webgl,
|
|
135
|
+
this.downsampleDepthRenderable = createCopyRenderable(webgl, depthTextureOpaque);
|
|
134
136
|
this.ssaoDepthTexture = webgl.resources.texture('image-uint8', 'rgba', 'ubyte', 'linear');
|
|
135
137
|
this.ssaoDepthTexture.define(sw, sh);
|
|
136
138
|
this.ssaoDepthTexture.attachFramebuffer(this.ssaoFramebuffer, 'color0');
|
|
@@ -138,14 +140,17 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
138
140
|
this.ssaoDepthBlurProxyTexture.define(sw, sh);
|
|
139
141
|
this.ssaoDepthBlurProxyTexture.attachFramebuffer(this.ssaoBlurFirstPassFramebuffer, 'color0');
|
|
140
142
|
this.ssaoDepthTexture.attachFramebuffer(this.ssaoBlurSecondPassFramebuffer, 'color0');
|
|
141
|
-
this.ssaoRenderable = getSsaoRenderable(webgl, this.downsampleFactor === 1 ?
|
|
143
|
+
this.ssaoRenderable = getSsaoRenderable(webgl, this.downsampleFactor === 1 ? depthTextureOpaque : this.downsampledDepthTarget.texture);
|
|
142
144
|
this.ssaoBlurFirstPassRenderable = getSsaoBlurRenderable(webgl, this.ssaoDepthTexture, 'horizontal');
|
|
143
145
|
this.ssaoBlurSecondPassRenderable = getSsaoBlurRenderable(webgl, this.ssaoDepthBlurProxyTexture, 'vertical');
|
|
144
|
-
this.renderable = getPostprocessingRenderable(webgl, colorTarget.texture,
|
|
146
|
+
this.renderable = getPostprocessingRenderable(webgl, colorTarget.texture, depthTextureOpaque, depthTextureTransparent, this.outlinesTarget.texture, this.ssaoDepthTexture);
|
|
145
147
|
}
|
|
146
148
|
PostprocessingPass.isEnabled = function (props) {
|
|
147
149
|
return props.occlusion.name === 'on' || props.outline.name === 'on';
|
|
148
150
|
};
|
|
151
|
+
PostprocessingPass.isOutlineEnabled = function (props) {
|
|
152
|
+
return props.outline.name === 'on';
|
|
153
|
+
};
|
|
149
154
|
PostprocessingPass.prototype.calcSsaoScale = function () {
|
|
150
155
|
// downscale ssao for high pixel-ratios
|
|
151
156
|
return Math.min(1, 1 / this.webgl.pixelRatio) * this.downsampleFactor;
|
|
@@ -226,7 +231,7 @@ var PostprocessingPass = /** @class */ (function () {
|
|
|
226
231
|
this.ssaoDepthTexture.define(sw, sh);
|
|
227
232
|
this.ssaoDepthBlurProxyTexture.define(sw, sh);
|
|
228
233
|
if (this.ssaoScale === 1) {
|
|
229
|
-
ValueCell.update(this.ssaoRenderable.values.tDepth, this.drawPass.
|
|
234
|
+
ValueCell.update(this.ssaoRenderable.values.tDepth, this.drawPass.depthTextureTransparent);
|
|
230
235
|
}
|
|
231
236
|
else {
|
|
232
237
|
ValueCell.update(this.ssaoRenderable.values.tDepth, this.downsampledDepthTarget.texture);
|
|
@@ -11,7 +11,10 @@ import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
|
|
|
11
11
|
import { LocationIterator } from '../util/location-iterator';
|
|
12
12
|
import { ColorTheme, ColorVolume } from '../../mol-theme/color';
|
|
13
13
|
import { Texture } from '../../mol-gl/webgl/texture';
|
|
14
|
-
export declare type
|
|
14
|
+
export declare type ColorTypeLocation = 'uniform' | 'instance' | 'group' | 'groupInstance' | 'vertex' | 'vertexInstance';
|
|
15
|
+
export declare type ColorTypeGrid = 'volume' | 'volumeInstance';
|
|
16
|
+
export declare type ColorTypeDirect = 'direct';
|
|
17
|
+
export declare type ColorType = ColorTypeLocation | ColorTypeGrid | ColorTypeDirect;
|
|
15
18
|
export declare type ColorData = {
|
|
16
19
|
uColor: ValueCell<Vec3>;
|
|
17
20
|
tColor: ValueCell<TextureImage<Uint8Array>>;
|
|
@@ -23,7 +26,7 @@ export declare type ColorData = {
|
|
|
23
26
|
dColorType: ValueCell<string>;
|
|
24
27
|
dUsePalette: ValueCell<boolean>;
|
|
25
28
|
};
|
|
26
|
-
export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any>, colorData?: ColorData): ColorData;
|
|
29
|
+
export declare function createColors(locationIt: LocationIterator, positionIt: LocationIterator, colorTheme: ColorTheme<any, any>, colorData?: ColorData): ColorData;
|
|
27
30
|
export declare function createValueColor(value: Color, colorData?: ColorData): ColorData;
|
|
28
31
|
export declare function createTextureColor(colors: TextureImage<Uint8Array>, type: ColorType, colorData?: ColorData): ColorData;
|
|
29
32
|
export declare function createGridColor(grid: ColorVolume, type: ColorType, colorData?: ColorData): ColorData;
|
|
@@ -9,7 +9,6 @@ import { createTextureImage } from '../../mol-gl/renderable/util';
|
|
|
9
9
|
import { Color } from '../../mol-util/color';
|
|
10
10
|
import { Vec2, Vec3, Vec4 } from '../../mol-math/linear-algebra';
|
|
11
11
|
import { NullLocation } from '../../mol-model/location';
|
|
12
|
-
import { Geometry } from './geometry';
|
|
13
12
|
import { createNullTexture } from '../../mol-gl/webgl/texture';
|
|
14
13
|
export function createColors(locationIt, positionIt, colorTheme, colorData) {
|
|
15
14
|
var data = _createColors(locationIt, positionIt, colorTheme, colorData);
|
|
@@ -23,27 +22,18 @@ export function createColors(locationIt, positionIt, colorTheme, colorData) {
|
|
|
23
22
|
return data;
|
|
24
23
|
}
|
|
25
24
|
function _createColors(locationIt, positionIt, colorTheme, colorData) {
|
|
26
|
-
switch (
|
|
25
|
+
switch (colorTheme.granularity) {
|
|
27
26
|
case 'uniform': return createUniformColor(locationIt, colorTheme.color, colorData);
|
|
28
|
-
case 'instance':
|
|
27
|
+
case 'instance':
|
|
28
|
+
return locationIt.nonInstanceable
|
|
29
|
+
? createGroupColor(locationIt, colorTheme.color, colorData)
|
|
30
|
+
: createInstanceColor(locationIt, colorTheme.color, colorData);
|
|
29
31
|
case 'group': return createGroupColor(locationIt, colorTheme.color, colorData);
|
|
30
32
|
case 'groupInstance': return createGroupInstanceColor(locationIt, colorTheme.color, colorData);
|
|
31
33
|
case 'vertex': return createVertexColor(positionIt, colorTheme.color, colorData);
|
|
32
34
|
case 'vertexInstance': return createVertexInstanceColor(positionIt, colorTheme.color, colorData);
|
|
33
|
-
case 'volume':
|
|
34
|
-
|
|
35
|
-
return createGridColor(colorTheme.grid, 'volume', colorData);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
throw new Error('Grid missing for "volume" color theme');
|
|
39
|
-
}
|
|
40
|
-
case 'volumeInstance':
|
|
41
|
-
if (colorTheme.grid) {
|
|
42
|
-
return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
throw new Error('Grid missing for "volume" color theme');
|
|
46
|
-
}
|
|
35
|
+
case 'volume': return createGridColor(colorTheme.grid, 'volume', colorData);
|
|
36
|
+
case 'volumeInstance': return createGridColor(colorTheme.grid, 'volumeInstance', colorData);
|
|
47
37
|
case 'direct': return createDirectColor(colorData);
|
|
48
38
|
}
|
|
49
39
|
}
|
|
@@ -50,8 +50,8 @@ export declare namespace Cylinders {
|
|
|
50
50
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
51
51
|
material: PD.Group<PD.Normalize<{
|
|
52
52
|
metalness: number;
|
|
53
|
-
roughness: number;
|
|
54
53
|
/** Number of cylinders */
|
|
54
|
+
roughness: number;
|
|
55
55
|
bumpiness: number;
|
|
56
56
|
}>>;
|
|
57
57
|
clip: PD.Group<PD.Normalize<{
|
|
@@ -153,7 +153,7 @@ export var Cylinders;
|
|
|
153
153
|
var padding = getMaxSize(size) * props.sizeFactor;
|
|
154
154
|
var invariantBoundingSphere = Sphere3D.clone(cylinders.boundingSphere);
|
|
155
155
|
var boundingSphere = calculateTransformBoundingSphere(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
156
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: ValueCell.create(padding) }), BaseGeometry.createValues(props, counts)), { uSizeFactor: ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: ValueCell.create(props.doubleSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded),
|
|
156
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('cylinders'), aMapping: cylinders.mappingBuffer, aGroup: cylinders.groupBuffer, aStart: cylinders.startBuffer, aEnd: cylinders.endBuffer, aScale: cylinders.scaleBuffer, aCap: cylinders.capBuffer, elements: cylinders.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: ValueCell.create(padding) }), BaseGeometry.createValues(props, counts)), { uSizeFactor: ValueCell.create(props.sizeFactor * props.sizeAspectRatio), uDoubleSided: ValueCell.create(props.doubleSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded), dTransparentBackfaces: ValueCell.create(props.transparentBackfaces), uBumpFrequency: ValueCell.create(props.bumpFrequency), uBumpAmplitude: ValueCell.create(props.bumpAmplitude) });
|
|
157
157
|
}
|
|
158
158
|
function createValuesSimple(cylinders, props, colorValue, sizeValue, transform) {
|
|
159
159
|
var s = BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -166,7 +166,7 @@ export var Cylinders;
|
|
|
166
166
|
ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
167
167
|
ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
168
168
|
ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
169
|
-
ValueCell.updateIfChanged(values.
|
|
169
|
+
ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
|
|
170
170
|
ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
171
171
|
ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
172
172
|
}
|
|
@@ -593,7 +593,7 @@ export var Mesh;
|
|
|
593
593
|
var counts = { drawCount: mesh.triangleCount * 3, vertexCount: mesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
|
|
594
594
|
var invariantBoundingSphere = Sphere3D.clone(mesh.boundingSphere);
|
|
595
595
|
var boundingSphere = calculateTransformBoundingSphere(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
596
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('mesh'), aPosition: mesh.vertexBuffer, aNormal: mesh.normalBuffer, aGroup: mesh.groupBuffer, elements: mesh.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), material), clipping), transform), BaseGeometry.createValues(props, counts)), { uDoubleSided: ValueCell.create(props.doubleSided), dFlatShaded: ValueCell.create(props.flatShaded), dFlipSided: ValueCell.create(props.flipSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded),
|
|
596
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('mesh'), aPosition: mesh.vertexBuffer, aNormal: mesh.normalBuffer, aGroup: mesh.groupBuffer, elements: mesh.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), material), clipping), transform), BaseGeometry.createValues(props, counts)), { uDoubleSided: ValueCell.create(props.doubleSided), dFlatShaded: ValueCell.create(props.flatShaded), dFlipSided: ValueCell.create(props.flipSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded), dTransparentBackfaces: ValueCell.create(props.transparentBackfaces), uBumpFrequency: ValueCell.create(props.bumpFrequency), uBumpAmplitude: ValueCell.create(props.bumpAmplitude), meta: ValueCell.create(mesh.meta) });
|
|
597
597
|
}
|
|
598
598
|
function createValuesSimple(mesh, props, colorValue, sizeValue, transform) {
|
|
599
599
|
var s = BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -607,7 +607,7 @@ export var Mesh;
|
|
|
607
607
|
ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
|
|
608
608
|
ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
609
609
|
ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
610
|
-
ValueCell.updateIfChanged(values.
|
|
610
|
+
ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
|
|
611
611
|
ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
612
612
|
ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
613
613
|
}
|
|
@@ -43,7 +43,7 @@ export declare namespace Points {
|
|
|
43
43
|
quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">;
|
|
44
44
|
material: PD.Group<PD.Normalize<{
|
|
45
45
|
metalness: number;
|
|
46
|
-
roughness: number;
|
|
46
|
+
roughness: number;
|
|
47
47
|
bumpiness: number;
|
|
48
48
|
}>>;
|
|
49
49
|
clip: PD.Group<PD.Normalize<{
|
|
@@ -132,7 +132,7 @@ export var Spheres;
|
|
|
132
132
|
var padding = spheres.boundingSphere.radius ? getMaxSize(size) * props.sizeFactor : 0;
|
|
133
133
|
var invariantBoundingSphere = Sphere3D.expand(Sphere3D(), spheres.boundingSphere, padding);
|
|
134
134
|
var boundingSphere = calculateTransformBoundingSphere(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
135
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('spheres'), aPosition: spheres.centerBuffer, aMapping: spheres.mappingBuffer, aGroup: spheres.groupBuffer, elements: spheres.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: ValueCell.create(padding) }), BaseGeometry.createValues(props, counts)), { uSizeFactor: ValueCell.create(props.sizeFactor), uDoubleSided: ValueCell.create(props.doubleSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded),
|
|
135
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('spheres'), aPosition: spheres.centerBuffer, aMapping: spheres.mappingBuffer, aGroup: spheres.groupBuffer, elements: spheres.indexBuffer, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), size), marker), overpaint), transparency), material), clipping), transform), { padding: ValueCell.create(padding) }), BaseGeometry.createValues(props, counts)), { uSizeFactor: ValueCell.create(props.sizeFactor), uDoubleSided: ValueCell.create(props.doubleSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded), dTransparentBackfaces: ValueCell.create(props.transparentBackfaces), uBumpFrequency: ValueCell.create(props.bumpFrequency), uBumpAmplitude: ValueCell.create(props.bumpAmplitude) });
|
|
136
136
|
}
|
|
137
137
|
function createValuesSimple(spheres, props, colorValue, sizeValue, transform) {
|
|
138
138
|
var s = BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -145,7 +145,7 @@ export var Spheres;
|
|
|
145
145
|
ValueCell.updateIfChanged(values.uDoubleSided, props.doubleSided);
|
|
146
146
|
ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
147
147
|
ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
148
|
-
ValueCell.updateIfChanged(values.
|
|
148
|
+
ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
|
|
149
149
|
ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
150
150
|
ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
151
151
|
}
|
|
@@ -110,7 +110,7 @@ export var TextureMesh;
|
|
|
110
110
|
var counts = { drawCount: textureMesh.vertexCount, vertexCount: textureMesh.vertexCount, groupCount: groupCount, instanceCount: instanceCount };
|
|
111
111
|
var invariantBoundingSphere = Sphere3D.clone(textureMesh.boundingSphere);
|
|
112
112
|
var boundingSphere = calculateTransformBoundingSphere(invariantBoundingSphere, transform.aTransform.ref.value, instanceCount);
|
|
113
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('textureMesh'), uGeoTexDim: textureMesh.geoTextureDim, tPosition: textureMesh.vertexTexture, tGroup: textureMesh.groupTexture, tNormal: textureMesh.normalTexture, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), substance), clipping), transform), BaseGeometry.createValues(props, counts)), { uDoubleSided: ValueCell.create(props.doubleSided), dFlatShaded: ValueCell.create(props.flatShaded), dFlipSided: ValueCell.create(props.flipSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded),
|
|
113
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ dGeometryType: ValueCell.create('textureMesh'), uGeoTexDim: textureMesh.geoTextureDim, tPosition: textureMesh.vertexTexture, tGroup: textureMesh.groupTexture, tNormal: textureMesh.normalTexture, boundingSphere: ValueCell.create(boundingSphere), invariantBoundingSphere: ValueCell.create(invariantBoundingSphere), uInvariantBoundingSphere: ValueCell.create(Vec4.ofSphere(invariantBoundingSphere)) }, color), marker), overpaint), transparency), substance), clipping), transform), BaseGeometry.createValues(props, counts)), { uDoubleSided: ValueCell.create(props.doubleSided), dFlatShaded: ValueCell.create(props.flatShaded), dFlipSided: ValueCell.create(props.flipSided), dIgnoreLight: ValueCell.create(props.ignoreLight), dXrayShaded: ValueCell.create(props.xrayShaded), dTransparentBackfaces: ValueCell.create(props.transparentBackfaces), uBumpFrequency: ValueCell.create(props.bumpFrequency), uBumpAmplitude: ValueCell.create(props.bumpAmplitude), meta: ValueCell.create(textureMesh.meta) });
|
|
114
114
|
}
|
|
115
115
|
function createValuesSimple(textureMesh, props, colorValue, sizeValue, transform) {
|
|
116
116
|
var s = BaseGeometry.createSimple(colorValue, sizeValue, transform);
|
|
@@ -124,7 +124,7 @@ export var TextureMesh;
|
|
|
124
124
|
ValueCell.updateIfChanged(values.dFlipSided, props.flipSided);
|
|
125
125
|
ValueCell.updateIfChanged(values.dIgnoreLight, props.ignoreLight);
|
|
126
126
|
ValueCell.updateIfChanged(values.dXrayShaded, props.xrayShaded);
|
|
127
|
-
ValueCell.updateIfChanged(values.
|
|
127
|
+
ValueCell.updateIfChanged(values.dTransparentBackfaces, props.transparentBackfaces);
|
|
128
128
|
ValueCell.updateIfChanged(values.uBumpFrequency, props.bumpFrequency);
|
|
129
129
|
ValueCell.updateIfChanged(values.uBumpAmplitude, props.bumpAmplitude);
|
|
130
130
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
3
3
|
*
|
|
4
4
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
5
5
|
*/
|
|
@@ -14,6 +14,8 @@ export function applyTransparencyValue(array, start, end, value) {
|
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
16
|
export function getTransparencyAverage(array, count) {
|
|
17
|
+
if (count === 0 || array.length < count)
|
|
18
|
+
return 0;
|
|
17
19
|
var sum = 0;
|
|
18
20
|
for (var i = 0; i < count; ++i) {
|
|
19
21
|
sum += array[i];
|
|
@@ -19,7 +19,7 @@ export declare const CylindersSchema: {
|
|
|
19
19
|
uDoubleSided: UniformSpec<"b">;
|
|
20
20
|
dIgnoreLight: DefineSpec<"boolean">;
|
|
21
21
|
dXrayShaded: DefineSpec<"boolean">;
|
|
22
|
-
|
|
22
|
+
dTransparentBackfaces: DefineSpec<"string">;
|
|
23
23
|
uBumpFrequency: UniformSpec<"f">;
|
|
24
24
|
uBumpAmplitude: UniformSpec<"f">;
|
|
25
25
|
uSize: UniformSpec<"f">;
|
|
@@ -9,7 +9,7 @@ import { createGraphicsRenderItem } from '../webgl/render-item';
|
|
|
9
9
|
import { GlobalUniformSchema, BaseSchema, AttributeSpec, InternalSchema, SizeSchema, ElementsSpec, ValueSpec, DefineSpec, GlobalTextureSchema, UniformSpec } from './schema';
|
|
10
10
|
import { CylindersShaderCode } from '../shader-code';
|
|
11
11
|
import { ValueCell } from '../../mol-util';
|
|
12
|
-
export var CylindersSchema = __assign(__assign(__assign({}, BaseSchema), SizeSchema), { aGroup: AttributeSpec('float32', 1, 0), aStart: AttributeSpec('float32', 3, 0), aEnd: AttributeSpec('float32', 3, 0), aMapping: AttributeSpec('float32', 3, 0), aScale: AttributeSpec('float32', 1, 0), aCap: AttributeSpec('float32', 1, 0), elements: ElementsSpec('uint32'), padding: ValueSpec('number'), uDoubleSided: UniformSpec('b'), dIgnoreLight: DefineSpec('boolean'), dXrayShaded: DefineSpec('boolean'),
|
|
12
|
+
export var CylindersSchema = __assign(__assign(__assign({}, BaseSchema), SizeSchema), { aGroup: AttributeSpec('float32', 1, 0), aStart: AttributeSpec('float32', 3, 0), aEnd: AttributeSpec('float32', 3, 0), aMapping: AttributeSpec('float32', 3, 0), aScale: AttributeSpec('float32', 1, 0), aCap: AttributeSpec('float32', 1, 0), elements: ElementsSpec('uint32'), padding: ValueSpec('number'), uDoubleSided: UniformSpec('b'), dIgnoreLight: DefineSpec('boolean'), dXrayShaded: DefineSpec('boolean'), dTransparentBackfaces: DefineSpec('string', ['off', 'on', 'opaque']), uBumpFrequency: UniformSpec('f'), uBumpAmplitude: UniformSpec('f') });
|
|
13
13
|
export function CylindersRenderable(ctx, id, values, state, materialId, variants) {
|
|
14
14
|
var schema = __assign(__assign(__assign(__assign({}, GlobalUniformSchema), GlobalTextureSchema), InternalSchema), CylindersSchema);
|
|
15
15
|
var internalValues = {
|
|
@@ -17,7 +17,7 @@ export declare const MeshSchema: {
|
|
|
17
17
|
readonly dFlipSided: DefineSpec<"boolean">;
|
|
18
18
|
readonly dIgnoreLight: DefineSpec<"boolean">;
|
|
19
19
|
readonly dXrayShaded: DefineSpec<"boolean">;
|
|
20
|
-
readonly
|
|
20
|
+
readonly dTransparentBackfaces: DefineSpec<"string">;
|
|
21
21
|
readonly uBumpFrequency: UniformSpec<"f">;
|
|
22
22
|
readonly uBumpAmplitude: UniformSpec<"f">;
|
|
23
23
|
readonly meta: ValueSpec<"unknown">;
|