mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
Revert "Add a simple subtle outline effect by drawing back faces using wireframe mode (#2934)"
This reverts commit 0cee513416.
This commit is contained in:
parent
f0e35839fb
commit
685de31088
4 changed files with 8 additions and 46 deletions
|
|
@ -54,11 +54,6 @@ varying vec4 world_pos;
|
|||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
|
|
@ -100,11 +95,8 @@ void main()
|
|||
}
|
||||
color.rgb = (any(lessThan(pv_check_min, ZERO)) || any(greaterThan(pv_check_max, ZERO))) ? mix(color.rgb, ZERO, 0.3333) : color.rgb;
|
||||
|
||||
// Orca: add backface outline
|
||||
if (!gl_FrontFacing)
|
||||
gl_FragColor = vec4(getBackfaceColor(color.rgb), 1.0);
|
||||
//BBS: add outline_color
|
||||
else if (is_outline)
|
||||
if (is_outline)
|
||||
gl_FragColor = uniform_color;
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
else if (use_environment_tex)
|
||||
|
|
|
|||
|
|
@ -56,11 +56,6 @@ in vec3 eye_normal;
|
|||
|
||||
out vec4 out_color;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
|
|
@ -102,11 +97,8 @@ void main()
|
|||
}
|
||||
color.rgb = (any(lessThan(pv_check_min, ZERO)) || any(greaterThan(pv_check_max, ZERO))) ? mix(color.rgb, ZERO, 0.3333) : color.rgb;
|
||||
|
||||
// Orca: add backface outline
|
||||
if (!gl_FrontFacing)
|
||||
out_color = vec4(getBackfaceColor(color.rgb), 1.0);
|
||||
//BBS: add outline_color
|
||||
else if (is_outline)
|
||||
if (is_outline)
|
||||
out_color = uniform_color;
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
else if (use_environment_tex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue