28
2016
Wireframe Shader
Founded some mesh wireframe shader in the unity 5.5f2 builtin shader folder (builtin_shaders-5.5.0f2\DefaultResourcesExtra\VR\Shaders)..
Changes:
– Added fillcolor, outline color
– Added [x] Discard option (draws only lines)
– Removed stereo rendering keywords
– Removed color by distance thing
Download shader:
https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Effects/WireFrame.shader
Tip: You can assign this material shader as a 2nd material to your mesh, to draw original material + wireframe (with [x] discard enabled)
Related Posts
11 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
thank you! i removed “UNITY_VERTEX_INPUT_INSTANCE_ID” and its usable in Unity 5.4.1f1
oh nice, removed it from the source and added fillcolor property also.
is it possible to make this transparent color? i mean no textures and fill color. how can i achieve this effect?
could set black color to alpha 0 and add blending mode https://docs.unity3d.com/Manual/SL-Blend.html like Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency
thanx again! if anyone wants to know how i achieve the transparency effect :
Tags { “Queue”=”Transparent” “RenderType”=”Transparent” “IgnoreProjector”=”True” }
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency
Would this work on mobile builds(Android/IOS) ?
Not tested, but i think should work. (i’ve read that shader with Discard might have issues/slowdown in some phones..)
Apparently it doesn’t work for android as it states that the gpu is not compatible. And, I was so hopeful too!!!
[FREE][OPEN-SOURCE] Generic Wireframe Shaders
https://forum.unity3d.com/threads/free-open-source-generic-wireframe-shaders.473968/
[…] hull and domain (tessellation) https://gist.github.com/JohnnyBeluga/9bd5c13a2b37706852a5 + geometry (extra polygons) http://ellenack.com/2016/11/05/grass-geometry-shader/ + geometry (wireframe) https://unitycoder.com/blog/2016/11/28/wireframe-shader/ […]
Wireframe (Geometry Shader)
https://forum.unity.com/threads/program-a-shader-that-only-displays-the-visible-edges.773534/#post-5158760