Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/assets/shaders/GLSL/fragmentAtoms/phong_lighting.frag

Diff revisions: vs.
  @@ -15,23 +15,24 @@
15 15 vec4 Phong(in vec2 texCoord, in vec3 normal){
16 16
17 17 #if defined(USE_OPACITY_MAP)
18 - float alpha = texture(opacityMap, texCoord).a;
19 18 // discard material if it is bellow opacity threshold
20 - if(alpha < ALPHA_DISCARD_THRESHOLD) discard;
21 - #endif
19 + if(texture(texOpacityMap, texCoord).a < ALPHA_DISCARD_THRESHOLD) discard;
20 + #else
22 21 if(opacity< ALPHA_DISCARD_THRESHOLD) discard;
22 + #endif
23 +
23 24
24 25 #ifndef SKIP_TEXTURES
25 26 //this shader is generated only for nodes with at least 1 texture
26 27 vec4 tBase;
27 28
28 29 //Get the texture color. use Replace for the first texture
29 - applyTexture(texDiffuse0, texDiffuse0Op, 0, texCoord, tBase);
30 + applyTexture(texDiffuse0, textureOperation0, 0, texCoord, tBase);
30 31
31 32 //If we have a second diffuse texture
32 33 if(textureCount > 1){
33 34 //Apply the second texture over the first
34 - applyTexture(texDiffuse1, texDiffuse1Op, 0, texCoord, tBase);
35 + applyTexture(texDiffuse1, textureOperation1, 0, texCoord, tBase);
35 36 }
36 37 //If the texture's alpha channel is less than 1/3, discard current fragment
37 38 if(tBase.a < ALPHA_DISCARD_THRESHOLD) discard;