sprite_replace_color color matching glitch
Closed this issue · 1 comments
There is a strange problem with this script on my system. I believe the script is coded correctly.
The problem occurs during the first stage of the algorithm. When the sprite is drawn to a surface, the pixels bordering color transitions are bleeding together slightly. It resembles interpolation although interpolation is off. Pixels transmit color by 3/255th of a pixel horizontally and 7/255th of a pixel vertically.
Some attempts were made to correct the problem using d3d_transform_set_translation(). It did not appear to have an effect while interpolation was disabled. More experimentation might be useful with interpolation active.
That said, I believe this is a GM:Studio bug or driver issue. Unfortunately, attempts to reproduce the problem with a simple test have not yet been successful.
I have verified that the original images are correct, the sprites in the sprite editor are correct, and the texture page preview is correct. The problem seems to manifest during drawing.
I've got a new system now. The problem has gone away. There have been updates to GM:Studio since this issue submitted but I feel confident that the problem was hardware/driver related. My GPU was very, very old and had exhibited unexpected results from time to time.