Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes errors for Intel HD4000 on Windows. My understending of this issue is following: - a shader assigned two textures, i.e. texture1 = sampler1, texture2=sampler2 - then next shader (i.e. importance sampling specular) assigned two textures: texture1=sampler1, texture2=without_sampler - when we executed setTextureUnits, the glBindSampler function wasn't called at all, so the drivers were trying to use combination texture2=sampler2, even though the sampler2 was prepared for different texture and most likely was already deleted. We can just always call the glBindSampler function, so that if texture doesn't have a sampler, it will execute it with sampler_id=0 param, which is practically an "unbind" function.
- Loading branch information