Game Development Community

BackBuffer Refraction (moved)

by Luigi Rosso · in Torque Game Engine Advanced · 02/29/2008 (11:44 am) · 1 replies

I moved the public thread from here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=72490

To this new thread so that I can post changes without giving TGEA code to non-owners :-)

I'm including the instructions for the fix in this post. If anyone can try it out and let me know if they run into any issues (I probably forgot to include something) then I'll make a resource (or you can) when the instructions are good.

You can download the big changes here:
realityslip.com/TGEA_1_0_3.zip

Just unzip that to a clean TGEA_1_0_3 dir.


The small changes (that I didn't include new files for in the zip, you need to make these manually!) are listed below:


At line 69 in renderGlowMgr.cpp add:
GFX->enableColorWrites( true, true, true, true );

At line 191 in renderGlowMgr.cpp add (at the end of the method):

GFX->enableColorWrites( true, true, true, false );


At line 208 in interiorRender.cpp
Change:
GFX->enableColorWrites( true, true, true, true );
To:
GFX->enableColorWrites( true, true, true, false );

At line 1155 in guiCanvas.cpp
Change:
ColorI gCanvasClearColor( 255, 0, 255 ); ///< For GFX->clear
To:
ColorI gCanvasClearColor( 255, 0, 255, 255 ); ///< For GFX->clear


At line 1704 in gfxD3DDevice.cpp
Change:
D3DFORMAT fmt = D3DFMT_X8R8G8B8; // 32 bit
To:
D3DFORMAT fmt = D3DFMT_A8R8G8B8; // 32 bit

In your WaterBlock initialization block in the .mis file you need to add:
surfMaterial[5] = "WaterAlphaMark";

If this doesn't work for you, I probably forgot something! Just let me know!

#1
09/19/2008 (12:57 pm)
I can't believe I missed this, Luigi!

Thanks a lot for sharing, I'll try this out as soon as possible.