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 / Fade Bitmap is a joke...

Author
Message
Hannibal
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 17th Jul 2017 01:21
And the more we fade it ...the longer it takes....!


Surely it should not matter if we got a pixel value and divided or multiplied it, by a value...it should take the same time, no matter the value?

But, we know ...it is probably quicker to fade a bitmap using DBP itself , than the inbuilt command !

zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 17th Jul 2017 09:04
DBPro help file wrote: "You must specify a fade value that sets the level of fading from zero which fades the bitmap completely to black, up to 100 which does not fade the bitmap at all. Fade operations are slow and the completion time depends on the size of the bitmap. The parameters should be specified using integer values."

the help file already states that this command is slow.

i don't know if you can do it with shaders, which should always be faster.
if you have the bitmap as an image, you can try the sprite commands. or you can convert the image to a memblock an manipulate the alpha value of each pixel and then paste it.
this should also work (pseudocode):

something similar could be done with the pixels pointer.

if you come up with a good and fast solution, please share it.

Login to post a reply

Server time is: 2024-04-25 07:29:08
Your offset time is: 2024-04-25 07:29:08