Nope! Under HLSL it does wierd things no matter what I do?
But when I don't use createDeviceEx(params) its fine.
createDevice() is fine, but it would be interesting to know what went wrong..
Maybe I'll post the project but it is still a bit messy..
Screen Quad Post Processing
Re: Screen Quad Post Processing
The screen is a "ScreenQuad"..
(you can how FXAA softened with the text)
(you can how FXAA softened with the text)
Re: Screen Quad Post Processing
Code: Select all
TheIRRNullDevice = createDevice(video::EDT_NULL); // Null Device for us to get our windows resolution..
TheDeskResolution = TheIRRNullDevice->getVideoModeList()->getDesktopResolution(); // As set by you in windows setup..
TheIRRNullDevice->drop(); // We got the desktop resolution, so drop the Null Device..
MyEventReceiver TheReceiver; // This receiver is the one assigned in the CREATE DEVICE function..
printf("Select the DriverType:\n"\
" (a) OpenGL \n (b) Direct3D \n (otherKey) exit\n\n");
char inkeypress;
std::cin >> inkeypress;
switch(inkeypress)
{case 'a': SelectedDriverType = video::EDT_OPENGL; break;
case 'b': SelectedDriverType = video::EDT_DIRECT3D9; break;
default: return 1;
}
//*/
// OVERRIDE..
// SelectedDriverType = video::EDT_OPENGL;
TheDeskResolution = (core::dimension2d<u32>( 800, 600 )); // Temp override..
SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
params.DriverType = SelectedDriverType;
params.Bits = 32 ;
params.AntiAlias = 1 ; // 1 (off) 2, 4, 8, 16, (your video card settings plays a role here too)..
params.ZBufferBits = 32 ;
params.WindowSize = core::dimension2d< u32 >(TheDeskResolution);
params.Fullscreen = false;
// params.Fullscreen = true;
params.Stencilbuffer = false; // false or true causes anomaly..
params.Vsync = false;
params.EventReceiver = &TheReceiver;
IrrlichtDevice* TheDevice = createDeviceEx(params);
// With HLSL the "createDeviceEx" method of
// device creation causes problems with Z Depth an occlusion
// when we render to Target Textures..
/* // This works for both GLSL and HLSL always..
TheDevice = createDevice(SelectedDriverType,
TheDeskResolution,
32,
false, // Fullscreen ?
false, // Stencil Buff ?
false, // Vsync ?
&TheReceiver);
// */
if (TheDevice == 0) return 1;