I am trying to add a geometry shader to a custom shading model, but I am struggling a bit.
It does not seem like there are a lot of examples out there.
I am using UE 4.24.3 and added my custom shading model by following this tutorial https://medium.com/@lordned/ue4-rend…l-e2972b40d72d and adapting for 4.24.3.
At the bottom of the tutorial, it said that adding a geometry shader would come next, but it seems like it never did.
Any pointers to examples/tutorials would be much appreciated.
I have been looking into the same thing. I am trying to implement some molecular visualization techniques, and I need to write geometry and tessellation shaders to do it. I’m totally lost in the material system code, that I have no idea, if or how one might inject custom HLSL geometry shaders into the MSM_DefaultLit shading model.
@bavarianbasti@timtimmy@MostHost_LA Do you guys have any progress regarding these problems? I appreciate your response, even a small detail is matters.
Not really.
For my purposes I have just been baking custom colors into vertex paint and using those.
It works well even if it’s painful to setup.
Instead of re-inventing the weel, at least it works with any engine…
I’ve done geo shader support for 4.16 back in the day. That is tremendous amount of work, barely justified by anything, and especially these days, when geo shader is pretty much a rudiment of the past. I suggest you to re-think your approach with geo shader, for in 2021 for whatever you might be using it for, better alternatives are available.
But then how would you, for example, assign an index pointing to a texture array to a vertex, and then blend them based on some kind of a mask? Colors can achieve that, but they only allow 8bit indecies, which in my case is not enough.
Please excuse my ignorance, but how are they a rudiment (or perhaps remnant?) of the past? Isn’t dynamic tessellation achieved through geo? It’s love to know how to achieve dynamic mesh simplification (decimation) through geometry shades for animated skinned meshes. I cannot fathom how to do this otherwise.
Hello fellas,
I’ve been also looking into UE Geometry Shader for a few years to create an effect not possible in the material or HLSL. I too have read the Medium article by Matt Hoffman and hoped for his next article.
I’m not a graphics programmer and a beginner with C++, but I remembered bookmarking an article by YivanLee regarding Geometry Shader implementation, it’s in Chinese, but can be translated and I hope it’ll help anyone here.
Geometry shaders are pretty much depricated because they run slow on most hardware. As an alternative to generating geometry in the shader, consider creating a mesh with all the necessary geometry on the cpu. If you want to manipulate this mesh on the gpu, do it in a vertex shader. vertex animation textures are a good thing to look into. hope this helps!
I have a mesh with multiple layers, and vertices on the outermost layer have the lowest alpha, while vertices on the interior are opaque. When I turn on Translucency and drive opacity by vertex alpha, there seems to be a problem with the depth testing as my mesh does not properly occlude itself, despite the innermost layer having an opacity of 1.0. I have read that a geometry shader would have created these layers – shells – for me without causing this depth testing problem. Is there another more modern approach you’d recommend? By that I mean, is “creating the necessary geometry on the cpu” not the same as having the mesh prepared with all the necessary geometry, as I’m doing?
Unlike anything else, unreal doesnt do screen priority on anything.
As such transparencies are always a mess.
They generally get forced into the forward shader where some sort of biased peiority could (in theory) be calculated.
Honestly, it sounds like you need to use an engine with better rendering to achieve what you want…