Announcement

Collapse
No announcement yet.

Custom Material Expression With Multi Outputs

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

    Custom Material Expression With Multi Outputs

    I have been recently working with Custom Material Expression. However there can be only one output for the UE stock custom expression. But I really need multiple outputs especially in the situation that the custom shader is very large. So I just modify the original one a bit so that I can now add as many output as I can to the custom expression now.

    So this is a just very simple version of it. In this example, I have only two outputs with the default returned. And the second output is 'Output1' as specified in the UI. The code shows how I modify the 'Output1' value.

    Click image for larger version

Name:	
Views:	0
Size:	280.0 KB
ID:	1370208
    I will also support including external ush files in the future so that external function would be inlined by the Shader compiler.
    Last edited by timli; 10-16-2017, 11:40 AM.

    #2
    It would be nice, if you would actually take it to a pull request stage. It is exceptionally useful.

    Comment


      #3
      I second this!
      Follow me on Twitter!
      Developer of Elium - Prison Escape
      Local Image-Based Lighting for UE4

      Comment


        #4
        Sorry for reviving this old post, but, how did you manage to do this? I kinda need this urgently. Also, is there a way you would compile a plugin with that?

        Comment


          #5
          I also really would like to know how you did it. Is there any comments or the actual code available??

          Comment


            #6
            3rd. Anyone found this?
            Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
            ComputeShader CPU->GPU->CPU
            Universal GetNetwork/LocalRole

            Comment


              #7
              Bump. Do it already.

              Comment


                #8
                Hi, anyone with a solution for this?

                I'm thinking of a workaround using "IncludeFilePaths" which would include some global variable declaration in it...
                Did someone try something like this already?

                Comment

                Working...
                X