Skip to main content
GameDev.net gamedev.net
🔒 Locked

problem with floating point render target

Started by deltadream Feb 5, 2006 at 9:24 AM 4 replies 6.2k views
Original Post
deltadream
deltadream
Hi, When I'm using a D3DFMT_A16B16G16R16F render target, the alpha blending doesn't work. If I switch to D3DFMT_X8R8G8B8 everything seems to be ok. Does anyone know what could be wrong ? Thanks
MikeWW
MikeWW
Only newer cards support alpha blending on FP surfaces. This is mentioned in the D3D docs (briefly!) and there is a cap bit you can check for support.

This was discussed a month or two ago here, have a search of the forum for more info.

Mike.
deltadream
deltadream
Thanks, you helped me a lot. Indeed my card (a FX 5200) does not support blending on a floating point render target ... here goes my HDR effect :(
Guoshima
Guoshima
you can still use HDR effect, allthough it's a little bit more tedious to implement. If you search the net you'll defently find some information about it (could even be that the DirectX SDK has some info on this.)
deltadream
deltadream
Thanks Guoshima, Indeed, there are other ways, but I'll wait a bit because I want to finish the rest of the demo and then if there is time I'll find some ways to implement HDR.
HellRaiZer
HellRaiZer
Hi...

You can still do true HDR with an FX card, by emulating floating point blending with shaders. I think ShaderX 2 has a chapter discussing such a technique.

There are problems with transparent objects (e.g. particle systems), but there are some ways to solve them (e.g. using the same depth buffer as the one used for the two main color textures, render all transparent objects in a normal (integer) render target and blend the result with the HDR buffer).

In their article they say that the technique works well when objects do not overlap in space, and when the result of one operation is dependent on the current color that's been rendered (e.g. transparent objects with front to back ordering).

BUT the main problem, is your card!!! I don't think that such a system is going to run well even on an FX 5950 when there are many lights involved! On your 5200 the whole thing will crowl when you are rendering on 1024x768 buffers and have more than 2 lights. But the result is going to be amazing :)

If you need more info on how to implement it, and the ShaderX 2 chapter can't help you, ask again. I may be able to help.

HellRaiZer
HellRaiZer

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.