bc5 normal maps

This commit is contained in:
2021-03-14 16:22:11 +01:00
parent 0c8d09effa
commit c2e3c4e0e4
6 changed files with 52 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ layout(location = 3) in mat3 tbn;
layout(location = 0) out vec4 out_color;
void main() {
vec3 normal_cam_u = texture(normal_tex, tex_coords).rgb;
vec3 normal_cam_u = vec3(texture(normal_tex, tex_coords).rg, 1.0);
normal_cam_u = normal_cam_u * 2.0 - 1.0;
normal_cam_u = normalize(tbn * normal_cam_u);

Binary file not shown.