This script component is designed to visualize mipmap levels in PlayCanvas. The component provides a way to monitor the mipmap levels of textures in real-time and helps to understand how textures are downscaled to improve performance.
A mipmap is a set of lower resolution versions of a texture that are used to improve rendering performance by reducing the number of pixels that need to be processed.
It is important to keep the texture resolution as small as possible because larger textures consume more video memory, which can cause performance issues, especially on lower-end hardware. Additionally, using smaller textures can result in faster load times and improved rendering performance, as the GPU has to process fewer pixels. Mipmaps can also help reduce aliasing artifacts and improve image quality by providing smoothly downscaled versions of the original texture.
Playcanvas project: https://playcanvas.com/project/1035726/overview/debug-mipmap
The repo is based on the Playcanvas TypeScript Template. I highly recommend you to check it out. Read more about usage of Playcanvas Overdraw in the Playcanvas TypeScript Template.
The repo contains the next Typescript ScriptComponents for Playcanvas:
- mipmap. It is used to visualize pixel mipmap levels with colors. Color of pixel shows the mipmap level of the texture.
NOTE: Red means good.
- Level 0: Red
- Level 1: Orange
- Level 2: Yellow
- Level 3: Green
- Level 4: Blue
- Level 5: Indigo
- Level 6: Violet
- Level 7: Black
- Level 8: White
- Level 9: Pink
- Level 10: Brown
- Level 11: Gray
- Level 12: Purple
- Level 13: Teal
NOTE: t is designed for use in a debugging environment and may not be suitable for use in a production environment.