Sampling a Procedural Sky

Sampling a Procedural Sky

The problem with this approach is that we don’t care about the luminosity information a texture holds and treat it like as if the volume was inside a spherical light box that recieves same value in every direction. note: Marginal function and cdf textures are 1D and their height is scaled for viewing purposes

The 1D marginal textures gives us the cumulative distribution and the avarage values in y-axis (avarage of rows in a column). Then we find the conditional pdf by value at 2D conditional function texture at choosen row and column, and divide it by 1D marginal function value at choosen row (remember these were the total values for rows).

Source: sergeneren.com