experimental new rendering
This commit is contained in:
parent
d4c7c5bbea
commit
2006e31a71
96 changed files with 1658 additions and 3104 deletions
7
client/src/main/resources/shaders/ui_color.fsh
Normal file
7
client/src/main/resources/shaders/ui_color.fsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
out vec4 FragColor;
|
||||
|
||||
in vec4 tex_color;
|
||||
|
||||
void main() {
|
||||
FragColor = tex_color;
|
||||
}
|
13
client/src/main/resources/shaders/ui_color.vsh
Normal file
13
client/src/main/resources/shaders/ui_color.vsh
Normal file
|
@ -0,0 +1,13 @@
|
|||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec4 norm;
|
||||
layout (location = 2) in vec2 coord;
|
||||
layout (location = 3) in vec4 color;
|
||||
|
||||
out vec4 tex_color;
|
||||
|
||||
uniform vec2 screen_size;
|
||||
|
||||
void main() {
|
||||
tex_color = color;
|
||||
gl_Position = vec4(-1.0 + pos.x / screen_size.x * 2.0, -1.0 + pos.y / screen_size.y * 2.0, 0.0, 1.0);
|
||||
}
|
10
client/src/main/resources/shaders/ui_texture.fsh
Normal file
10
client/src/main/resources/shaders/ui_texture.fsh
Normal file
|
@ -0,0 +1,10 @@
|
|||
out vec4 FragColor;
|
||||
|
||||
in vec2 tex_coord;
|
||||
in vec4 tex_color;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
FragColor = texture(tex, tex_coord) * tex_color;
|
||||
}
|
15
client/src/main/resources/shaders/ui_texture.vsh
Normal file
15
client/src/main/resources/shaders/ui_texture.vsh
Normal file
|
@ -0,0 +1,15 @@
|
|||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec4 norm;
|
||||
layout (location = 2) in vec2 coord;
|
||||
layout (location = 3) in vec4 color;
|
||||
|
||||
out vec2 tex_coord;
|
||||
out vec4 tex_color;
|
||||
|
||||
uniform vec2 screen_size;
|
||||
|
||||
void main() {
|
||||
tex_coord = coord;
|
||||
tex_color = color;
|
||||
gl_Position = vec4(pos.x, pos.y, 0.0, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue