Download

Adding a geometry shader into an existing shading model pipeline

Hello everyone,

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.

Cheers,
Sebastian

1 Like

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 Did you make any progress?

same boat.
the best docs I found are these. (Same as link above, but the second part.)

And it is definitely a time sink because you need to try and fail to get the proper understanding of it…

@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.