• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code [SOLVED] draw_sprite_ext: Unwanted Lines

Nodamex

Member
Here is the lines:
upload_2019-1-5_22-38-19.png

Code:
draw_sprite_ext(sprite, -1, xx, yy, ssize, ssize, aangle, bblend, aalpha)
This is my shield sprite:
upload_2019-1-5_22-41-22.png

How can I avoid this?

Note: After refreshing, lines may disappear.
 

Joe Ellis

Member
this is too vague
from your post, the original pics are diagonal and you rotate it upright, and i dont know the lines your talking about,
 
L

Lonewolff

Guest
At a glance, this appears to be texture bleed caused by the surrounding sprites internally on the texture page.

You can verify this by turning off interpolation, for test purposes only, and/or ticking use for 3D.

Neither of these options are optimal, But if the lines go away it is texture bleed.
 

Joe Ellis

Member
At a glance, this appears to be texture bleed caused by the surrounding sprites internally on the texture page.

You can verify this by turning off interpolation, for test purposes only, and/or ticking use for 3D.

Neither of these options are optimal, But if the lines go away it is texture bleed.
True, it could be, could you post more info though?
and if you refresh do they go away?
 

Nodamex

Member
Even if I do not use the black outline script, it happens.
upload_2019-1-7_16-22-28.png

Setting interpolation off solves the problem, but I do not want to turn off.

Left: With interpolation
Right: Without interpolation
upload_2019-1-7_16-33-6.png
 

Hyomoto

Member
The issue, as others have noted, is a type of texture bleeding. I don't know the full technical reasons behind it but I know that it's worsened by precision problems. That is to say, it's worse on an angle of 12.019228 than 12.00000, which is worse than 10 or 15. However it doesn't affect all things equally either, as your bow is affected but other sprites may not be.

A solution could be to make a new sprite that is already rotated, but you may also be able to find a scale/rotation that doesn't cause the effect.
 
Last edited:

gnysek

Member

Hyomoto

Member
I just remembered, even though this is marked as solved, that GM2 optimizes sprites by removing all of the 'blank' pixels regardless of how many you have in the editor. Which is why the changing border fixes it, because you are adding that blank space back in. Just to add a little bit of information as to why that fix works. I honestly forgot about that.
 

kupo15

Member
Border size adds transparency around the border of the entire tex page not each individual sprite, right? I know there are both options when dealing with texture atlases. When would you need to use the border padding vs sprite border padding?
 

Nodamex

Member
Border size adds transparency around the border of the entire tex page not each individual sprite, right? I know there are both options when dealing with texture atlases. When would you need to use the border padding vs sprite border padding?
it adds space for each individual sprite in one texture page, so lines are gone, i think.
 
Top