Closed Ziemas closed 3 years ago
Neat, thanks! I will check later today, how does setting sampler uniforms every frame affect performance. I feel uniforms really are becoming a bottleneck at this point.
Merged. It did cause a ~30% decrease in FPS, but I managed to offset it by setting sampler uniforms once at shader initialization.
Rendering on Intel was broken because of multiple sampler types pointing to the same texture unit. So it seems like texture sampler uniforms always needs to be initialized.
With this change they always get set and always uses the same texture units for each type.
Idk if this is the best way to fix it, but it was quick and easy.
Also a fix for an invalid enum error with glTexParameteri.