shadowmage45 / TexturesUnlimited

KSP Shader, Texture, and Modeling Utilities
GNU General Public License v3.0
29 stars 17 forks source link

Access to BUILTIN Textures #64

Open GER-Space opened 6 years ago

GER-Space commented 6 years ago

Are you interested in a Patch that would allow TU to access SQUAD internal textures? Like: BUILTIN:/

I made a single mod for that https://github.com/GER-Space/AdvancedTextures/tree/master/src

The interrsting part is in the KKGrafics.cs GetTexture()

for better performance the Code uses some caching, because within Kerbal-Konstricts it is called thousands of times on startup. (some models use that very extensive)

If you are interested, I would try to integrate it and send a PR.

shadowmage45 commented 6 years ago

Currently I do not see a need to access those textures, at least with TU's current part-centric functionality.

I have been considering expanding functionality to allow for manipulation of non part-related materials - space center/buildings, terrain textures (are those even a thing?), kerbal suits, ??. If/when such a function is realized, then yes, I could certainly see the utility of using the existing stock textures for some things.

Will keep this on the radar for a bit, as from looking at your source code it shouldn't be too hard to implement, and time permitting there is no real reason not to implement it.