Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
ScreenSpaceReflections.h
Go to the documentation of this file.
1 
2 #include "OGRE/OgrePrerequisites.h"
3 
4 #include "OGRE/OgreGpuProgramParams.h"
5 #include "OGRE/OgreMatrix4.h"
6 
7 namespace Demo
8 {
10  {
11  Ogre::GpuProgramParametersSharedPtr mPsParams[2];
12 
13  Ogre::Matrix4 mLastUvSpaceViewProjMatrix;
14  Ogre::Real mRsDepthRange;
15 
16  public:
17  ScreenSpaceReflections( Ogre::TextureGpu *globalCubemap,
18  Ogre::RenderSystem *renderSystem );
19 
20  void update( Ogre::Camera *camera );
21 
39  static void setupSSR( bool useMsaa, bool useHq, Ogre::CompositorManager2 *compositorManager );
40 
99  static void setupSSRValues( double equivalentMetersInCurrentUnit,
100  double zThickness = 0.25,
101  double zThicknessBiasAmount = 2.0,
102  double zThicknessBiasStart = 10.0,
103  double zThicknessBiasEnd = 100.0,
104  float maxDistance = 10000.0f,
105  float reprojectionMaxDistanceError = 2.0f,
106  Ogre::uint16 pixelStride = 4,
107  Ogre::uint16 maxSteps = 200 );
108  };
109 }
Demo::PROJECTIONCLIPSPACE2DTOIMAGESPACE_PERSPECTIVE
const Ogre::Matrix4 PROJECTIONCLIPSPACE2DTOIMAGESPACE_PERSPECTIVE(0.5, 0, 0, 0.5, 0, -0.5, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1)
Demo::ScreenSpaceReflections
Definition: ScreenSpaceReflections.h:9
Demo::ScreenSpaceReflections::ScreenSpaceReflections
ScreenSpaceReflections(Ogre::TextureGpu *globalCubemap, Ogre::RenderSystem *renderSystem)
Definition: ScreenSpaceReflections.cpp:22
Demo
Definition: BaseSystem.cpp:5
Blam::Globals::String
@ String
Represents a std::string.
Definition: globals.h:48
ScreenSpaceReflections.h
material
Definition: material.h:53
Demo::ScreenSpaceReflections::update
void update(Ogre::Camera *camera)
Definition: ScreenSpaceReflections.cpp:46
camera
BlamDirector * camera
Definition: director.cpp:3
Demo::ScreenSpaceReflections::setupSSRValues
static void setupSSRValues(double equivalentMetersInCurrentUnit, double zThickness=0.25, double zThicknessBiasAmount=2.0, double zThicknessBiasStart=10.0, double zThicknessBiasEnd=100.0, float maxDistance=10000.0f, float reprojectionMaxDistanceError=2.0f, Ogre::uint16 pixelStride=4, Ogre::uint16 maxSteps=200)
SSR algorithm works by "voxelizing" the scene in screen space; and these voxels have a size in view s...
Definition: ScreenSpaceReflections.cpp:174
Demo::ScreenSpaceReflections::setupSSR
static void setupSSR(bool useMsaa, bool useHq, Ogre::CompositorManager2 *compositorManager)
Setups SSR materials and compositor nodes according to settings.
Definition: ScreenSpaceReflections.cpp:102