Re: IDirect3DSurface9 and alpha channels
- From: "Wessam Bahnassi" <wbahnassi@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Jan 2006 09:39:52 +0300
Run DXCapsViewer on this card. Check out its capabilities, and see what kind
of hardware blending it offers (frame buffer alpha and texture stage
blending)...
--
Wessam Bahnassi
Microsoft DirectX MVP,
Lead Programmer
In|Framez
--
In|Structurez Arabic Gamedev Community
www.instructurez.com
"hamlatzis" <hamlatzis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CC94427B-A9A0-4411-B8CA-DE7844D74715@xxxxxxxxxxxxxxxx
> As promissed, the technical spec of minimum hardware:
>
> VGA: VIA/S3G UniChrome IGP with 32MB shared memory
>
> total RAM : 512MB (of those 32MB are shared with video card)
> CPU : 1GHz
>
> Iosif
>
> "Eyal Teler" wrote:
>
>> What kind of hardware graphics card are you using? For years cards
>> have been able to use non-power-of-2 textures (with some conditions).
>> Also, what kind of per-pixel operations does this card support?
>>
>> Also, what kind of blending do you want? I can understand blending two
>> images with one alpha channel (determining who much of each to
>> choose), but if both have alpha channels, how are you planning to use
>> this?
>>
>> Eyal
>>
>> hamlatzis wrote:
>> > Thanks alot.
>> >
>> > The reason I'm loading the images onto surfaces has to do with memory
>> > consumption and frame rates. I'm implementing a game that runs full
>> > screen
>> > 800x600 and I am given a minimum hardware that has to run onto. This PC
>> > has
>> > an onboard AGP card and it supports textures with power of 2
>> > dimensions. When
>> > I've tested the software even without blending (for special effects)
>> > but
>> > using textures, the frame rate dropped to a point that there were no
>> > fps to
>> > apply the game's logic. On the other hand when using surfaces, again
>> > obviously without any blending, the rendering speed was acceptable to
>> > perform
>> > the game's logic.
>> >
>> > I thought there was a way to do blending with surfaces, as I can use
>> > D3DXLoadSurfaceFromFile to load the image without losing the alpha
>> > channel on
>> > a surface, I've tested this as I saved the image back to a temp file
>> > using
>> > D3DXSaveSurfaceToFile and haven't lost the alpha channel.
>> >
>> > If using GDI I could do a crude transparency with:
>> >
>> > BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCAND);
>> > BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCPAINT);
>> >
>> > why shouldn't I be able to do the same or even a more sophisticated
>> > (semi)transparency with alpha channels using directX?
>> >
>> > Back to drawing board.
>> >
>> > "Wessam Bahnassi" wrote:
>> >
>> >
>> >>There isn't a HW-accelerated way to blend two IDirect3DSurface9 objects
>> >>together.
>> >>You can however lock them and do the blending by hand if you don't need
>> >>real-time operation. BTW, even if your images are 800x600, I don't see
>> >>any
>> >>reason stopping you from putting them into textures... You can either
>> >>stretch them to cover a full 1024x1024 texture or just make them use a
>> >>sub
>> >>rect of that texture...
>> >>
>> >>--
>> >>Wessam Bahnassi
>> >>Microsoft DirectX MVP,
>> >>Lead Programmer
>> >>In|Framez
>> >>
>> >>"hamlatzis" <hamlatzis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>news:9ADB122D-6C5E-4EBA-BE1F-E61EC0B4B037@xxxxxxxxxxxxxxxx
>> >>
>> >>>I'm loading two images that have alpha channels using
>> >>
>> >>D3DXLoadSurfaceFromFile
>> >>
>> >>>and want to use each image's alpha channel to blend them together, but
>> >>>obviously I'm doint something wrong as I only see the top image. I
>> >>>dont'
>> >>
>> >>want
>> >>
>> >>>to use textures as my images are 800x600 pixels.
>> >>>
>> >>>Can someone help me?
>> >>>
>> >>>Thanks
>> >>>
>> >>>Iosif
>> >>
>> >>
>> >>
>>
.
- References:
- Re: IDirect3DSurface9 and alpha channels
- From: Wessam Bahnassi
- Re: IDirect3DSurface9 and alpha channels
- From: Eyal Teler
- Re: IDirect3DSurface9 and alpha channels
- From: hamlatzis
- Re: IDirect3DSurface9 and alpha channels
- Prev by Date: Re: Max Training Videos
- Next by Date: Re: mip mapping with shaders
- Previous by thread: Re: IDirect3DSurface9 and alpha channels
- Next by thread: Re: IDirect3DSurface9 and alpha channels
- Index(es):
Relevant Pages
|