Screen Quad Post Processing

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Screen Quad Post Processing

Post by Vectrotek »

Nope! Under HLSL it does wierd things no matter what I do?
But when I don't use createDeviceEx(params) its fine.

Image

Image

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..
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Screen Quad Post Processing

Post by Vectrotek »

The screen is a "ScreenQuad"..
(you can how FXAA softened with the text)
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Screen Quad Post Processing

Post by Vectrotek »

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;
Post Reply