This repository has been archived on 2020-09-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
libs/qglengine/shaders/selection.glsl

20 lines
274 B
GLSL

// vert //
flat out uint id, select;
void main(void) {
id = qgl_ObjectID;
select = qgl_ObjectSelected;
gl_Position = qgl_ftransform();
}
// frag //
flat in uint id, select;
void main(void) {
qgl_FragData[0] = unpackUnorm4x8(id);
qgl_FragData[1] = vec4(select);
}