Revision 6544040f
Added by Leszek Koltunski over 7 years ago
| src/main/res/raw/main_fragment_shader.glsl | ||
|---|---|---|
| 126 | 126 |
} |
| 127 | 127 |
#endif |
| 128 | 128 |
|
| 129 |
vec4 converted = vec4(color.rgb * (1.0 + 7.0*v_Normal.z) * 0.125, color.a); |
|
| 129 |
float z = v_Normal.z; |
|
| 130 |
if( z<0.0 ) z = -z; |
|
| 131 |
|
|
| 132 |
vec4 converted = vec4(color.rgb * (1.0 + 7.0*z) * 0.125, color.a); |
|
| 130 | 133 |
|
| 131 | 134 |
#ifdef OIT |
| 132 |
if( converted.a > 0.95 )
|
|
| 135 |
if( converted.a > 0.97 )
|
|
| 133 | 136 |
{
|
| 134 | 137 |
fragColor= converted; |
| 135 | 138 |
} |
| src/main/res/raw/oit_build_fragment_shader.glsl | ||
|---|---|---|
| 98 | 98 |
vec4 color= texture(u_Texture , v_TexCoordinate); |
| 99 | 99 |
float depth= texture(u_DepthTexture, v_TexCoordinate).r; |
| 100 | 100 |
|
| 101 |
if( color.a > 0.95 )
|
|
| 101 |
if( color.a > 0.97 )
|
|
| 102 | 102 |
{
|
| 103 | 103 |
gl_FragDepth = depth; |
| 104 | 104 |
fragColor = color; |
Also available in: Unified diff
Fix the fact that back-facing surfaces were invisible.