mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-18 13:43:27 +02:00
Version 2.5 - http://otclient.net/showthread.php?tid=238
This commit is contained in:
17
data/shaders/outfit_default_fragment.frag
Normal file
17
data/shaders/outfit_default_fragment.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
uniform mat4 u_Color;
|
||||
varying vec2 v_TexCoord;
|
||||
varying vec2 v_TexCoord2;
|
||||
uniform sampler2D u_Tex0;
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(u_Tex0, v_TexCoord);
|
||||
vec4 texcolor = texture2D(u_Tex0, v_TexCoord2);
|
||||
if(texcolor.r > 0.9) {
|
||||
gl_FragColor *= texcolor.g > 0.9 ? u_Color[0] : u_Color[1];
|
||||
} else if(texcolor.g > 0.9) {
|
||||
gl_FragColor *= u_Color[2];
|
||||
} else if(texcolor.b > 0.9) {
|
||||
gl_FragColor *= u_Color[3];
|
||||
}
|
||||
if(gl_FragColor.a < 0.01) discard;
|
||||
}
|
16
data/shaders/outfit_default_vertex.frag
Normal file
16
data/shaders/outfit_default_vertex.frag
Normal file
@@ -0,0 +1,16 @@
|
||||
attribute vec2 a_Vertex;
|
||||
attribute vec2 a_TexCoord;
|
||||
uniform mat3 u_TextureMatrix;
|
||||
varying vec2 v_TexCoord;
|
||||
varying vec2 v_TexCoord2;
|
||||
uniform mat3 u_TransformMatrix;
|
||||
uniform mat3 u_ProjectionMatrix;
|
||||
uniform vec2 u_Offset;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4((u_ProjectionMatrix * u_TransformMatrix * vec3(a_Vertex.xy, 1.0)).xy, 1.0, 1.0);
|
||||
v_TexCoord = (u_TextureMatrix * vec3(a_TexCoord,1.0)).xy;
|
||||
v_TexCoord2 = (u_TextureMatrix * vec3(a_TexCoord + u_Offset,1.0)).xy;
|
||||
}
|
||||
|
Reference in New Issue
Block a user