mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-04-10 06:14:07 +08:00
perf: optmize world rendering performance
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
layout (location = 0) in vec3 pos;
|
||||
layout (location = 1) in vec2 texCoord;
|
||||
layout (location = 2) in float layer;
|
||||
out vec2 tc;
|
||||
|
||||
flat out int tex_layer;
|
||||
|
||||
mat4 buildRotateX(float rad);
|
||||
mat4 buildRotateY(float rad);
|
||||
@@ -13,11 +14,12 @@ mat4 buildTranslate(float x, float y, float z);
|
||||
uniform mat4 mv_matrix;
|
||||
uniform mat4 proj_matrix;
|
||||
|
||||
layout (binding = 0) uniform sampler2D samp;
|
||||
|
||||
|
||||
void main(void) {
|
||||
gl_Position = proj_matrix * mv_matrix * vec4(pos, 1.0);
|
||||
tc = texCoord;
|
||||
tex_layer = int(layer);
|
||||
}
|
||||
|
||||
mat4 buildTranslate(float x, float y, float z) {
|
||||
|
||||
Reference in New Issue
Block a user