aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Common/Shaders/frag/guageMask.frag
diff options
context:
space:
mode:
author0 <0>2021-05-21 22:50:39 +0900
committer0 <0>2021-05-21 22:50:39 +0900
commit32264925b9cc54b8b8b92fa40e0717095a1bb9d7 (patch)
tree640baf7342f30e5cfb6f39a5952a06a172bc75cd /Assets/Common/Shaders/frag/guageMask.frag
parent5c0cca5b770cb30d547f3d7c56be9f46aa1a31b8 (diff)
initial commit
Diffstat (limited to 'Assets/Common/Shaders/frag/guageMask.frag')
-rw-r--r--Assets/Common/Shaders/frag/guageMask.frag11
1 files changed, 11 insertions, 0 deletions
diff --git a/Assets/Common/Shaders/frag/guageMask.frag b/Assets/Common/Shaders/frag/guageMask.frag
new file mode 100644
index 0000000..9ea1279
--- /dev/null
+++ b/Assets/Common/Shaders/frag/guageMask.frag
@@ -0,0 +1,11 @@
+uniform mediump float angleBase;
+uniform mediump float angle;
+uniform mediump sampler2D src;
+uniform mediump float qt_Opacity;
+varying mediump vec2 coord;
+void main(){
+ mediump vec2 d=2.0*coord-vec2(1.0,1.0);
+ mediump float a=atan(d.x,-d.y);
+ mediump vec4 tex = texture2D(src, coord);
+ gl_FragColor = (angleBase<=a && a<=angle) ? tex * qt_Opacity : tex * 0.0;
+}