mirror of
				https://github.com/ErikasKontenis/SabrehavenServer.git
				synced 2025-10-31 03:56:22 +01:00 
			
		
		
		
	commit client
This commit is contained in:
		
							
								
								
									
										11
									
								
								SabrehavenOTClient/data/shaders/map_default_fragment.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								SabrehavenOTClient/data/shaders/map_default_fragment.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
|  | ||||
| varying vec2 v_TexCoord; | ||||
| uniform vec4 u_Color; | ||||
| uniform sampler2D u_Tex0; | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     gl_FragColor = texture2D(u_Tex0, v_TexCoord) * u_Color; | ||||
|     if(gl_FragColor.a < 0.01) | ||||
|         discard; | ||||
| } | ||||
							
								
								
									
										14
									
								
								SabrehavenOTClient/data/shaders/map_default_vertex.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								SabrehavenOTClient/data/shaders/map_default_vertex.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
|  | ||||
| attribute vec2 a_Vertex; | ||||
| attribute vec2 a_TexCoord; | ||||
|  | ||||
| uniform mat3 u_TransformMatrix; | ||||
| uniform mat3 u_ProjectionMatrix; | ||||
| uniform mat3 u_TextureMatrix; | ||||
| varying vec2 v_TexCoord; | ||||
|  | ||||
| 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; | ||||
| } | ||||
							
								
								
									
										15
									
								
								SabrehavenOTClient/data/shaders/map_rainbow_fragment.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								SabrehavenOTClient/data/shaders/map_rainbow_fragment.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
|  | ||||
| varying vec2 v_TexCoord; | ||||
| varying vec2 v_TexCoord2; | ||||
|  | ||||
| uniform vec4 u_Color; | ||||
| uniform sampler2D u_Tex0; | ||||
| uniform sampler2D u_Tex1; | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     gl_FragColor = texture2D(u_Tex0, v_TexCoord) * u_Color; | ||||
|     gl_FragColor += texture2D(u_Tex1, v_TexCoord2); | ||||
|     if(gl_FragColor.a < 0.01) | ||||
|         discard; | ||||
| } | ||||
							
								
								
									
										33
									
								
								SabrehavenOTClient/data/shaders/map_rainbow_vertex.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								SabrehavenOTClient/data/shaders/map_rainbow_vertex.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| attribute vec2 a_TexCoord; | ||||
| attribute vec2 a_Vertex; | ||||
|  | ||||
| varying vec2 v_TexCoord; | ||||
| varying vec2 v_TexCoord2; | ||||
|  | ||||
| uniform mat3 u_TextureMatrix; | ||||
| uniform mat3 u_TransformMatrix; | ||||
| uniform mat3 u_ProjectionMatrix; | ||||
|  | ||||
| uniform vec2 u_Offset; | ||||
| uniform vec2 u_Center; | ||||
| uniform float u_Time; | ||||
|  | ||||
| vec2 effectTextureSize = vec2(466.0, 342.0); | ||||
| vec2 direction = vec2(1.0,0.2); | ||||
| float speed = 200.0; | ||||
|  | ||||
| vec2 rotate(vec2 v, float a) { | ||||
| 	float s = sin(a); | ||||
| 	float c = cos(a); | ||||
| 	mat2 m = mat2(c, -s, s, c); | ||||
| 	return m * v; | ||||
| } | ||||
|  | ||||
| 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 = ((a_Vertex + direction * u_Time * speed) / effectTextureSize); | ||||
| } | ||||
|  | ||||
							
								
								
									
										17
									
								
								SabrehavenOTClient/data/shaders/outfit_default_fragment.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								SabrehavenOTClient/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
									
								
								SabrehavenOTClient/data/shaders/outfit_default_vertex.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								SabrehavenOTClient/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; | ||||
| } | ||||
|  | ||||
							
								
								
									
										16
									
								
								SabrehavenOTClient/data/shaders/outfit_rainbow_fragment.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								SabrehavenOTClient/data/shaders/outfit_rainbow_fragment.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| uniform mat4 u_Color; | ||||
| varying vec2 v_TexCoord; | ||||
| varying vec2 v_TexCoord2; | ||||
| varying vec2 v_TexCoord3; | ||||
| uniform sampler2D u_Tex0; | ||||
| uniform sampler2D u_Tex1; | ||||
| void main() | ||||
| { | ||||
|     gl_FragColor = texture2D(u_Tex0, v_TexCoord); | ||||
|     vec4 texcolor = texture2D(u_Tex0, v_TexCoord2); | ||||
|     vec4 effectColor = texture2D(u_Tex1, v_TexCoord3); | ||||
|     if(texcolor.a > 0.1) { | ||||
|         gl_FragColor *= effectColor; | ||||
|     } | ||||
|     if(gl_FragColor.a < 0.01) discard; | ||||
| } | ||||
							
								
								
									
										47
									
								
								SabrehavenOTClient/data/shaders/outfit_rainbow_vertex.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								SabrehavenOTClient/data/shaders/outfit_rainbow_vertex.frag
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,47 @@ | ||||
| attribute vec2 a_TexCoord; | ||||
| uniform mat3 u_TextureMatrix; | ||||
| varying vec2 v_TexCoord; | ||||
| varying vec2 v_TexCoord2; | ||||
| varying vec2 v_TexCoord3; | ||||
| attribute vec2 a_Vertex; | ||||
| uniform mat3 u_TransformMatrix; | ||||
| uniform mat3 u_ProjectionMatrix; | ||||
| uniform vec2 u_Offset; | ||||
| uniform vec2 u_Center; | ||||
| uniform float u_Time; | ||||
|  | ||||
| vec2 effectTextureSize = vec2(466.0, 342.0); | ||||
| vec2 direction = vec2(1.0,0.2); | ||||
| float speed = 200.0; | ||||
|  | ||||
| vec2 rotate(vec2 v, float a) { | ||||
| 	float s = sin(a); | ||||
| 	float c = cos(a); | ||||
| 	mat2 m = mat2(c, -s, s, c); | ||||
| 	return m * v; | ||||
| } | ||||
|  | ||||
| void main() | ||||
| { | ||||
|     vec2 offset = direction * speed * u_Time; | ||||
|     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; | ||||
|  | ||||
|     vec2 vertex = a_Vertex; | ||||
|     if(vertex.x < u_Center.x) { | ||||
|         vertex.x = effectTextureSize.x / 10.0; | ||||
|     } | ||||
|     if(vertex.x > u_Center.x) { | ||||
|         vertex.x = effectTextureSize.x - effectTextureSize.x / 10.0; | ||||
|     } | ||||
|     if(vertex.y < u_Center.y) { | ||||
|         vertex.y = effectTextureSize.y / 10.0; | ||||
|     } | ||||
|     if(vertex.y > u_Center.y) { | ||||
|         vertex.y = effectTextureSize.y - effectTextureSize.y / 10.0; | ||||
|     } | ||||
|  | ||||
|     v_TexCoord3 = ((vertex + direction * u_Time * speed) / effectTextureSize); | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 ErikasKontenis
					ErikasKontenis