@@ -53,23 +53,23 @@ void update()
5353 GuiCheckBoxComponent &cb = e->value <GuiCheckBoxComponent>();
5454 enableEffect (ScreenSpaceEffectsFlags::AmbientOcclusion, cb.state == CheckBoxStateEnum::Checked);
5555 }
56- { // world radius
56+ { // rays length
5757 Entity *e = ents->get (baseName + 1 );
5858 GuiInputComponent &in = e->value <GuiInputComponent>();
5959 if (in.valid )
60- eff.ssao .worldRadius = toFloat (in.value );
60+ eff.ssao .raysLength = toFloat (in.value );
6161 }
6262 { // strength
6363 Entity *e = ents->get (baseName + 2 );
6464 GuiInputComponent &in = e->value <GuiInputComponent>();
6565 if (in.valid )
6666 eff.ssao .strength = toFloat (in.value );
6767 }
68- { // bias
68+ { // threshold
6969 Entity *e = ents->get (baseName + 3 );
7070 GuiInputComponent &in = e->value <GuiInputComponent>();
7171 if (in.valid )
72- eff.ssao .bias = toFloat (in.value );
72+ eff.ssao .threshold = toFloat (in.value );
7373 }
7474 { // power
7575 Entity *e = ents->get (baseName + 4 );
@@ -351,9 +351,9 @@ void initializeGui()
351351 table->value <GuiLayoutTableComponent>();
352352 }
353353 sint32 childIndex = 1 ;
354- genInputFloat (table, childIndex, baseName, " World radius :" , 0.1 , 3 , 0.05 , ScreenSpaceEffectsComponent ().ssao .worldRadius );
354+ genInputFloat (table, childIndex, baseName, " Rays length :" , 0.1 , 3 , 0.05 , ScreenSpaceEffectsComponent ().ssao .raysLength );
355355 genInputFloat (table, childIndex, baseName, " Strength:" , 0 , 3 , 0.1 , ScreenSpaceEffectsComponent ().ssao .strength );
356- genInputFloat (table, childIndex, baseName, " Bias :" , -0.5 , 0.5 , 0.01 , ScreenSpaceEffectsComponent ().ssao .bias );
356+ genInputFloat (table, childIndex, baseName, " Threshold :" , -0.5 , 0.5 , 0.01 , ScreenSpaceEffectsComponent ().ssao .threshold );
357357 genInputFloat (table, childIndex, baseName, " Power:" , 0.1 , 2 , 0.02 , ScreenSpaceEffectsComponent ().ssao .power );
358358 genInputInt (table, childIndex, baseName, " Samples:" , 1 , 128 , 1 , ScreenSpaceEffectsComponent ().ssao .samplesCount );
359359 genInputInt (table, childIndex, baseName, " Blur passes:" , 0 , 10 , 1 , ScreenSpaceEffectsComponent ().ssao .blurPasses );
@@ -619,6 +619,7 @@ int main(int argc, char *args[])
619619 c.ambientIntensity = 0.05 ;
620620 c.near = 0.1 ;
621621 c.far = 100 ;
622+ c.shadowmapFrustumDepthFraction = 0.5 ;
622623 e->value <ScreenSpaceEffectsComponent>();
623624 }
624625 { // skybox
@@ -634,8 +635,9 @@ int main(int argc, char *args[])
634635 e->value <LightComponent>().lightType = LightTypeEnum::Directional;
635636 e->value <ColorComponent>().intensity = 3 ;
636637 ShadowmapComponent &s = e->value <ShadowmapComponent>();
637- s.resolution = 2048 ;
638- s.directionalWorldSize = 30 ;
638+ s.resolution = 1024 ;
639+ s.cascadesPaddingDistance = 20 ;
640+ s.cascadesSplitLogFactor = 0.6 ;
639641 }
640642 { // floor
641643 Entity *e = ents->createAnonymous ();
0 commit comments