Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Oct 17, 2023
1 parent 2213e99 commit 8106023
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -79238,7 +79238,7 @@ class TrianglesDataTextureOcclusionRenderer {
// when the geometry is not solid, if needed, flip the triangle winding
src.push("if (solid != 1u) {");
src.push(" if (isPerspectiveMatrix(projMatrix)) {");
src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");
src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");
src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {");
src.push(" position = positions[2 - (gl_VertexID % 3)];");
src.push(" }");
Expand All @@ -79250,7 +79250,7 @@ class TrianglesDataTextureOcclusionRenderer {
src.push(" }");
src.push("}");

src.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); ");
src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); ");

// get XYZ offset
src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);");
Expand Down
4 changes: 2 additions & 2 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -79234,7 +79234,7 @@ class TrianglesDataTextureOcclusionRenderer {
// when the geometry is not solid, if needed, flip the triangle winding
src.push("if (solid != 1u) {");
src.push(" if (isPerspectiveMatrix(projMatrix)) {");
src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");
src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");
src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {");
src.push(" position = positions[2 - (gl_VertexID % 3)];");
src.push(" }");
Expand All @@ -79246,7 +79246,7 @@ class TrianglesDataTextureOcclusionRenderer {
src.push(" }");
src.push("}");

src.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); ");
src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); ");

// get XYZ offset
src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);");
Expand Down
2 changes: 1 addition & 1 deletion dist/xeokit-sdk.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -18364,7 +18364,7 @@ src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAn
src.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));");src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));");src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));");// get color
src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);");src.push("if (color.a == 0u) {");src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);");// Cull vertex
src.push(" return;");src.push("};");src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));");src.push("vec3 position;");src.push("position = positions[gl_VertexID % 3];");// when the geometry is not solid, if needed, flip the triangle winding
src.push("if (solid != 1u) {");src.push(" if (isPerspectiveMatrix(projMatrix)) {");src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {");src.push(" position = positions[2 - (gl_VertexID % 3)];");src.push(" }");src.push(" } else {");src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);");src.push(" if (viewNormal.z < 0.0) {");src.push(" position = positions[2 - (gl_VertexID % 3)];");src.push(" }");src.push(" }");src.push("}");src.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); ");// get XYZ offset
src.push("if (solid != 1u) {");src.push(" if (isPerspectiveMatrix(projMatrix)) {");src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;");src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {");src.push(" position = positions[2 - (gl_VertexID % 3)];");src.push(" }");src.push(" } else {");src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);");src.push(" if (viewNormal.z < 0.0) {");src.push(" position = positions[2 - (gl_VertexID % 3)];");src.push(" }");src.push(" }");src.push("}");src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); ");// get XYZ offset
src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);");src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;");src.push("vec4 viewPosition = viewMatrix * worldPosition; ");if(clipping){src.push(" vWorldPosition = worldPosition;");src.push(" vFlags2 = flags2;");}src.push("vec4 clipPos = projMatrix * viewPosition;");if(clipping){src.push("vWorldPosition = worldPosition;");src.push("vFlags2 = flags2.r;");}src.push("gl_Position = clipPos;");src.push(" }");src.push("}");return src;}},{key:"_buildFragmentShader",value:function _buildFragmentShader(){var scene=this._scene;var sectionPlanesState=scene._sectionPlanesState;var clipping=sectionPlanesState.sectionPlanes.length>0;var src=[];src.push('#version 300 es');src.push("// TrianglesDataTextureColorRenderer fragment shader");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(clipping){src.push("in vec4 vWorldPosition;");src.push("in vec4 vFlags2;");for(var _i370=0;_i370<sectionPlanesState.sectionPlanes.length;_i370++){src.push("uniform bool sectionPlaneActive"+_i370+";");src.push("uniform vec3 sectionPlanePos"+_i370+";");src.push("uniform vec3 sectionPlaneDir"+_i370+";");}}src.push("out vec4 outColor;");src.push("void main(void) {");if(clipping){src.push(" bool clippable = (float(vFlags2.x) > 0.0);");src.push(" if (clippable) {");src.push(" float dist = 0.0;");for(var _i371=0;_i371<sectionPlanesState.sectionPlanes.length;_i371++){src.push(" if (sectionPlaneActive"+_i371+") {");src.push(" dist += clamp(dot(-sectionPlaneDir"+_i371+".xyz, vWorldPosition.xyz - sectionPlanePos"+_i371+".xyz), 0.0, 1000.0);");src.push(" }");}src.push(" if (dist > 0.0) { discard; }");src.push(" }");}src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); ");// Occluders are blue
src.push("}");return src;}},{key:"webglContextRestored",value:function webglContextRestored(){this._program=null;}},{key:"destroy",value:function destroy(){if(this._program){this._program.destroy();}this._program=null;}}]);return TrianglesDataTextureOcclusionRenderer;}();var tempVec3a$b=math.vec3();var tempVec3b$7=math.vec3();var tempVec3c$6=math.vec3();var tempVec3d$3=math.vec3();var tempMat4a$2=math.mat4();/**
* @private
Expand Down
2 changes: 1 addition & 1 deletion dist/xeokit-sdk.min.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xeokit-sdk.min.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xeokit-sdk.min.es5.js

Large diffs are not rendered by default.

0 comments on commit 8106023

Please sign in to comment.