Don't output tangents and bitangents to fragement shader
This commit is contained in:
parent
da3c56af36
commit
9a3240b25f
|
@ -14,9 +14,6 @@ in vec3 vs_frag_pos;
|
||||||
|
|
||||||
in mat3 vs_tbn;
|
in mat3 vs_tbn;
|
||||||
|
|
||||||
in vec3 vs_tangent;
|
|
||||||
in vec3 vs_bitangent;
|
|
||||||
|
|
||||||
const int SAMP_DIFFUSE = 0;
|
const int SAMP_DIFFUSE = 0;
|
||||||
const int SAMP_SPECULAR = 1;
|
const int SAMP_SPECULAR = 1;
|
||||||
|
|
||||||
|
@ -49,8 +46,6 @@ void main() {
|
||||||
|
|
||||||
|
|
||||||
fs_color = vec4(lighting, 1.f) * texture(u_material.diffuse, vs_texcoord);
|
fs_color = vec4(lighting, 1.f) * texture(u_material.diffuse, vs_texcoord);
|
||||||
//fs_color = vec4(vs_tangent, 1.f);
|
|
||||||
//fs_color = vec4(vs_bitangent, 1.f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3 calculate_lighting() {
|
vec3 calculate_lighting() {
|
||||||
|
|
|
@ -22,9 +22,6 @@ out vec3 vs_frag_pos;
|
||||||
|
|
||||||
out mat3 vs_tbn;
|
out mat3 vs_tbn;
|
||||||
|
|
||||||
out vec3 vs_tangent;
|
|
||||||
out vec3 vs_bitangent;
|
|
||||||
|
|
||||||
uniform mat4 u_transform_matrix;
|
uniform mat4 u_transform_matrix;
|
||||||
uniform mat4 u_view_matrix;
|
uniform mat4 u_view_matrix;
|
||||||
uniform mat4 u_projection_matrix;
|
uniform mat4 u_projection_matrix;
|
||||||
|
@ -55,7 +52,4 @@ void main() {
|
||||||
vec3 B = normalize(vec3(u_transform_matrix * vec4(vertex_bitangent, 1.f)));
|
vec3 B = normalize(vec3(u_transform_matrix * vec4(vertex_bitangent, 1.f)));
|
||||||
vec3 N = normalize(vec3(u_transform_matrix * vec4(vertex_normal, 1.f)));
|
vec3 N = normalize(vec3(u_transform_matrix * vec4(vertex_normal, 1.f)));
|
||||||
vs_tbn = mat3(T, B, N);
|
vs_tbn = mat3(T, B, N);
|
||||||
|
|
||||||
vs_tangent = vertex_tangent;
|
|
||||||
vs_bitangent = vertex_bitangent;
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue