Dear Team
i know how to generate terrain from a bitmap , but i was wondering how to do it directly from a png converted to pvr , how can i access to the pixel ( x,y ) r,g,b values ?
thanks in advance
david
Hi Dgu,
PVR files are stored in a simple, linear texel array, there’s no file compression going on in a basic PVR. You can literally just access each pixel directly. If you have it stored as, say, RGBA8888, every 32 bits will be a new pixel, and each 8bit value within that will be a different channel.
It should be largely the same as accessing a bitmap array, just with different formats supported. You can also just bind them as a texture and perform vertex texture reads on supported platforms (sadly, this does not include iOS though).
Thanks,
Tobias
thanks Tobias ,that is really interesting , it s my todo list now