mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 01:47:31 +02:00
fix the coo/texel blender mode for the case when color is black and the stereo issue
This commit is contained in:
parent
69c4075439
commit
0398f9429e
3 changed files with 5 additions and 2 deletions
|
@ -129,7 +129,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky
|
||||||
|
|
||||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||||
|
|
||||||
batch.setResourceTexture(SKYBOX_SKYMAP_SLOT, nullptr);
|
// batch.setResourceTexture(SKYBOX_SKYMAP_SLOT, nullptr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,8 @@ void main(void) {
|
||||||
vec3 texel = texture(cubeMap, coord).rgb;
|
vec3 texel = texture(cubeMap, coord).rgb;
|
||||||
if (_skybox._color.a < 2.0) {
|
if (_skybox._color.a < 2.0) {
|
||||||
color *= texel;
|
color *= texel;
|
||||||
|
} else {
|
||||||
|
color = texel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -335,9 +335,10 @@ void DrawStencilDeferred::run(const SceneContextPointer& sceneContext, const Ren
|
||||||
batch.enableStereo(false);
|
batch.enableStereo(false);
|
||||||
|
|
||||||
batch.setFramebuffer(primaryFboColorDepthStencil);
|
batch.setFramebuffer(primaryFboColorDepthStencil);
|
||||||
batch.clearStencilFramebuffer(0, true);
|
|
||||||
batch.setViewportTransform(args->_viewport);
|
batch.setViewportTransform(args->_viewport);
|
||||||
batch.setStateScissorRect(args->_viewport);
|
batch.setStateScissorRect(args->_viewport);
|
||||||
|
batch.clearStencilFramebuffer(0, true);
|
||||||
|
|
||||||
|
|
||||||
Transform modelMat;
|
Transform modelMat;
|
||||||
batch.setModelTransform(modelMat);
|
batch.setModelTransform(modelMat);
|
||||||
|
|
Loading…
Reference in a new issue