diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-05-23 02:16:29 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-05-28 14:53:34 -0400 |
commit | b1d26ed47bfd3725100bde10c20b6ee9b1045e65 (patch) | |
tree | 486826a4d1cc8410052cb9abd6eff2c1e48cde4a /render/gles2/shaders | |
parent | 45b2a8eee2f1ee30bd021cba7e918c758b8f4cea (diff) |
renderer/gles2: Compute texture coordinates based off of vertex positions
Diffstat (limited to 'render/gles2/shaders')
-rw-r--r-- | render/gles2/shaders/common.vert | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/render/gles2/shaders/common.vert b/render/gles2/shaders/common.vert index 4f855a5d..f51548ab 100644 --- a/render/gles2/shaders/common.vert +++ b/render/gles2/shaders/common.vert @@ -1,9 +1,10 @@ uniform mat3 proj; +uniform mat3 tex_proj; attribute vec2 pos; -attribute vec2 texcoord; varying vec2 v_texcoord; void main() { - gl_Position = vec4(vec3(pos, 1.0) * proj, 1.0); - v_texcoord = texcoord; + vec3 pos3 = vec3(pos, 1.0); + gl_Position = vec4(pos3 * proj, 1.0); + v_texcoord = (pos3 * tex_proj).xy; } |