Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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,348
    @screenname_taken is right.



    VacuumShaders - Facebook Twitter YouTube
     
  2. EgoJacky

    EgoJacky

    Joined:
    Aug 15, 2017
    Posts:
    6
    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,348
    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:
    3
    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,348
    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:
    313
    @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,348
    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:
    313
    @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,348
    Try new version v2018.3



    VacuumShaders - Facebook Twitter YouTube
     
  10. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    313
    @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:
    313
    @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,348

    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:
    6
    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,348
    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:
    6
    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,348
    Some bug in Unity 2018.3.6 compiler. Hope will be fixed.



    VacuumShaders - Facebook Twitter YouTube
     
  17. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    529
    @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:
    529
    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:
    569
    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,348
    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:
    529
    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,348
    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,348
    Shader requires GeometryShaders support and it is not included in LWRP.



    VacuumShaders - Facebook Twitter YouTube
     
  25. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    529
    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,348
    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,348
    Yes. Waiting HDRP leaving preview mode.



    VacuumShaders - Facebook Twitter YouTube
     
  29. Dy5funct10n

    Dy5funct10n

    Joined:
    Feb 2, 2018
    Posts:
    3
    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,348
    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
     
    Dy5funct10n likes this.
  31. Dy5funct10n

    Dy5funct10n

    Joined:
    Feb 2, 2018
    Posts:
    3
    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
  32. kiradaisuke

    kiradaisuke

    Joined:
    Sep 20, 2018
    Posts:
    3
    I am using Unity 2018.3.0f and I noticed that an issue when I enabled anti-aliasing and built the game.
    In the game build, the screen turn black when my player turn to face the object with the vacuum shader on it. This does not occur if I disabled anti-aliasing.

    I guess this mean that the shader does not work with anti-aliasing and is there a way around this?
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Where do you enable anti-aliasing? Shader has no such option.
    What is build target?



    VacuumShaders - Facebook Twitter YouTube
     
  34. kiradaisuke

    kiradaisuke

    Joined:
    Sep 20, 2018
    Posts:
    3
    The anti-aliasing option is in the Edit->Project Settings->Quality, under Rendering.

    I built it on the Android platform.
    Minimum api level: android 8.0,
    Target API level: Automatic (Highest installed)
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Unfortunately I'm not able to reproduce your issue at my side.
    Low Poly shader and Antialiasing option inside Project settings are not connected. It may be some problem at Unity engine side or with device GPU.



    VacuumShaders - Facebook Twitter YouTube
     
  36. hsjaaa

    hsjaaa

    Joined:
    Apr 30, 2016
    Posts:
    29
    Hi there, the shader looks very cool. Just wander dose this shader work with real low poly mesh? Tried some shader with low poly style mesh and single material, the result doesn't look very low poly. I use orthogonal camera, the shader is not very sensitive to plane change under directional light, especially the shadow on mesh sometimes have spikes or crack, will this shader help with that? Also is this shader compatible with post process outline effect? Thanks!
     
    Last edited: Jun 24, 2019
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Shader works with any mesh.
    Note: shader does not modify mesh triangle/vertex count. Mesh is rendered using its triangles, but each one with unique color gained from material texture and generating flat normal creating 'low poly' effect.

    Shadows are completely generated and rendered by Unity. This shader has no effect on them.

    With Unity post processing - Yes. Have not tested with custom third party image effects, but I'm sure - Yes.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 22, 2020
  38. Skribble

    Skribble

    Joined:
    Oct 29, 2012
    Posts:
    16
    Are this shaders compatible with HDRP on Unity 2019.2 ?

    i just import them and all the example scenes are just pink objects.

    =(
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Currently not supported.
    HDRP is still in preview and rapid development.
    Waiting for official "production ready" release.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 22, 2020
  40. GameMunchers

    GameMunchers

    Joined:
    Jul 3, 2017
    Posts:
    40
    Can i get the old version for unity 4.7.2 I really need this.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Unfortunately there is no version for Unity 4.7 and even not possible.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 22, 2020
  42. GameMunchers

    GameMunchers

    Joined:
    Jul 3, 2017
    Posts:
    40
    Awhhh :( is it possible to convert the scripts for that version of unity?
     
  43. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    17
    Is there a timetable for SRP (HDRP or URP) given it's "Production Ready" according to Unity?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    Unfortunately, currently no.



    Amazing Assets - YouTube Facebook Twitter
     
    Last edited: May 22, 2020
    NathanielAH likes this.
  45. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    17
    Understood. Thanks for the response!
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,348
    It will be defiantly updated in the future. It is just not in the first position in the queue of my assets requiring the same updates.



    Amazing Assets - YouTube Facebook Twitter
     
    NathanielAH likes this.
unityunity