Skip to content

Instantly share code, notes, and snippets.

@antonkudin
antonkudin / spherefog.shader
Last active February 8, 2025 10:19
Spherical fog unity shader
// original from https://forum.unity3d.com/threads/share-volume-fog-shader.147323/
Shader "Effect/SphereFog" {
Properties {
_FogColor ("Fog Color", Color) = (1,1,1,1)
[space]
_Density ("Density", Float) = 1
_Power ("Power/gamma", Float) = 4
_Offset ("Offset", Range(-.1,.1)) = -0.003
[space]
_NearbyOffset ("Nearby Offset", Float) = -1
/*
Read the article about this script on : https://medium.com/return-of-the-jordy/dealing-with-unity-ui-hierarchy-db2ff05e01b0
*/
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class UIFocusMode : MonoBehaviour
{