mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into interstitial-final-page
This commit is contained in:
commit
71e8ccd190
5 changed files with 5 additions and 16 deletions
|
@ -212,6 +212,8 @@ GLShader* GLBackend::compileBackendProgram(const Shader& program, const Shader::
|
||||||
glprogram = ::gl::buildProgram(shaderGLObjects);
|
glprogram = ::gl::buildProgram(shaderGLObjects);
|
||||||
|
|
||||||
if (!::gl::linkProgram(glprogram, compilationLogs[version].message)) {
|
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);
|
glDeleteProgram(glprogram);
|
||||||
glprogram = 0;
|
glprogram = 0;
|
||||||
return nullptr;
|
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
|
// 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
|
// that's a bug from the calling code, because it means that location wasn't in the
|
||||||
// reflection
|
// reflection
|
||||||
qWarning() << "Unexpected location requested for shader";
|
qWarning() << "Unexpected location requested for shader: #" << location;
|
||||||
return INVALID_UNIFORM_INDEX;
|
return INVALID_UNIFORM_INDEX;
|
||||||
}
|
}
|
||||||
return itr->second;
|
return itr->second;
|
||||||
|
|
|
@ -496,10 +496,6 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext,
|
||||||
batch.setPipeline(program);
|
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
|
// Setup the global lighting
|
||||||
deferredLightingEffect->setupKeyLightBatch(args, batch);
|
deferredLightingEffect->setupKeyLightBatch(args, batch);
|
||||||
|
|
||||||
|
@ -560,23 +556,18 @@ void RenderDeferredLocals::run(const render::RenderContextPointer& renderContext
|
||||||
batch.setViewportTransform(viewport);
|
batch.setViewportTransform(viewport);
|
||||||
batch.setStateScissorRect(viewport);
|
batch.setStateScissorRect(viewport);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,6 +282,7 @@ void Model::reset() {
|
||||||
const FBXGeometry& geometry = getFBXGeometry();
|
const FBXGeometry& geometry = getFBXGeometry();
|
||||||
_rig.reset(geometry);
|
_rig.reset(geometry);
|
||||||
emit rigReset();
|
emit rigReset();
|
||||||
|
emit rigReady();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
layout(location=RENDER_UTILS_ATTR_TEXCOORD01) out vec4 _texCoord01;
|
||||||
|
|
||||||
layout(location=RENDER_UTILS_UNIFORM_LIGHT_TEXCOORD_TRANSFORM) uniform vec4 texcoordFrameTransform;
|
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
const float depth = 1.0;
|
const float depth = 1.0;
|
||||||
const vec4 UNIT_QUAD[4] = vec4[4](
|
const vec4 UNIT_QUAD[4] = vec4[4](
|
||||||
|
@ -30,8 +28,5 @@ void main(void) {
|
||||||
|
|
||||||
_texCoord01.xy = (pos.xy + 1.0) * 0.5;
|
_texCoord01.xy = (pos.xy + 1.0) * 0.5;
|
||||||
|
|
||||||
_texCoord01.xy *= texcoordFrameTransform.zw;
|
|
||||||
_texCoord01.xy += texcoordFrameTransform.xy;
|
|
||||||
|
|
||||||
gl_Position = pos;
|
gl_Position = pos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
SEAT: 'seat' // The current target is a seat
|
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};
|
var accelerationAxis = {x: 0.0, y: -5.0, z: 0.0};
|
||||||
|
|
||||||
function Teleporter(hand) {
|
function Teleporter(hand) {
|
||||||
|
|
Loading…
Reference in a new issue