Open DinhQuocTrung opened 8 months ago
I Agree, it would be great if we could save one pixel data in memory and modify it when needed. backbuffer works great until you need to sample the last frame but in my case i want to sample how much time has passed since the last touch was performed and if i could store the time data in a pixel value and reference it in next frame it would work. :)
I hope we get something like that soon.
I think what you really want would be the ability to also write scripts for the CPU as well.
This would require the addition of an actual filesystem and a scripting language like LuaJ
or JavascriptEngine
. JavascriptEngine
would require API level 26 though.
Custom variables could be passed using a setUniform
API and the data can be modified in the main loop.
To not break backwards compatibility, a default script could be used and all shaders get converted into a {shader_name}/main.glsl
path.
Could you add a basic sample about backbuffer to store and load data to use later? May be store data on only one pixel? I have seen game of life sample, I thing that you could add a sample like using mouse to change color. It will be very useful for beginners. Thank you.