fragment.glsl 430 B

123456789101112131415161718
  1. uniform sampler2D uPotionIcon;
  2. varying vec2 vUv;
  3. varying vec3 vPosition;
  4. void main()
  5. {
  6. float insideColor = step(0.03, abs(distance(vUv, vec2(0.5)) - 0.47));
  7. float inCircle = 1.0 - step(0.5, length(vPosition.xy));
  8. vec3 color = texture2D(uPotionIcon, vUv).rgb;// * insideColor;
  9. float mask = inCircle;
  10. gl_FragColor = vec4(color, mask);
  11. #include <tonemapping_fragment>
  12. #include <colorspace_fragment>
  13. }