Files Class List
cyAlphaDistribution.h File Reference

Detailed Description

Implementation of the alpha distribution methods.

Author
Cem Yuksel

This file includes an implementation of the alpha distribution methods using alpha pyramid and error diffusion used for pre-computing textures to be used with alpha testing or sampleMask-to-alpha.

Alpha testing using the original alpha values of a texture cannot handle semi-transparent regions and often leads to problems with mipmapping. Alpha distribution is a pre-processing approach that modifies the alpha values of mipmap levels, such that they can properly handle semi-transparent regions.

The AlphaDistribution class provided in this file implements two methods that can be used for alpha distribution: error diffusion and alpha pyramid. Both methods produce similar results with minor differences.

More details can be found in the original publication:

Cem Yuksel. 2017. Alpha Distribution for Alpha Testing. PACM on CGIT (I3D 2018). http://www.cemyuksel.com/research/alphadistribution/

#include <vector>
#include <random>
#include <cassert>

Classes

class  AlphaDistribution
 An implementation of alpha distribution methods. This implementation only works for textures with 8-bit channels. More...
 

Typedefs

typedef cy::AlphaDistribution cyAlphaDistribution
 An implementation of alpha distribution methods.