This site is no longer active and is available for archival purposes only. Registration and login is disabled.

alphablend optimization?


alphablend optimization?

Postby jaguard » Jul 31, 2005 @ 3:22pm

An idea crossed my mind - what if we create specific blit fuctions for several alphablends where it is possible to optimize it? Like display->Blit50() (equal to setblending(127)), display->Blit25() (setblending(63)) ?

This can be useful to draw big objects which you want to be transparent somehow, i.e. clouds.

And also, we can optimize PixelAlphaBlend to be less accurate but one multiplication less in a way that fast_rx done it in his alphablit fuction. I'm not entirely undestand every part of his code, so it's a little trouble to me..

What do you think? Any code snippets are highly appreciated ;).
jaguard
pm Member
 
Posts: 230
Joined: Mar 2, 2004 @ 6:45pm


Postby Presto » Jul 31, 2005 @ 3:58pm

Why not just do:

display->SetBlending(127);
display->Blit(x,y,pCloudImg);
display->SetDefaultShader();

Now, if it's a true alpha image, then the alpha layer will determine how much blending each pixel in the image gets. Using SetBlending would be optional to make it even more transparent than what the alpha layer says to.

Perhaps I don't understand what you're trying to do.

-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby jaguard » Jul 31, 2005 @ 4:07pm

jaguard
pm Member
 
Posts: 230
Joined: Mar 2, 2004 @ 6:45pm


Postby fast_rx » Jul 31, 2005 @ 5:05pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron