quakeforge/libs/video/renderer/vulkan/shader/particle.frag
Bill Currie 4cb120e878 [vulkan] Implement most of the changes for cube rendering
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).
2023-02-14 13:24:47 +09:00

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);
}