Jump to content

draw onto a rendertarget, without "white" borders


KryPtoHolYx

Recommended Posts

Posted

Hello,

i´m having some problems while drawing a image with a rendertarget.

Everytime i draw onto the target, the drawn image leaves a "white" border,

example :

395a0109a10e917d4fd45686c44ade44.jpg

So is there a way to remove them ?

how i draw the image :

dxSetRenderTarget( map,true ) 
        dxSetBlendMode("modulate_add")  
        dxDrawRectangle (0,0, 155,155 ,tocolor(20,200,20,150)) 
                local x,y = getElementPosition(localPlayer); 
                local x,y = calcPos(x,y) 
                _,_,rz= getElementRotation ( v) 
                dxDrawImage(x,y, 50,50,"ship.png",-rz,0,0,tocolor(255,255,255,255)) 
        dxSetBlendMode("blend") 
    dxSetRenderTarget(  ) 
  

Regards

  • MTA Team
Posted

Create your ship.png as texture when the resource starts. (use DXT5 compressed and textureEdge "clamp")

dxCreateTexture 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...