Browsing articles in "shaders"
Oct
19
2023

2 Sided Lighting for Sprite Diffuse Shader

Interesting question athttps://forum.unity.com/threads/making-normal-maps-work-on-both-sides-of-a-2d-sprite-in-3d-space.1507538/ Made quick test with BiRP, modified sprite surface shader, with custom lighting (added “abs” into dot normal).. Source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Sprites/Diffuse%20(2%20Sided%20Light).shader#L48

Oct
19
2021

Old School Scrolling Text with Shaders, RenderTexture

Tried to make scrolling text using shaders and text mesh, video below (results at 59 mins -> ) Shader Sources:(one for text mesh, one for UI RawImage that displays camera view as rendertexture)

Oct
9
2021

Shader Effects Test

Inspired from https://twitter.com/chiba_akihito/status/1438088953878302725 Part #1 (Project sources) Part #2 (source not available)

Aug
27
2021

Boat Attack URP Water: Add Underwater surface flip

Just modify 2 lines from the scripts and you get visible waterplane when going below surface. The idea is to check camera Y position, if below 0, flip normal and flip matrix for mesh. Boat Attack Project:https://github.com/Unity-Technologies/BoatAttack Inside Water.cs & PlanarReflections.cs replace these 2 lines:

Nov
4
2020

LineRenderer with Outline Shader

Tried using sprite outline shader with LineRenderer, works surprisingly well References:Sprite shader source: https://forum.unity.com/threads/help-to-find-an-asset-solution.755273/#post-5246960 (2nd shader in that post)Forum topic: https://forum.unity.com/threads/achieve-a-stroke-transparent-effect-with-the-line-renderer.999682/

Mar
18
2020

Shader: Color Cycling

Color Cycling Shader test, because. Shader Source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Effects/ColorCycle.shader How it works?Gray color value is used to pick color from the gradient, if gray texture pixel is 0.5, then you get that turquoise color from gradient texture.

Mar
13
2020

Shader: Scrolling Texture With Fill Amount (line renderer)

Quick test shader for this thread https://forum.unity.com/threads/smooth-filling-of-the-2d-pipe-with-texture.845848/#post-5584480 Shader source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Patterns/ScrollingFill.shader Sample fbx file (used in screenshot)https://github.com/unitycoder/BlogUploads/blob/master/models/lineuv.FBX

Mar
5
2020

Shader: Drawing Circles Pattern

Drawing Pattern of Circles in shader. (test for this forum topic) Shader:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Patterns/CirclesPattern.shader References:– Drawing Shapes : https://thebookofshaders.com/07/– Drawing Patterns : https://thebookofshaders.com/09/

Mar
1
2020

Waves Shader

Tried to create similar waves in shader as this tweet: https://twitter.com/akivaw/status/1226681850564956160 Shader source:https://gist.github.com/unitycoder/7b501f5d6af03dbabd48c16c08767fe3*2 pass shader to draw underwater slightly differently

Pages:123456»

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

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.