Skip to content

Instantly share code, notes, and snippets.

@SpineyPete
SpineyPete / hemisphere_concentric.pde
Last active April 11, 2022 18:40
Concentric Hemisphere Point Generator (Processing 3 Sketch)
// Visualization of Shirley and Chui's Concentric Mapping
// projected onto a hemisphere -- e.g. for irradiance tracing.
// The points are drawn to the window and C code is output to the console.
// This import is needed since Processing 4.
// In Processing complains about it not finding it:
// In the menubar go to to sketch -> import library -> add library,
// enter javafx in the searchbox and download it.
import processing.javafx.*;
@SpineyPete
SpineyPete / tonemappers.glsl
Last active November 2, 2023 13:20
Tonemappers
#version 330
// Tonemapping
// -----------
// Some of these are attributed to certain games.
// But this is mostly secondhand info, so take it with a grain of salt.
vec3 Tonemap_Reinhard(vec3 x) {
// Simplest Reinhard tonemapper.