aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Common/Shaders/frag
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Common/Shaders/frag')
-rw-r--r--Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag26
-rw-r--r--Assets/Common/Shaders/frag/RefTexRefColorFactor_Qt.frag13
-rw-r--r--Assets/Common/Shaders/frag/guageMask.frag11
3 files changed, 50 insertions, 0 deletions
diff --git a/Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag b/Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag
new file mode 100644
index 0000000..aec29d2
--- /dev/null
+++ b/Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag
@@ -0,0 +1,26 @@
+#ifndef GL_ES
+
+#define lowp
+#define mediump
+#define highp
+#define precision
+
+#endif
+
+uniform highp samplerCube u_CubeMapTexture;
+uniform highp vec3 u_rgbFactor;
+uniform highp float u_alphaFactor;
+
+uniform mediump float u_Dist_Rate;
+uniform mediump float u_Dist_Position_Rate;
+
+
+varying highp vec3 v_CubeTexCoord;
+varying highp float v_Distance;
+
+void main()
+{
+ highp float DistDark = u_Dist_Position_Rate - v_Distance * u_Dist_Rate;
+
+ gl_FragColor = textureCube(u_CubeMapTexture, v_CubeTexCoord) * vec4(u_rgbFactor * DistDark, u_alphaFactor);
+}
diff --git a/Assets/Common/Shaders/frag/RefTexRefColorFactor_Qt.frag b/Assets/Common/Shaders/frag/RefTexRefColorFactor_Qt.frag
new file mode 100644
index 0000000..a8e8ea5
--- /dev/null
+++ b/Assets/Common/Shaders/frag/RefTexRefColorFactor_Qt.frag
@@ -0,0 +1,13 @@
+/*out*/
+
+uniform mediump sampler2D u_Texture;
+uniform mediump vec3 u_rgbFactor;
+uniform mediump float u_alphaFactor;
+
+/*in*/
+varying mediump vec2 v_texCoord;
+
+void main()
+{
+ gl_FragColor = texture2D(u_Texture, v_texCoord) * vec4(u_rgbFactor, u_alphaFactor);
+}
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;
+}