forked from 1b-agent/opencadstudio-upstream
fix(render): colour-7 solid edges contrast with a layout's paper
A solid's edges and silhouettes were drawn in its face colour, and the edge shader read that from the material instead of the edge vertices. Colour 7 is white, so in Wireframe 2D a solid vanished white-on-white in a layout viewport (and on a light model background), while wires and block solids already turned black there. Solids now keep a separate edge colour, colour 7 turned against the background they are drawn on, and the edge shader uses the edge vertices' colour again, which also brings back visual-style edge colours. Shaded faces keep their colour so they still read as lit. (#1446) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
44c6ddc513
commit
19cc2e1073
6 files changed
+24
-8
No files matched your search
@@ -594,7 +594,10 @@ fn fs_main(in: VertexOut) -> @location(0) vec4<f32> {
|
||||
// wireframe and hidden-line edge passes so lines read at their true colour.
|
||||
@fragment
|
||||
fn fs_edge(in: EdgeVertexOut) -> @location(0) vec4<f32> {
|
||||
return vec4<f32>(surface.face_color.rgb, 1.0);
|
||||
// The edge buffers carry their own colour (keyed by it, so instances
|
||||
// share a buffer only with the same colour): a visual style's edge
|
||||
// colour, or colour 7 turned against the background (#1446).
|
||||
return vec4<f32>(in.color.rgb, 1.0);
|
||||
}
|
||||
|
||||
// Edge fragment for filled render modes: force black so edges frame the shaded
|
||||
|
||||
Reference in new issue
Block a user