More about Sprite3DBlendingMode

Advanced game related topics
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by chr1sb.

Don't know why I didn't think of this before! Here's some code to test the blending modes, then we can discover once and for all how these will look on different graphics cards (well, up to mode 11 anyway)
SPACE key takes a screendump, please post your result (jpg obviously not the bmp!) if you have a different graphics card to the one's I've tested (geforce3 and voodoo3)

Code: Select all

ScreenWidth = 640
ScreenHeight = 480
ScreenDepth = 16

InitSprite()
InitKeyboard()
InitSprite3D()
OpenScreen(ScreenWidth, ScreenHeight, ScreenDepth, "")

CreateSprite(0,32,32,#PB_Sprite_Texture)
StartDrawing(SpriteOutput(0))
For x=0 To 15
Box(x,x,32-(x 

voodoo3:
[url]http://www.contralogic.com/images/BlendModes_voodoo3.jpg[/url]

chr1sb
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Rendition Verite 2200B3 8MB



El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by WolfgangS.

Geforce 2 GTS 32 MB


MFG
:)WolfgangS
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by chr1sb.

thanks for the replies,

already this narrows it down to the following values which work the same on the above graphics cards:

Code: Select all

SourceModes: 1,2,5,6,8,9,10,11
DestinationModes: 0,1,2,3,4,5,6,8,11
But I'm thinking my code isn't a very good demonstration of the different blending effects - I think maybe some of the effects need an alpha channel to be contained within the 3d sprite to work properly.

Purebasic doesn't seem to directly support alpha channels in 3d sprites but maybe there is some way to merge 8-bit alpha channel information into a 3d sprite by doing a binary AND with the 24-bit colour information into the memory area that the sprite uses?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by plouf.

in my RivaTNT2 i get no effect at all (only blue bars are displayed and numbers)

Christos
Post Reply