Open Phlarx opened 2 years ago
The message is about accessing the game's pixels (framebuffer?) and then doing anything with them, be it making a screenshot, recording a video and manipulating these pixels including applying shaders (GLSL?).
I assume it could be introduced into Draw
namespace. There will be two methods:
Draw::GetPixels(vec2 size = vec2(Draw::GetWidth(), Draw::GetHeight())
will get whole screen pixels into something like MemoryBuffer
objectDraw::SetPixels(vec2 size = vec2(Draw::GetWidth(), Draw::GetHeight())
will set whole screen pixels from something like MemoryBuffer
objectAnd one parameter:
size
can allow getting or setting only a portion of the screenWould be interesting to see how it could work out 👀
I think getting a screen buffer capture should be a very different API, because it doesn't have a whole lot to do with shaders.
Post-processing shaders use the screen buffer ofcourse, but it's still kinda different, because shaders have to be written in HLSL.
While challenging, it would be neat to have the ability to create custom shaders.
Inspiration: https://discord.com/channels/276076890714800129/424967293538402334/992398520671805530