github.com/cybriq/giocore@v0.0.7-0.20210703034601-cfb9cb5f3900/gpu/shaders/material.vert (about)

     1  #version 310 es
     2  
     3  // SPDX-License-Identifier: Unlicense OR MIT
     4  
     5  precision highp float;
     6  
     7  layout(binding = 0) uniform Block {
     8  	vec2 scale;
     9  	vec2 pos;
    10  } _block;
    11  
    12  layout(location = 0) in vec2 pos;
    13  layout(location = 1) in vec2 uv;
    14  
    15  layout(location = 0) out vec2 vUV;
    16  
    17  void main() {
    18  	vUV = uv;
    19  	gl_Position = vec4(pos*_block.scale + _block.pos, 0, 1);
    20  }