mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-13 06:00:42 +00:00
4cb120e878
There are some missing parts from this commit as these are the fairly clean changes. Missing is building a separate set of pipelines for the new render pass (might be able to get away from that), OIT heads texture is flat rather than an array, view matrices aren't set up, and the fisheye renderer isn't hooked up to the output pass (code exists but is messy). However, with the missing parts included, testing shows things mostly working: the cube map is rendered correctly even though it's not displayed correctly (incorrect view). This has definitely proven to be a good test for Vulkan's multiview feature (very nice).
22 lines
491 B
GLSL
22 lines
491 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
#extension GL_EXT_multiview : enable
|
|
|
|
#define OIT_SET 1
|
|
#include "oit_blend.finc"
|
|
|
|
layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput opaque;
|
|
|
|
layout (location = 0) out vec4 frag_color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec3 o;
|
|
vec3 c;
|
|
|
|
o = subpassLoad (opaque).rgb;
|
|
c = BlendFrags (vec4 (o, 1)).xyz;
|
|
c = pow (c, vec3(0.83));//FIXME make gamma correction configurable
|
|
frag_color = vec4 (c, 1);
|
|
}
|