mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +02:00
Merge pull request #15668 from SamGondelman/transparent
BUGZ-197, BUGZ-372: Fix some transparency issues on AMD
This commit is contained in:
commit
7a62ce21f6
3 changed files with 7 additions and 3 deletions
|
@ -163,7 +163,7 @@ void ImageEntityRenderer::doRender(RenderArgs* args) {
|
||||||
transform = _renderTransform;
|
transform = _renderTransform;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!_visible || !texture || !texture->isLoaded()) {
|
if (!_visible || !texture || !texture->isLoaded() || color.a == 0.0f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,4 +214,4 @@ void ImageEntityRenderer::doRender(RenderArgs* args) {
|
||||||
);
|
);
|
||||||
|
|
||||||
batch->setResourceTexture(0, nullptr);
|
batch->setResourceTexture(0, nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,6 +270,10 @@ void ShapeEntityRenderer::doRender(RenderArgs* args) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (outColor.a == 0.0f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (proceduralRender) {
|
if (proceduralRender) {
|
||||||
if (render::ShapeKey(args->_globalShapeKey).isWireframe() || primitiveMode == PrimitiveMode::LINES) {
|
if (render::ShapeKey(args->_globalShapeKey).isWireframe() || primitiveMode == PrimitiveMode::LINES) {
|
||||||
geometryCache->renderWireShape(batch, geometryShape, outColor);
|
geometryCache->renderWireShape(batch, geometryShape, outColor);
|
||||||
|
|
|
@ -222,7 +222,7 @@ void evalFragShadingGloss(out vec3 diffuse, out vec3 specular,
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 evalSpecularWithOpacity(vec3 specular, float opacity) {
|
vec3 evalSpecularWithOpacity(vec3 specular, float opacity) {
|
||||||
return specular / opacity;
|
return specular / mix(1.0, opacity, float(opacity > 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
<@if not GETFRESNEL0@>
|
<@if not GETFRESNEL0@>
|
||||||
|
|
Loading…
Reference in a new issue