From 37e11f04be93bca703889c7c8553aa9d944c1e45 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 28 Aug 2024 22:51:28 +0200 Subject: Cleaned-up Doc/ directory a bit Renames, re-capitalization, removed selected very outdated or not interesting files. --- Doc/Eschaton-Atmosphere.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Doc/Eschaton-Atmosphere.txt') diff --git a/Doc/Eschaton-Atmosphere.txt b/Doc/Eschaton-Atmosphere.txt index 2a50e8a..d5f23c2 100644 --- a/Doc/Eschaton-Atmosphere.txt +++ b/Doc/Eschaton-Atmosphere.txt @@ -1,9 +1,9 @@ -Thanks. I'm currently working as a graphics programmer at Pandemic in LA, finishing Star Wars Battlefront 2. Its alright. I still ocassionally get the urge to finish cocommand, but its demands too much. - -The atmosphere shader is a somewhat straightforward optimization of a typical, if simplified, offline atmosphere model. The basic idea is to accumulate/integrate the in-scattering of light along a ray based on a density function which decreases exponentially with height above the sphere's surface. You integrate the density function along the ray which represents the total number of atmosphere particles hit along that ray. The in/out scattering (which I simplified to a single replacement % - an alpha value, really) are then determined from a simple exponential function of the accumulated density. - -The realtime aspect is that the ray integral density function is precomputed and fetched in a pixel shader with a texture lookup. This is straightforward because the model has just three basic scalar inputs - the ray's hit angle on the sphere, and the start and end intercepts along the ray (this model handles the cases where you are inside the atmosphere.) These setup parameters are calculated in the vertex shader. - -I later realized it could be further simplified to a 2D lookup. . . - +Thanks. I'm currently working as a graphics programmer at Pandemic in LA, finishing Star Wars Battlefront 2. Its alright. I still ocassionally get the urge to finish cocommand, but its demands too much. + +The atmosphere shader is a somewhat straightforward optimization of a typical, if simplified, offline atmosphere model. The basic idea is to accumulate/integrate the in-scattering of light along a ray based on a density function which decreases exponentially with height above the sphere's surface. You integrate the density function along the ray which represents the total number of atmosphere particles hit along that ray. The in/out scattering (which I simplified to a single replacement % - an alpha value, really) are then determined from a simple exponential function of the accumulated density. + +The realtime aspect is that the ray integral density function is precomputed and fetched in a pixel shader with a texture lookup. This is straightforward because the model has just three basic scalar inputs - the ray's hit angle on the sphere, and the start and end intercepts along the ray (this model handles the cases where you are inside the atmosphere.) These setup parameters are calculated in the vertex shader. + +I later realized it could be further simplified to a 2D lookup. . . + The atmosphere is rendered as the inner surface(reversed backface culling) of a sphere which surrounds the planet, and is necessarily somewhat larger than it. The shader is also rendered directly as a second pass on the planet geometry. The atmosphere sphere-shell is used for that sliver silhoutte of atmosphere overlapping empty space and for the atmosphere up close if you are near the planet surface. \ No newline at end of file -- cgit v1.1