Search Unity

► Wireframe shader - The Amazing Wireframe shader ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Jun 11, 2014.

  1. nigel-moore

    nigel-moore

    Joined:
    Aug 28, 2012
    Posts:
    23
    Hi. Am trying to generate and use a wireframe texture using the Menu tools for an animated character. I have created the texture however I feel I must be having a bit of a 'senior' moment because I cannot for the life of me work out how to use this texture. I have manually put it in the wireframe texture slot but that doesn't work and I am now completely at a loss.

    There doesn't seem to be a supplied example that uses this approach and I am now completely stuck. Any help with this would be very very welcome.

    Thanks in advance.
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    It's just a texture.
    You can use it inside shader to avoid wireframe calculations.
    upload_2019-4-18_15-40-35.png

    Using this option you can provide your custom wireframe texture too.



    VacuumShaders - Facebook Twitter YouTube
     
  3. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    162
    Any known issues with VR?

    Tried searching the forum but "VR" is too small of a search term.
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    No problems have been reported.



    VacuumShaders - Facebook Twitter YouTube
     
    maxaud likes this.
  5. hwinter_unity

    hwinter_unity

    Joined:
    Jan 26, 2018
    Posts:
    1
    Hello!

    Wondering why the baked barycentric coordinates rendering option is limited to 21,000. Is that because of the barycentric coordinates calculation? Or is that because of the shader itself? e.g. if I were to magically bake in barycentric coordinates in another fashion, would the shader work on a larger-than-21000 mesh?
     
  6. yassss

    yassss

    Joined:
    Jun 6, 2019
    Posts:
    2
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    It is not a limit or restriction. But mostly a suggestion. As barycentric coordinates are baked per-vertex and 3D models do not always have perfect vertex/triangle structure, sometimes it is necessary to increase vertex array and theoretically can be reached Unity's limit for mesh vertex buffer size.
    In run-time wireframe calculation it is better do not use meshes with more than 21.000
    In editor you can try bake barycentric coordinates into mesh with much more vertex count.

    And here comes Geometry shaders: No limit on vertex count, mesh types, no need to bake anything into mesh, support tessellation.



    VacuumShaders - Facebook Twitter YouTube
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    You mean Bloom? It's just a post-processing effect.



    VacuumShaders - Facebook Twitter YouTube
     
  9. yassss

    yassss

    Joined:
    Jun 6, 2019
    Posts:
    2
    Sorry, my English is not good. I'm not familiar with shader. Where can I add post-processing effect? using unity's Post Processing Stack?
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    You can use Unity's Post Processing or any third party Bloom image effect.
    Wireframe emission is controlled by Emission Strength parameter.



    VacuumShaders - Facebook Twitter YouTube
     
    syscrusher likes this.
  11. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    976
    @Arkhivrag, I don't know where things stand for you supporting SRP with this superb asset, but I wanted to let you know that as of a couple of days ago I have a wireframe shader using barycentric coordinates working in HDRP.

    Just to reassure you, I have absolutely NO intention to compete with The Amazing Wireframe Shader. Your asset goes way, way beyond what I need from my custom shader; my wireframe shader just part of Magic Markers for visualizing the editor gizmos better. (IOW, I'm not making a "shader product", it just happens that my product includes one purpose-built shader with a wireframe as one of its options.)

    That being said, it was a challenge getting this to work in HDRP. I believe, but haven't yet tested, that my shader would also work in LWRP. If you're finding the SRP documentation to be as impenetrable as I have, drop me a private message and I'll gladly share a code snippet with you from my prototype. My SRP support is not release-ready yet, but the wireframe part is working.

    Thanks again for making TAWFS. My biggest "complaint" (joking here!!!) is that it does so much that every time I use it I lose a couple of hours just fooling around with its settings for fun. :)
     
  12. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    LWRP was released as 'production ready' (no, it still not ready), just month ago and I've already updated 3 of my asset to support it: Advanced Dissolve, Curved World, Terrain To Mesh.
    Wireframe shader will support it too. Just busy with other assets updates.



    VacuumShaders - Facebook Twitter YouTube
     
    syscrusher likes this.
  13. michelapt

    michelapt

    Joined:
    Apr 1, 2019
    Posts:
    2
    Hi. I'm running into a shader compilation failing when building for the Nintendo Switch:

     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    Hidden/Internal-DepthNormalsTexture shader is used in post processing (image effects) for calculating depth normals for various shaders.
    It contains description of all render styles, including Tessellation shaders. Seems Nintendo Switch does not support tessellation.

    Solution: If you are not using post processing, just delete file from VacuumShaders/The Amazing Wireframe Shader/Shaders/Resources folder or remove tessellation related subshaders from that file (lines: 507-543 and 545-585).



    VacuumShaders - Facebook Twitter YouTube
     
  15. michelapt

    michelapt

    Joined:
    Apr 1, 2019
    Posts:
    2
    @Arkhivrag

    Thanks for the swift reply. Worked perfectly!
     
  16. Coryatmarsden

    Coryatmarsden

    Joined:
    May 22, 2018
    Posts:
    6
    @Arkhivrag Would you happen to have a timetable for the release of LWRP support? Love your asset!
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    It is In development. Release date is unknown.



    VacuumShaders - Facebook Twitter YouTube
     
    Coryatmarsden likes this.
  18. sharkwithlasers

    sharkwithlasers

    Joined:
    Dec 8, 2012
    Posts:
    1
    Hi there! Loving the shader so far! However, I'm experiencing a screen flicker effect as the camera scrolls across the a wireframe quad mesh grid:



    Would anyone happen to know what causes this? I can provide some additional information if necessary as well.

    (The provided video has temporal antialiasing enabled. without antialiasing the effect is greater)
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    Wireframe is rendered as line, yes. Antialiasing does not like lines.
    From shader side I can do nothing :(.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jul 8, 2019
  20. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    303
    Guys, why I got these 2 errors on Android build? It doesn't break the build itself, but anyway...

    Code (CSharp):
    1. Shader error in 'Hidden/VacuumShaders/The Amazing Wireframe/Tessellation/ColorMask0': failed to open source file: '../cginc/CurvedWorld.cginc' at line 29 (on metal)
    2. Compiling Vertex program
    3. Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS
    4. UNITY_NO_CUBEMAP_ARRAY 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_DLDR_ENCODING
    and
    Code (CSharp):
    1. Shader error in 'Hidden/VacuumShaders/The Amazing Wireframe/Tessellation/ColorMask0': failed to open source file: '../cginc/Wireframe_Tessellation.cginc' at line 55 (on metal) Compiling Vertex program Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY 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_DLDR_ENCODING
    I am on Unity 2019.1.8f1 and latest wireframes plugin
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    Seems tessellation is not supported on your device.
    Try: Delete Tessellation shaders folder (VacuumShaders\The Amazing Wireframe Shader\Shaders\Tessellation).



    VacuumShaders - Facebook Twitter YouTube
     
  22. halvorss

    halvorss

    Joined:
    Mar 18, 2013
    Posts:
    9
    Question... can the wire Distance Fade be inverted? For positive values it's working fine... as I get closer it gets brighter and as I get further it fades out. However, I need the opposite to happen... I would like it to fade out as you get closer and get brighter as you back away. Thank you, this is a great tool.
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    Check attached file. Copy included file it into VacuumShaders\The Amazing Wireframe Shader\Shaders\cginc folder.
    Distance fade effect now will be inverted on all shaders.



    VacuumShaders - Facebook Twitter YouTube
     

    Attached Files:

  24. halvorss

    halvorss

    Joined:
    Mar 18, 2013
    Posts:
    9
    Thank you! I had to update to the latest version from the Asset Store, but the changed Wireframe_Core file indeed inverted the Fade Distance as needed. I appreciate the quick response and assistance. You make an excellent product.
     
  25. tonywalsh

    tonywalsh

    Joined:
    Jun 4, 2014
    Posts:
    9
    fwiw +1 for LWRP/URP support, thanks!
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,153
    URP - yes.
    LWRP - mostly no.



    VacuumShaders - Facebook Twitter YouTube