Looking for something that is faster than surface_getpixel? Well you came to the right stop.
Introducing buffer_getpixel scripts! This asset will provide you a short list of commands that will help you get a pixel color 10x faster than the average surface_getpixel command.
Its easy to set up and you can control on the performance it runs too.
Includes not only the default scripts with the buffer_getpixel, but it comes with buffer_getpixel_ext (to get the RGBA value) and it comes with separate scripts to pick up each color value individually.
So much reliability on this, this will become your replacement for surface_getpixel for sure. Its so fast, its likely possible to imitate shader effects with a color pick up code like this!
Get it now!
UPDATE 1.0.4 - Fixed bug that returns incorrect buffer index when after removing the buffer. - buffer_getpixel_end has been removed. Uses buffer_delete instead. - buffer_getpixel now relies only on one buffer index. - Two new arguments are applied for every buffer_getpixel command; width and height. Make sure to apply these changes to your code before running.
NOTE: The Width and Height specifies the surface size to use.
End User Licence Agreement (EULA).
Notice that the colour formats were returning incorrectly since GMS follows an inverted pattern. The colour formats are now fixed with BGRA instead.
buffer_seek has been replaced with buffer_peek instead.
Minor fixes
Notice that the colour formats were returning incorrectly since GMS follows an inverted pattern. The colour formats are now fixed with BGRA instead.
buffer_seek has been replaced with buffer_peek instead.
Minor fixes