Support for Accessing Vertex Data/Writing Custom Shaders

Are there any talks on if/when there will be support for custom vertex shaders in Unreal?
I know there are ways to move vertices around with WorldPositionOffset, etc, but what I need is to read that data, not write to it.
My team has already started moving from Unity to Unreal, and I’d rather not have to tell them we should scrap everything and go back to Unity.
I could make a new shader model, but asking my team to go off and re-compile the engine anytime I want to make a change to a vertex shader doesn’t sound practical. In fact, just managing our own version of unreal sounds unruly.
I was hoping that maybe I would have access to some vertex data from within a shader-plugin, but that also looks impossible (please correct me if I’m wrong).

Maybe there’s some hacky way to get some vertex data from within custom expressions in the material editor?? If it is possible, I haven’t been able to find anyone doing it.

If anyone has any method for accessing vertex data/writing vertex shaders with unreal (other than adding a new shader model), please let me know!

Any comments, thoughts, corrections, tips, etc, are appreciated.
Thanks!

What data are you trying to read exactly? You can get the position, color, and normal from the material graph

Thanks for the reply.
I’m looking for the positions (x,y,z) of every vertex in the mesh.
I know that Absolute World Position can give me the location of a pixel being rendered, but I would need that information for the whole mesh, occluded geometry and all, not just what is visible.

You know, shaders work per-pixel basically. If you need more data you can generate a texture with your data. Then read from that texture in the shader.

In your case you want to put the vertex positions in the texture. You can also create custom nodes to read from the vertex by any given index.

AFAIK absolute world position returns data per-vertex when it is plugged in as part of an input for world position offset. I was also confused by this at first, given the tooltip description on the node. Depending on what you’re doing you can also use pre-skinned local position.

Additionally if you want to force portions of your graph to run per vertex then you can use the vertex interpolator node. Useful for optimization or using certain nodes that normally only work in the vertex shader.

2 Likes

My team has started moving from Unity to Unreal, and I would rather not have to tell them to delete everything and return to Unity. I can make a new shader model, but asking my team to leave and reassemble the machine whenever I want to convert it to the shader vertex does not sound useful. We had best essay writing service Australia for more stuff. In fact, it is just a matter of controlling our own inclinations.