mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
renderer/gles2: Compute texture coordinates based off of vertex positions
This commit is contained in:
parent
45b2a8eee2
commit
b1d26ed47b
3 changed files with 15 additions and 20 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue