1
2019
Basic Ray Marching Shader
Converted this ray marching for dummies-shader into unity. Shader Source:https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Special/RayMarching.shader
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 […]
25
2019
Enable HDR Color picker for Shader or Script
I needed HDR color for some old Unlit/Color-shader, and for c# script also, found out that you can add this attribute for the shader: And for the script: More info:https://docs.unity3d.com/ScriptReference/ColorUsageAttribute.htmlhttps://docs.unity3d.com/Manual/SL-Properties.html Also make sure your Camera has [x] HDR enabled
23
2019
Scrolling Texture Plotter using CustomRenderTexture
Saw interesting question in the forums (link) about drawing plotter like data that would scroll up, got idea about custom rendertextures (since it was similar to this effect) Basic idea: – use CustomRenderTexture, double buffered so it can read from itself – draw color32 array […]
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 […]
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 […]
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 […]
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 […]
14
2017
[Shader] Draw World Space UI Always On Top
If you want to draw UI in VR (for example Google Cardboard), it doesn’t support ScreenSpace rendermode in canvas.. So all the UI’s are using WorldSpace RenderMode.. which causes issues when UI goes behind geometry. Fix: You can modify UI shader to disable ZTest Shader […]
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 […]
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