Some more optimization and fixed sorting of render job objects in RenderSystem

This commit is contained in:
Teejoon
2016-03-09 16:51:24 +01:00
parent d51bea798a
commit 91cad561a4
9 changed files with 372 additions and 137 deletions
+6 -1
View File
@@ -118,7 +118,12 @@ LightResult CalcDirectionalLightSource(vec4 direction, vec4 color, float intensi
return result;
}
#include "Shaders/Util/CommonUniforms.glsl"
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);
}
void main()
{
+1 -2
View File
@@ -1,6 +1,5 @@
#version 430
#include "StandarUniform.glsl"
layout(location = PVM_UNIFORM_LOCATION) uniform mat4 PVM;
uniform mat4 PVM;
layout(location = 0) in vec3 Position;
layout(location = 1) in vec3 Normal;
+1 -2
View File
@@ -1,6 +1,5 @@
#version 430
#include "StandarUniform.glsl"
layout(location = PVM_UNIFORM_LOCATION) uniform mat4 PVM;
uniform mat4 PVM;
uniform mat4 Bones[100];
layout(location = 0) in vec3 Position;