diff options
| author | Mel <einebeere@gmail.com> | 2024-02-12 12:55:11 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-02-12 12:55:11 +0100 |
| commit | d2b5fc5b3bc648afffa42375706429685ac63794 (patch) | |
| tree | a2dfbb241e1d46e5616c5884e5f3d685de2a2cb6 /assets/shaders/vertex.glsl | |
| parent | 588c7e87b7cab270698d43ca5c22d67793ae5fc4 (diff) | |
| download | meowcraft-d2b5fc5b3bc648afffa42375706429685ac63794.tar.zst meowcraft-d2b5fc5b3bc648afffa42375706429685ac63794.zip | |
Split rendering into own thread and sync through render action lists
Diffstat (limited to 'assets/shaders/vertex.glsl')
| -rw-r--r-- | assets/shaders/vertex.glsl | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/assets/shaders/vertex.glsl b/assets/shaders/vertex.glsl deleted file mode 100644 index 6902ad4..0000000 --- a/assets/shaders/vertex.glsl +++ /dev/null @@ -1,30 +0,0 @@ -#version 330 core - -uniform mat4 model_matrix; -uniform mat4 view_matrix; -uniform mat4 projection_matrix; - -layout (location = 0) in vec3 position; -layout (location = 1) in vec3 normal; -layout (location = 2) in vec2 tex_coord; -layout (location = 3) in float light; -layout (location = 4) in float ambient_occlusion; - -out vec2 frag_tex_coord; -out float frag_light; -out float frag_ambient_occlusion; -out vec3 surface_normal; -out float depth; - -void main() { - vec4 world_position = model_matrix * vec4(position, 1.0); - vec4 view_position = view_matrix * world_position; - vec4 clip_position = projection_matrix * view_position; - - gl_Position = clip_position; - frag_tex_coord = tex_coord; - frag_light = light; - frag_ambient_occlusion = ambient_occlusion; - surface_normal = (model_matrix * vec4(normal, 0.0)).xyz; - depth = clamp((length(view_position) - 75) / 125, 0.0, 1.0); -} \ No newline at end of file |
