diff options
| author | realtradam <[email protected]> | 2022-11-24 21:44:59 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-11-24 21:44:59 -0500 |
| commit | f2a9e986afe980c6b32f7f40d1fe2b0294d86d90 (patch) | |
| tree | 252b7e7a2a8fa5ff71b1b7953ec9af2492a2ea2d /src/shaders/default.vert | |
| parent | f0f30c12fe919862ade380513c02c9845598ac46 (diff) | |
| download | Ogle-f2a9e986afe980c6b32f7f40d1fe2b0294d86d90.tar.gz Ogle-f2a9e986afe980c6b32f7f40d1fe2b0294d86d90.zip | |
implemented proper batch rendering of quads and textures
Diffstat (limited to 'src/shaders/default.vert')
| -rw-r--r-- | src/shaders/default.vert | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/shaders/default.vert b/src/shaders/default.vert index 5adf795..38e5343 100644 --- a/src/shaders/default.vert +++ b/src/shaders/default.vert @@ -1,16 +1,19 @@ #version 330 core -layout (location = 0) in vec3 aPos; -layout (location = 1) in vec3 aColor; -layout (location = 2) in vec2 aTexCoord; +layout (location = 0) in vec3 a_Pos; +layout (location = 1) in vec4 a_Color; +layout (location = 2) in vec2 a_TexCoord; +layout (location = 3) in float a_TexId; -uniform float offset_x; +//uniform float offset_x; -out vec3 ourColor; -out vec2 TexCoord; +out vec4 v_Color; +out vec2 v_TexCoord; +out float v_TexId; void main() { - gl_Position = vec4(aPos.x + offset_x, aPos.yz, 1.0); - ourColor = aColor; - TexCoord = aTexCoord; + gl_Position = vec4(a_Pos, 1.0); + v_Color = a_Color; + v_TexCoord = a_TexCoord; + v_TexId = a_TexId; } |
