mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-11 05:11:16 +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).
24 lines
413 B
GLSL
24 lines
413 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
#extension GL_EXT_multiview : enable
|
|
|
|
#include "oit_store.finc"
|
|
|
|
layout (location = 0) in vec4 uv_tr;
|
|
layout (location = 1) in vec4 color;
|
|
|
|
layout(early_fragment_tests) in;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec4 c = color;
|
|
vec2 x = uv_tr.xy;
|
|
|
|
float a = 1 - dot (x, x);
|
|
if (a <= 0) {
|
|
discard;
|
|
}
|
|
c *= (a);
|
|
StoreFrag (c, gl_FragCoord.z);
|
|
}
|