fix the coo/texel blender mode for the case when color is black and the stereo issue

This commit is contained in:
samcake 2015-09-30 18:39:13 -07:00
parent 69c4075439
commit 0398f9429e
3 changed files with 5 additions and 2 deletions

View file

@ -129,7 +129,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky
batch.draw(gpu::TRIANGLE_STRIP, 4);
batch.setResourceTexture(SKYBOX_SKYMAP_SLOT, nullptr);
// batch.setResourceTexture(SKYBOX_SKYMAP_SLOT, nullptr);
}

View file

@ -47,6 +47,8 @@ void main(void) {
vec3 texel = texture(cubeMap, coord).rgb;
if (_skybox._color.a < 2.0) {
color *= texel;
} else {
color = texel;
}
}

View file

@ -335,9 +335,10 @@ void DrawStencilDeferred::run(const SceneContextPointer& sceneContext, const Ren
batch.enableStereo(false);
batch.setFramebuffer(primaryFboColorDepthStencil);
batch.clearStencilFramebuffer(0, true);
batch.setViewportTransform(args->_viewport);
batch.setStateScissorRect(args->_viewport);
batch.clearStencilFramebuffer(0, true);
Transform modelMat;
batch.setModelTransform(modelMat);