mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 22:52:21 +00:00
3603f90718
Surfaces marked with SURF_DRAWALPHA but not SURF_DRAWTURB are put in a separate queue for the water shader and run with a turb scale of 0. Also, entities with colormod alpha < 1 are marked to go in the same queue as SURF_DRAWALPHA surfaces (ie, no SURF_DRAWTURB unless the model's texture indicated such).
33 lines
721 B
GLSL
33 lines
721 B
GLSL
#version 450
|
|
#extension GL_GOOGLE_include_directive : enable
|
|
|
|
#include "entity.h"
|
|
|
|
layout (set = 0, binding = 0) uniform Matrices {
|
|
mat4 Projection3d;
|
|
mat4 View;
|
|
mat4 Sky;
|
|
mat4 Projection2d;
|
|
};
|
|
|
|
layout (set = 1, binding = 0) buffer Entities {
|
|
Entity entities[];
|
|
};
|
|
|
|
layout (location = 0) in vec4 vertex;
|
|
layout (location = 1) in vec4 tl_uv;
|
|
layout (location = 2) in uint entid;
|
|
|
|
layout (location = 0) out vec4 tl_st;
|
|
layout (location = 1) out vec3 direction;
|
|
layout (location = 2) out vec4 color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec3 vert = vertex * entities[entid].transform;
|
|
gl_Position = Projection3d * (View * vec4 (vert, 1));
|
|
direction = (Sky * vertex).xyz;
|
|
tl_st = tl_uv;
|
|
color = entities[entid].color;
|
|
}
|