| 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | Material and texture properties. This allows to configure downscaled |
| 4 | and compressed textures, see https://castle-engine.io/creating_data_auto_generated_textures.php . |
| 5 | --> |
| 6 | <properties> |
| 7 | <!-- Automatically compress textures. |
| 8 | Most of them to DXT1 (without alpha), |
| 9 | some of them to DXT5 (with smooth alpha). |
| 10 | |
| 11 | Note that the engine assumes that *all* DXT5 textures should |
| 12 | use blending when rendering (since we cannot detect alpha channel |
| 13 | type in a compressed data). So *you cannot* just blindly compress |
| 14 | everything to DXT5 or to DXT1, you have to choose, like we show |
| 15 | below. |
| 16 | |
| 17 | Run "castle-engine auto-generate-textures" to create or update the DDS files |
| 18 | with compressed textures. You will need to install first: |
| 19 | - build tool: https://castle-engine.io/build_tool |
| 20 | - one of the supported tools to compress to DXTn, see |
| 21 | https://castle-engine.io/creating_data_auto_generated_textures.php . |
| 22 | |
| 23 | The Castle Game Engine will automatically use the compressed textures. |
| 24 | --> |
| 25 | <auto_generated_textures> |
| 26 | <compress> |
| 27 | <format name="DXT1_RGB" /> |
| 28 | <format name="ASTC_8x8_RGBA" /> |
| 29 | </compress> |
| 30 | |
| 31 | <include path="example_level/textures/*" recursive="True" /> |
| 32 | <include path="example_level/sky/*" recursive="True" /> |
| 33 | <exclude path="example_level/textures/brushwalker437.png" /> |
| 34 | |
| 35 | <mipmaps level="20" /> |
| 36 | </auto_generated_textures> |
| 37 | |
| 38 | <auto_generated_textures> |
| 39 | <compress> |
| 40 | <format name="DXT5" /> |
| 41 | </compress> |
| 42 | <include path="example_level/textures/brushwalker437.png" /> |
| 43 | <mipmaps level="20" /> |
| 44 | </auto_generated_textures> |
| 45 | </properties> |