diff options
| author | hachem <im@hachem.wtf> | 2025-08-12 18:12:37 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-12 18:12:37 +0200 |
| commit | a2ec7dabd48a70ea69623406ddd0f8f97af403c8 (patch) | |
| tree | 52d71b51753b88473607f5e97f8bc15bdb5ad7d3 /assets | |
| parent | 16dff443789c7f1461b46ce52966972ae14c042b (diff) | |
[add]: Start of a basic rendering backend
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/Basic.glsl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/assets/Basic.glsl b/assets/Basic.glsl new file mode 100644 index 0000000..f6016f7 --- /dev/null +++ b/assets/Basic.glsl @@ -0,0 +1,31 @@ +#type vertex +#version 330 core + +layout(location = 0) in vec3 a_Position; +layout(location = 1) in vec4 a_Color; + +uniform mat4 u_ViewProjection; +uniform mat4 u_Transform; + +out vec3 v_Position; +out vec4 v_Color; + +void main() +{ + v_Position = a_Position; + v_Color = a_Color; + gl_Position = u_ViewProjection * u_Transform * vec4(a_Position, 1.0); +} + +#type fragment +#version 330 core + +layout(location = 0) out vec4 color; + +in vec3 v_Position; +in vec4 v_Color; + +void main() +{ + color = v_Color; +} |
