Skip to content

Instantly share code, notes, and snippets.

int corners[8][3] = {
{0,0,0},
{1,0,0},
{1,1,0},
{0,1,0},
{0,0,1},
{1,0,1},
{1,1,1},
{0,1,1}
};
@T5impact
T5impact / AtmosphericScattering.shader
Last active February 22, 2024 11:51
Atmospheric Scattering Shader for Unity that works in the URP (feel free to use this in any projects) (default settings are tailored towards an earth-like atmosphere)
Shader "Atmosphere/Atmospheric Scattering"
{
Properties
{
_LightIntensity("Light Intensity", Float) = 30
_LightColor("Light Color", Color) = (1,1,1)
_LightDirection("Light Direction", Vector) = (0,0,1)
_PlanetRadius("Planet Radius", Float) = 47
_AtmosphereRadius("Atmosphere Radius", Float) = 50
_Steps ("Steps", Int) = 20