mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
wiki update
@@ -18,6 +18,7 @@ This is a place for developers, a hub for documentation and code conventions for
|
||||
|
||||
### Rendering
|
||||
* [[Rendering Pipeline]] — Graphics system and tile rendering
|
||||
* [[Lighting Engine]] — Lighting and shading simulation
|
||||
* [[OpenGL Considerations]] — GL 3.2 requirements and shader syntax
|
||||
|
||||
### Physics
|
||||
|
||||
@@ -87,7 +87,7 @@ class BlocksDrawer(
|
||||
|
||||
### Tile Atlas System
|
||||
|
||||
Blocks use texture atlases for autotiling variants:
|
||||
Blocks use texture atlantes for autotiling variants:
|
||||
|
||||
#### Atlas Formats
|
||||
|
||||
@@ -124,7 +124,7 @@ Autotiling tiles have a "barcode" pixel in the atlas (position 6,5) encoding:
|
||||
|
||||
### Seasonal Variation
|
||||
|
||||
224×224 atlases support seasonal colour blending:
|
||||
224×224 atlantes support seasonal colour blending:
|
||||
|
||||
```
|
||||
┌─────────┬─────────┐
|
||||
@@ -509,7 +509,7 @@ if (actor.hitbox.intersects(camera.bounds)) {
|
||||
|
||||
### Texture Atlas
|
||||
|
||||
Use texture atlases to reduce texture switches:
|
||||
Use texture atlantes to reduce texture switches:
|
||||
|
||||
```kotlin
|
||||
val atlas = TextureAtlas("sprites/packed.atlas")
|
||||
@@ -599,7 +599,7 @@ batch.shader = null // Reset to default
|
||||
## Best Practises
|
||||
|
||||
1. **Batch draw calls** — Group similar sprites together
|
||||
2. **Use texture atlases** — Reduce texture binding overhead
|
||||
2. **Use texture atlantes** — Reduce texture binding overhead
|
||||
3. **Cull off-screen objects** — Don't render invisible actors
|
||||
4. **Cache sprite references** — Don't recreate textures every frame
|
||||
5. **Reset batch colour** — Always reset to white after tinting
|
||||
@@ -620,7 +620,7 @@ batch.shader = null // Reset to default
|
||||
- Texture binding issues
|
||||
|
||||
### Performance Issues
|
||||
- Too many draw calls (use atlases)
|
||||
- Too many draw calls (use atlantes)
|
||||
- Large lightmap calculations
|
||||
- Excessive particle count
|
||||
- Missing culling
|
||||
|
||||
Reference in New Issue
Block a user