mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
Merge pull request #13158 from highfidelity/stable
RC67.1 stable mergeback to master
This commit is contained in:
commit
a6cda2166a
4 changed files with 26 additions and 13 deletions
|
@ -172,7 +172,7 @@ StackView {
|
||||||
source: InputConfiguration.configurationLayout(box.currentText);
|
source: InputConfiguration.configurationLayout(box.currentText);
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
if (loader.item.hasOwnProperty("pluginName")) {
|
if (loader.item.hasOwnProperty("pluginName")) {
|
||||||
if (box.currentText === "Vive") {
|
if (box.currentText === "HTC Vive") {
|
||||||
loader.item.pluginName = "OpenVR";
|
loader.item.pluginName = "OpenVR";
|
||||||
} else {
|
} else {
|
||||||
loader.item.pluginName = box.currentText;
|
loader.item.pluginName = box.currentText;
|
||||||
|
|
|
@ -251,7 +251,7 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
|
||||||
updateAmbientLightFromEntity(entity);
|
updateAmbientLightFromEntity(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skyboxChanged) {
|
if (skyboxChanged || _proceduralUserData != entity->getUserData()) {
|
||||||
updateKeyBackgroundFromEntity(entity);
|
updateKeyBackgroundFromEntity(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +295,10 @@ bool ZoneEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPoint
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity->getUserData() != _proceduralUserData) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (_typedEntity->getCompoundShapeURL() != _lastShapeURL) {
|
if (_typedEntity->getCompoundShapeURL() != _lastShapeURL) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -35,8 +35,11 @@ void main(void) {
|
||||||
#ifdef PROCEDURAL
|
#ifdef PROCEDURAL
|
||||||
|
|
||||||
vec3 color = getSkyboxColor();
|
vec3 color = getSkyboxColor();
|
||||||
// Procedural Shaders are expected to be Gamma corrected so let's bring back the RGB in linear space for the rest of the pipeline
|
// Protect from NaNs and negative values
|
||||||
color = pow(color, vec3(2.2));
|
color = mix(color, vec3(0), isnan(color));
|
||||||
|
color = max(color, vec3(0));
|
||||||
|
// Procedural Shaders are expected to be Gamma corrected so let's bring back the RGB in linear space for the rest of the pipeline
|
||||||
|
color = pow(color, vec3(2.2));
|
||||||
_fragColor = vec4(color, 0.0);
|
_fragColor = vec4(color, 0.0);
|
||||||
|
|
||||||
// FIXME: scribe does not yet scrub out else statements
|
// FIXME: scribe does not yet scrub out else statements
|
||||||
|
|
|
@ -272,18 +272,24 @@ void Procedural::prepare(gpu::Batch& batch, const glm::vec3& position, const glm
|
||||||
// Leave this here for debugging
|
// Leave this here for debugging
|
||||||
// qCDebug(procedural) << "FragmentShader:\n" << fragmentShaderSource.c_str();
|
// qCDebug(procedural) << "FragmentShader:\n" << fragmentShaderSource.c_str();
|
||||||
|
|
||||||
|
gpu::Shader::BindingSet slotBindings;
|
||||||
|
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel0"), 0));
|
||||||
|
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel1"), 1));
|
||||||
|
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel2"), 2));
|
||||||
|
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel3"), 3));
|
||||||
|
|
||||||
_opaqueFragmentShader = gpu::Shader::createPixel(opaqueShaderSource);
|
_opaqueFragmentShader = gpu::Shader::createPixel(opaqueShaderSource);
|
||||||
_opaqueShader = gpu::Shader::createProgram(_vertexShader, _opaqueFragmentShader);
|
_opaqueShader = gpu::Shader::createProgram(_vertexShader, _opaqueFragmentShader);
|
||||||
_transparentFragmentShader = gpu::Shader::createPixel(transparentShaderSource);
|
gpu::Shader::makeProgram(*_opaqueShader, slotBindings);
|
||||||
_transparentShader = gpu::Shader::createProgram(_vertexShader, _transparentFragmentShader);
|
|
||||||
|
|
||||||
gpu::Shader::BindingSet slotBindings;
|
if (!transparentShaderSource.empty() && transparentShaderSource != opaqueShaderSource) {
|
||||||
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel0"), 0));
|
_transparentFragmentShader = gpu::Shader::createPixel(transparentShaderSource);
|
||||||
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel1"), 1));
|
_transparentShader = gpu::Shader::createProgram(_vertexShader, _transparentFragmentShader);
|
||||||
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel2"), 2));
|
gpu::Shader::makeProgram(*_transparentShader, slotBindings);
|
||||||
slotBindings.insert(gpu::Shader::Binding(std::string("iChannel3"), 3));
|
} else {
|
||||||
gpu::Shader::makeProgram(*_opaqueShader, slotBindings);
|
_transparentFragmentShader = _opaqueFragmentShader;
|
||||||
gpu::Shader::makeProgram(*_transparentShader, slotBindings);
|
_transparentShader = _opaqueShader;
|
||||||
|
}
|
||||||
|
|
||||||
_opaquePipeline = gpu::Pipeline::create(_opaqueShader, _opaqueState);
|
_opaquePipeline = gpu::Pipeline::create(_opaqueShader, _opaqueState);
|
||||||
_transparentPipeline = gpu::Pipeline::create(_transparentShader, _transparentState);
|
_transparentPipeline = gpu::Pipeline::create(_transparentShader, _transparentState);
|
||||||
|
|
Loading…
Reference in a new issue