mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 01:03:59 +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);
|
||||
onLoaded: {
|
||||
if (loader.item.hasOwnProperty("pluginName")) {
|
||||
if (box.currentText === "Vive") {
|
||||
if (box.currentText === "HTC Vive") {
|
||||
loader.item.pluginName = "OpenVR";
|
||||
} else {
|
||||
loader.item.pluginName = box.currentText;
|
||||
|
|
|
@ -251,7 +251,7 @@ void ZoneEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scen
|
|||
updateAmbientLightFromEntity(entity);
|
||||
}
|
||||
|
||||
if (skyboxChanged) {
|
||||
if (skyboxChanged || _proceduralUserData != entity->getUserData()) {
|
||||
updateKeyBackgroundFromEntity(entity);
|
||||
}
|
||||
|
||||
|
@ -295,6 +295,10 @@ bool ZoneEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPoint
|
|||
return true;
|
||||
}
|
||||
|
||||
if (entity->getUserData() != _proceduralUserData) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (_typedEntity->getCompoundShapeURL() != _lastShapeURL) {
|
||||
return true;
|
||||
|
|
|
@ -35,8 +35,11 @@ void main(void) {
|
|||
#ifdef PROCEDURAL
|
||||
|
||||
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
|
||||
color = pow(color, vec3(2.2));
|
||||
// Protect from NaNs and negative values
|
||||
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);
|
||||
|
||||
// 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
|
||||
// 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);
|
||||
_opaqueShader = gpu::Shader::createProgram(_vertexShader, _opaqueFragmentShader);
|
||||
_transparentFragmentShader = gpu::Shader::createPixel(transparentShaderSource);
|
||||
_transparentShader = gpu::Shader::createProgram(_vertexShader, _transparentFragmentShader);
|
||||
gpu::Shader::makeProgram(*_opaqueShader, slotBindings);
|
||||
|
||||
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));
|
||||
gpu::Shader::makeProgram(*_opaqueShader, slotBindings);
|
||||
gpu::Shader::makeProgram(*_transparentShader, slotBindings);
|
||||
if (!transparentShaderSource.empty() && transparentShaderSource != opaqueShaderSource) {
|
||||
_transparentFragmentShader = gpu::Shader::createPixel(transparentShaderSource);
|
||||
_transparentShader = gpu::Shader::createProgram(_vertexShader, _transparentFragmentShader);
|
||||
gpu::Shader::makeProgram(*_transparentShader, slotBindings);
|
||||
} else {
|
||||
_transparentFragmentShader = _opaqueFragmentShader;
|
||||
_transparentShader = _opaqueShader;
|
||||
}
|
||||
|
||||
_opaquePipeline = gpu::Pipeline::create(_opaqueShader, _opaqueState);
|
||||
_transparentPipeline = gpu::Pipeline::create(_transparentShader, _transparentState);
|
||||
|
|
|
@ -16,11 +16,21 @@
|
|||
<@include ForwardGlobalLight.slh@>
|
||||
<$declareEvalSkyboxGlobalColor()$>
|
||||
|
||||
|
||||
// the interpolated normal
|
||||
in vec3 _normalWS;
|
||||
in vec3 _normalMS;
|
||||
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
|
||||
|
||||
layout(location = 0) out vec4 _fragColor0;
|
||||
|
||||
//PROCEDURAL_COMMON_BLOCK
|
||||
|
|
|
@ -18,9 +18,18 @@
|
|||
|
||||
// the interpolated normal
|
||||
in vec3 _normalWS;
|
||||
in vec3 _normalMS;
|
||||
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
|
||||
|
||||
layout(location = 0) out vec4 _fragColor0;
|
||||
|
||||
//PROCEDURAL_COMMON_BLOCK
|
||||
|
|
|
@ -16,7 +16,17 @@
|
|||
|
||||
// the interpolated normal
|
||||
in vec3 _normalWS;
|
||||
in vec3 _normalMS;
|
||||
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
|
||||
|
||||
|
|
|
@ -19,9 +19,19 @@
|
|||
|
||||
// the interpolated normal
|
||||
in vec3 _normalWS;
|
||||
in vec3 _normalMS;
|
||||
in vec4 _color;
|
||||
in vec2 _texCoord0;
|
||||
in vec4 _positionMS;
|
||||
in vec4 _positionES;
|
||||
in vec4 _positionWS;
|
||||
|
||||
// For retro-compatibility
|
||||
#define _normal _normalWS
|
||||
#define _modelNormal _normalMS
|
||||
#define _position _positionMS
|
||||
#define _eyePosition _positionES
|
||||
|
||||
//PROCEDURAL_COMMON_BLOCK
|
||||
|
||||
#line 1001
|
||||
|
|
|
@ -16,7 +16,17 @@
|
|||
|
||||
// the interpolated normal
|
||||
in vec3 _normalWS;
|
||||
in vec3 _normalMS;
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue