UFO: Alien Invasion
Doxygen documentation generating
model_devtools_fs.glsl
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief Developer tools for battlescape model fragment shader.
4  */
5 
6 vec4 ApplyDeveloperTools(vec4 color, vec3 sunDirection, vec3 normalmap) {
7  vec4 finalColor = color;
8  vec3 lightVec = normalize(sunDirection);
9 
10 #if r_debug_normals
11  finalColor.rgb = finalColor.rgb * 0.01 + dot(sunDirection, normalmap);
12  finalColor.a = 1.0;
13 #endif
14 
15 #if r_debug_tangents
16  finalColor.rgb = finalColor.rgb * 0.01 + sunDirection;
17  finalColor.a = 1.0;
18 #endif
19 
20  return finalColor;
21 }