Announcement

Collapse
No announcement yet.

Geometry shader

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Geometry shader

    Hi, I can't find how I can write shaders in UE4. Especially geometry and compute shaders. Maybe someone has any tutorials or articles about how to implement hlsl code.
    Thanks.

    #2
    There's the custom node in the material editor that will allow you to write your own HLSL code, but if you're wanting to make your own shader models, then you'll need a copy of the Github version of UE4 which would allow access to the engine's shader directory. From there you would write your own HLSL code, save it as .usf and then go into the engine code and add your references to the new shader so that you can open it in the material editor.

    Comment


      #3
      Be warned, that adding your own files will lead to very time consuming shader recompiles.
      Get your GAME done - Productivity Plugins for Unreal Engine.

      My articles in Game Programming Gems:
      Real Time Modular Audio Processing For Games
      A Lightweight Generator for Real-Time Sound Effects
      Controlling Real-Time Sound Synthesis from Game Physics

      Comment


        #4
        Goto gihub.com and search ue4 shader ,you will find fist demo.That's what you want.I'm also finding out how to get the mesh (vertex and index) from the character.If you got it , could you get me a tip also?

        Comment


          #5
          To modify the rendering pipeline, which you would need to do in order to utilize new shader stages, you will need to get into the engine code. Compute shaders are relatively simple because they depend on nothing, but you would still need to put your hlsl code in with the engine shaders.

          Comment


            #6
            Hello, You can visit my blog. I have written a tutorial.here: https://zhuanlan.zhihu.com/p/36675543

            Comment

            Working...
            X