2D Alpha DLL ready to test

Community Forums/Showcase/2D Alpha DLL ready to test

Eikon(Posted 2004) [#1]
This is one of the examples i'll be releasing with the finished DLL. Before I go any further with it I'd like to know how it performs on other systems. Please check out the demo and run it in both windowed and full screen modes. When you exit there will be an alpha.log file with all the stats I need. Thanks!



Download Example One | Worklog


MrCredo(Posted 2004) [#2]
Windowed: 20-40fps
Fullscreen: 75-140fps

no constant fps-rate!

do you tested my dll:
http://www.blitzbasic.com/toolbox/toolbox.php?tool=38


Eikon(Posted 2004) [#3]
Whoa, thats way off what i'm getting :(

Can you post machine specs? Checking out your dll now...

*edit* Yours is nice. Your using a very different approach than me and it seems a lot lighter on the CPU. Maybe I should use C for the DLL instead. Thanks for the feedback. Nothing is in stone of course so i'm still requesting testers.

@sswift: Correct. Fixed broken low fps logging, thx.


sswift(Posted 2004) [#4]
Lowest FPS: 1
Average FPS: 958
Highest FPS: 1315

According to that, you could do 60fps at 1280x960 and 239fps at 640x480.

But that's not working with any alpha maps I presume?


Grisu(Posted 2004) [#5]
Lowest FPS: 984
Average FPS: 1691
Highest FPS: 2102

AMD XP 2100, 512 DDR, Radeon 9600xt 256


Andy_A(Posted 2004) [#6]
Lowest FPS: 54
Average FPS: 164
Highest FPS: 195

1GHz AMD, 512MB RAM, GeForce2 GTS

Andy


Paul "Taiphoz"(Posted 2004) [#7]
lowest 2 fps.

Average for both window and full screen is around 120-140 fps.


MrCredo(Posted 2004) [#8]
my specs:
P800, 128MB, 32MB ATI Xpert 2000, DX8, Win98SE


Perturbatio(Posted 2004) [#9]
Lowest FPS: 1
Average FPS: 305
Highest FPS: 518


mearrin69(Posted 2004) [#10]
Lowest FPS: 1
Average FPS: 2115
Highest FPS: 2904

Yowsa!

2.0Ghz P4, 256Mb RAM, ATI Radeon 9800 Pro (128 Mb)


Eikon, tell us more ;) Please say it isn't just for B+!


Eikon(Posted 2004) [#11]
Looks like FPS are all over the place, far from consistent :\

I get around:
Lowest FPS: 1022
Average FPS: 2896
Highest FPS: 3657

so i'm really suprised with these results. I appreciate everyone's comments and testing. These findings tell me its time to go back to the drawing board.


Highest FPS: 2904
Eikon, tell us more ;) Please say it isn't just for B+!


@Mearrin69: Thats more like it! The current method works in all versions of Blitz, though the new method im experimenting with does not. I will try to keep it as compatible as possible, its looking like B+/B3D only for now.


podperson(Posted 2004) [#12]
I'm getting frame rates ranging from 153 to 750 or so ... but no matter how high the frame rate, the alpha blending doesn't run smoothly (it looks like only 10 or so levels of alpha are supported).


Eikon(Posted 2004) [#13]
Thanks for testing PodPerson. The Alpha is done with a

Alpha Source_Img, Destination_Img, Opaqueness

type function. Meaning you can blend in as large or as small of increments as you like. I think the current demo goes in steps of 10 or so, which may be too quickly for slower machines. The param is limited from 0 (Full Src Image) to 255 (Full Dest Image).


MrCredo(Posted 2004) [#14]
do you use a api-function or do you use pixel-maths


Eikon(Posted 2004) [#15]
Hi Credo,
API only.


MrCredo(Posted 2004) [#16]
ah, i use pixel-maths... i wrote this in C++. I have olways constant fps-rate, but i don't know why your DLL always change speed...


eBusiness(Posted 2004) [#17]
Compare to the pure Blitz way:
Const a1=255
Const a2=256*255
Const a3=32768*2*255
Graphics 320,240,32,1
SetBuffer BackBuffer()
Dim img(2)
img(0)=LoadImage("one.bmp")
img(1)=LoadImage("two.bmp")
img(2)=LoadImage("three.bmp")
LockBuffer ImageBuffer(img(0))
LockBuffer ImageBuffer(img(1))
LockBuffer ImageBuffer(img(2))
Dim imgs(2,239,319,2)
For a=0 To 2
For b=0 To 239
For c=0 To 319
	imgs(a,b,c,0)=ReadPixelFast(c,b,ImageBuffer(img(a))) And a1
	imgs(a,b,c,1)=(ReadPixelFast(c,b,ImageBuffer(img(a))) And a2) Shr 8
	imgs(a,b,c,2)=(ReadPixelFast(c,b,ImageBuffer(img(a))) And a3) Shr 16
Next
Next
Next
FreeImage img(0)
FreeImage img(1)
FreeImage img(2)
las=MilliSecs()
Dim multa(255)
Dim multb(255)
While Not KeyHit(1)
	mil=MilliSecs()
	time=(mil Shr 12) Mod 3
	imga=time
	imgb=(time+1) Mod 3
	gradb=(mil Shr 4) Mod 256
	grada=255-gradb
	For a=0 To 255
		multa(a)=(grada*a) Shr 8
		multb(a)=(gradb*a) Shr 8
	Next
	LockBuffer BackBuffer()
	For b=0 To 239
	For a=0 To 319
		WritePixelFast a,b,multa(imgs(imga,b,a,0))+multb(imgs(imgb,b,a,0)) Or ((multa(imgs(imga,b,a,1))+multb(imgs(imgb,b,a,1))) Shl 8) Or ((multa(imgs(imga,b,a,2))+multb(imgs(imgb,b,a,2))) Shl 16)
	Next
	Next
	UnlockBuffer BackBuffer()
	Text 0,0,fps
	Flip
	If MilliSecs()>las+1000 Then
		las=las+1000
		fps=count
		count=0
	End If
	count=count+1
Wend
Need something better than WritePixel"Fast"


FBEpyon(Posted 2004) [#18]
Lowest FPS: 5
Average FPS: 6
Highest FPS: 8

I have a
P3 1g
1gb of Ram
Geforce 5200fx
Winxp

I also us Bitz3d for future refrence for when this comes out..


Eikon(Posted 2004) [#19]
Some great FPS there ;)
Im guessing the

Geforce 5200fx

would be your culprit. I have one of those nasty buggers myself, though its collecting dust somewhere.

Again, a thank you to all the testers. I don't need any more results atm, testing is officially closed.