Skip to content

Commit

Permalink
ed prv const ssao size
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed Dec 6, 2024
1 parent db858a2 commit ffab060
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/AppGui.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class AppGui : public BaseGui
Ogre::Pass *mApplyPass =0;
Ogre::TextureGpu *noiseTexture =0;
void InitSSAO(), UpdSSAO(Ogre::Camera *camera);
bool edPrvCam =0;

// 🔆 Lens flare
Ogre::Vector4 uvSunPos_Fade; // on screen
Expand Down
12 changes: 10 additions & 2 deletions src/common/AppGui_SSAO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,18 @@ void AppGui::UpdSSAO(Camera* camera)
camera->setOrientationMode( OR_DEGREE_0 );
#endif
psParams->setNamedConstant( "projection", camera->getProjectionMatrix() );
psParams->setNamedConstant( "kernelRadius", pSet->ssao_radius );
psParams->setNamedConstant( "kernelRadius",
#ifdef SR_EDITOR
edPrvCam ? 0.3f : // const for 1024 view rtt
#endif
pSet->ssao_radius );

GpuProgramParametersSharedPtr psParamsApply = mApplyPass->getFragmentProgramParameters();
psParamsApply->setNamedConstant( "powerScale", pSet->ssao_scale );
psParamsApply->setNamedConstant( "powerScale",
#ifdef SR_EDITOR
edPrvCam ? 1.8f :
#endif
pSet->ssao_scale );
}

// 💫 common util 🔆🌄
Expand Down
1 change: 1 addition & 0 deletions src/common/FluidsReflect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void ReflectListener::passEarlyPreExecute( CompositorPass *pass )

CompositorPassScene *passScene = static_cast<CompositorPassScene *>( pass );
Camera *camera = passScene->getCamera();
// LogO("cam: "+camera->getName());


app->UpdateEffects(camera); // 💫
Expand Down

0 comments on commit ffab060

Please sign in to comment.