diff options
Diffstat (limited to 'src/extras')
-rw-r--r-- | src/extras/shaders/colourfilterVC_fs_gl3.inc | 28 | ||||
-rw-r--r-- | src/extras/shaders/contrast_fs_gl3.inc | 20 | ||||
-rw-r--r-- | src/extras/shaders/default_UV2_gl3.inc | 31 | ||||
-rw-r--r-- | src/extras/shaders/im2d_gl3.inc | 23 | ||||
-rw-r--r-- | src/extras/shaders/neoGloss_fs_gl3.inc | 28 | ||||
-rw-r--r-- | src/extras/shaders/neoGloss_vs_gl3.inc | 31 | ||||
-rw-r--r-- | src/extras/shaders/neoRimSkin_gl3.inc | 50 | ||||
-rw-r--r-- | src/extras/shaders/neoRim_gl3.inc | 39 | ||||
-rw-r--r-- | src/extras/shaders/neoVehicle_fs_gl3.inc | 30 | ||||
-rw-r--r-- | src/extras/shaders/neoVehicle_vs_gl3.inc | 56 | ||||
-rw-r--r-- | src/extras/shaders/neoWorldVC_fs_gl3.inc | 27 | ||||
-rw-r--r-- | src/extras/shaders/simple_fs_gl3.inc | 18 |
12 files changed, 0 insertions, 381 deletions
diff --git a/src/extras/shaders/colourfilterVC_fs_gl3.inc b/src/extras/shaders/colourfilterVC_fs_gl3.inc deleted file mode 100644 index d11cdc5a..00000000 --- a/src/extras/shaders/colourfilterVC_fs_gl3.inc +++ /dev/null @@ -1,28 +0,0 @@ -const char *colourfilterVC_frag_src = -"uniform sampler2D tex0;\n" -"uniform vec4 u_blurcolor;\n" - -"in vec4 v_color;\n" -"in vec2 v_tex0;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" float a = u_blurcolor.a;\n" -" vec4 doublec = clamp(u_blurcolor*2, 0.0, 1.0);\n" -" vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" vec4 prev = dst;\n" -" for(int i = 0; i < 5; i++){\n" -" vec4 tmp = dst*(1.0-a) + prev*doublec*a;\n" -" tmp += prev*u_blurcolor;\n" -" tmp += prev*u_blurcolor;\n" -" prev = clamp(tmp, 0.0, 1.0);\n" -" }\n" -" color.rgb = prev.rgb;\n" -" color.a = 1.0f;\n" -"}\n" - -; diff --git a/src/extras/shaders/contrast_fs_gl3.inc b/src/extras/shaders/contrast_fs_gl3.inc deleted file mode 100644 index 58aaf079..00000000 --- a/src/extras/shaders/contrast_fs_gl3.inc +++ /dev/null @@ -1,20 +0,0 @@ -const char *contrast_frag_src = -"uniform sampler2D tex0;\n" -"uniform vec3 u_contrastAdd;\n" -"uniform vec3 u_contrastMult;\n" - -"in vec4 v_color;\n" -"in vec2 v_tex0;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" color.rgb = dst.rgb*u_contrastMult + u_contrastAdd;\n" -" color.a = 1.0f;\n" -"}\n" - -; diff --git a/src/extras/shaders/default_UV2_gl3.inc b/src/extras/shaders/default_UV2_gl3.inc deleted file mode 100644 index 14106b29..00000000 --- a/src/extras/shaders/default_UV2_gl3.inc +++ /dev/null @@ -1,31 +0,0 @@ -const char *default_UV2_vert_src = -"layout(location = 0) in vec3 in_pos;\n" -"layout(location = 1) in vec3 in_normal;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" -"layout(location = 4) in vec2 in_tex1;\n" - -"out vec4 v_color;\n" -"out vec2 v_tex0;\n" -"out vec2 v_tex1;\n" -"out float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" -" gl_Position = u_proj * u_view * Vertex;\n" -" vec3 Normal = mat3(u_world) * in_normal;\n" - -" v_tex0 = in_tex0;\n" -" v_tex1 = in_tex1;\n" - -" v_color = in_color;\n" -" v_color.rgb += u_ambLight.rgb*surfAmbient;\n" -" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse;\n" -" v_color = clamp(v_color, 0.0, 1.0);\n" -" v_color *= u_matColor;\n" - -" v_fog = DoFog(gl_Position.w);\n" -"}\n" -; diff --git a/src/extras/shaders/im2d_gl3.inc b/src/extras/shaders/im2d_gl3.inc deleted file mode 100644 index 68341b39..00000000 --- a/src/extras/shaders/im2d_gl3.inc +++ /dev/null @@ -1,23 +0,0 @@ -const char *im2d_vert_src = -"uniform vec4 u_xform;\n" - -"layout(location = 0) in vec4 in_pos;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" - -"out vec4 v_color;\n" -"out vec2 v_tex0;\n" -"out float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" gl_Position = in_pos;\n" -" gl_Position.w = 1.0;\n" -" gl_Position.xy = gl_Position.xy * u_xform.xy + u_xform.zw;\n" -" v_fog = DoFog(gl_Position.z);\n" -" gl_Position.xyz *= gl_Position.w;\n" -" v_color = in_color;\n" -" v_tex0 = in_tex0;\n" -"}\n" -; diff --git a/src/extras/shaders/neoGloss_fs_gl3.inc b/src/extras/shaders/neoGloss_fs_gl3.inc deleted file mode 100644 index 736b0c5d..00000000 --- a/src/extras/shaders/neoGloss_fs_gl3.inc +++ /dev/null @@ -1,28 +0,0 @@ -const char *neoGloss_frag_src = -"uniform sampler2D tex0;\n" - -"uniform vec4 u_reflProps;\n" - -"#define glossMult (u_reflProps.x)\n" - -"in vec3 v_normal;\n" -"in vec3 v_light;\n" -"in vec2 v_tex0;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" color = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" vec3 n = 2.0*v_normal-1.0; // unpack\n" -" vec3 v = 2.0*v_light-1.0; //\n" - -" float s = dot(n, v);\n" -" color = s*s*s*s*s*s*s*s*color*v_fog*glossMult;\n" - -" DoAlphaTest(color.a);\n" -"}\n" - -; diff --git a/src/extras/shaders/neoGloss_vs_gl3.inc b/src/extras/shaders/neoGloss_vs_gl3.inc deleted file mode 100644 index 4adc9cb2..00000000 --- a/src/extras/shaders/neoGloss_vs_gl3.inc +++ /dev/null @@ -1,31 +0,0 @@ -const char *neoGloss_vert_src = -"uniform vec3 u_eye;\n" - - -"layout(location = 0) in vec3 in_pos;\n" -"layout(location = 1) in vec3 in_normal;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" - -"out vec3 v_normal;\n" -"out vec3 v_light;\n" -"out vec2 v_tex0;\n" -"out float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" -" gl_Position = u_proj * u_view * Vertex;\n" -" vec3 Normal = mat3(u_world) * in_normal;\n" - -" v_tex0 = in_tex0;\n" - -" vec3 viewVec = normalize(u_eye - Vertex.xyz);\n" -" vec3 Light = normalize(viewVec - u_lightDirection[0].xyz);\n" -" v_normal = 0.5*(1.0 + vec3(0.0, 0.0, 1.0)); // compress\n" -" v_light = 0.5*(1.0 + Light); //\n" - -" v_fog = DoFog(gl_Position.w);\n" -"}\n" -; diff --git a/src/extras/shaders/neoRimSkin_gl3.inc b/src/extras/shaders/neoRimSkin_gl3.inc deleted file mode 100644 index 70948e1f..00000000 --- a/src/extras/shaders/neoRimSkin_gl3.inc +++ /dev/null @@ -1,50 +0,0 @@ -const char *neoRimSkin_vert_src = -"uniform mat4 u_boneMatrices[64];\n" - -"uniform vec3 u_viewVec;\n" -"uniform vec4 u_rampStart;\n" -"uniform vec4 u_rampEnd;\n" -"uniform vec3 u_rimData;\n" - -"layout(location = 0) in vec3 in_pos;\n" -"layout(location = 1) in vec3 in_normal;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" -"layout(location = 11) in vec4 in_weights;\n" -"layout(location = 12) in vec4 in_indices;\n" - -"out vec4 v_color;\n" -"out vec2 v_tex0;\n" -"out float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec3 SkinVertex = vec3(0.0, 0.0, 0.0);\n" -" vec3 SkinNormal = vec3(0.0, 0.0, 0.0);\n" -" for(int i = 0; i < 4; i++){\n" -" SkinVertex += (u_boneMatrices[int(in_indices[i])] * vec4(in_pos, 1.0)).xyz * in_weights[i];\n" -" SkinNormal += (mat3(u_boneMatrices[int(in_indices[i])]) * in_normal) * in_weights[i];\n" -" }\n" - -" vec4 Vertex = u_world * vec4(SkinVertex, 1.0);\n" -" gl_Position = u_proj * u_view * Vertex;\n" -" vec3 Normal = mat3(u_world) * SkinNormal;\n" - -" v_tex0 = in_tex0;\n" - -" v_color = in_color;\n" -" v_color.rgb += u_ambLight.rgb*surfAmbient;\n" -" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse;\n" - -" // rim light\n" -" float f = u_rimData.x - u_rimData.y*dot(Normal, u_viewVec);\n" -" vec4 rimlight = clamp(mix(u_rampEnd, u_rampStart, f)*u_rimData.z, 0.0, 1.0);\n" -" v_color.rgb += rimlight.rgb;\n" - -" v_color = clamp(v_color, 0.0, 1.0);\n" -" v_color *= u_matColor;\n" - -" v_fog = DoFog(gl_Position.z);\n" -"}\n" -; diff --git a/src/extras/shaders/neoRim_gl3.inc b/src/extras/shaders/neoRim_gl3.inc deleted file mode 100644 index 7e36e95a..00000000 --- a/src/extras/shaders/neoRim_gl3.inc +++ /dev/null @@ -1,39 +0,0 @@ -const char *neoRim_vert_src = -"uniform vec3 u_viewVec;\n" -"uniform vec4 u_rampStart;\n" -"uniform vec4 u_rampEnd;\n" -"uniform vec3 u_rimData;\n" - -"layout(location = 0) in vec3 in_pos;\n" -"layout(location = 1) in vec3 in_normal;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" - -"out vec4 v_color;\n" -"out vec2 v_tex0;\n" -"out float v_fog;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" -" gl_Position = u_proj * u_view * Vertex;\n" -" vec3 Normal = mat3(u_world) * in_normal;\n" - -" v_tex0 = in_tex0;\n" - -" v_color = in_color;\n" -" v_color.rgb += u_ambLight.rgb*surfAmbient;\n" -" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse;\n" - -" // rim light\n" -" float f = u_rimData.x - u_rimData.y*dot(Normal, u_viewVec);\n" -" vec4 rimlight = clamp(mix(u_rampEnd, u_rampStart, f)*u_rimData.z, 0.0, 1.0);\n" -" v_color.rgb += rimlight.rgb;\n" - -" v_color = clamp(v_color, 0.0, 1.0);\n" -" v_color *= u_matColor;\n" - -" v_fog = DoFog(gl_Position.w);\n" -"}\n" -; diff --git a/src/extras/shaders/neoVehicle_fs_gl3.inc b/src/extras/shaders/neoVehicle_fs_gl3.inc deleted file mode 100644 index c75ba717..00000000 --- a/src/extras/shaders/neoVehicle_fs_gl3.inc +++ /dev/null @@ -1,30 +0,0 @@ -const char *neoVehicle_frag_src = -"uniform sampler2D tex0;\n" -"uniform sampler2D tex1;\n" - -"in vec4 v_color;\n" -"in vec4 v_reflcolor;\n" -"in vec2 v_tex0;\n" -"in vec2 v_tex1;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 pass1 = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" vec3 envmap = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y)).rgb;\n" -" pass1.rgb = mix(pass1.rgb, envmap, v_reflcolor.a);\n" -" pass1.rgb = mix(u_fogColor.rgb, pass1.rgb, v_fog);\n" -"// pass1.rgb += v_reflcolor.rgb * v_fog;\n" - -" vec3 pass2 = v_reflcolor.rgb * v_fog;\n" - -" color.rgb = pass1.rgb*pass1.a + pass2;\n" -" color.a = pass1.a;\n" - -"// color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" -" DoAlphaTest(color.a);\n" -"}\n" -; diff --git a/src/extras/shaders/neoVehicle_vs_gl3.inc b/src/extras/shaders/neoVehicle_vs_gl3.inc deleted file mode 100644 index 268180e1..00000000 --- a/src/extras/shaders/neoVehicle_vs_gl3.inc +++ /dev/null @@ -1,56 +0,0 @@ -const char *neoVehicle_vert_src = -"uniform vec3 u_eye;\n" -"uniform vec4 u_reflProps;\n" -"uniform vec4 u_specDir[5];\n" -"uniform vec4 u_specColor[5];\n" - -"#define fresnel (u_reflProps.x)\n" -"#define lightStrength (u_reflProps.y) // speclight alpha\n" -"#define shininess (u_reflProps.z)\n" -"#define specularity (u_reflProps.w)\n" - -"layout(location = 0) in vec3 in_pos;\n" -"layout(location = 1) in vec3 in_normal;\n" -"layout(location = 2) in vec4 in_color;\n" -"layout(location = 3) in vec2 in_tex0;\n" - -"out vec4 v_color;\n" -"out vec4 v_reflcolor;\n" -"out vec2 v_tex0;\n" -"out vec2 v_tex1;\n" -"out float v_fog;\n" - -"vec3 DoDirLightSpec(vec3 Ldir, vec3 Lcol, vec3 N, vec3 V, float power)\n" -"{\n" -" return pow(clamp(dot(N, normalize(V + -Ldir)), 0.0, 1.0), power)*Lcol;\n" -"}\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n" -" gl_Position = u_proj * u_view * Vertex;\n" -" vec3 Normal = mat3(u_world) * in_normal;\n" -" vec3 viewVec = normalize(u_eye - Vertex.xyz);\n" - -" v_tex0 = in_tex0;\n" - -" v_color = in_color;\n" -" v_color.rgb += u_ambLight.rgb*surfAmbient;\n" -" v_color.rgb += DoDynamicLight(Vertex.xyz, Normal)*surfDiffuse*lightStrength;\n" -" v_color = clamp(v_color, 0.0, 1.0);\n" -" v_color *= u_matColor;\n" - -" // reflect V along Normal\n" -" vec3 uv2 = Normal*dot(viewVec, Normal)*2.0 - viewVec;\n" -" v_tex1 = uv2.xy*0.5 + 0.5;\n" -" float b = 1.0 - clamp(dot(viewVec, Normal), 0.0, 1.0);\n" -" v_reflcolor = vec4(0.0, 0.0, 0.0, 1.0);\n" -" v_reflcolor.a = mix(b*b*b*b*b, 1.0f, fresnel)*shininess;\n" - -" for(int i = 0; i < 5; i++)\n" -" v_reflcolor.rgb += DoDirLightSpec(u_specDir[i].xyz, u_specColor[i].rgb, Normal, viewVec, u_specDir[i].w)*specularity*lightStrength;\n" - -" v_fog = DoFog(gl_Position.w);\n" -"}\n" -; diff --git a/src/extras/shaders/neoWorldVC_fs_gl3.inc b/src/extras/shaders/neoWorldVC_fs_gl3.inc deleted file mode 100644 index c861d334..00000000 --- a/src/extras/shaders/neoWorldVC_fs_gl3.inc +++ /dev/null @@ -1,27 +0,0 @@ -const char *neoWorldVC_frag_src = -"uniform sampler2D tex0;\n" -"uniform sampler2D tex1;\n" - -"uniform vec4 u_lightMap;\n" - -"in vec4 v_color;\n" -"in vec2 v_tex0;\n" -"in vec2 v_tex1;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" vec4 t0 = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" vec4 t1 = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));\n" - -" color = t0*v_color*(1 + u_lightMap*(t1-1));\n" -" color.a = v_color.a*t0.a*u_lightMap.a;\n" - -" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" -" DoAlphaTest(color.a);\n" -"}\n" - -; diff --git a/src/extras/shaders/simple_fs_gl3.inc b/src/extras/shaders/simple_fs_gl3.inc deleted file mode 100644 index 47d89971..00000000 --- a/src/extras/shaders/simple_fs_gl3.inc +++ /dev/null @@ -1,18 +0,0 @@ -const char *simple_frag_src = -"uniform sampler2D tex0;\n" - -"in vec4 v_color;\n" -"in vec2 v_tex0;\n" -"in float v_fog;\n" - -"out vec4 color;\n" - -"void\n" -"main(void)\n" -"{\n" -" color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" -" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" -" DoAlphaTest(color.a);\n" -"}\n" - -; |