Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

► DirectX 11 Low Poly Shader ◄

Discussion in 'Works In Progress' started by Arkhivrag, May 24, 2016.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    @screenname_taken is right.



    VacuumShaders - Facebook Twitter YouTube
     
  2. EgoJacky

    EgoJacky

    Joined:
    Aug 15, 2017
    Posts:
    4
    Hey really nice Shader! Is it possible to add a Specular/Metallic map? Would love it to have more Detail with my own Specular Texture. (to the Legacy_Opaque Shaders)
     
    Last edited: Nov 9, 2018
  3. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Right now working on update for Unity 2018.
    Will try to add SpecularMap option to Legacy shaders too.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Nov 13, 2018
  4. kiradaisuke

    kiradaisuke

    Joined:
    Sep 20, 2018
    Posts:
    1
    Hi, I was wondering how your low poly shader would compare to the mobile/diffuse shader in terms of performance on mobile? Because I planned on replacing most of the shaders with this low poly shader for a low poly style mobile game.
     
  5. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    I have not tested it on mobile.
    Package includes Unlit, Legacy and PhysicallyBased shaders. There is no Mobile/Diffuse shader.

    If compare Low Poly/Legacy/Diffuse and Unity built-in Legacy/Diffuse shaders, then the last one may be is a little bit faster (of course), as it has no all those "Low Poly" related features.



    VacuumShaders - Facebook Twitter YouTube
     
  6. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    299
    @Arkhivrag is there a way to add Dissolve support to this awesome shader? I really need it. Thanks.
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Simple dissolve effect with edge size and color control - may be.
    But Integration with Advanced Dissolve shader - currently no.



    VacuumShaders - Facebook Twitter YouTube
     
    ikemen_blueD likes this.
  8. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    299
    @Arkhivrag for now, a simple dissolve effect with edge size, color control would be okay enough. Please make it happen.
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Try new version v2018.3



    VacuumShaders - Facebook Twitter YouTube
     
  10. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    299
    @Arkhivrag Hi there, I deleted "VacuumShaders" folder, update the latest version v2018.3. But, I did not see any Dissolve option. I'm using Unity 2018.2.6f1.

    Edit
    I found Dissolve option, inside Cutout shaders. It works. Thanks.
     
    Last edited: Dec 12, 2018
  11. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    299
    @Arkhivrag Hi, I'm using Unity version 2018.3.3f1, DirectX 11 Low Poly Shade version 2019.1 - Jan 16, 2019. I got these 2 errors. Can you help me to fix it? Thanks a lot.

    Code (CSharp):
    1. Shader error in 'Hidden/VacuumShaders/DirectX 11 Low Poly/Legacy_Opaque_Diffuse_Bump_Specular_Reflective':
    2.    invalid subscript 'objectPos' at Assets/VacuumShaders/DirectX 11 Low Poly Shader/Shaders/cginc/Geometry.cginc(145) (on d3d11)
    3. Shader error in 'Hidden/VacuumShaders/DirectX 11 Low Poly/Legacy_Opaque_Diffuse_Reflective':
    4.    invalid subscript 'objectPos' at Assets/VacuumShaders/DirectX 11 Low Poly Shader/Shaders/cginc/Geometry.cginc(145) (on d3d11)
    EDIT
    I still don't know where the problem is. I found a quick fix for it, by right click Shader folder, click Re-Import it to force the Shade to be re-compiled properly again.
     
    Last edited: Jan 29, 2019
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072

    Seems shader just was not completely imported. Right click and re-importing it is the solution.



    VacuumShaders - Facebook Twitter YouTube
     
    ikemen_blueD likes this.
  13. EgoJacky

    EgoJacky

    Joined:
    Aug 15, 2017
    Posts:
    4
    Hi, we updated our Unity Version to Unity 2018 3.6f1 and now we get these 3 errors, when we export our game:
    Code (CSharp):
    1. Shader error in 'VacuumShaders/DirectX 11 Low Poly/Main': '' :  syntax error, unexpected LEFT_BRACKET at line 10 (on vulkan)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE DIRECTIONAL FOG_LINEAR
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING


    We export our Game to Linux x86_64 and use your last released Version.
    Our System uses OpenGL 4.5

    The exported Game gives us the following error messages:

    Code (CSharp):
    1. 0:8(1): error: syntax error, unexpected '[', expecting $end
    2.  
    3. Note: Creation of internal variant of shader 'Hidden/VacuumShaders/DirectX 11 Low Poly/PBS_Opaque_Diffuse_Bump' failed.
    4. 0:8(1): error: syntax error, unexpected '[', expecting $end
    5.  
    6. Note: Creation of internal variant of shader 'Hidden/VacuumShaders/DirectX 11 Low Poly/PBS_Opaque_Diffuse_Bump' failed.
    7. 0:7(1): error: syntax error, unexpected '[', expecting $end
    8.  
    9. Note: Creation of internal variant of shader 'Hidden/VacuumShaders/DirectX 11 Low Poly/Legacy_Opaque_Diffuse_Bump' failed.
    10. 0:7(1): error: syntax error, unexpected '[', expecting $end
    11.  
    12. Note: Creation of internal variant of shader 'Hidden/VacuumShaders/DirectX 11 Low Poly/Legacy_Opaque_Diffuse_Bump' failed.
    13. 0:8(1): error: syntax error, unexpected '[', expecting $end
     

    Attached Files:

    Last edited: Feb 26, 2019
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    I was able to reconstruct issue. It exists in Unity 2018.3.6. No problem with Unity 2018.3.0
    There is nothing from my side to be fixed.
    Problem is in Unity shader compiler. I have just sent bug report.



    VacuumShaders - Facebook Twitter YouTube
     
  15. EgoJacky

    EgoJacky

    Joined:
    Aug 15, 2017
    Posts:
    4
    Ok, we will try out some older Unity 2018 3.0+ Versions. Thanks you for your fast answer!

    Edit: It works in Unity 2018 3.3
     
    Last edited: Feb 27, 2019
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Some bug in Unity 2018.3.6 compiler. Hope will be fixed.



    VacuumShaders - Facebook Twitter YouTube
     
  17. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    461
    @Arkhivrag Do you know if it's just 2018.3.6, or that and above (specifically 2019.1). Looking into getting the shader, but don't want to rush ahead if it's broken on Unity's end in the version I'm in.
     
  18. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    461
    Went ahead and got it anyways. Did a mono build in 2019.1 and don't seem to have any issues at all.
     
  19. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    465
    Could this be used to render stuff in the distance in order to reduce cpu and gpu load?
     
  20. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Some Unity shader compilation issue in Unity 2018.3.6 on Vulcan only.


    Shader does not reduce vertex or triangle count. But you can briefly reduce texture resolution as it is rendered per-vertex and no need to have it in HD quality.



    VacuumShaders - Facebook Twitter YouTube
     
    astracat111 likes this.
  21. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    461
    Is there a way to increase the intensity of the "low poly" effect? For example, I have very small triangles on some models but would prefer larger ones such as in your examples.
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    No, mesh is rendered using its vertices only.
    What you are asking for can be achieved by adding tessellation pass.



    VacuumShaders - Facebook Twitter YouTube
     
    Acissathar likes this.
  23. Slick_Nick

    Slick_Nick

    Joined:
    Jan 4, 2014
    Posts:
    36
    Hi!
    Is there any plans on making this shader compatible with Lightweight RP?
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Shader requires GeometryShaders support and it is not included in LWRP.



    VacuumShaders - Facebook Twitter YouTube
     
  25. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    461
    One more shader question, is it possible for this shader to work as a blend shader? For example, say I want a toon material as the base but then blend in a low poly effect over that (as a secondary material).
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Shader does not support such effects.



    VacuumShaders - Facebook Twitter YouTube
     
  27. Matthu32

    Matthu32

    Joined:
    Mar 5, 2019
    Posts:
    3
    Will this be updated to work with HDRP?
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Yes. Waiting HDRP leaving preview mode.



    VacuumShaders - Facebook Twitter YouTube
     
  29. ReinierVanOs

    ReinierVanOs

    Joined:
    Feb 2, 2018
    Posts:
    2
    Hi Arkhivrag,
    Just imported LowPoly & Wireframe.
    But as soon as I select 'enable wireframe' I see that the scene is refreshing (very short cyan mesh color) but then no wireframe!!. Is this a bug, or not yet supported in 2019.3? I don't have any warnings/errors. Just the wireframe is not visible. Please help.
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,072
    Check ReadMe file in the VacuumShaders\DirectX 11 Low Poly Shader\Doc folder.
    Note, it mau not work in Unity beta versions.



    VacuumShaders - Facebook Twitter YouTube
     
    ReinierVanOs likes this.
  31. ReinierVanOs

    ReinierVanOs

    Joined:
    Feb 2, 2018
    Posts:
    2
    The last line of the ReadMe states:

    " For enabling papercraft effect check 'Integration_TheAmazingWireframeShader.cginc' file inside 'VacuumShaders\DirectX 11 Low Poly Shader\Shaders\cginc' folder. "


    It does not state that, when wireframe is used, this file also needs to be changed.
    Now I understand the reason why it didn't work, but it could be made a bit more clear.
     
    Last edited: May 18, 2019 at 8:22 PM