gpu: [compute] move material clip space transformation to the GPU

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-05-05 11:22:05 +02:00
parent a87206c364
commit d331f63d20
3 changed files with 64 additions and 14 deletions
+6 -1
View File
@@ -4,6 +4,11 @@
precision highp float;
layout(binding = 0) uniform Block {
vec2 scale;
vec2 pos;
} _block;
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 uv;
@@ -11,5 +16,5 @@ layout(location = 0) out vec2 vUV;
void main() {
vUV = uv;
gl_Position = vec4(pos, 0, 1);
gl_Position = vec4(pos*_block.scale + _block.pos, 0, 1);
}