Low level graphics programming in Unreal Engine

I’m a little experienced in Unreal Engine, but I don’t know the Unreal’s graphics programming from a very low level. So, I would like to know more informations about this. I have searched on google but I don’t find anything. More in details, I would like to know:

Can I write an HLSL shader(Vertex, tessellation, fragment, ecc,…) for a specific actor ?

Can I apply some pre-processing operations to a UStaticMesh/USkeletalMesh of an anctor ? An example can be to create different LOD levels

Can I write a compute shader in Unreal ?

Many thanks

All of these things you mentioned can be done. It all depends on your ability to understand the Unreal Engine code and most efficient way to modify it.

  • You can create HLSL directly in materials using the Custom Node. You have access to the fundamentals. If you want to expose more, you’ll have to dig into the C++ and HLSL code.
  • Creating LODs can be done in either a 3D application and be imported with a mesh, alternatively you can generate it directly from meshes in Unreal. You could look at that code to figure out the processing and where in the pipeline such changes can be done.
  • Compute shaders can absolutely be created, but again C++ and HLSL will be your friend here. I’d suggest getting the source code and have a go at reading about the various systems already in place.

Hi,
first of all many thanks for the reply.

I think that, with the Custom Node, I can apply only fragment operations. So I can’t create, for example, a vertex shader or a tesselation shader. Let me know if I’m wronging. About the pre-processing operations, I would like, to do these without using any external tools. So, considering the LODs example, I want to create a piece of C++ or HLSL code that simplifies my mesh in different LODs and it saves them somewhere. About the compute shaders, do you know how can create them in Unreal ? Do you know any tutorials/articles that explains how can create and use a compute shader in Unreal ?

Maybe the compute shader is the key to apply some pre-processing operations in a very fast way

Many thanks

Hmm, you are somewhat correct. With the Custom Node you can write code that takes input and outputs stuff. You can extend the code by changing the underlying system in C++.

Could you explain why you would want to do that in HLSL when we already have very capable tools to change the LODs?

You are dabbing in areas where people really don’t create tutorials. People who have experience with low level shaders rarely make tutorials about it. You will basically have to figure out most of this yourself, or find pieces scattered around on the internet.

I would like to do that in HLSL becasuse I would like to implement a custom LOD algorithm cluster-based in Unreal. It is for a master thesis project.

I see! Well my suggestion is to register for the source code and break down their existing LOD system to see how you should integrate it.

If you want to touch HLSL on a deeper level, you will have to interact with the C++ code. It’s not an easy thing, so I really do wish you the best of luck!

Ok perfect I will do it. Thank you so much for your suggestions.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.