Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / A problem with alpha/antialiasing of text created using ImageKit/D3D plugins...

Author
Message
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Feb 2011 01:02
Hi guys,

I seem to have run into another of those incredibly frustrating problems which has me banging my head against the desk.

I've been using Sven B's Image kit plugin and Cloggy's D3D plugin to create things like Outlines and shadows for text; but have hit a snag. When simply pasted without transparency the image looks as I'd expect it too, but when pasted with, you can see what looks to be trails caused by antialiasing (but which must be in the alpha channel?)

I have whipped up the following snippet which better explains the problem I'm having.



I'm really lost as to why this is happening, and if any of you guys can shed a little bit of light on this for me, it'll be muchly appreciated.

Thanks in advance as always

=PRoF=

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 12:00
Can't compile, is that the latest version of the Image Kit?

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Feb 2011 12:39
Thanks for looking Baxslash,

I do indeed have the latest versions of both Cloggy's D3D plugin and Sven B's Imagekit.

What error did it give? I've tested it on 2 PC's here and it a) compiles and runs ok, and b) creates the same graphical artifacts.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 12:51 Edited at: 9th Feb 2011 12:56
"ik create render target 1,400,200" is not recognised, strange I just updated it to make sure. Let me take another look...

EDIT: Got it working now (forgot to rebuild keywords... doh!) I'll take a proper look.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 13:02 Edited at: 9th Feb 2011 13:06
It's something to do with drawing to another target image. I had a similar problem on Monday drawing to another bitmap (other than bitmap 0).

If you do this it works as expected:


Maybe you need to init d3d after swapping to the other image...

...no that didn't work...

I'll think on it.

EDIT: This works using normal text commands. My guess is it's a problem in the dll...



=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Feb 2011 13:33
@Baxslash:
Thanks for looking again, I had reached the same conclusions as you did. D3D text works ok on Bitmap 0, and normal text works ok on the render target image (It's just sooooo much slower than D3D text, over 20x in the full project.)

I was hoping someone would come along and say "You need to change the blend mode" or someth, lol;

Where do you think the problem lies? Cloggy's plugin? Sven B's plugin? IanM's plugin (I forgot about this, its where the render target commands come from) or with DBP itself?

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 13:39
Quote: "Where do you think the problem lies? Cloggy's plugin? Sven B's plugin? IanM's plugin (I forgot about this, its where the render target commands come from) or with DBP itself?"

I'd guess D3D. I had a similar problem using both D3D and A2 without using the Matrix command or any Image Kit commands.

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Feb 2011 13:47
Thats a pity. I don't think Cloggy is updating the plugin any more

I guess it's time to hit the ol' msdn again then, try and work out how to do it myself *sigh*

(Unless Sven B or IanM fancy adding d3d_text support to their plugins?)

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2011 13:54
Quote: "Thats a pity. I don't think Cloggy is updating the plugin any more "

I could be wrong but I thought he did a recent post regarding some possible improvements being made to the plugin after talking to Diggsey regarding how his advanced 2D plugin works...

I'd post something on the thread.

Login to post a reply

Server time is: 2024-04-24 18:24:14
Your offset time is: 2024-04-24 18:24:14