Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Sep 20, 2023
1 parent 58080fe commit aa726b9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 34 deletions.
20 changes: 6 additions & 14 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -77670,10 +77670,8 @@ class TrianglesDataTextureOcclusionRenderer {
const scene = this._scene;
const clipping = scene._sectionPlanesState.sectionPlanes.length > 0;
const src = [];
src.push("#version 300 es");
src.push("// TrianglesDataTextureColorRenderer vertex shader");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("#extension GL_EXT_frag_depth : enable");
}
src.push("uniform int renderPass;");
src.push("attribute vec3 position;");
if (scene.entityOffsetsEnabled) {
Expand Down Expand Up @@ -77723,12 +77721,7 @@ class TrianglesDataTextureOcclusionRenderer {
}
src.push("vec4 clipPos = projMatrix * viewPosition;");
if (scene.logarithmicDepthBufferEnabled) {
if (WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("vFragDepth = 1.0 + clipPos.w;");
} else {
src.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;");
src.push("clipPos.z *= clipPos.w;");
}
src.push("vFragDepth = 1.0 + clipPos.w;");
src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));");
}
src.push("gl_Position = clipPos;");
Expand All @@ -77742,18 +77735,16 @@ class TrianglesDataTextureOcclusionRenderer {
const sectionPlanesState = scene._sectionPlanesState;
const clipping = sectionPlanesState.sectionPlanes.length > 0;
const src = [];
src.push('#version 300 es');
src.push("// TrianglesDataTextureColorRenderer fragment shader");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("#extension GL_EXT_frag_depth : enable");
}
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
src.push("precision highp float;");
src.push("precision highp int;");
src.push("#else");
src.push("precision mediump float;");
src.push("precision mediump int;");
src.push("#endif");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
if (scene.logarithmicDepthBufferEnabled) {
src.push("in float isPerspective;");
src.push("uniform float logDepthBufFC;");
src.push("in float vFragDepth;");
Expand All @@ -77780,7 +77771,7 @@ class TrianglesDataTextureOcclusionRenderer {
src.push(" if (dist > 0.0) { discard; }");
src.push(" }");
}
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
if (scene.logarithmicDepthBufferEnabled) {
src.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");
}
src.push(" gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue
Expand Down Expand Up @@ -78540,6 +78531,7 @@ class TrianglesDataTextureNormalsRenderer {
const sectionPlanesState = scene._sectionPlanesState;
const clipping = (sectionPlanesState.sectionPlanes.length > 0);
const src = [];
src.push("#version 300 es");
src.push("// Batched geometry normals fragment shader");

if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
Expand Down
20 changes: 6 additions & 14 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -77666,10 +77666,8 @@ class TrianglesDataTextureOcclusionRenderer {
const scene = this._scene;
const clipping = scene._sectionPlanesState.sectionPlanes.length > 0;
const src = [];
src.push("#version 300 es");
src.push("// TrianglesDataTextureColorRenderer vertex shader");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("#extension GL_EXT_frag_depth : enable");
}
src.push("uniform int renderPass;");
src.push("attribute vec3 position;");
if (scene.entityOffsetsEnabled) {
Expand Down Expand Up @@ -77719,12 +77717,7 @@ class TrianglesDataTextureOcclusionRenderer {
}
src.push("vec4 clipPos = projMatrix * viewPosition;");
if (scene.logarithmicDepthBufferEnabled) {
if (WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("vFragDepth = 1.0 + clipPos.w;");
} else {
src.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;");
src.push("clipPos.z *= clipPos.w;");
}
src.push("vFragDepth = 1.0 + clipPos.w;");
src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));");
}
src.push("gl_Position = clipPos;");
Expand All @@ -77738,18 +77731,16 @@ class TrianglesDataTextureOcclusionRenderer {
const sectionPlanesState = scene._sectionPlanesState;
const clipping = sectionPlanesState.sectionPlanes.length > 0;
const src = [];
src.push('#version 300 es');
src.push("// TrianglesDataTextureColorRenderer fragment shader");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
src.push("#extension GL_EXT_frag_depth : enable");
}
src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");
src.push("precision highp float;");
src.push("precision highp int;");
src.push("#else");
src.push("precision mediump float;");
src.push("precision mediump int;");
src.push("#endif");
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
if (scene.logarithmicDepthBufferEnabled) {
src.push("in float isPerspective;");
src.push("uniform float logDepthBufFC;");
src.push("in float vFragDepth;");
Expand All @@ -77776,7 +77767,7 @@ class TrianglesDataTextureOcclusionRenderer {
src.push(" if (dist > 0.0) { discard; }");
src.push(" }");
}
if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
if (scene.logarithmicDepthBufferEnabled) {
src.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");
}
src.push(" gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue
Expand Down Expand Up @@ -78536,6 +78527,7 @@ class TrianglesDataTextureNormalsRenderer {
const sectionPlanesState = scene._sectionPlanesState;
const clipping = (sectionPlanesState.sectionPlanes.length > 0);
const src = [];
src.push("#version 300 es");
src.push("// Batched geometry normals fragment shader");

if (scene.logarithmicDepthBufferEnabled && WEBGL_INFO.SUPPORTED_EXTENSIONS["EXT_frag_depth"]) {
Expand Down
Loading

0 comments on commit aa726b9

Please sign in to comment.