Fix #105830: Add depth bias for overlay faces in Metal
Resolves z-fighting blocking artifacts on faces due to limited depth precision at certain camera positions. Depth bias offsets the calculation enough without affecting display. Authored by Apple: Michael Parkin-White Pull Request: https://projects.blender.org/blender/blender/pulls/108048
This commit is contained in:
committed by
Jeroen Bakker
parent
2ce7f3ec71
commit
c267256f01
@@ -74,6 +74,11 @@ void main()
|
||||
finalColor = EDIT_MESH_face_color(m_data.x);
|
||||
bool occluded = true;
|
||||
|
||||
# ifdef GPU_METAL
|
||||
/* Apply depth bias to overlay in order to prevent z-fighting on Apple Silicon GPUs. */
|
||||
gl_Position.z -= 5e-5;
|
||||
# endif
|
||||
|
||||
#elif defined(FACEDOT)
|
||||
finalColor = EDIT_MESH_facedot_color(norAndFlag.w);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user