mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-02 22:01:32 +00:00
e2b6e0728e
Currently the instance id is written (with the idea that it can be mapped back to entity in C). The plan is to use it for mouse picking.
20 lines
375 B
GLSL
20 lines
375 B
GLSL
#version 450
|
|
|
|
layout (set = 1, binding = 0) uniform sampler2D Texture;
|
|
|
|
layout (location = 0) in vec2 st;
|
|
layout (location = 1) in vec4 color;
|
|
layout (location = 2) in flat uint id;
|
|
|
|
layout (location = 0) out vec4 frag_color;
|
|
layout (location = 1) out uint entid;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec4 pix;
|
|
|
|
pix = texture (Texture, st);
|
|
frag_color = pix * color;
|
|
entid = id;
|
|
}
|