forge
Explore
Log in

Don't you dare go Hollow

niri

Clone
★ 0

0 watching0 forksRustGPL-3.012.1 MiB90ef202Ivan Molodetskikh1 year ago2349 commits

texture.vert25 lines, 563 bytesHistoryRawDownload
1#version 100
2
3uniform mat3 matrix;
4uniform mat3 tex_matrix;
5
6attribute vec2 vert;
7attribute vec4 vert_position;
8
9varying vec2 niri_v_coords;
10
11mat2 scale(vec2 scale_vec){
12 return mat2(
13 scale_vec.x, 0.0,
14 0.0, scale_vec.y
15 );
16}
17
18void main() {
19 vec2 vert_transform_translation = vert_position.xy;
20 vec2 vert_transform_scale = vert_position.zw;
21 vec3 position = vec3(vert * scale(vert_transform_scale) + vert_transform_translation, 1.0);
22 niri_v_coords = (tex_matrix * position).xy;
23 gl_Position = vec4(matrix * position, 1.0);
24}
25