Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/IECoreGL/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ class Shader::Implementation : public IECore::RefCounted
}
}

if( p.type == GL_SAMPLER_1D || p.type == GL_SAMPLER_2D || p.type == GL_SAMPLER_3D )
if(
p.type == GL_SAMPLER_1D || p.type == GL_SAMPLER_2D || p.type == GL_SAMPLER_3D ||
p.type == GL_INT_SAMPLER_1D || p.type == GL_INT_SAMPLER_2D || p.type == GL_INT_SAMPLER_3D ||
p.type == GL_UNSIGNED_INT_SAMPLER_1D || p.type == GL_UNSIGNED_INT_SAMPLER_2D || p.type == GL_UNSIGNED_INT_SAMPLER_3D
)
{
// we assign a specific texture unit to each individual
// sampler parameter - this makes it much easier to save
Expand Down Expand Up @@ -663,8 +667,10 @@ const Shader *Shader::Setup::shader() const
void Shader::Setup::addUniformParameter( const std::string &name, ConstTexturePtr value )
{
const Parameter *p = m_memberData->shader->uniformParameter( name );
if( !p || p->type != GL_SAMPLER_2D )
if( !p || ( p->type != GL_SAMPLER_2D && p->type != GL_INT_SAMPLER_2D && p->type != GL_UNSIGNED_INT_SAMPLER_2D ) )
{
// We can only support 2D samplers, because `Texture::bind()`
// unconditionally uses the GL_TEXTURE_2D target.
return;
}

Expand Down