h4570 / tyra

Game engine for PlayStation 2™
Apache License 2.0
511 stars 36 forks source link

GetPixelAtPoint() function for texture class #189

Open matt-comm-link opened 9 months ago

matt-comm-link commented 9 months ago

I've been working on a function to get the colour of a pixel (as a Vec4) at a specified location for heightmap terrain in a project I'm working on.

I'd like to propose adding a function like that into the texture class proper. I'm still working on my implementation, and I'm not familiar enough with 4bpp pngs to have implemented anything for that just yet, so I won't submit a PR at the moment, but am thinking of doing so when I've battle tested things a little more.

Wellinator commented 8 months ago

That'd be very helpful. I've needed it before.