Skip to content

Commit

Permalink
Fix background map base color transparency mix problem (#3668)
Browse files Browse the repository at this point in the history
* Reality mesh shader needs to mix base color with any overrides even if textures are not specified (map base color, for example, can be specified).

* rush change

(cherry picked from commit 596e122)
  • Loading branch information
markschlosseratbentley authored and mergify[bot] committed May 24, 2022
1 parent d2b1ff5 commit 2dc5a1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
7 changes: 5 additions & 2 deletions core/frontend/src/render/webgl/glsl/RealityMesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,11 @@ function baseColorFromTextures(textureCount: number, applyFeatureColor: string)
applyTextureStrings.push(`if (applyTexture(col, s_texture${i}, u_texParams${i}, u_texMatrix${i})) doDiscard = false; `);

return `
if (!u_texturesPresent)
return u_baseColor;
if (!u_texturesPresent) {
vec4 col = u_baseColor;
${applyFeatureColor}
return col;
}
bool doDiscard = true;
vec4 col = u_baseColor;
Expand Down

0 comments on commit 2dc5a1e

Please sign in to comment.