mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:37:12 +02:00
Fixed some shader program link errors
This commit is contained in:
parent
190e9313c7
commit
8ef25301cb
12 changed files with 75 additions and 75 deletions
|
@ -22,19 +22,19 @@
|
||||||
<@include Fade.slh@>
|
<@include Fade.slh@>
|
||||||
<$declareFadeFragment()$>
|
<$declareFadeFragment()$>
|
||||||
|
|
||||||
in vec4 _position;
|
in vec4 _positionES;
|
||||||
in vec2 _texCoord0;
|
in vec2 _texCoord0;
|
||||||
in vec2 _texCoord1;
|
in vec2 _texCoord1;
|
||||||
in vec3 _normal;
|
in vec3 _normalWS;
|
||||||
in vec3 _color;
|
in vec3 _color;
|
||||||
in vec4 _worldPosition;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec3 fadeEmissive;
|
vec3 fadeEmissive;
|
||||||
FadeObjectParams fadeParams;
|
FadeObjectParams fadeParams;
|
||||||
|
|
||||||
<$fetchFadeObjectParams(fadeParams)$>
|
<$fetchFadeObjectParams(fadeParams)$>
|
||||||
applyFade(fadeParams, _worldPosition.xyz, fadeEmissive);
|
applyFade(fadeParams, _positionWS.xyz, fadeEmissive);
|
||||||
|
|
||||||
Material mat = getMaterial();
|
Material mat = getMaterial();
|
||||||
BITFIELD matKey = getMaterialKey(mat);
|
BITFIELD matKey = getMaterialKey(mat);
|
||||||
|
@ -61,7 +61,7 @@ void main(void) {
|
||||||
float scattering = getMaterialScattering(mat);
|
float scattering = getMaterialScattering(mat);
|
||||||
|
|
||||||
packDeferredFragment(
|
packDeferredFragment(
|
||||||
normalize(_normal),
|
normalize(_normalWS),
|
||||||
opacity,
|
opacity,
|
||||||
albedo,
|
albedo,
|
||||||
roughness,
|
roughness,
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
|
@ -38,7 +38,7 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, inPosition, _worldPosition)$>
|
<$transformModelToWorldPos(obj, inPosition, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normal)$>
|
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normalWS)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<$VERSION_HEADER$>
|
<$VERSION_HEADER$>
|
||||||
// Generated on <$_SCRIBE_DATE$>
|
// Generated on <$_SCRIBE_DATE$>
|
||||||
//
|
//
|
||||||
// model_normal_specular_map_fade.frag
|
// model_normal_map_fade.frag
|
||||||
// fragment shader
|
// fragment shader
|
||||||
//
|
//
|
||||||
// Created by Olivier Prat on 06/05/17.
|
// Created by Olivier Prat on 06/05/17.
|
||||||
|
@ -22,20 +22,20 @@
|
||||||
<@include Fade.slh@>
|
<@include Fade.slh@>
|
||||||
<$declareFadeFragment()$>
|
<$declareFadeFragment()$>
|
||||||
|
|
||||||
in vec4 _position;
|
in vec4 _positionES;
|
||||||
in vec2 _texCoord0;
|
in vec2 _texCoord0;
|
||||||
in vec2 _texCoord1;
|
in vec2 _texCoord1;
|
||||||
in vec3 _normal;
|
in vec3 _normalWS;
|
||||||
in vec3 _tangent;
|
in vec3 _tangentWS;
|
||||||
in vec3 _color;
|
in vec3 _color;
|
||||||
in vec4 _worldPosition;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec3 fadeEmissive;
|
vec3 fadeEmissive;
|
||||||
FadeObjectParams fadeParams;
|
FadeObjectParams fadeParams;
|
||||||
|
|
||||||
<$fetchFadeObjectParams(fadeParams)$>
|
<$fetchFadeObjectParams(fadeParams)$>
|
||||||
applyFade(fadeParams, _worldPosition.xyz, fadeEmissive);
|
applyFade(fadeParams, _positionWS.xyz, fadeEmissive);
|
||||||
|
|
||||||
Material mat = getMaterial();
|
Material mat = getMaterial();
|
||||||
BITFIELD matKey = getMaterialKey(mat);
|
BITFIELD matKey = getMaterialKey(mat);
|
||||||
|
@ -56,8 +56,8 @@ void main(void) {
|
||||||
vec3 emissive = getMaterialEmissive(mat);
|
vec3 emissive = getMaterialEmissive(mat);
|
||||||
<$evalMaterialEmissive(emissiveTex, emissive, matKey, emissive)$>;
|
<$evalMaterialEmissive(emissiveTex, emissive, matKey, emissive)$>;
|
||||||
|
|
||||||
vec3 fragNormal;
|
vec3 fragNormalWS;
|
||||||
<$evalMaterialNormalLOD(_position, normalTex, _normal, _tangent, fragNormal)$>
|
<$evalMaterialNormalLOD(_positionES, normalTex, _normalWS, _tangentWS, fragNormalWS)$>
|
||||||
|
|
||||||
float metallic = getMaterialMetallic(mat);
|
float metallic = getMaterialMetallic(mat);
|
||||||
<$evalMaterialMetallic(metallicTex, metallic, matKey, metallic)$>;
|
<$evalMaterialMetallic(metallicTex, metallic, matKey, metallic)$>;
|
||||||
|
@ -65,12 +65,12 @@ void main(void) {
|
||||||
float scattering = getMaterialScattering(mat);
|
float scattering = getMaterialScattering(mat);
|
||||||
|
|
||||||
packDeferredFragment(
|
packDeferredFragment(
|
||||||
normalize(fragNormal.xyz),
|
normalize(fragNormalWS.xyz),
|
||||||
opacity,
|
opacity,
|
||||||
albedo,
|
albedo,
|
||||||
roughness,
|
roughness,
|
||||||
metallic,
|
metallic,
|
||||||
emissive+fadeEmissive,
|
emissive + fadeEmissive,
|
||||||
occlusionTex,
|
occlusionTex,
|
||||||
scattering);
|
scattering);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _tangent;
|
out vec3 _tangentWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, inPosition, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, inPosition, _worldPosition)$>
|
<$transformModelToWorldPos(obj, inPosition, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normal)$>
|
<$transformModelToWorldDir(cam, obj, inNormal.xyz, _normalWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, inTangent.xyz, _tangent)$>
|
<$transformModelToWorldDir(cam, obj, inTangent.xyz, _tangentWS)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
in vec2 _texCoord0;
|
in vec2 _texCoord0;
|
||||||
in vec3 _color;
|
in vec3 _color;
|
||||||
in float _alpha;
|
in float _alpha;
|
||||||
in vec4 _worldPosition;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
out vec4 _fragColor;
|
out vec4 _fragColor;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ void main(void) {
|
||||||
FadeObjectParams fadeParams;
|
FadeObjectParams fadeParams;
|
||||||
|
|
||||||
<$fetchFadeObjectParams(fadeParams)$>
|
<$fetchFadeObjectParams(fadeParams)$>
|
||||||
applyFade(fadeParams, _worldPosition.xyz, fadeEmissive);
|
applyFade(fadeParams, _positionWS.xyz, fadeEmissive);
|
||||||
|
|
||||||
Material mat = getMaterial();
|
Material mat = getMaterial();
|
||||||
BITFIELD matKey = getMaterialKey(mat);
|
BITFIELD matKey = getMaterialKey(mat);
|
||||||
|
|
|
@ -23,17 +23,17 @@
|
||||||
<$declareMaterialTextures(ALBEDO)$>
|
<$declareMaterialTextures(ALBEDO)$>
|
||||||
|
|
||||||
in vec2 _texCoord0;
|
in vec2 _texCoord0;
|
||||||
in vec3 _normal;
|
in vec3 _normalWS;
|
||||||
in vec3 _color;
|
in vec3 _color;
|
||||||
in float _alpha;
|
in float _alpha;
|
||||||
in vec4 _worldPosition;
|
in vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec3 fadeEmissive;
|
vec3 fadeEmissive;
|
||||||
FadeObjectParams fadeParams;
|
FadeObjectParams fadeParams;
|
||||||
|
|
||||||
<$fetchFadeObjectParams(fadeParams)$>
|
<$fetchFadeObjectParams(fadeParams)$>
|
||||||
applyFade(fadeParams, _worldPosition.xyz, fadeEmissive);
|
applyFade(fadeParams, _positionWS.xyz, fadeEmissive);
|
||||||
|
|
||||||
Material mat = getMaterial();
|
Material mat = getMaterial();
|
||||||
BITFIELD matKey = getMaterialKey(mat);
|
BITFIELD matKey = getMaterialKey(mat);
|
||||||
|
@ -48,7 +48,7 @@ void main(void) {
|
||||||
albedo *= _color;
|
albedo *= _color;
|
||||||
albedo += fadeEmissive;
|
albedo += fadeEmissive;
|
||||||
packDeferredFragmentUnlit(
|
packDeferredFragmentUnlit(
|
||||||
normalize(_normal),
|
normalize(_normalWS),
|
||||||
opacity,
|
opacity,
|
||||||
albedo * isUnlitEnabled());
|
albedo * isUnlitEnabled());
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -48,7 +48,7 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, position, _worldPosition)$>
|
<$transformModelToWorldPos(obj, position, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, _normal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, _normalWS.xyz)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -48,7 +48,7 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, position, _worldPosition)$>
|
<$transformModelToWorldPos(obj, position, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, _normal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, _normalWS.xyz)$>
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _tangent;
|
out vec3 _tangentWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
||||||
|
|
||||||
_normal = interpolatedNormal.xyz;
|
_normalWS = interpolatedNormal.xyz;
|
||||||
_tangent = interpolatedTangent.xyz;
|
_tangentWS = interpolatedTangent.xyz;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _tangent;
|
out vec3 _tangentWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
||||||
|
|
||||||
_normal = interpolatedNormal.xyz;
|
_normalWS = interpolatedNormal.xyz;
|
||||||
_tangent = interpolatedTangent.xyz;
|
_tangentWS = interpolatedTangent.xyz;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _tangent;
|
out vec3 _tangentWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -53,11 +53,11 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, position, _worldPosition)$>
|
<$transformModelToWorldPos(obj, position, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
||||||
|
|
||||||
_normal = interpolatedNormal.xyz;
|
_normalWS = interpolatedNormal.xyz;
|
||||||
_tangent = interpolatedTangent.xyz;
|
_tangentWS = interpolatedTangent.xyz;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
<@include MaterialTextures.slh@>
|
<@include MaterialTextures.slh@>
|
||||||
<$declareMaterialTexMapArrayBuffer()$>
|
<$declareMaterialTexMapArrayBuffer()$>
|
||||||
|
|
||||||
out vec4 _position;
|
out vec4 _positionES;
|
||||||
out vec2 _texCoord0;
|
out vec2 _texCoord0;
|
||||||
out vec2 _texCoord1;
|
out vec2 _texCoord1;
|
||||||
out vec3 _normal;
|
out vec3 _normalWS;
|
||||||
out vec3 _tangent;
|
out vec3 _tangentWS;
|
||||||
out vec3 _color;
|
out vec3 _color;
|
||||||
out float _alpha;
|
out float _alpha;
|
||||||
out vec4 _worldPosition;
|
out vec4 _positionWS;
|
||||||
|
|
||||||
void main(void) {
|
void main(void) {
|
||||||
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
vec4 position = vec4(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@ -53,11 +53,11 @@ void main(void) {
|
||||||
// standard transform
|
// standard transform
|
||||||
TransformCamera cam = getTransformCamera();
|
TransformCamera cam = getTransformCamera();
|
||||||
TransformObject obj = getTransformObject();
|
TransformObject obj = getTransformObject();
|
||||||
<$transformModelToEyeAndClipPos(cam, obj, position, _position, gl_Position)$>
|
<$transformModelToEyeAndClipPos(cam, obj, position, _positionES, gl_Position)$>
|
||||||
<$transformModelToWorldPos(obj, position, _worldPosition)$>
|
<$transformModelToWorldPos(obj, position, _positionWS)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedNormal.xyz, interpolatedNormal.xyz)$>
|
||||||
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
<$transformModelToWorldDir(cam, obj, interpolatedTangent.xyz, interpolatedTangent.xyz)$>
|
||||||
|
|
||||||
_normal = interpolatedNormal.xyz;
|
_normalWS = interpolatedNormal.xyz;
|
||||||
_tangent = interpolatedTangent.xyz;
|
_tangentWS = interpolatedTangent.xyz;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue