Files
gio/gpu/shaders/intersect.vert
T
Elias Naur fbee13a07d gpu/internal/convertshaders,gpu: represent converted shaders with raw literals
Raw strings with linebreaks are easier to read and produce smaller
diffs.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2021-04-12 12:43:46 +02:00

29 lines
702 B
GLSL

#version 310 es
// SPDX-License-Identifier: Unlicense OR MIT
#extension GL_GOOGLE_include_directive : enable
precision highp float;
#include "common.h"
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 uv;
layout(binding = 0) uniform Block {
vec4 uvTransform;
vec4 subUVTransform;
} _block;
layout(location = 0) out vec2 vUV;
void main() {
vec3 p = transform3x2(fboTransform, vec3(pos, 1.0));
gl_Position = vec4(p, 1);
vec3 uv3 = transform3x2(fboTextureTransform, vec3(uv, 1.0));
vUV = uv3.xy*_block.subUVTransform.xy + _block.subUVTransform.zw;
vUV = transform3x2(fboTextureTransform, vec3(vUV, 1.0)).xy;
vUV = vUV*_block.uvTransform.xy + _block.uvTransform.zw;
}