const bool hasTransparency = MaskMatch(mFlags, TRANSPARENCY);
// Why we add additional count here?
- uint32_t numBuffers = mTextureStages.size() + (hasTransparency ? !CheckTextures(ALBEDO) + !CheckTextures(METALLIC | ROUGHNESS) + !CheckTextures(NORMAL)
- : !CheckTextures(ALBEDO | METALLIC) + !CheckTextures(NORMAL | ROUGHNESS));
+ uint32_t numBuffers = static_cast<uint32_t>(mTextureStages.size()) + (hasTransparency ? !CheckTextures(ALBEDO) + !CheckTextures(METALLIC | ROUGHNESS) + !CheckTextures(NORMAL)
+ : !CheckTextures(ALBEDO | METALLIC) + !CheckTextures(NORMAL | ROUGHNESS));
if(numBuffers == 0)
{
return raw;
}
// Assign textures to slots -- starting with 2D ones, then cubemaps, if any.
- if(mEnvironmentIdx < environments.size())
+ if(mEnvironmentIdx < static_cast<Index>(environments.size()))
{
auto& envTextures = environments[mEnvironmentIdx].second;
// If pre-computed brdf texture is defined, set the texture.