mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 04:37:51 -06:00
Remove grid pattern
It'll be replaced by grid lines instead of grid surfaces. Contributes to issue CURA-4150.
This commit is contained in:
parent
b74c09dec8
commit
484740f2ff
2 changed files with 6 additions and 18 deletions
|
@ -169,8 +169,7 @@ class BuildVolume(SceneNode):
|
|||
self._shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "default.shader"))
|
||||
self._grid_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "grid.shader"))
|
||||
theme = Application.getInstance().getTheme()
|
||||
self._grid_shader.setUniformValue("u_gridColor0", Color(*theme.getColor("buildplate").getRgb()))
|
||||
self._grid_shader.setUniformValue("u_gridColor1", Color(*theme.getColor("buildplate_alt").getRgb()))
|
||||
self._grid_shader.setUniformValue("u_buildplateColor", Color(*theme.getColor("buildplate").getRgb()))
|
||||
|
||||
renderer.queueNode(self, mode = RenderBatch.RenderMode.Lines)
|
||||
renderer.queueNode(self, mesh = self._origin_mesh)
|
||||
|
|
|
@ -14,17 +14,12 @@ vertex =
|
|||
}
|
||||
|
||||
fragment =
|
||||
uniform lowp vec4 u_gridColor0;
|
||||
uniform lowp vec4 u_gridColor1;
|
||||
|
||||
uniform lowp vec4 u_buildplateColor;
|
||||
varying lowp vec2 v_uvs;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (mod(floor(v_uvs.x / 10.0) - floor(v_uvs.y / 10.0), 2.0) < 1.0)
|
||||
gl_FragColor = u_gridColor0;
|
||||
else
|
||||
gl_FragColor = u_gridColor1;
|
||||
gl_FragColor = u_buildplateColor;
|
||||
}
|
||||
|
||||
vertex41core =
|
||||
|
@ -44,23 +39,17 @@ vertex41core =
|
|||
|
||||
fragment41core =
|
||||
#version 410
|
||||
uniform lowp vec4 u_gridColor0;
|
||||
uniform lowp vec4 u_gridColor1;
|
||||
|
||||
uniform lowp vec4 u_buildplateColor;
|
||||
in lowp vec2 v_uvs;
|
||||
out vec4 frag_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (mod(floor(v_uvs.x / 10.0) - floor(v_uvs.y / 10.0), 2.0) < 1.0)
|
||||
frag_color = u_gridColor0;
|
||||
else
|
||||
frag_color = u_gridColor1;
|
||||
gl_FragColor = u_buildplateColor;
|
||||
}
|
||||
|
||||
[defaults]
|
||||
u_gridColor0 = [0.96, 0.96, 0.96, 1.0]
|
||||
u_gridColor1 = [0.8, 0.8, 0.8, 1.0]
|
||||
u_buildplateColor = [0.96, 0.96, 0.96, 1.0]
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue