Skip to content

Instantly share code, notes, and snippets.

View BelmuTM's full-sized avatar
🌺
Beep Boop

Belmu BelmuTM

🌺
Beep Boop
View GitHub Profile
@LVutner
LVutner / LabPBR template
Last active September 29, 2023 15:22
LabPBR unpacking template (1.3)
//Sample textures
vec4 albedo_tex = texture2D(texture, texcoord);
vec4 normal_tex = texture2D(normals, texcoord);
vec4 specular_tex = texture2D(specular, texcoord);
//Gamma correction - Optional if you're not doing gamma correct lighting
albedo_tex.xyz = pow(albedo_tex.xyz, vec3(2.2));
//Normals
vec3 normal;
@pixelsnafu
pixelsnafu / CloudsResources.md
Last active November 2, 2026 16:47
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

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active November 6, 2026 22:00
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);