mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:58:45 +02:00
Completely remove the texcoord frame transform as we don;t use it at all
This commit is contained in:
parent
8c5aab7fa0
commit
6b994ba39a
2 changed files with 7 additions and 14 deletions
|
@ -496,11 +496,6 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext,
|
||||||
batch.setPipeline(program);
|
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
|
// Setup the global lighting
|
||||||
deferredLightingEffect->setupKeyLightBatch(args, batch);
|
deferredLightingEffect->setupKeyLightBatch(args, batch);
|
||||||
|
|
||||||
|
@ -561,24 +556,18 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext
|
||||||
batch.setViewportTransform(viewport);
|
batch.setViewportTransform(viewport);
|
||||||
batch.setStateScissorRect(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;
|
auto& lightIndices = lightClusters->_visibleLightIndices;
|
||||||
if (!lightIndices.empty() && lightIndices[0] > 0) {
|
if (!lightIndices.empty() && lightIndices[0] > 0) {
|
||||||
deferredLightingEffect->setupLocalLightsBatch(batch, lightClusters);
|
deferredLightingEffect->setupLocalLightsBatch(batch, lightClusters);
|
||||||
|
|
||||||
// Local light pipeline
|
// Local light pipeline
|
||||||
batch.setPipeline(deferredLightingEffect->_localLight);
|
batch.setPipeline(deferredLightingEffect->_localLight);
|
||||||
// batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast<const float*>(&textureFrameTransform));
|
|
||||||
|
|
||||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||||
|
|
||||||
// Draw outline as well ?
|
// Draw outline as well ?
|
||||||
if (lightingModel->isShowLightContourEnabled()) {
|
if (lightingModel->isShowLightContourEnabled()) {
|
||||||
batch.setPipeline(deferredLightingEffect->_localLightOutline);
|
batch.setPipeline(deferredLightingEffect->_localLightOutline);
|
||||||
// batch._glUniform4fv(ru::Uniform::TexcoordTransform, 1, reinterpret_cast<const float*>(&textureFrameTransform));
|
|
||||||
|
|
||||||
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
batch.draw(gpu::TRIANGLE_STRIP, 4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,10 @@
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
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)
|
// 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) {
|
void main(void) {
|
||||||
const float depth = 1.0;
|
const float depth = 1.0;
|
||||||
|
@ -31,8 +33,10 @@ void main(void) {
|
||||||
|
|
||||||
_texCoord01.xy = (pos.xy + 1.0) * 0.5;
|
_texCoord01.xy = (pos.xy + 1.0) * 0.5;
|
||||||
|
|
||||||
// _texCoord01.xy *= texcoordFrameTransform.zw;
|
#ifdef RENDER_UTILS_USE_TEXCOORD_FRAME_TRANSFORM
|
||||||
// _texCoord01.xy += texcoordFrameTransform.xy;
|
_texCoord01.xy *= texcoordFrameTransform.zw;
|
||||||
|
_texCoord01.xy += texcoordFrameTransform.xy;
|
||||||
|
#endif
|
||||||
|
|
||||||
gl_Position = pos;
|
gl_Position = pos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue