Display wireframe of model

Hi,
I’m fairly new to the world of 3D graphics in general and to Stride in particular. I’m trying to accomplish something that seems to be a pretty simple task: I have some model, lets say a cube. How do I go about and display the wireframe for that model in a scene? I tried DebugPhysicsShapes but couldn’t make it work. Anyone have any code snipets that can point me in the right direction?

Thanks for the help,
Michael

I’m not sure, but you need to pass a shader to your model.

Here is an example on Unity:

This is certainly something that could be easier.

There are broadly two ways to draw wireframes.

The simple (slower) way is to draw the object mesh with GL lines. This is what Stride editor does… and it does this in a pass after the screen space filters.

The Unity screenshot uses a single pass wireframe shader. In Stride you can follow a shader example and make a custom wireframe shader. I tried to work on this last week but ran into issues editing shaders because the new VS plugin was crashing. Hopefull that’s fixed now?

Here is a sample single pass wireframe shader…

2 Likes