2023-10-28 15:53:35 +00:00
|
|
|
#version 440 core
|
2020-11-15 22:18:35 +00:00
|
|
|
|
|
|
|
#include <constants.glsl>
|
|
|
|
|
|
|
|
#define LIGHTING_TYPE (LIGHTING_TYPE_TRANSMISSION | LIGHTING_TYPE_REFLECTION)
|
|
|
|
|
|
|
|
#define LIGHTING_REFLECTION_KIND LIGHTING_REFLECTION_KIND_SPECULAR
|
|
|
|
|
2022-10-23 19:03:21 +00:00
|
|
|
#if (FLUID_MODE == FLUID_MODE_LOW)
|
2020-11-15 22:18:35 +00:00
|
|
|
#define LIGHTING_TRANSPORT_MODE LIGHTING_TRANSPORT_MODE_IMPORTANCE
|
2022-09-23 14:04:47 +00:00
|
|
|
#elif (FLUID_MODE >= FLUID_MODE_MEDIUM)
|
2020-11-15 22:18:35 +00:00
|
|
|
#define LIGHTING_TRANSPORT_MODE LIGHTING_TRANSPORT_MODE_RADIANCE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define LIGHTING_DISTRIBUTION_SCHEME LIGHTING_DISTRIBUTION_SCHEME_MICROFACET
|
|
|
|
|
|
|
|
#define LIGHTING_DISTRIBUTION LIGHTING_DISTRIBUTION_BECKMANN
|
|
|
|
|
|
|
|
#include <globals.glsl>
|
|
|
|
|
2020-12-06 21:42:01 +00:00
|
|
|
layout(location = 0) out vec2 uv;
|
2020-11-15 22:18:35 +00:00
|
|
|
|
|
|
|
void main() {
|
2020-12-05 09:31:35 +00:00
|
|
|
// Generate fullscreen triangle
|
|
|
|
vec2 v_pos = vec2(
|
|
|
|
float(gl_VertexIndex / 2) * 4.0 - 1.0,
|
|
|
|
float(gl_VertexIndex % 2) * 4.0 - 1.0
|
|
|
|
);
|
|
|
|
|
2021-05-13 03:59:51 +00:00
|
|
|
// Flip y and transform into 0.0 to 1.0 range
|
2020-12-06 21:42:01 +00:00
|
|
|
uv = (v_pos * vec2(1.0, -1.0) + 1.0) * 0.5;
|
2020-11-15 22:18:35 +00:00
|
|
|
|
2020-12-05 09:31:35 +00:00
|
|
|
gl_Position = vec4(v_pos, 0.0, 1.0);
|
2020-11-15 22:18:35 +00:00
|
|
|
}
|