anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
47 stars 16 forks source link

Custom sampler unbinding broken in ShaderProgramBase.Stop #2336

Open xxmicloxx opened 1 year ago

xxmicloxx commented 1 year ago

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: image 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

tyronx commented 1 year ago

thanks for the report, this will be fixed in 1.17.10

tyronx commented 1 year ago

huh. correctly unbinding them actually breaks the game

tyronx commented 1 year ago

ok, this might need to wait for 1.18