mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-22 02:25:48 +01:00
Updated GLFWMapRendering (markdown)
parent
7503a503c8
commit
43652fac86
@ -45,7 +45,7 @@ Although Graphics2D framebuffers are not able to accelerate this process, GLFW c
|
||||
There are two ways of doing this conversion.
|
||||
|
||||
## Manual conversion
|
||||
Calling `GLFWCapableBuffer#useMapColors()` will tell the framebuffer that you are not rendering with RGB directly, but with map colors. The map color is in the case encoded in the RED channel of the framebuffer. When grabbing the pixels from the framebuffer for processing, Minestom will only query the red channel and interpret the red intensity as the index inside the color palette.
|
||||
Calling `GLFWCapableBuffer#useMapColors()` will tell the framebuffer that you are not rendering with RGB directly, but with map colors. The map color is in this case encoded in the RED channel of the framebuffer. When grabbing the pixels from the framebuffer for processing, Minestom will only query the red channel and interpret the red intensity as the index inside the color palette.
|
||||
If you want to use this mode manually, you can always convert a color index to a color intensity by simply dividing the index by `255f`.
|
||||
|
||||
## Automatic/Post-processing conversion
|
||||
|
Loading…
Reference in New Issue
Block a user