single-pass-wireframes in shader
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
This is an issue to track a feature I plan to add sometime soon.
The goal is to add Single-Pass Wireframe Rendering to Xenko's shaders, and use that for wireframes in the Studio, instead of 2-pass xray wireframes. Here is an example...

Why?
There are many advantages to single-pass wireframes.
- they are massively faster than 2-pass drawing of LINE primitives
- they look much nicer
- they don't have any z-fighting issues, so they can be z-clipped
- they can support advanced wireframe features, like contrast coloring, or depth-test occlusion coloring
- automatic back-face line rejection, independent of z-test
The most immediate problem this will fix is the fact that the current x-ray wireframes make placing objects very very confusing. Take a look at two screenshots..
Here is one with a character standing on a surface.

Here is one with the character "submerged" up to the waist. The x-ray wireframes make this very hard to see.

I'm guessing the current wireframes are x-ray because non-xray 2-pass wireframes have many z-fighting issues, and also it may be advantageous to see the wireframes through objects.
My plan is to add single-pass wireframes to the shader, and add some features, such as:
- allowing occluded lines to be an alternate (muted) color, or culled
- contrast-coloring lines (so on yellow objects they will appear black)
Notes:
- https://github.com/stride3d/stride/blob/master/sources/engine/Stride.Rendering/Rendering/WireframePipelineProcessor.cs
- https://github.com/stride3d/stride/blob/master/sources/engine/Stride.Graphics/RasterizerStates.cs
- https://github.com/stride3d/stride/blob/master/sources/editor/Stride.Assets.Presentation/SceneEditor/WireframeRenderFeature.cs
- https://github.com/stride3d/stride/blob/master/sources/editor/Stride.Assets.Presentation/AssetEditors/EntityHierarchyEditor/Game/EditorGameModelSelectionService.cs#L60
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading WireframePipelineProcessor.cs and RasterizerStates.cs, then trace the Studio integration through WireframeRenderFeature.cs and EditorGameModelSelectionService.cs. Compare the current two-pass x-ray behavior with the linked single-pass wireframe approach. Done means Studio uses single-pass wireframes with the intended depth and occlusion behavior, including the proposed line-color or culling options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100