mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 16:06:19 +00:00
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>
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
#extension GL_GOOGLE_include_directive : enable
|
||||
|
||||
precision highp float;
|
||||
|
||||
#include <common.inc>
|
||||
#include "common.h"
|
||||
|
||||
layout(location = 0) in vec2 pos;
|
||||
layout(location = 1) in vec2 uv;
|
||||
@@ -12,7 +14,7 @@ layout(location = 1) in vec2 uv;
|
||||
layout(binding = 0) uniform Block {
|
||||
vec4 uvTransform;
|
||||
vec4 subUVTransform;
|
||||
};
|
||||
} _block;
|
||||
|
||||
layout(location = 0) out vec2 vUV;
|
||||
|
||||
@@ -20,7 +22,7 @@ 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*subUVTransform.xy + subUVTransform.zw;
|
||||
vUV = uv3.xy*_block.subUVTransform.xy + _block.subUVTransform.zw;
|
||||
vUV = transform3x2(fboTextureTransform, vec3(vUV, 1.0)).xy;
|
||||
vUV = vUV*uvTransform.xy + uvTransform.zw;
|
||||
vUV = vUV*_block.uvTransform.xy + _block.uvTransform.zw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user