The custom shader unbinding loop in ShaderProgramBase.Stop() is using the loop iteration instead of the actual texture number where the sampler is bound:
This causes problems when the custom samplers are not in the first texture units exclusively, since only the first texture IDs are unbound. There should probably be a way to track which texture numbers actually have custom samplers bound so they can be unbound reliably.
Game Version
No response
Platform
None
Modded
Vanilla
SP/MP
None
Description
The custom shader unbinding loop in
ShaderProgramBase.Stop()
is using the loop iteration instead of the actual texture number where the sampler is bound: This causes problems when the custom samplers are not in the first texture units exclusively, since only the first texture IDs are unbound. There should probably be a way to track which texture numbers actually have custom samplers bound so they can be unbound reliably.How to reproduce
No response
Screenshots
No response
Logs
No response