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:
Elias Naur
2021-04-12 12:04:53 +02:00
parent 495c690187
commit fbee13a07d
13 changed files with 7086 additions and 474 deletions
+6 -4
View File
@@ -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;
}