aboutsummaryrefslogtreecommitdiffstats
path: root/Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.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/RefCubeMapTex_RGBChange_DistDark_Qt.frag
parent5c0cca5b770cb30d547f3d7c56be9f46aa1a31b8 (diff)
initial commit
Diffstat (limited to 'Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag')
-rw-r--r--Assets/Common/Shaders/frag/RefCubeMapTex_RGBChange_DistDark_Qt.frag26
1 files changed, 26 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);
+}