Skip to content

Instantly share code, notes, and snippets.

View corporateshark's full-sized avatar
🙃

Sergey Kosarevsky corporateshark

🙃
View GitHub Profile
@pixelsnafu
pixelsnafu / CloudsResources.md
Last active April 29, 2025 08:22
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

#include<dbghelp.h>
void getStackTrace(char *funcName,int *lineNumber)
{
unsigned int i;
void * stack[ 100 ];
unsigned short frames;
SYMBOL_INFO * symbol;
@jcayzac
jcayzac / gist:1241840
Created September 26, 2011 08:20
Charles Bloom algorithm for sphere-cone intersection
V = sphere.center - cone.apex_location
a = V * cone.direction_normal
b = a * cone.tan
c = sqrt( V*V - a*a )
d = c - b
e = d * cone.cos
now if ( e >= sphere.radius ) , cull the sphere
else if ( e <=-sphere.radius ) , totally include the sphere
else the sphere is partially included.