Skip to content

Instantly share code, notes, and snippets.

@thyrrestrup
thyrrestrup / filter.cpp
Last active November 9, 2015 08:51
bindFramebufferFace
void BasicIBL::prefilterCubeMap()
{
auto texFormat = gl::TextureCubeMap::Format();
texFormat.setInternalFormat( GL_RGB );
texFormat.enableMipmapping();
texFormat.setMinFilter( GL_LINEAR_MIPMAP_LINEAR );
texFormat.setMagFilter( GL_LINEAR );
texFormat.setWrap( GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE );