This changes quite a few things. - Outline is now per object. - No more outline at object intersection (fix hairs problem). - Simplify the code quite a bit. We use a R16UI buffer to save one id per object outline. We convert this id to color when detecting the outline. Added textureGatherOffsets to the code but could not test on current hardware so leaving it commented for now.
11 lines
173 B
GLSL
11 lines
173 B
GLSL
uniform int callId;
|
|
uniform int baseId;
|
|
|
|
/* using uint because 16bit uint can contain more ids than int. */
|
|
out uint outId;
|
|
|
|
void main()
|
|
{
|
|
outId = uint(baseId + callId);
|
|
}
|