diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp index 88d2e8609f..7267e29be2 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp @@ -212,6 +212,8 @@ GLShader* GLBackend::compileBackendProgram(const Shader& program, const Shader:: glprogram = ::gl::buildProgram(shaderGLObjects); if (!::gl::linkProgram(glprogram, compilationLogs[version].message)) { + qCWarning(gpugllogging) << "GLBackend::compileBackendProgram - Program didn't link:\n" << compilationLogs[version].message.c_str(); + compilationLogs[version].compiled = false; glDeleteProgram(glprogram); glprogram = 0; return nullptr; @@ -254,7 +256,7 @@ GLint GLBackend::getRealUniformLocation(GLint location) const { // uniforms. If someone is requesting a uniform that isn't in the remapping structure // that's a bug from the calling code, because it means that location wasn't in the // reflection - qWarning() << "Unexpected location requested for shader"; + qWarning() << "Unexpected location requested for shader: #" << location; return INVALID_UNIFORM_INDEX; } return itr->second; diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 2995d17f03..af5a3f3e63 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -496,10 +496,6 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, batch.setPipeline(program); } - // Adjust the texcoordTransform in the case we are rendeirng a sub region(mini mirror) - auto textureFrameTransform = gpu::Framebuffer::evalSubregionTexcoordTransformCoefficients(deferredFramebuffer->getFrameSize(), args->_viewport); - batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast< const float* >(&textureFrameTransform)); - // Setup the global lighting deferredLightingEffect->setupKeyLightBatch(args, batch); @@ -560,23 +556,18 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext batch.setViewportTransform(viewport); batch.setStateScissorRect(viewport); - auto textureFrameTransform = gpu::Framebuffer::evalSubregionTexcoordTransformCoefficients(deferredFramebuffer->getFrameSize(), viewport); - - auto& lightIndices = lightClusters->_visibleLightIndices; if (!lightIndices.empty() && lightIndices[0] > 0) { deferredLightingEffect->setupLocalLightsBatch(batch, lightClusters); // Local light pipeline batch.setPipeline(deferredLightingEffect->_localLight); - batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast(&textureFrameTransform)); batch.draw(gpu::TRIANGLE_STRIP, 4); // Draw outline as well ? if (lightingModel->isShowLightContourEnabled()) { batch.setPipeline(deferredLightingEffect->_localLightOutline); - batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast(&textureFrameTransform)); batch.draw(gpu::TRIANGLE_STRIP, 4); } diff --git a/libraries/render-utils/src/deferred_light.slv b/libraries/render-utils/src/deferred_light.slv index 654e9a69b2..164fd9fb3b 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -16,8 +16,6 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; -layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; - void main(void) { const float depth = 1.0; const vec4 UNIT_QUAD[4] = vec4[4]( @@ -30,8 +28,5 @@ void main(void) { _texCoord01.xy = (pos.xy + 1.0) * 0.5; - _texCoord01.xy *= texcoordFrameTransform.zw; - _texCoord01.xy += texcoordFrameTransform.xy; - gl_Position = pos; }