Skip to content

Commit

Permalink
#48 Add Shader/BakeDirectional/BakeDirectionalLight.xml (empty) and a…
Browse files Browse the repository at this point in the history
…djust some value in example
  • Loading branch information
ducphamhong committed May 30, 2023
1 parent c7269ed commit db5fb81
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Assets/BuiltIn/Shader/BakeDirectional/BakeDirectionalLight.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<shaderConfig name="BakeDirectionalLight" baseShader="SOLID">
<uniforms>
<vs>
<uniform name="uMvpMatrix" type="WORLD_VIEW_PROJECTION" value="0" float="16" matrix="true"/>
<uniform name="uWorldMatrix" type="WORLD" value="0" float="16" matrix="true"/>
<uniform name="uLightDirection" type="WORLD_LIGHT_DIRECTION" value="0" float="4"/>
</vs>
<fs>
<uniform name="uLightColor" type="LIGHT_COLOR" value="1.0,1.0,1.0,1.0" float="4"/>
</fs>
</uniforms>
<resources>
</resources>
<customUI>
</customUI>
<shader type="GLSL" vs="GLSL/BakeLightVS.glsl" fs="GLSL/BakeDirectionalLightFS.glsl" fs_source="GLSL/BakeDirectionalLightFS.d.glsl"/>
<shader type="HLSL" vs="HLSL/BakeLightVS.hlsl" fs="HLSL/BakeDirectionalLightFS.hlsl" fs_source="HLSL/BakeDirectionalLightFS.d.hlsl"/>
</shaderConfig>
3 changes: 1 addition & 2 deletions Samples/SampleFW/Context/CContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,12 @@ CBaseRP* CContext::initRenderPipeline(int w, int h, bool postEffect, bool enable
#ifdef __EMSCRIPTEN__
highQuality = false;
#endif
highQuality = false;

if (!highQuality)
{
m_postProcessor->enableAutoExposure(false);
m_postProcessor->enableManualExposure(true);
m_postProcessor->setManualExposure(2.0f);
m_postProcessor->setManualExposure(1.2f);
m_postProcessor->enableFXAA(false);
m_postProcessor->enableScreenSpaceReflection(false);
}
Expand Down
1 change: 1 addition & 0 deletions Samples/Sponza/Source/CViewInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ void CViewInit::initScene()
context->setPointLight(pointLights);

// context->getDefferredRP()->enableTestIndirect(true);
context->getPostProcessorPipeline()->setManualExposure(2.0f);

initProbes();
}
Expand Down

0 comments on commit db5fb81

Please sign in to comment.