30#define SCORE_GFX_CAPTURE_UNIFORMS \
31 "layout(std140, binding = 0) uniform renderer_t {\n" \
32 " mat4 clipSpaceCorrMatrix;\n" \
33 " vec2 renderSize;\n" \
36 "layout(std140, binding = 2) uniform material_t {\n" \
39 " vec4 blackLevel;\n" \
40 " vec4 whiteBalance;\n" \
48#define SCORE_GFX_CAPTURE_ADJUST_FN \
49 "vec3 adjustCapture(vec3 c)\n" \
51 " vec3 bl = mat.blackLevel.rgb;\n" \
52 " c = (c - bl) / max(vec3(1.0 / 65535.0), vec3(1.0) - bl);\n" \
53 " c *= mat.whiteBalance.rgb;\n" \
54 " c *= mat.params.x;\n" \
55 " c = max(c, vec3(0.0));\n" \
56 " float l = dot(c, vec3(0.2126, 0.7152, 0.0722));\n" \
57 " c = mix(vec3(l), c, mat.params.z);\n" \
58 " c = max(c, vec3(0.0));\n" \
59 " c = pow(c, vec3(1.0 / max(mat.params.y, 1.0 / 65535.0)));\n" \
60 " return clamp(c, 0.0, 1.0);\n" \
72static const constexpr auto captureVertexShader = R
"_(#version 450
73layout(location = 0) in vec2 position;
74layout(location = 1) in vec2 texcoord;
76layout(location = 0) out vec2 v_texcoord;
80out gl_PerVertex { vec4 gl_Position; };
84 v_texcoord = texcoord;
85 gl_Position = renderer.clipSpaceCorrMatrix * vec4(position.x * mat.scale.x, position.y * mat.scale.y, 0.0, 1.);
86#if defined(QSHADER_HLSL) || defined(QSHADER_MSL)
87 gl_Position.y = - gl_Position.y;
#define SCORE_GFX_CAPTURE_UNIFORMS
Definition CaptureAdjustGLSL.hpp:30
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11