mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 06:59:18 +02:00
Cleanup of vertex shader by @tmj.
2-channel normalmaps with Z-component reconstruction. Normal vectors passed from fragment shaders to lightning calculations.
This commit is contained in:
@@ -30,9 +30,11 @@ float calc_shadow()
|
||||
vec2 calc_light(vec3 light_dir)
|
||||
{
|
||||
#ifdef NORMALMAP
|
||||
vec3 normal = normalize(f_tbn * normalize(texture(normalmap, f_coord).rgb * 2.0 - 1.0));
|
||||
vec3 normal = normal;
|
||||
#elif defined(WATER)
|
||||
vec3 normal = normal_d;
|
||||
#elif defined(PARALLAX)
|
||||
vec3 normal = normal_p;
|
||||
#else
|
||||
vec3 normal = normalize(f_normal);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user