Merge pull request #13149 from SamGondelman/cherry-pick

RC67.1: Fixed procedural shaders
This commit is contained in:
John Conklin II 2018-05-10 23:47:16 -07:00 committed by GitHub
commit b0d19bc08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 1 deletions

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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