Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/base/shaders/world_fs.glsl b/base/shaders/world_fs.glsl
- index 136dfde..31b33d6 100644
- --- a/base/shaders/world_fs.glsl
- +++ b/base/shaders/world_fs.glsl
- @@ -50,10 +50,8 @@ in_qualifier vec3 lightDirs[R_DYNAMIC_LIGHTS];
- * @brief main
- */
- void main(void){
- -
- vec4 finalColor = vec4(0.0);
- -
- /* use new dynamic lighing system, including
- * the Cook-Torrance specularity model with the Phong
- * model as a default if the roughness map isn't enabled */
- @@ -68,19 +66,22 @@ void main(void){
- vec3 lightmap = texture2D(SAMPLER1, gl_TexCoord[1].st).rgb;
- #if r_bumpmap
- + vec4 normalmap;
- if(BUMPMAP > 0){
- /* Sample deluxemap and normalmap.*/
- - vec4 normalmap = texture2D(SAMPLER3, gl_TexCoord[0].st);
- - normalmap.rgb = normalize(two * (normalmap.rgb + negHalf));
- + normalmap = texture2D(SAMPLER3, gl_TexCoord[0].st);
- + } else {
- + normalmap = vec4(0.0, 0.0, 1.0, 0.8);
- + }
- + normalmap.rgb = normalize(two * (normalmap.rgb + negHalf));
- - /* deluxemap contains pre-computed incoming light vectors in object tangent space */
- - vec3 deluxemap = texture2D(SAMPLER2, gl_TexCoord[1].st).rgb;
- - deluxemap = normalize(two * (deluxemap + negHalf));
- + /* deluxemap contains pre-computed incoming light vectors in object tangent space */
- + vec3 deluxemap = texture2D(SAMPLER2, gl_TexCoord[1].st).rgb;
- + deluxemap = normalize(two * (deluxemap + negHalf));
- - /* Resolve parallax offset and bump mapping.*/
- - offset = BumpTexcoord(normalmap.a);
- - bump = BumpFragment(deluxemap, normalmap.rgb);
- - }
- + /* Resolve parallax offset and bump mapping.*/
- + offset = BumpTexcoord(normalmap.a);
- + bump = BumpFragment(deluxemap, normalmap.rgb);
- #endif
- /* Sample the diffuse texture, honoring the parallax offset.*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement