Review PBR shaders

Issue was related to vertex tangent attibutes not uploaded to GPU, a quick solution was implemented for new vertex attributes loading for already existing meshes... I don't like it specially but it will work for now.
This commit is contained in:
Ray
2019-04-05 16:43:09 +02:00
parent 0f9fe34c3a
commit c600dd0766
6 changed files with 41 additions and 6 deletions

View File

@ -9,7 +9,7 @@
#version 330
// Input vertex attributes (from vertex shader)
in vec3 fragPos;
in vec3 fragPosition;
// Input uniform values
uniform samplerCube environmentMap;
@ -23,7 +23,7 @@ out vec4 finalColor;
void main()
{
// The sample direction equals the hemisphere's orientation
vec3 normal = normalize(fragPos);
vec3 normal = normalize(fragPosition);
vec3 irradiance = vec3(0.0);