Transformed "Encoded shaders" into "Encoded Resources"
Former-commit-id: ead4cc9bb162d2f9e5c08756575e84f3a9056679
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#if FLAG_DEFERRED
|
||||
#error Deferred Shading needs core profile
|
||||
#endif
|
||||
|
||||
/********************Entrant********************/
|
||||
varying vec2 vTexCoord;
|
||||
|
||||
/********************Uniformes********************/
|
||||
uniform sampler2D MaterialAlphaMap;
|
||||
uniform float MaterialAlphaThreshold;
|
||||
uniform vec4 MaterialDiffuse;
|
||||
uniform sampler2D MaterialDiffuseMap;
|
||||
|
||||
/********************Fonctions********************/
|
||||
void main()
|
||||
{
|
||||
vec4 fragmentColor = MaterialDiffuse;
|
||||
#if DIFFUSE_MAPPING
|
||||
fragmentColor *= texture2D(MaterialDiffuseMap, vTexCoord);
|
||||
#endif
|
||||
|
||||
#if ALPHA_MAPPING
|
||||
fragmentColor.a *= texture2D(MaterialAlphaMap, vTexCoord).r;
|
||||
#endif
|
||||
|
||||
#if ALPHA_TEST
|
||||
if (fragmentColor.a < MaterialAlphaThreshold)
|
||||
discard;
|
||||
#endif
|
||||
|
||||
gl_FragColor = fragmentColor;
|
||||
}
|
||||
Reference in New Issue
Block a user