Skip to content

Commit

Permalink
Fix normal picking shader for data textures #1180
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Oct 17, 2023
1 parent 62c2c23 commit 5f3a8a9
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 289 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {TrianglesDataTexturePickMeshRenderer} from "./renderers/TrianglesDataTex
import {TrianglesDataTexturePickDepthRenderer} from "./renderers/TrianglesDataTexturePickDepthRenderer.js";
import {TrianglesDataTextureSnapDepthRenderer} from "./renderers/TrianglesDataTextureSnapDepthRenderer.js";
import {TrianglesDataTextureSnapDepthBufInitRenderer} from "./renderers/TrianglesDataTextureSnapDepthBufInitRenderer.js";
import {TrianglesDataTexturePickNormalsRenderer} from "./renderers/TrianglesDataTexturePickNormalsRenderer.js";
import {TrianglesDataTextureOcclusionRenderer} from "./renderers/TrianglesDataTextureOcclusionRenderer.js";
import {TrianglesDataTextureDepthRenderer} from "./renderers/TrianglesDataTextureDepthRenderer.js";
import {TrianglesDataTextureNormalsRenderer} from "./renderers/TrianglesDataTextureNormalsRenderer.js";
Expand Down Expand Up @@ -107,6 +106,9 @@ class TrianglesDataTextureRenderers {
if (!this._pickDepthRenderer) {
this._pickDepthRenderer = new TrianglesDataTexturePickDepthRenderer(this._scene);
}
if (!this._pickNormalsRenderer) {
this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene);
}
if (!this._vertexDepthRenderer) {
this._vertexDepthRenderer = new TrianglesDataTextureSnapDepthRenderer(this._scene);
}
Expand All @@ -131,9 +133,9 @@ class TrianglesDataTextureRenderers {
}

get colorQualityRendererWithSAO() {
if (!this._colorQualityRendererWithSAO) {
this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true);
}
// if (!this._colorQualityRendererWithSAO) {
// this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true);
// }
return this._colorQualityRendererWithSAO;
}

Expand Down Expand Up @@ -181,7 +183,7 @@ class TrianglesDataTextureRenderers {

get pickNormalsRenderer() {
if (!this._pickNormalsRenderer) {
this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsRenderer(this._scene);
this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene);
}
return this._pickNormalsRenderer;
}
Expand Down
Loading

0 comments on commit 5f3a8a9

Please sign in to comment.