Fix #119527: Aliased Wireframe In XRay
This change reverts 14500953ed. This commit improved the performance but introduced the regression. The wireframe shader checks the normal buffer to detect if attributes are being rendered. The VBO contains both positions and normals. In Blender 4.2 this VBO was separated (#116902)and this solved the rendering. It is to late and risky to add this separation to 4.1 in the last minute so we decided to revert the performance improvement as it was already an issue for several years. The performance improvement will still be in Blender 4.2 where it doesn't have these artifacts. Pull Request: https://projects.blender.org/blender/blender/pulls/119656
This commit is contained in:
parent
4a7c5d3d3d
commit
b5168ee771
@ -66,8 +66,7 @@ void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata)
|
|||||||
|
|
||||||
const bool use_select = (DRW_state_is_select() || DRW_state_is_depth());
|
const bool use_select = (DRW_state_is_select() || DRW_state_is_depth());
|
||||||
GPUShader *wires_sh = use_select ? OVERLAY_shader_wireframe_select() :
|
GPUShader *wires_sh = use_select ? OVERLAY_shader_wireframe_select() :
|
||||||
OVERLAY_shader_wireframe(pd->antialiasing.enabled &&
|
OVERLAY_shader_wireframe(pd->antialiasing.enabled);
|
||||||
!pd->xray_enabled);
|
|
||||||
|
|
||||||
for (int xray = 0; xray < (is_material_shmode ? 1 : 2); xray++) {
|
for (int xray = 0; xray < (is_material_shmode ? 1 : 2); xray++) {
|
||||||
DRWState state = DRW_STATE_FIRST_VERTEX_CONVENTION | DRW_STATE_WRITE_COLOR |
|
DRWState state = DRW_STATE_FIRST_VERTEX_CONVENTION | DRW_STATE_WRITE_COLOR |
|
||||||
|
Loading…
Reference in New Issue
Block a user