mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 20:03:06 +02:00
Merge pull request #13155 from highfidelity/RC67.1
Beta Release 67.1 - branched at Developer Release 8260
This commit is contained in:
commit
0991bf106d
9 changed files with 75 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
|
||||||
|
|
|
@ -270,18 +270,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);
|
||||||
|
|
|
@ -16,11 +16,21 @@
|
||||||
<@include ForwardGlobalLight.slh@>
|
<@include ForwardGlobalLight.slh@>
|
||||||
<$declareEvalSkyboxGlobalColor()$>
|
<$declareEvalSkyboxGlobalColor()$>
|
||||||
|
|
||||||
|
|
||||||
// the interpolated normal
|
// the interpolated normal
|
||||||
in vec3 _normalWS;
|
in vec3 _normalWS;
|
||||||
|
in vec3 _normalMS;
|
||||||
in vec4 _color;
|
in vec4 _color;
|
||||||
|
in vec2 _texCoord0;
|
||||||
|
in vec4 _positionMS;
|
||||||
in vec4 _positionES;
|
in vec4 _positionES;
|
||||||
|
|
||||||
|
// For retro-compatibility
|
||||||
|
#define _normal _normalWS
|
||||||
|
#define _modelNormal _normalMS
|
||||||
|
#define _position _positionMS
|
||||||
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
layout(location = 0) out vec4 _fragColor0;
|
layout(location = 0) out vec4 _fragColor0;
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
|
@ -18,9 +18,18 @@
|
||||||
|
|
||||||
// the interpolated normal
|
// the interpolated normal
|
||||||
in vec3 _normalWS;
|
in vec3 _normalWS;
|
||||||
|
in vec3 _normalMS;
|
||||||
in vec4 _color;
|
in vec4 _color;
|
||||||
|
in vec2 _texCoord0;
|
||||||
|
in vec4 _positionMS;
|
||||||
in vec4 _positionES;
|
in vec4 _positionES;
|
||||||
|
|
||||||
|
// For retro-compatibility
|
||||||
|
#define _normal _normalWS
|
||||||
|
#define _modelNormal _normalMS
|
||||||
|
#define _position _positionMS
|
||||||
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
layout(location = 0) out vec4 _fragColor0;
|
layout(location = 0) out vec4 _fragColor0;
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
|
@ -16,7 +16,17 @@
|
||||||
|
|
||||||
// the interpolated normal
|
// the interpolated normal
|
||||||
in vec3 _normalWS;
|
in vec3 _normalWS;
|
||||||
|
in vec3 _normalMS;
|
||||||
in vec4 _color;
|
in vec4 _color;
|
||||||
|
in vec2 _texCoord0;
|
||||||
|
in vec4 _positionMS;
|
||||||
|
in vec4 _positionES;
|
||||||
|
|
||||||
|
// For retro-compatibility
|
||||||
|
#define _normal _normalWS
|
||||||
|
#define _modelNormal _normalMS
|
||||||
|
#define _position _positionMS
|
||||||
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,19 @@
|
||||||
|
|
||||||
// the interpolated normal
|
// the interpolated normal
|
||||||
in vec3 _normalWS;
|
in vec3 _normalWS;
|
||||||
|
in vec3 _normalMS;
|
||||||
in vec4 _color;
|
in vec4 _color;
|
||||||
|
in vec2 _texCoord0;
|
||||||
|
in vec4 _positionMS;
|
||||||
|
in vec4 _positionES;
|
||||||
in vec4 _positionWS;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
|
// For retro-compatibility
|
||||||
|
#define _normal _normalWS
|
||||||
|
#define _modelNormal _normalMS
|
||||||
|
#define _position _positionMS
|
||||||
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
||||||
#line 1001
|
#line 1001
|
||||||
|
|
|
@ -16,7 +16,17 @@
|
||||||
|
|
||||||
// the interpolated normal
|
// the interpolated normal
|
||||||
in vec3 _normalWS;
|
in vec3 _normalWS;
|
||||||
|
in vec3 _normalMS;
|
||||||
in vec4 _color;
|
in vec4 _color;
|
||||||
|
in vec2 _texCoord0;
|
||||||
|
in vec4 _positionMS;
|
||||||
|
in vec4 _positionES;
|
||||||
|
|
||||||
|
// For retro-compatibility
|
||||||
|
#define _normal _normalWS
|
||||||
|
#define _modelNormal _normalMS
|
||||||
|
#define _position _positionMS
|
||||||
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue