Skip to content

Commit 67c0382

Browse files
committed
Update wireframe display
1 parent 025c89e commit 67c0382

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/osgEarthImGui/RenderingGUI

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ void oeui_render_winding_fs(inout vec4 color) {
8383
#define VP_STAGE_FRAGMENT
8484
void oeui_render_outlines(inout vec4 color) {
8585
float b = min(gl_BaryCoordNV.x, min(gl_BaryCoordNV.y, gl_BaryCoordNV.z))*32.0;
86-
vec3 line_color = color.rgb;
87-
if (color.r < 0.5) line_color.r += 0.5; else line_color.r -= 0.5;
88-
if (color.b < 0.5) line_color.b += 0.5; else line_color.b -= 0.5;
89-
if (color.g < 0.5) line_color.b += 0.5; else line_color.g -= 0.5;
90-
color = vec4(mix(line_color, color.rgb, clamp(b,0,1)), color.a);
86+
float mono = dot(color.rgb, vec3(0.299, 0.587, 0.114));
87+
mono = mod(mono + 0.25, 1.0);
88+
color = vec4(mix(vec3(mono), color.rgb, clamp(b,0,1)), color.a);
9189
}
9290
)";
9391

0 commit comments

Comments
 (0)