Show wireframe in MMU painter gizmo (#2808)

* Remove unused shader files

* Port wireframe shader from BBS

* Enable wireframe in MMU painter

Co-Authored-By: zhou.xu <zhou.xu@bambulab.com>

---------

Co-authored-by: zhou.xu <zhou.xu@bambulab.com>
This commit is contained in:
Noisyfox 2023-11-21 17:17:22 +08:00 committed by GitHub
parent 70d86af253
commit 03a9014d3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 121 additions and 1092 deletions

View file

@ -12,10 +12,13 @@ uniform vec2 z_range;
uniform vec4 clipping_plane;
attribute vec3 v_position;
attribute vec3 v_barycentric;
varying vec3 clipping_planes_dots;
varying vec4 model_pos;
varying vec4 world_pos;
varying vec3 barycentric_coordinates;
struct SlopeDetection
{
bool actived;
@ -32,4 +35,7 @@ void main()
gl_Position = projection_matrix * view_model_matrix * model_pos;
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
//compute the Barycentric Coordinates
barycentric_coordinates = v_barycentric;
}