mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-01 04:42:01 +08:00
NEW:add flat shader for cut tool
Jira:STUDIO-4227 thanks for PrusaSlcer and enricoturri1966 commit 76d1d4949bbd0964717f8112aae992a1267c5eb4 Author: enricoturri1966 <enricoturri@seznam.cz> Date: Mon Mar 21 13:10:47 2022 +0100 Tech ENABLE_GL_SHADERS_ATTRIBUTES - Added shaders for glsl version 140 ... Change-Id: I4db00805830f07a5eaa95cfc7b8254c61b86f0c8
This commit is contained in:
parent
b32b1d2462
commit
26b8ca6599
8
resources/shaders/flat.fs
Normal file
8
resources/shaders/flat.fs
Normal file
@ -0,0 +1,8 @@
|
||||
#version 110
|
||||
|
||||
uniform vec4 uniform_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = uniform_color;
|
||||
}
|
11
resources/shaders/flat.vs
Normal file
11
resources/shaders/flat.vs
Normal file
@ -0,0 +1,11 @@
|
||||
#version 110
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
|
||||
attribute vec3 v_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
}
|
@ -39,6 +39,7 @@ std::pair<bool, std::string> GLShadersManager::init()
|
||||
valid &= append_shader("thumbnail", { "thumbnail.vs", "thumbnail.fs" });
|
||||
// used to render first layer for calibration
|
||||
valid &= append_shader("cali", { "cali.vs", "cali.fs"});
|
||||
valid &= append_shader("flat", {"flat.vs", "flat.fs"});
|
||||
// used to render printbed
|
||||
valid &= append_shader("printbed", { "printbed.vs", "printbed.fs" });
|
||||
// used to render options in gcode preview
|
||||
|
Loading…
x
Reference in New Issue
Block a user