mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +02:00
Extended to other shaders
This commit is contained in:
parent
eab7dd6006
commit
328f1dec9b
5 changed files with 37 additions and 8 deletions
|
@ -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
|
||||||
|
|
|
@ -23,10 +23,10 @@ in vec4 _positionMS;
|
||||||
in vec4 _positionES;
|
in vec4 _positionES;
|
||||||
|
|
||||||
// For retro-compatibility
|
// For retro-compatibility
|
||||||
#define _normal _normalWS
|
#define _normal _normalWS
|
||||||
#define _modelNormal _normalMS
|
#define _modelNormal _normalMS
|
||||||
#define _position _positionMS
|
#define _position _positionMS
|
||||||
#define _eyePosition _positionES
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
//PROCEDURAL_COMMON_BLOCK
|
//PROCEDURAL_COMMON_BLOCK
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,10 @@ in vec4 _positionES;
|
||||||
in vec4 _positionWS;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
// For retro-compatibility
|
// For retro-compatibility
|
||||||
#define _normal _normalWS
|
#define _normal _normalWS
|
||||||
#define _modelNormal _normalMS
|
#define _modelNormal _normalMS
|
||||||
#define _position _positionMS
|
#define _position _positionMS
|
||||||
#define _eyePosition _positionES
|
#define _eyePosition _positionES
|
||||||
|
|
||||||
//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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue