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
Next revisionBoth sides next revision
0.8.4:atlas-material [2022/06/15 19:50] admin0.8.4:atlas-material [2022/06/15 19:55] admin
Line 11: Line 11:
     GorillaAtlasFragment2 : TGorillaAtlasMaterialSource;     GorillaAtlasFragment2 : TGorillaAtlasMaterialSource;
          
 +/// create central texture atlas storage
 GorillaSharedAtlas := TGorillaSharedAtlasMaterialSource.Create(GorillaViewport1); GorillaSharedAtlas := TGorillaSharedAtlasMaterialSource.Create(GorillaViewport1);
-GorillaSharedAtlas.AtlasRowCount := 32+GorillaSharedAtlas.AtlasRowCount := 8
-GorillaSharedAtlas.AtlasColCount := 32+GorillaSharedAtlas.AtlasColCount := 8
-GorillaSharedAtlas.FrameWidth := 16+GorillaSharedAtlas.FrameWidth := 32
-GorillaSharedAtlas.FrameHeight := 16;+GorillaSharedAtlas.FrameHeight := 32;
  
 /// create first fragment material for cube component /// create first fragment material for cube component
Line 30: Line 31:
 /// select the frame from the atlas to show /// select the frame from the atlas to show
 GorillaAtlasFragment2.TextureIndex := 23; GorillaAtlasFragment2.TextureIndex := 23;
-/// link to first component+/// link to second component
 GorillaSphere1.MaterialSource := GorillaAtlasFragment2; GorillaSphere1.MaterialSource := GorillaAtlasFragment2;
 </file> </file>
Line 39: Line 40:
  
 To configure a supplied texture atlas in the material use the provided properties: To configure a supplied texture atlas in the material use the provided properties:
 +
 +{{:atlas.png?nolink&400|Sample atlas texture}}
  
 ^ Property ^ Notice ^ ^ Property ^ Notice ^