From 274bf33318d06924fcdd6bd537f7723254c6792b Mon Sep 17 00:00:00 2001 From: amantley Date: Tue, 7 Aug 2018 18:29:51 -0700 Subject: [PATCH 1/8] fix for the avatar scale reset when we re-enter hmd mode --- interface/src/Application.cpp | 1 - interface/src/avatar/MyAvatar.cpp | 6 ++++++ interface/src/avatar/MySkeletonModel.cpp | 2 ++ libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp | 1 + libraries/render-utils/src/Model.cpp | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 0bbd2b1c17..d1871c7692 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -8133,7 +8133,6 @@ void Application::setDisplayPlugin(DisplayPluginPointer newDisplayPlugin) { // reset the avatar, to set head and hand palms back to a reasonable default pose. getMyAvatar()->reset(false); - // switch to first person if entering hmd and setting is checked if (menu) { QAction* action = menu->getActionForOption(newDisplayPlugin->getName()); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 3f738ea4cb..0fdd7edb7a 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -806,6 +806,7 @@ void MyAvatar::updateSensorToWorldMatrix() { // update the sensor mat so that the body position will end up in the desired // position when driven from the head. float sensorToWorldScale = getEyeHeight() / getUserEyeHeight(); + qCDebug(interfaceapp) << sensorToWorldScale; glm::mat4 desiredMat = createMatFromScaleQuatAndPos(glm::vec3(sensorToWorldScale), getWorldOrientation(), getWorldPosition()); _sensorToWorldMatrix = desiredMat * glm::inverse(_bodySensorMatrix); @@ -1742,6 +1743,10 @@ controller::Pose MyAvatar::getControllerPoseInSensorFrame(controller::Action act controller::Pose MyAvatar::getControllerPoseInWorldFrame(controller::Action action) const { auto pose = getControllerPoseInSensorFrame(action); + glm::mat4 printout = getSensorToWorldMatrix(); + if (action == controller::Action::HEAD) { + //qCDebug(interfaceapp) << "matrix 4 sensor to world" << printout; + } if (pose.valid) { return pose.transform(getSensorToWorldMatrix()); } else { @@ -1751,6 +1756,7 @@ controller::Pose MyAvatar::getControllerPoseInWorldFrame(controller::Action acti controller::Pose MyAvatar::getControllerPoseInAvatarFrame(controller::Action action) const { auto pose = getControllerPoseInWorldFrame(action); + // qCDebug(interfaceapp) << " the head position in world frame is " << pose.getTranslation(); if (pose.valid) { glm::mat4 invAvatarMatrix = glm::inverse(createMatFromQuatAndPos(getWorldOrientation(), getWorldPosition())); return pose.transform(invAvatarMatrix); diff --git a/interface/src/avatar/MySkeletonModel.cpp b/interface/src/avatar/MySkeletonModel.cpp index 0fc5e7521e..6bc0c8fefa 100644 --- a/interface/src/avatar/MySkeletonModel.cpp +++ b/interface/src/avatar/MySkeletonModel.cpp @@ -116,7 +116,9 @@ void MySkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) { // input action is the highest priority source for head orientation. auto avatarHeadPose = myAvatar->getControllerPoseInAvatarFrame(controller::Action::HEAD); + if (avatarHeadPose.isValid()) { + //qCDebug(interfaceapp) << " the head position in avatar frame is " << avatarHeadPose.getTranslation(); AnimPose pose(avatarHeadPose.getRotation(), avatarHeadPose.getTranslation()); params.primaryControllerPoses[Rig::PrimaryControllerType_Head] = avatarToRigPose * pose; params.primaryControllerFlags[Rig::PrimaryControllerType_Head] = (uint8_t)Rig::ControllerFlags::Enabled; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 69356cdfaa..0fda5be77b 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1761,6 +1761,7 @@ void Avatar::ensureInScene(AvatarSharedPointer self, const render::ScenePointer& // thread-safe float Avatar::getEyeHeight() const { + qCDebug(animation) << "modelscale "< Date: Wed, 8 Aug 2018 09:18:28 -0700 Subject: [PATCH 2/8] removed print statements --- interface/src/Application.cpp | 1 + interface/src/avatar/MyAvatar.cpp | 6 ------ interface/src/avatar/MySkeletonModel.cpp | 2 -- libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index d1871c7692..0bbd2b1c17 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -8133,6 +8133,7 @@ void Application::setDisplayPlugin(DisplayPluginPointer newDisplayPlugin) { // reset the avatar, to set head and hand palms back to a reasonable default pose. getMyAvatar()->reset(false); + // switch to first person if entering hmd and setting is checked if (menu) { QAction* action = menu->getActionForOption(newDisplayPlugin->getName()); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 0fdd7edb7a..3f738ea4cb 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -806,7 +806,6 @@ void MyAvatar::updateSensorToWorldMatrix() { // update the sensor mat so that the body position will end up in the desired // position when driven from the head. float sensorToWorldScale = getEyeHeight() / getUserEyeHeight(); - qCDebug(interfaceapp) << sensorToWorldScale; glm::mat4 desiredMat = createMatFromScaleQuatAndPos(glm::vec3(sensorToWorldScale), getWorldOrientation(), getWorldPosition()); _sensorToWorldMatrix = desiredMat * glm::inverse(_bodySensorMatrix); @@ -1743,10 +1742,6 @@ controller::Pose MyAvatar::getControllerPoseInSensorFrame(controller::Action act controller::Pose MyAvatar::getControllerPoseInWorldFrame(controller::Action action) const { auto pose = getControllerPoseInSensorFrame(action); - glm::mat4 printout = getSensorToWorldMatrix(); - if (action == controller::Action::HEAD) { - //qCDebug(interfaceapp) << "matrix 4 sensor to world" << printout; - } if (pose.valid) { return pose.transform(getSensorToWorldMatrix()); } else { @@ -1756,7 +1751,6 @@ controller::Pose MyAvatar::getControllerPoseInWorldFrame(controller::Action acti controller::Pose MyAvatar::getControllerPoseInAvatarFrame(controller::Action action) const { auto pose = getControllerPoseInWorldFrame(action); - // qCDebug(interfaceapp) << " the head position in world frame is " << pose.getTranslation(); if (pose.valid) { glm::mat4 invAvatarMatrix = glm::inverse(createMatFromQuatAndPos(getWorldOrientation(), getWorldPosition())); return pose.transform(invAvatarMatrix); diff --git a/interface/src/avatar/MySkeletonModel.cpp b/interface/src/avatar/MySkeletonModel.cpp index 6bc0c8fefa..0fc5e7521e 100644 --- a/interface/src/avatar/MySkeletonModel.cpp +++ b/interface/src/avatar/MySkeletonModel.cpp @@ -116,9 +116,7 @@ void MySkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) { // input action is the highest priority source for head orientation. auto avatarHeadPose = myAvatar->getControllerPoseInAvatarFrame(controller::Action::HEAD); - if (avatarHeadPose.isValid()) { - //qCDebug(interfaceapp) << " the head position in avatar frame is " << avatarHeadPose.getTranslation(); AnimPose pose(avatarHeadPose.getRotation(), avatarHeadPose.getTranslation()); params.primaryControllerPoses[Rig::PrimaryControllerType_Head] = avatarToRigPose * pose; params.primaryControllerFlags[Rig::PrimaryControllerType_Head] = (uint8_t)Rig::ControllerFlags::Enabled; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 0fda5be77b..69356cdfaa 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1761,7 +1761,6 @@ void Avatar::ensureInScene(AvatarSharedPointer self, const render::ScenePointer& // thread-safe float Avatar::getEyeHeight() const { - qCDebug(animation) << "modelscale "< Date: Tue, 21 Aug 2018 11:18:00 +1200 Subject: [PATCH 3/8] Reduce strength of teleport parabola --- scripts/system/controllers/controllerModules/teleport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/teleport.js b/scripts/system/controllers/controllerModules/teleport.js index 92e3168147..2253432f48 100644 --- a/scripts/system/controllers/controllerModules/teleport.js +++ b/scripts/system/controllers/controllerModules/teleport.js @@ -110,7 +110,7 @@ Script.include("/~/system/libraries/controllers.js"); SEAT: 'seat' // The current target is a seat }; - var speed = 12.0; + var speed = 9.3; var accelerationAxis = {x: 0.0, y: -5.0, z: 0.0}; function Teleporter(hand) { From 5ae604f341510caba2efb639e774118eda59fc97 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 21 Aug 2018 12:14:32 -0700 Subject: [PATCH 4/8] REmove the texture Transform for deferred_light slv which then makes it work correctly on AMD --- .../gpu-gl-common/src/gpu/gl/GLBackendShader.cpp | 4 +++- .../render-utils/src/DeferredLightingEffect.cpp | 14 ++++++++------ libraries/render-utils/src/deferred_light.slv | 6 +++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp index 88d2e8609f..4e00fb4871 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..fb73ee0dfc 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -135,7 +135,7 @@ static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePoint if (lightVolume) { PrepareStencil::testShape(*state); - state->setCullMode(gpu::State::CULL_BACK); + state->setCullMode(gpu::State::CULL_NONE); //state->setCullMode(gpu::State::CULL_FRONT); //state->setDepthTest(true, false, gpu::GREATER_EQUAL); //state->setDepthClampEnable(true); @@ -496,9 +496,10 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, batch.setPipeline(program); } + // NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) // 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)); + // 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,7 +561,8 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext batch.setViewportTransform(viewport); batch.setStateScissorRect(viewport); - auto textureFrameTransform = gpu::Framebuffer::evalSubregionTexcoordTransformCoefficients(deferredFramebuffer->getFrameSize(), viewport); + // NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) + // auto textureFrameTransform = gpu::Framebuffer::evalSubregionTexcoordTransformCoefficients(deferredFramebuffer->getFrameSize(), viewport); auto& lightIndices = lightClusters->_visibleLightIndices; @@ -569,14 +571,14 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext // Local light pipeline batch.setPipeline(deferredLightingEffect->_localLight); - batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast(&textureFrameTransform)); + // 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._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..7468be9655 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -16,7 +16,7 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; -layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; +//layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; void main(void) { const float depth = 1.0; @@ -30,8 +30,8 @@ void main(void) { _texCoord01.xy = (pos.xy + 1.0) * 0.5; - _texCoord01.xy *= texcoordFrameTransform.zw; - _texCoord01.xy += texcoordFrameTransform.xy; + // _texCoord01.xy *= texcoordFrameTransform.zw; + // _texCoord01.xy += texcoordFrameTransform.xy; gl_Position = pos; } From b7d8b92fb5e2795402401ae35eb5618873d067e7 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 21 Aug 2018 12:25:27 -0700 Subject: [PATCH 5/8] Add comment in shader and fix bad cull mode --- libraries/render-utils/src/DeferredLightingEffect.cpp | 2 +- libraries/render-utils/src/deferred_light.slv | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index fb73ee0dfc..91d196f896 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -135,7 +135,7 @@ static void loadLightProgram(int programId, bool lightVolume, gpu::PipelinePoint if (lightVolume) { PrepareStencil::testShape(*state); - state->setCullMode(gpu::State::CULL_NONE); + state->setCullMode(gpu::State::CULL_BACK); //state->setCullMode(gpu::State::CULL_FRONT); //state->setDepthTest(true, false, gpu::GREATER_EQUAL); //state->setDepthClampEnable(true); diff --git a/libraries/render-utils/src/deferred_light.slv b/libraries/render-utils/src/deferred_light.slv index 7468be9655..0bc7a0f807 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -16,6 +16,7 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; +// NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) //layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; void main(void) { From 8c5aab7fa04577836fdcbfed4cd2564b6091a574 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 21 Aug 2018 12:30:31 -0700 Subject: [PATCH 6/8] tabs! --- libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp index 4e00fb4871..7267e29be2 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp @@ -256,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: #" << location; + qWarning() << "Unexpected location requested for shader: #" << location; return INVALID_UNIFORM_INDEX; } return itr->second; From 6b994ba39a27cbc4ff895947973d05a7433f865e Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 21 Aug 2018 14:51:54 -0700 Subject: [PATCH 7/8] Completely remove the texcoord frame transform as we don;t use it at all --- libraries/render-utils/src/DeferredLightingEffect.cpp | 11 ----------- libraries/render-utils/src/deferred_light.slv | 10 +++++++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 91d196f896..af5a3f3e63 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -496,11 +496,6 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, batch.setPipeline(program); } - // NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) - // 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); @@ -561,24 +556,18 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext batch.setViewportTransform(viewport); batch.setStateScissorRect(viewport); - // NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) - // 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 0bc7a0f807..4ea3133718 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -16,8 +16,10 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; +#ifdef RENDER_UTILS_USE_TEXCOORD_FRAME_TRANSFORM // NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) -//layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; +layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; +#endif void main(void) { const float depth = 1.0; @@ -31,8 +33,10 @@ void main(void) { _texCoord01.xy = (pos.xy + 1.0) * 0.5; - // _texCoord01.xy *= texcoordFrameTransform.zw; - // _texCoord01.xy += texcoordFrameTransform.xy; +#ifdef RENDER_UTILS_USE_TEXCOORD_FRAME_TRANSFORM + _texCoord01.xy *= texcoordFrameTransform.zw; + _texCoord01.xy += texcoordFrameTransform.xy; +#endif gl_Position = pos; } From 30c0c44822fe0817e93d1007465a9792441cce84 Mon Sep 17 00:00:00 2001 From: sam gateau Date: Tue, 21 Aug 2018 14:52:42 -0700 Subject: [PATCH 8/8] Completely remove the texcoord frame transform as we don;t use it at all --- libraries/render-utils/src/deferred_light.slv | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libraries/render-utils/src/deferred_light.slv b/libraries/render-utils/src/deferred_light.slv index 4ea3133718..164fd9fb3b 100644 --- a/libraries/render-utils/src/deferred_light.slv +++ b/libraries/render-utils/src/deferred_light.slv @@ -16,11 +16,6 @@ layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01; -#ifdef RENDER_UTILS_USE_TEXCOORD_FRAME_TRANSFORM -// NOTE: WE are assuming that the deferred lighting pass is always full screen so this texture transform is not needed (and cause problems on AMD) -layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform; -#endif - void main(void) { const float depth = 1.0; const vec4 UNIT_QUAD[4] = vec4[4]( @@ -33,10 +28,5 @@ void main(void) { _texCoord01.xy = (pos.xy + 1.0) * 0.5; -#ifdef RENDER_UTILS_USE_TEXCOORD_FRAME_TRANSFORM - _texCoord01.xy *= texcoordFrameTransform.zw; - _texCoord01.xy += texcoordFrameTransform.xy; -#endif - gl_Position = pos; }