Search Unity

Amplify vs Shader Forge

Discussion in 'General Discussion' started by boxhallowed, Dec 4, 2016.

  1. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    When an engine starts doing stuff like this, users will start leaving (to unreal 4, for example).

    And besides, there's not much financial point in doing that, because a single PRO license will generate more cash per month than a single asset sale, and that'll be a recurring payment (while asset sales only happen once).
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    Also, there's optional domain shader, tesselator control shader and geometry shader. You should try them out. When those are present, output of vertex shader does not go to fragment shader and instead is passing through those three first.


    Surface shader is unity-specific name. Which essentailly means that you can write one function for the "surface" and let unity handle the rest.

    CG has also been abandoned by its creator for quite some time, and if you try doing heavier stuff with CG in Unity, you'll end up using HLSL code in it.
     
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    As @neginfinity says, they'd rather you subscribe than make an Asset Store purchase.

    @hippocoder is right - Unity should be focussing on providing tools that are either useful across the board, or which help us to make game-specific tools as needed.

    And finally, while Unity certainly isn't perfect, by and large I find that when they implement something in-house it soon becomes my preferred option over equivalent Asset Store products. This isn't even necessarily because of shortcomings of the Asset Store versions. For instance, a built-in tool is ubiquitous, where a 3rd party one introduces a dependency and possibly additional license requirements. I also generally find that workflow with Unity's in-house stuff is broadly more refined than with 3rd party stuff, possibly as a result of their broader reach in getting usability feedback.
     
    Alverik, Martin_H and Ryiah like this.
  4. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    Thank you for the explanation, it does help to have it explained simply. It may be that I am most interested in doing the advanced stuff and should start with the easier shaders.

    To give you an idea from my perspective, I have used and do use node-based systems but I have been wary of doing that with shaders. I am comfortable with code, so I find it hard to believe a node system could generate 'good' shader code. And, not knowing how the code works, I would be stuck if it caused performance issues. Maybe I could get the visual look, but at what cost in performance?

    To give you an idea of how it does help though, I know what noise looks like. And, coming from 3D I can use noise to animate particles, extrude depth, etc. But, I need to see the noise to know if it is doing what I want. Maybe Perlin noise can be tweaked or overlayed with another noise and do exactly what I want. Or, maybe I need the structure of Voronoi. For me, these are visual decisions, although I'm aware it's all math. I need a preview as I tweak, and even as I animated the speed of the noise.

    So, I haven't jumped on either of these system and not sure that I will. If I understood what is going on in a shader, I would really prefer to work with the code.
     
    angrypenguin likes this.
  5. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Isn't CG the only truly cross platform variant that allow you to access vertex shaders? GLSL is limited to OpenGL and HLSL is limited to DirectX, isn't it?

    Btw, do Vulkan have a new specific shader language?
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Only if you don't have utilities to translate the shaders from one language to another. Just as an example the first four links are for code that converts HLSL to GLSL/Metal and the last one is an optimizer/converter for GLSL to Metal.

    https://github.com/aras-p/hlsl2glslfork
    https://github.com/Thekla/hlslparser
    https://github.com/Unity-Technologies/HLSLcc
    https://github.com/KhronosGroup/glslang
    https://github.com/aras-p/glsl-optimizer
     
    Last edited: Dec 7, 2016
    Alverik likes this.
  7. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    I see HLSLcc is integrated in Unity, why isn't that mentioned in the docs anywhere?! So it's possible to write HLSL and it will work in all platforms?

    EDIT
    I thought it was a 1:1 conversion but I found this :
    https://blogs.unity3d.com/2010/10/20/shader-compilation-for-multiple-platforms/
    And turn out they needed an optimizer to make it run at same speed. I'll continue to work in CG, thanks.
     
    Last edited: Dec 7, 2016
  8. Deleted User

    Deleted User

    Guest

    Not sure if this has been pointed out yet, but one advantage of Unity's surface shaders, and tools that generate them, is that they make third party integration much simpler. For example, we can integrate Alloy's area lights, colored cookies, etc with them by just dropping a few headers in the same folder.
     
    Alverik and Peter77 like this.
  9. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    hmm, really, Unreal 4 and other engines nearly demand it..I have used AAA in house and other engines, that you are required to use Some Visual scripting, like Unreal 4 in some of the more simple stuff, where you do most of the heavy lifting, in C++ .. Please keep this in mind.. So this is not so. Just like MOST people use the visual editor for shaders in Unreal. Same with the AI for Cry. Not all,but its faster and easier to do with some of this as a programmer even, so I will disagree. I been a programmer for over twenty years or so, in Web, Game and Automotive, and we had to use many forms of visual programming in software... Its the future in many forms for some engines in my opinion.. I personally do not like it to be honest.. Look at Substance Designer. Its all visual....So lets see you make them with out it...
     
    Alverik likes this.