diff options
author | 0 <0> | 2021-05-21 22:50:39 +0900 |
---|---|---|
committer | 0 <0> | 2021-05-21 22:50:39 +0900 |
commit | 32264925b9cc54b8b8b92fa40e0717095a1bb9d7 (patch) | |
tree | 640baf7342f30e5cfb6f39a5952a06a172bc75cd /Assets/Common/Shaders/frag/guageMask.frag | |
parent | 5c0cca5b770cb30d547f3d7c56be9f46aa1a31b8 (diff) |
initial commit
Diffstat (limited to 'Assets/Common/Shaders/frag/guageMask.frag')
-rw-r--r-- | Assets/Common/Shaders/frag/guageMask.frag | 11 |
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; +} |