]> git.tdb.fi Git - libs/gl.git/commitdiff
Naming tweaks in builtin shaders
authorMikko Rasa <tdb@tdb.fi>
Tue, 23 Jun 2020 14:01:53 +0000 (17:01 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 23 Jun 2020 14:01:53 +0000 (17:01 +0300)
shaderlib/common.glsl
shaderlib/msp_interface.glsl
shaderlib/phong.glsl
shaderlib/singlepass.glsl

index 7222b00f4f2439c0739eeff8dec7d3d97c77c0c3..05648e4c0c106f469b63ed0346dc4c8b32c0c9be 100644 (file)
@@ -65,7 +65,7 @@ void main()
 }
 
 #pragma MSP stage(fragment)
-vec3 get_normal_sample()
+vec3 get_fragment_normal()
 {
        if(use_normal_map)
                return texture(normal_map, texcoord.xy).xyz*2.0-1.0;
@@ -75,7 +75,7 @@ vec3 get_normal_sample()
 
 vec4 get_environment_sample(vec3 direction)
 {
-       return texture(environment, direction);
+       return texture(environment_map, direction);
 }
 
 vec3 get_reflection(vec3 normal, vec3 look)
index b1b887ea68a92b3f11a308d0895e503473cf8f61..c90ab5aaac995aabe99f62f43b5a6112fef6746e 100644 (file)
@@ -57,7 +57,7 @@ uniform ShadowMap
        mat4 shd_eye_matrix;
 };
 
-uniform samplerCube environment;
+uniform samplerCube environment_map;
 uniform EnvMap
 {
        mat3 env_eye_matrix;
index e3b97f5870d4cb93c2fba04934234af20efd8584..90f0ac8ac51ef65f8ed05bc5b44dccdbf9cf28a6 100644 (file)
@@ -101,7 +101,7 @@ void main()
        vec3 look;
        if(use_normal_map)
        {
-               normal = get_normal_sample();
+               normal = get_fragment_normal();
                look = normalize(tbn_look_dir);
        }
        else
index 2de3f6121c71255f4e4bb04a496951cc454bffe3..eef6a5322aabed050dbfa6272a2337d7fd09bfd1 100644 (file)
@@ -72,7 +72,7 @@ vec3 get_normal_sample()
 
 vec4 get_environment_sample(vec3 direction)
 {
-       return texture(environment, direction);
+       return texture(environment_map, direction);
 }
 
 vec3 normal;