Logo white

Peter M. Groen / dali-demo

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • dali-demo
  • resources
  • shaders
  • dli_images.fsh
  • Added an example to demonstrate the usage of the Dali Scene Loader library. ...
    6167bcd2
    Change-Id: I2cbd4814fbb3238c188a10900f98b5285da8dc98
    Signed-off-by: György Straub <g.straub@partner.samsung.com>
    György Straub authored
    2020-12-29 13:55:34 +0000  
    Browse Code »
dli_images.fsh 392 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#ifdef HIGHP
  precision highp float;
#else
  precision mediump float;
#endif

uniform sampler2D sAlbedo;

uniform vec4 uColor;

#ifdef ALPHA_TEST
  uniform float uAlphaThreshold;
#endif	//ALPHA_TEST

varying vec2 vUV;

void main()
{
  vec4 color = texture2D(sAlbedo, vUV.st);
#ifdef ALPHA_TEST
  if (color.a <= uAlphaThreshold)
  {
    discard;
  }
#endif
  gl_FragColor = color * uColor;
}