diff options
Diffstat (limited to 'Assets/Common/Shaders')
6 files changed, 102 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; +} diff --git a/Assets/Common/Shaders/vert/RefTransCubeMapReflection_DistDark_Qt.vert b/Assets/Common/Shaders/vert/RefTransCubeMapReflection_DistDark_Qt.vert new file mode 100644 index 0000000..7278f9b --- /dev/null +++ b/Assets/Common/Shaders/vert/RefTransCubeMapReflection_DistDark_Qt.vert @@ -0,0 +1,30 @@ +#ifndef GL_ES
+
+#define lowp
+#define mediump
+#define highp
+#define precision
+
+#endif
+
+uniform highp mat4 mvp;
+uniform highp mat4 modelMatrix;
+uniform highp mat3 modelNormalMatrix;
+uniform highp vec3 eyePosition;
+
+attribute highp vec4 vertexPosition;
+attribute highp vec3 vertexNormal;
+
+varying highp vec3 v_CubeTexCoord;
+varying highp float v_Distance;
+
+void main()
+{
+ gl_Position = mvp * vertexPosition;
+
+ v_Distance = gl_Position.z / gl_Position.w;
+
+ highp vec3 view = eyePosition - (modelMatrix * vertexPosition).xyz;
+ highp vec3 normalWorld = normalize(modelNormalMatrix * vertexNormal);
+ v_CubeTexCoord = reflect(view, normalWorld);
+}
diff --git a/Assets/Common/Shaders/vert/RefTrans_Qt.vert b/Assets/Common/Shaders/vert/RefTrans_Qt.vert new file mode 100644 index 0000000..7d5293e --- /dev/null +++ b/Assets/Common/Shaders/vert/RefTrans_Qt.vert @@ -0,0 +1,14 @@ +uniform mediump mat4 mvp;
+
+attribute mediump vec4 vertexPosition;
+attribute mediump vec2 vertexTexCoord;
+
+/*out*/
+varying mediump vec2 v_texCoord;
+
+
+void main()
+{
+ v_texCoord = vertexTexCoord;
+ gl_Position = mvp * vertexPosition;
+}
diff --git a/Assets/Common/Shaders/vert/guageMask.vert b/Assets/Common/Shaders/vert/guageMask.vert new file mode 100644 index 0000000..23de278 --- /dev/null +++ b/Assets/Common/Shaders/vert/guageMask.vert @@ -0,0 +1,8 @@ +uniform mediump mat4 qt_Matrix; +attribute mediump vec4 qt_Vertex; +attribute mediump vec2 qt_MultiTexCoord0; +varying mediump vec2 coord; +void main(){ + coord = qt_MultiTexCoord0; + gl_Position = qt_Matrix * qt_Vertex; +} |