Includes now use the key #include. Fixed a bug where it would crash if the file is not found. Fixed a bug where null terminators where included from the included file, causing it to stop reading after the first included file.
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
#define MIN_AMBIENT_LIGHT 0.3
|
||||
|
||||
#GLSL "Shaders/Util/CommonUniforms.glsl"
|
||||
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
@@ -118,12 +116,7 @@ LightResult CalcDirectionalLightSource(vec4 direction, vec4 color, float intensi
|
||||
return result;
|
||||
}
|
||||
|
||||
vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textureCoordinate, sampler2D normalMap)
|
||||
{
|
||||
mat3 TBN = mat3(tangent, bitangent, normal);
|
||||
vec3 NormalMap = texture(normalMap, textureCoordinate).xyz * 2.0 - vec3(1.0);
|
||||
return vec4(TBN * normalize(NormalMap), 0.0);
|
||||
}
|
||||
#include "Shaders/Util/CommonUniforms.glsl"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
#define testtest1234;
|
||||
vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textureCoordinate, sampler2D normalMap)
|
||||
{
|
||||
mat3 TBN = mat3(tangent, bitangent, normal);
|
||||
vec3 NormalMap = texture(normalMap, textureCoordinate).xyz * 2.0 - vec3(1.0);
|
||||
return vec4(TBN * normalize(NormalMap), 0.0);
|
||||
}
|
||||
Reference in New Issue
Block a user