[Bf-blender-cvs] [c5eceb35829] master: Cleanup: EditMode: Remove uneeded shader depth bias
Clément Foucault
noreply at git.blender.org
Thu Jun 27 17:02:34 CEST 2019
Commit: c5eceb35829560dcb7e31e0c41bf59ea4feec0c0
Author: Clément Foucault
Date: Thu Jun 27 17:01:28 2019 +0200
Branches: master
https://developer.blender.org/rBc5eceb35829560dcb7e31e0c41bf59ea4feec0c0
Cleanup: EditMode: Remove uneeded shader depth bias
The bias is done using the DRWView now, no need to double it.
===================================================================
M source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl
===================================================================
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl
index fabc317cf4f..af0a47f1858 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl
@@ -1,7 +1,6 @@
uniform float faceAlphaMod;
uniform ivec4 dataMask = ivec4(0xFF);
-uniform float ofs;
in ivec4 data;
in vec3 pos;
@@ -23,24 +22,13 @@ void main()
GPU_INTEL_VERTEX_SHADER_WORKAROUND
vec3 world_pos = point_object_to_world(pos);
-
-#if !defined(FACE)
- /* TODO override the ViewProjection Matrix for this case. */
- mat4 projmat = ProjectionMatrix;
- projmat[3][2] -= ofs;
-
- gl_Position = projmat * (ViewMatrix * vec4(world_pos, 1.0));
-#else
-
gl_Position = point_world_to_ndc(world_pos);
-#endif
ivec4 m_data = data & dataMask;
#if defined(VERT)
finalColor = EDIT_MESH_vertex_color(m_data.y);
gl_PointSize = sizeVertex * 2.0;
- gl_Position.z -= 3e-5 * ((ProjectionMatrix[3][3] == 0.0) ? 1.0 : 0.0);
/* Make selected and active vertex always on top. */
if ((data.x & VERT_SELECTED) != 0) {
gl_Position.z -= 1e-7;
More information about the Bf-blender-cvs
mailing list