libgdx/libgdx

GlobalSetter's that bind textures can have their textures overwritten by LocalSetter's

tylerhasman opened this issue · 0 comments

Please ensure you have given all the following requested information in your report.

Issue details

If a GlobalSetter registers a texture to be bound by the textureBinder, it's texture slot can be overwritten by a LocalSetter.
Since it seems like GlobalSetter's only run a single time, their texture slot can be overwritten by a LocalSetter.

Example image where the global shadow maps have been overwritten by another texture on some terrain chunks:
image

Reproduction steps/code

Create a custom shader where many different textures are bound. Have one of the setter's be a GlobalSetter and the rest LocalSetter.
The GlobalSetter's texture slot may be overwritten by one of the LocalSetter's at some point.

Version of libGDX and/or relevant dependencies

1.12.0

Please select the affected platforms

Found on Windows but I assume this is a problem on all platforms.