17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 09:27:54 +01:00

Vulkan: scene rendering (D1–D7) on a scene walk shared with GL (N6a, N6b)

This commit is contained in:
2026-10-24 20:10:24 +02:00
parent bd589f272d
commit 9b7d02e5fb
107 changed files with 14511 additions and 3924 deletions

View File

@@ -0,0 +1,34 @@
#version 460 core
#define STAGE_FRAGMENT 1
#include "common.glsl"
layout(location = 2) in vec2 f_coord;
#pragma texture(tex1, 0, sRGB_A)
layout(set = MATERIAL_SET, binding = MATERIAL_TEXTURE_FIRST + 0) uniform sampler2D tex1;
#include "tonemapping.glsl"
layout(location = 0) out vec4 out_color;
#ifdef NO_MOTION_OUTPUT
// a pass without the velocity target: the writes go nowhere
vec4 out_motion;
#else
layout(location = 1) out vec4 out_motion;
#endif
void main()
{
vec4 tex_color = texture(tex1, f_coord);
if (POSTFX_ENABLED)
{
out_color = tex_color * param[0];
}
else
{
out_color = tonemap(tex_color * param[0]);
}
if (MOTIONBLUR_ENABLED)
{
out_motion = vec4(0.0f);
}
}