Hi,
I want to port my engine to Monogame. Currently my engine, is quite an empty engine. I did use physics in the past with the Jitter physics engine and bepu physics a little bit. My 2022 development was going great i thought, below is a picture of within Virtual Reality with the oculus rift cv1 and touch controllers, where i was able to contruct a scene with many individual voxel meshes, with a voxel virtual desktop and voxel keyboard and a voxel inverse kinematics player controller.
After my development on Individual mesh Level of Detail and custom dot frustrum culling and distance culling, i decided to dive deep into trying to develop chunk voxel instancing and i succeeded, but it was hard to arrive there and i am not done.
The problem is that, while i thought i was correctly using the GPU’s capabilities to render a scene, i wasn’t, since i wasn’t using compute shaders for fast GPU calculations. I tried searching for sharpdx compute shaders examples but i didn’t find anything except one example here //https://gist.github.com/oguna/624969e732a868ec17f05694012c1b63 which is a sample code on how to use a compute shader to make a vector sum. But there aren’t any vertex shaders or pixel shaders in that sample that could explain the code i would need to use to send directly from the compute shader towards the vertex shader. When i say that what i am coding isn’t using the GPU capabilities enough, is that i compared with others, for instance Sebastian Lagues Marching Cubes tutorial here, SebLague/Marching-Cubes: Coding Adventure (github.com) where in a scene where putting the ISO at the highest level to barely have lag, there are over 80 million vertices loaded in the scene at times, where if i try and load a big level in my engine i get 30fps and about 4-8 million vertices at most. And i’ve always thought the Sebastian Lagues finished projects very complicated to learn from scratch, but when done in parts, it was easier for me to learn, although i have been a while without using Unity3D and it would bother me to just leave almost everything that i have coded in low-level barebone c# and port to new engine with everything so different.
Monogame for instance, i have found very similar to barebone low-level c#, and i did try in the past Monogame’s engine to incorporate Virtual Reality from the AB3D.oculuswrap, and tried the jitter physics integration, and i enjoyed coding in Monogame. You can find my repositories of my earlier attempts at VR here:
ninekorn/SCCoreSystemsMono: Ab3d OVR wrapper Monogame with jitter physics (github.com)
and here:
and here:
ninekorn/screen-capture-monogame: screen capture using sharpdx in monogame (github.com)
Now, to the root of the problem. I can’t make a single example that uses compute shaders work from here cpt-max/MonoGame-Shader-Samples: Compute, Tessellation and Geometry Shader Samples for MonoGame (github.com)
I tried to follow Monogames compute shader guide below but it doesn’t work. In my own development i could use a vertex and pixel shader and have them be loaded into the content manager mgcb but currently using monogame 3.8.2 and the content builder doesn’t recognize the compute shaders from any samples available.
Docs/MonoGame Compute Shader Guide.md at master · cpt-max/Docs (github.com)
I would really appreciate to have help from the community of monogame regarding how to load compute shaders in monogame 3.8.2, so that i could start learning how to use them properly and to port my engine in monogame, and finally see if my chunked voxel instancing technique with the addition of compute shaders really can be on par with other developers techniques so that i could continue developing on it.
I have tried also using the nugget MonoGame.Framework.Compute.WindowsDX 3.8.2 but to no avail as that either wouldn’t make the content builder work. Trying to load the compute shader example from MonoGame’s compute shader Guide gives the below error which is the same error if i try the samples in the github link i posted above.
thank you for the help,
steve chassé
Edit-2022dec30: i just noticed that the monogame links i posted above are actually coming from a custom fork.