This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/draw/modes/shaders/object_outline_prepass_frag.glsl
Clément Foucault 7f5d76b37f Object Mode: Rework outline drawing.
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.
2018-04-16 19:38:58 +02:00

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