mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 06:52:32 +02:00
cleanup
This commit is contained in:
parent
3336efb6ee
commit
6af7b9f772
2 changed files with 6 additions and 3 deletions
|
@ -248,6 +248,7 @@ ItemID EntityRenderer::computeMirrorViewOperator(ViewFrustum& viewFrustum, const
|
|||
glm::vec3 outPropertiesPosition = inPropertiesPosition;
|
||||
glm::quat outPropertiesRotation = inPropertiesRotation;
|
||||
glm::mat4 outToWorld = inToWorld;
|
||||
bool foundPortalExit = false;
|
||||
if (mirrorMode == MirrorMode::PORTAL && !portalExitID.isNull()) {
|
||||
auto renderer = DependencyManager::get<EntityTreeRenderer>();
|
||||
if (renderer) {
|
||||
|
@ -258,6 +259,7 @@ ItemID EntityRenderer::computeMirrorViewOperator(ViewFrustum& viewFrustum, const
|
|||
});
|
||||
|
||||
outToWorld = glm::translate(outPropertiesPosition) * glm::mat4_cast(outPropertiesRotation);
|
||||
foundPortalExit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -314,7 +316,7 @@ ItemID EntityRenderer::computeMirrorViewOperator(ViewFrustum& viewFrustum, const
|
|||
|
||||
viewFrustum.setProjection(projection, true);
|
||||
|
||||
return (mirrorMode == MirrorMode::PORTAL && !portalExitID.isNull()) ? DependencyManager::get<EntityTreeRenderer>()->renderableIdForEntityId(portalExitID) : Item::INVALID_ITEM_ID;
|
||||
return foundPortalExit ? DependencyManager::get<EntityTreeRenderer>()->renderableIdForEntityId(portalExitID) : Item::INVALID_ITEM_ID;
|
||||
}
|
||||
|
||||
void EntityRenderer::render(RenderArgs* args) {
|
||||
|
|
|
@ -59,15 +59,16 @@ void main() {
|
|||
|
||||
<@if HIFI_USE_MIRROR@>
|
||||
color.rgb = texelFetch(mirrorMap, ivec2(gl_FragCoord.xy), 0).rgb;
|
||||
color.a = 1.0;
|
||||
<@endif@>
|
||||
|
||||
<@if HIFI_USE_UNLIT@>
|
||||
<@if HIFI_USE_TRANSLUCENT or HIFI_USE_FORWARD@>
|
||||
_fragColor0 = vec4(color.rgb * isUnlitEnabled(), 1.0);
|
||||
_fragColor0 = vec4(color.rgb * isUnlitEnabled(), color.a);
|
||||
<@else@>
|
||||
packDeferredFragmentUnlit(
|
||||
normalize(_normalWS),
|
||||
1.0,
|
||||
color.a,
|
||||
color.rgb);
|
||||
<@endif@>
|
||||
<@else@>
|
||||
|
|
Loading…
Reference in a new issue