From 32264925b9cc54b8b8b92fa40e0717095a1bb9d7 Mon Sep 17 00:00:00 2001 From: 0 <0> Date: Fri, 21 May 2021 22:50:39 +0900 Subject: initial commit --- .../RefTransCubeMapReflection_DistDark_Qt.vert | 30 ++++++++++++++++++++++ Assets/Common/Shaders/vert/RefTrans_Qt.vert | 14 ++++++++++ Assets/Common/Shaders/vert/guageMask.vert | 8 ++++++ 3 files changed, 52 insertions(+) create mode 100644 Assets/Common/Shaders/vert/RefTransCubeMapReflection_DistDark_Qt.vert create mode 100644 Assets/Common/Shaders/vert/RefTrans_Qt.vert create mode 100644 Assets/Common/Shaders/vert/guageMask.vert (limited to 'Assets/Common/Shaders/vert') 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; +} -- cgit