Browsing articles tagged with " shader"
Sep
21
2019

Modified Standard shader to start fading based on Camera Y distance

Needed this kind of effect for a small game, where:– objects below would be faded out– player can move up and down (fade should “follow”)– realtime lights should be supported basically like the old unity global fog for height, but that one doesn’t work with […]

Dec
20
2018

Marching Ants Sprite Outline Shader

Saw interesting question here https://forum.unity.com/threads/animated-outline-effects-using-shader.600028/ and unity sprite outline https://github.com/wlgys8/Sprites-Outline + stackoverflow https://stackoverflow.com/a/16856878/5452781 to the rescue! (although this is for 2D sprite..) Results: TODO – Test how this would look with screenspace values (to keep same size even if zoomed) – Maybe could check neighbor pixel […]

Nov
30
2018

Sprite Sheet Flip Book Shader

Converted this old animated sprite sheet script into shader, its useful for animating sprites from sprite sheet. (when Animator is too heavy for simple sprite animation) Could be extended to have billboard option. Shader source: *Updated: 30/11/18 to fix index wrapping and UV direction https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Sprites/FlipBook.shader […]

Oct
19
2018

HSV Debugging and Color Match Shader

Quick test for color matching using shader, by converting colors into HSV and comparing target color with h-s-v threshold values. See Shader source at the bottom. (main image: Changing target color, shows inverted color for the texture in that matching hue position) Shader has different […]

May
26
2018

Fire Effect Using CustomRenderTexture

Converted this fire effect (by The Coding Train) into unity customrendertexture + shader. Added fire gradient color (by moving the fire calculation into alpha channel). Unity Project Sources https://github.com/unitycoder/FireEffect References CustomRenderTexture (was added to unity in 2017.1) https://docs.unity3d.com/Manual/CustomRenderTextures.html Keijiros example project (reaction-diffusion) https://github.com/keijiro/RDSystem Fire Effect […]

May
20
2017

Terrain AlphaMap Texture FilterMode (sharp texture blending)

You can use shader to do sharp blending on terrain textures like this old version custom terrain sharp blending shader, but can also set alphamap texture filtermode instead! (no custom shaders needed) With custom editor script, you can do this: Example project with the editor […]

Nov
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 […]

Sep
16
2016

Grayscale Image Effect with Exclude Layers

Testing grayscale image effect with added ExcludeLayers option (*just took the script parts from CameraMotionBlur effect, since it supports excluding layers) Instructions: – Attach the script below to your camera *You need to import default effects package first (Assets/Import Package/Effects) – Select excludeLayers (by default […]

Sep
16
2016

Custom Sprite Bloom HDR Shader

Tried to do this shader mentioned in the forums (link), to have a Bloom image effect only on certain sprites. See main image^ 2 same sprites, different material, so only 1 gets bloomed (even though the Bloom is full screen image effect) Instructions: – Download […]

Aug
20
2016

Sprite Shader with Clip() *Discard pixels

Testing what happens if add clip(discard), remove transparency and remove color tint from default Sprite Shader.. Just wanted to see if there is big difference or not, but seems like no huge difference on PC (asus laptop, gtx970m), unless you have thousands of sprites on […]

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.