Wireframe-Shader - A wireframe material in Unity using the geometry shader.

  •        383

There are times when you want to show a mesh in wireframe mode. It could be part of the look of your game or you may want to see whats going on for debugging reasons. Unity makes this quite easy by enabling wireframe mode in the editor but it would be nice if you could have a wireframe material to drag onto the mesh. This is a shader that can be used to make a wireframe material. It uses the geometry pipeline to 'see' the triangle and calculate the fragments distance from the triangles edge. You can then use this information to add a line around the triangle. As the shader needs the geometry pipeline there are some limitations. Geometry shaders are a SM4 (dx10) feature only in Unity so you will need to have dx11 enabled.




Related Projects

ShaderGraph - Unity ShaderGraph project

  •    CSharp

A Shader Graph enables you to build shaders visually. Instead of hand writing code you create and connect nodes in a graph network. The graph framework gives instant feedback on the changes, and it’s simple enough that new users can become involved in shader creation. This repository is under active development. Everything is subject to change. The master branch is our current development branch and may not work on the latest publicly available version of Unity. Unless you intend to modify Shader Graph or want to try out the very latest and unsupported features, we recommend that you acquire Shader Graph through the Unity Package Manager.



An extension to XNA 4 to allow use of DirectX 10 and 11 features, especially geometry shaders and tesselation.


  •    C++

[2017/11/12] - Added simple tessellation shader sample. Fixed misc issues with pipeline setup for tessellation. [2017/11/10] - Added ChessSet demo. Added geometry shader sample. Fixes to depth stencil handling. [2017/11/10] - Added TexturedCube sample. Updated depth attachment handling on swapchain render pass. Switched out lc_image for stb_image. Added DXC shader build script. [2017/05/27] - Fixed some annoying buffer state transitions. Added build script for shaders. Updated shader naming convention to be more exact. Added OpaqueArgs and PassingArrays for investigation. [2017/05/20] - Updated Append/Consume sample for Vulkan. Requires latest glslang. ConstantBuffer also works for both platforms. [2017/05/13] - Added Linux support. Moved to project files to cmake. Moved glsl shaders to glsl sub directory - forcing HLSL for now. [2017/04/30] - Clarified shader usage in some sample programs to point out which source they're coming from. [2017/04/27] - Added ConstantBuffer sample (D3D12 only for now). Updated Vulkan samples to use negative viewport height. [2017/04/25] - Updated SimpleCompute and StructuredBuffer to work on Vulkan. [2017/04/24] - Added compute samples (D3D12 only for now). One for simple compute and another for structured buffers.

HologramShader - :pencil2: Test of an hologram material made in Unity.

  •    CSharp

Hologram is a simple shader made in Unity. This package is composed of a shader and a custom material editor to tweak the effect. MIT, see LICENSE for details.

KvantGrass - Animating grass shader for Unity

  •    CSharp

KvantGrass is an animating grass shader for Unity. Don't expect too much! This shader might be useless for your production because of its lack of versatility. Using this just for an experiment or prototyping is better idea.

ShaderGraph_ExampleLibrary - A library of Shaders created using Unity 2018.1's Shader Graph.

  •    ShaderLab

This project is a library of different custom shaders created using Unity 2018.1's Shader Graph feature. All of the shaders are compatible for the Lightweight Scriptable Render Pipeline. These Shader Graphs are provided as-is; so your mileage may vary! You are more than welcome to modify/change/extract/use any of the examples.

UnitySpriteShaders - An Uber Shader for rendering Sprites in Unity.

  •    HLSL

An Uber Shader for Unity specialised in rendering Alpha Blended objects like sprites. It has a ton of features and a nifty Shader GUI meaning its very easy to use. It's also modular so features you don't use don't impact performance at all. Because it supports all its feaures in a one pass Vertex lit mode it can be used on skeleon based animation or sprites with submeshes (eg Spine animations) whilst preserving soft alpha edges, this includeds per pixel effects like normal mapping and specular. Above shows single pass normal mapping, specular, emission and rim lighting on Unity's example robot sprite.

Unity_Shaders_Book - :book: 书籍《Unity Shader入门精要》源代码

  •    ShaderLab

:book: 书籍《Unity Shader入门精要》源代码


  •    Silverlight

PsPad is Pixel Shader Editing Tool for Silverlight and WPF. You can edit your Pixel Shader code with HLSL, compile it, and see the result on this tool immediately. Also you can load and save Pixel Shader source and save compiled Pixel Shader to integrate your project.

DirectXShaderCompiler - This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang

  •    C++

The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate Language (DXIL) representation. Applications that make use of DirectX for graphics, games, and computation can use it to generate shader programs.For more information, see the Wiki.

Retro3D - A shader that imitates low grade 3D graphics.

  •    CSharp

Retro 3D is a shader that provides low grade 3D graphics, which resembles the first generation of 3D consoles like PlayStation and Sega Saturn. Basically, it's a kind of unlit shader, but also reduces the precision of geometric operations, and cancels the perspective correction for texture mapping. You can use the shader for whatever you want.

ShaderSketches - KodeLife shader sketches I wrote while commuting

  •    GLSL

This is a repository that stores GLSL shader sketches I created while commuting every day. You can see GIFs of these sketches from my Tumblr. I'm using KodeLife shader editor and GPD Win handheld PC for sketching. In my opinion, this is the best combination of portable development. I created all these sketches while standing in a train.

Efficient Shader Compiler

  •    C++

An efficient shader compiler, a simple and practical solution for managing shader files in 3d engine projects. Editing fx files is just as easy as editing c files with its help. It provides a lot more than fxc.exe. (key words: HLSL,GLSL,DirectX,CG)

WPF Shader Effects Library

  •    WPF

A library of shader effects for Windows Presentation Foundation SP1.

Voodoo Shader Framework


Voodoo Shader is a comprehensive graphics framework for powering shaders in multiple programs, during development or after release. Voodoo uses plugins and a shared core to support many games and other applications and is compatible with Direct3D and OpenGL.

Shazzam Shader Editor


Shazzam simplifies editing, testing and learning WPF/Silverlight Pixel Shader Effects. It compiles HLSL code, auto-generates C#/VB shader classes and creates a testing page for each effect. Plus it supports animations of the effect. Learn more at http://shazzam-tool.com

NShader - HLSL - GLSL - CG - Shader Syntax Highlighter AddIn for Visual Studio


NShader is an extension to Visual Studio 2008/2010/2012 that provides syntax highlighting for various shader languages including HLSL - GLSL - CG.

glslEditor - Simple WebGL Fragment Shader Editor

  •    Javascript

Friendly GLSL Shader editor based on Codemirror compatible with glslViewer (C++/OpenGL ES) and glslCanvas (JS/WebGL). Was originaly develop to work as a embebed editor for The Book of Shaders. But now have grown as a stand alone Web app. Thanks to their compatibility with other apps of this ecosystems like glslViewer that runs in the RaspberryPi directly from console, GlslEditor interact with other projects like OpenFrame.io allowing the user to export the shaders to frames with only one button.

Shader Experimenting and Testing Hive

  •    Delphi

SETH is a fully integrated Shader-IDE for prototyping Vertex- and Pixelshaders for OpenGL written in the fxPascal-High Level Shader Language (with Pascal-like Syntax).