Skip to content

Commit 6771d8e

Browse files
committed
GITechDemo:
*lighting parameter update *tone mapping parameter update *bloom parameter update *film grain parameter update *color correction parameter update *default to borderless window mode *window state caching initialization fix
1 parent 3bdbb90 commit 6771d8e

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

GITechDemo/Code/AppMain/GITechDemo/GITechDemo.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace GITechDemoApp
5656
extern const char* const ResourceTypeMap[RenderResource::RES_MAX];
5757

5858
bool FULLSCREEN_ENABLED = false;
59-
bool BORDERLESS_ENABLED = false;
59+
bool BORDERLESS_ENABLED = true;
6060
int FULLSCREEN_RESOLUTION_X = 0;
6161
int FULLSCREEN_RESOLUTION_Y = 0;
6262
int FULLSCREEN_REFRESH_RATE = 0;
@@ -112,6 +112,8 @@ bool GITechDemo::Init(void* hWnd)
112112
{
113113
m_pHWND = hWnd;
114114

115+
Framework* const pFW = Framework::GetInstance();
116+
115117
// Renderer MUST be initialized on the SAME thread as the target window
116118
Renderer::CreateInstance(API_DX9);
117119
//Renderer::CreateInstance(API_NULL);
@@ -198,9 +200,9 @@ bool GITechDemo::Init(void* hWnd)
198200
m_nLastFrameResY = -1;
199201
m_vLastFrameViewport = Vec2i(-1, -1);
200202
m_nLastFrameRefreshRate = -1;
201-
m_bLastFrameFullscreen = FULLSCREEN_ENABLED;
202-
m_bLastFrameBorderless = BORDERLESS_ENABLED;
203-
m_bLastFrameVSync = VSYNC_ENABLED;
203+
m_bLastFrameFullscreen = pFW->IsFullscreen();
204+
m_bLastFrameBorderless = pFW->IsBorderlessWindow();
205+
m_bLastFrameVSync = RenderContext->GetVSyncStatus();
204206

205207
return true;
206208
}

GITechDemo/Code/AppMain/GITechDemo/RenderScheme/HDRToneMappingPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using namespace GITechDemoApp;
3737
namespace GITechDemoApp
3838
{
3939
bool HDR_TONE_MAPPING_ENABLED = true;
40-
bool SRGB_COLOR_CORRECTION = false;
40+
bool SRGB_COLOR_CORRECTION = true;
4141
}
4242

4343
HDRToneMappingPass::HDRToneMappingPass(const char* const passName, RenderPass* const parentPass)

GITechDemo/Code/AppMain/GITechDemo/Resources/AppResources.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ namespace GITechDemoApp
407407
CREATE_SHADER_CONSTANT_OBJECT(fZFar, float, 5000.f );
408408

409409
/* Directional light parameters */
410-
CREATE_SHADER_CONSTANT_OBJECT(fDiffuseFactor, float, 10.f );
410+
CREATE_SHADER_CONSTANT_OBJECT(fDiffuseFactor, float, 7.5f );
411411
CREATE_SHADER_CONSTANT_OBJECT(fSpecFactor, float, 15.f );
412412
CREATE_SHADER_CONSTANT_OBJECT(fAmbientFactor, float, 0.15f );
413413
CREATE_SHADER_CONSTANT_OBJECT(fIrradianceFactor, float, 1.f );
@@ -454,7 +454,7 @@ namespace GITechDemoApp
454454

455455
/* Post-processing parameters */
456456
// Tone mapping
457-
CREATE_SHADER_CONSTANT_OBJECT(fExposureBias, float, 0.2f );
457+
CREATE_SHADER_CONSTANT_OBJECT(fExposureBias, float, 0.25f );
458458
CREATE_SHADER_CONSTANT_OBJECT(f2AvgLumaClamp, Vec2f, Vec2f(0.0001f, 0.75f) );
459459
CREATE_SHADER_CONSTANT_OBJECT(fShoulderStrength, float, 0.5f );
460460
CREATE_SHADER_CONSTANT_OBJECT(fLinearStrength, float, 0.58f );
@@ -464,12 +464,12 @@ namespace GITechDemoApp
464464
CREATE_SHADER_CONSTANT_OBJECT(fToeDenominator, float, 0.58f );
465465
CREATE_SHADER_CONSTANT_OBJECT(fLinearWhite, float, 3.f );
466466
CREATE_SHADER_CONSTANT_OBJECT(fLumaAdaptSpeed, float, 1.f );
467-
CREATE_SHADER_CONSTANT_OBJECT(fFilmGrainAmount, float, 0.003f );
467+
CREATE_SHADER_CONSTANT_OBJECT(fFilmGrainAmount, float, 0.001f );
468468
CREATE_SHADER_CONSTANT_OBJECT(bApplyColorCorrection, bool, true );
469469
// Bloom
470470
CREATE_SHADER_CONSTANT_OBJECT(fBrightnessThreshold, float, 0.2f );
471471
CREATE_SHADER_CONSTANT_OBJECT(fBloomPower, float, 1.f );
472-
CREATE_SHADER_CONSTANT_OBJECT(fBloomStrength, float, 1.f );
472+
CREATE_SHADER_CONSTANT_OBJECT(fBloomStrength, float, 0.75f );
473473
// FXAA
474474
CREATE_SHADER_CONSTANT_OBJECT(fFxaaSubpix, float, 0.75f );
475475
CREATE_SHADER_CONSTANT_OBJECT(fFxaaEdgeThreshold, float, 0.166f );

0 commit comments

Comments
 (0)