Skip to content

Commit

Permalink
Samples: LightShafts - use PF_DEPTH16
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 17, 2024
1 parent 570c8e1 commit 6f5336d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Samples/Media/materials/programs/GLSL/LightShafts.frag
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ MAIN_DECLARATION
iUV.z = iUV.z * 0.5 + 0.5;
#endif

#ifdef OGRE_REVERSED_Z
if (Depth > iUV.z)
#else
if (Depth < iUV.z)
#endif
{
gl_FragColor = vec4(0,0,0,1);
}
Expand Down
3 changes: 1 addition & 2 deletions Samples/Simple/include/LightShafts.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,8 @@ class _OgreSampleClassExport Sample_LightShafts : public SdkSample
schemRenderState->addTemplateSubRenderState(subRenderState);
#endif
mSceneMgr->setShadowTechnique(SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED);
mSceneMgr->setShadowTextureSettings(256, 1, PF_FLOAT32_R);
mSceneMgr->setShadowTextureSettings(256, 1, PF_DEPTH16);
mSceneMgr->setShadowTextureSelfShadow( true );
mSceneMgr->setShadowTextureCasterMaterial(MaterialManager::getSingleton().getByName("PSSM/shadow_caster"));

auto statusPanel = mTrayMgr->createParamsPanel(TL_TOPLEFT, "HelpMessage", 200, {"Help"});
statusPanel->setParamValue("Help", "H / F1");
Expand Down

0 comments on commit 6f5336d

Please sign in to comment.