Page MenuHome

The overlay for bone ik limits has visual artifacts
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 446.14

Blender Version
Broken: version: 2.83.0, branch: master, commit date: 2020-06-03 14:38, hash: rB211b6c29f771
Worked: 2.82.7

Short description of error
The sphere that is drawn in the 3D viewport after you select a bone with ik limits has visual artifacts. As far as I can tell, this always happens and requires no special reproduction steps besides creating an armature bone with ik limits enabled under the 'Bone Properties' panel.
Out of curiosity, I took a look at the code. The cause appears to be, that the shader, which is used to the draw the lines of the ik limit overlay, is also used for drawing the sphere. The shader (armature_wire_frag.glsl) does antialiasing for lines, which causes artifacts when it is used for not-lines.

Exact steps for others to reproduce the error
Create an armature with at least 2 bones. Then select a bone and enable ik limits on the x and z axis.

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Jun 15 2020, 9:00 PM
Germano Cavalcante (mano-wii) updated the task description. (Show Details)
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

Seems like it draws into the lineTex buffer with alpha 0.


It does draw the solids to the linesTex and colorTex. and afterwards the outline is drawn on top. When drawing the solids it should not effect the lineTex.

I retested this on the latest daily build and the sphere is now invisible. It does obscure other overlays, so something is being rendered.

version: 2.90.0 Alpha, branch: master, commit date: 2020-06-19 13:42, hash: 59b523c3c98e, type: Release
build date: 2020-06-19, 12:31:39

Clément Foucault (fclem) reopened this task as Confirmed.Jun 19 2020, 7:36 PM

@Jeroen Bakker (jbakker) you need to make sure the shader still writes to the lineTex buffer. Otherwise it's Undefined behavior. I overlooked that in the patch.