Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#version 330 core
|
||||
|
||||
layout (location = 0) in vec2 a_Position;
|
||||
layout (location = 1) in vec2 a_TexCoord;
|
||||
|
||||
out vec2 v_TexCoord;
|
||||
|
||||
uniform mat4 u_ModelViewProj;
|
||||
uniform float u_SkewX;
|
||||
uniform float u_SkewY;
|
||||
|
||||
void main() {
|
||||
// Apply skew
|
||||
vec2 skewedPos = a_Position;
|
||||
skewedPos.x += a_Position.y * u_SkewX * 0.01; // Shear X based on Y
|
||||
skewedPos.y += a_Position.x * u_SkewY * 0.01; // Shear Y based on X
|
||||
|
||||
gl_Position = u_ModelViewProj * vec4(skewedPos, 0.0, 1.0);
|
||||
v_TexCoord = a_TexCoord;
|
||||
}
|
||||
Reference in New Issue
Block a user