File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
GITechDemo/Code/AppMain/GITechDemo/RenderScheme Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,6 @@ void DirectionalLightPass::Update(const float fDeltaTime)
9393
9494 texIrradianceMap = IrradianceTexture.GetTextureIndex ();
9595 texEnvMap = EnvironmentTexture.GetTextureIndex ();
96-
97- nBRDFModel = gmtl::Math::clamp (nBRDFModel.GetCurrentValue (), (int )BLINN_PHONG, (int )BRDF_MODEL_MAX - 1 );
9896}
9997
10098void DirectionalLightPass::Draw ()
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ void GBufferPass::Update(const float fDeltaTime)
9999 ResourceMgr->GetTexture (HyperbolicQuarterDepthBuffer.GetRenderTarget ()->GetColorBuffer ())->SetFilter (SF_MIN_MAG_POINT_MIP_NONE);
100100
101101 DIFFUSE_ANISOTROPY = Math::clamp (DIFFUSE_ANISOTROPY, 1 , (int )MAX_ANISOTROPY);
102+ nBRDFModel = gmtl::Math::clamp (nBRDFModel.GetCurrentValue (), (int )BLINN_PHONG, (int )BRDF_MODEL_MAX - 1 );
102103}
103104
104105void GBufferPass::Draw ()
@@ -159,7 +160,7 @@ void GBufferPass::Draw()
159160 const unsigned int matTexIdx = SponzaScene.GetTexture (Synesthesia3D::Model::TextureDesc::TT_AMBIENT, SponzaScene.GetModel ()->arrMesh [mesh]->nMaterialIdx );
160161 const unsigned int roughnessTexIdx = SponzaScene.GetTexture (Synesthesia3D::Model::TextureDesc::TT_SHININESS, SponzaScene.GetModel ()->arrMesh [mesh]->nMaterialIdx );
161162
162- if (diffuseTexIdx != ~0u && ((texMatType != ~0u && texRoughness != ~0u ) || nBRDFModel == BLINN_PHONG))
163+ if (diffuseTexIdx != ~0u && ((matTexIdx != ~0u && roughnessTexIdx != ~0u ) || nBRDFModel == BLINN_PHONG))
163164 {
164165 RenderContext->GetResourceManager ()->GetTexture (diffuseTexIdx)->SetAnisotropy ((unsigned int )DIFFUSE_ANISOTROPY);
165166
You can’t perform that action at this time.
0 commit comments