Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
0.8.4:atlas-material [2022/06/17 07:48] – [Background] admin0.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 frame of the texture atlas to a specific 3D object you have to create further **TGorillaAtlasMaterialSource** instances
 +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's! 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.+That's not what we want. Gorilla3D offers a solution to you: SharedMaterialSource's!  
 + 
 +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.
  
 {{:0.8.4:share_atlas.png?nolink&600|}} {{:0.8.4:share_atlas.png?nolink&600|}}