Skip to content

Commit

Permalink
ed too
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Nov 7, 2024
1 parent 06d90ca commit 5186e89
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 24 deletions.
4 changes: 2 additions & 2 deletions data/gui/Editor_Options.layout
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@


<!-- 🕳️ SSAO -->
<Widget type="Button" skin="CheckBox" position="28 120 256 24" name="SSAO">
<Property key="Caption" value="#{ssao} #704040 = #{NotDone}"/>
<Widget type="Button" skin="CheckBox" position="28 120 356 24" name="SSAO">
<Property key="Caption" value="#{SSAO} #704040 = #{NotDone}"/>
<Property key="TextColour" value="0.3 0.7 1"/>
</Widget>

Expand Down
2 changes: 1 addition & 1 deletion data/gui/Game_Options.layout
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@


<!-- 🕳️ SSAO -->
<Widget type="Button" skin="CheckBox" position="28 120 256 24" name="SSAO">
<Widget type="Button" skin="CheckBox" position="28 120 356 24" name="SSAO">
<Property key="Caption" value="#{SSAO} #704040 = #{NotDone}"/>
<Property key="TextColour" value="0.3 0.7 1"/>
</Widget>
Expand Down
4 changes: 2 additions & 2 deletions data/materials/Pbs/object.material.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
},
"fresnel" :
{
"value" : 0.1,
"value" : 0.6,
"mode" : "coeff"
},
"normal" :
Expand All @@ -164,7 +164,7 @@
},
"roughness" :
{
"value" : 0.4
"value" : 0.1
}
},

Expand Down
22 changes: 11 additions & 11 deletions src/common/AppGui_GI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ void AppGui::DestroyGI()
//-----------------------------------------------------------------------------------
void AppGui::UpdateGI()
{
//if (mGraphicsSystem->getRenderWindow()->isVisible())
//{
// static int frame = 0;
// if (frame > 1)
// {
// mVoxelizer->build( mSceneMgr );
// mVctLighting->update( mSceneMgr, mNumBounces );
// }
// ++frame;
//}
/*if (mGraphicsSystem->getRenderWindow()->isVisible())
{
static int frame = 0;
if (frame > 1)
{
mVoxelizer->build( mSceneMgr );
mVctLighting->update( mSceneMgr, mNumBounces );
}
++frame;
}*/ // ? ^

if (mIrradianceField)
if (GIgetMode() == IfdVct || GIgetMode() == Ifd)
Expand Down Expand Up @@ -211,7 +211,7 @@ void AppGui::GInextIrradianceField( int add )
}
}

// Voxelize scene
// 🌄🔁 Voxelize scene
//-----------------------------------------------------------------------------------
void AppGui::GIVoxelizeScene()
{
Expand Down
5 changes: 5 additions & 0 deletions src/editor/App_SceneInitEd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ void App::LoadTrackEv()
NewCommon(false); // full destroy
iObjCur = -1; iEmtCur = -1;

DestroyGI(); // 🌄

scn->DestroyRoads();
scn->DestroyPace();
scn->DestroyTrails();
Expand Down Expand Up @@ -380,6 +382,9 @@ void App::LoadTrackEv()
scn->LoadRoadDens();
scn->CreateVegets(); // trees after objects so they aren't inside them
scn->grass->Create(this); // 🌿

if (pSet->gi)
InitGI(); // 🌄
}


Expand Down
5 changes: 4 additions & 1 deletion src/editor/Update_Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,11 @@ void App::update( float dt )

processCamera(mDTime);


if (pSet->ssao)
UpdateSSAO();
UpdateSSAO(); // 🕳️
if (pSet->gi)
UpdateGI(); // 🌄


/// gui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void App::LoadCleanUp()
LogO("DD-- LoadCleanUp ------DD");
updMouse();

DestroyGI();
DestroyGI(); // 🌄

if (dstTrk)
{
Expand Down Expand Up @@ -752,7 +752,7 @@ void App::LoadTrees()
scn->grass->Create(this); // 🌿

if (pSet->gi)
InitGI();
InitGI(); // 🌄
}

// check for cars inside terrain ___
Expand Down
12 changes: 7 additions & 5 deletions src/game/Game_Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ void App::update( float dt )
{
fLastFrameDT = dt;

if (pSet->ssao)
UpdateSSAO();
if (pSet->gi)
UpdateGI();

#if 0 //** log big dt
if (dt > 0.02)
LogO("dt "+fToStr(dt,3,5));
#endif


if (pSet->ssao)
UpdateSSAO(); // 🕳️
if (pSet->gi)
UpdateGI(); // 🌄


// fixes white texture flashes
if (bLoading)
{
Expand Down

0 comments on commit 5186e89

Please sign in to comment.