Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
0.8.4:atlas-material [2022/06/15 20:05] – [Configuration] admin | 0.8.4:atlas-material [2022/06/17 07:50] (current) – [Background] admin | ||
---|---|---|---|
Line 5: | Line 5: | ||
This means it is only a container for central storage of a texture atlas. | This means it is only a container for central storage of a texture atlas. | ||
- | To link one frame of the atlas to a specific 3D object you have to create further **TGorillaAtlasMaterialSource** instances. | + | To link a single |
+ | Those will should then be linked to your TGorillaSharedAtlasMaterialSource instance. | ||
===== Background ===== | ===== Background ===== | ||
Line 12: | Line 13: | ||
Because each time you create a material source and use the atlas texture, FMX will load the texture into the GPU. So if you're having an atlas with 8x8 parts, this will create 64 texture with the size of the original one. This is just horrible memory management. | Because each time you create a material source and use the atlas texture, FMX will load the texture into the GPU. So if you're having an atlas with 8x8 parts, this will create 64 texture with the size of the original one. This is just horrible memory management. | ||
- | That's not what we want. Gorilla3D offers a solution to you: SharedMaterialSource' | + | That's not what we want. Gorilla3D offers a solution to you: SharedMaterialSource' |
+ | |||
+ | You set up a shared atlas material source once, where you load up your atlas texture. Than you only create referenced materials linked to that source. The reference material shader will use the global texture for rendering, instead of registering its own. | ||
+ | |||
+ | {{: | ||