Page MenuHome

Fix T73518: Normal Overlay
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Mon, Feb 10, 3:33 PM.

Details

Summary

This change will not render the normals for faces that are hidden.
Before we had instance drawing the hidden faces were registered in the
index buffer. During the overlay refactoring the rendering was migrated
to instance rendering. Instance rendering does not use the index buffer
so the data was ignored.

This patch stored the normal visibility in the .w part of the normal or
for face normals it will set the normal to zero. The shader looks at
this and renders the normals fully transparent when detected.

Diff Detail

Repository
rB Blender

Event Timeline

Added support for loop normals during cage editing.

Clément Foucault (fclem) added inline comments.
source/blender/draw/engines/overlay/shaders/edit_mesh_common_lib.glsl
67 ↗(On Diff #21575)

put back 0.0f

source/blender/draw/intern/draw_cache_extract_mesh.c
3718

+1 for better code quality!

This revision is now accepted and ready to land.Mon, Feb 10, 4:25 PM
Jeroen Bakker (jbakker) marked 2 inline comments as done.Mon, Feb 17, 2:58 PM
This revision was automatically updated to reflect the committed changes.