Skip to content

Commit

Permalink
[Shadows] Fixed an issue where the cascade line was visible
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Dec 19, 2023
1 parent 1595c23 commit d40b685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/shaders/shadow_mapping.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// technique - all
static const uint g_shadow_samples = 3;
static const float g_shadow_filter_size = 2.0f;
static const float g_shadow_cascade_blend_threshold = 0.8f;
static const float g_shadow_cascade_blend_threshold = 0.7f; // above that, you start to see the cascade line
// technique - vogel
static const uint g_penumbra_samples = 8;
static const float g_penumbra_filter_size = 128.0f;
Expand Down
6 changes: 2 additions & 4 deletions runtime/World/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,9 @@ namespace Spartan
material->SetTexture(MaterialTexture::Normal, "project\\terrain\\water_normal.jpeg");
material->SetProperty(MaterialProperty::Ior, 1.33f); // water
material->SetProperty(MaterialProperty::Roughness, 0.0f);
material->SetProperty(MaterialProperty::Clearcoat, 1.0f); // just a bit of roughness to diffuse the sun a little
material->SetProperty(MaterialProperty::Clearcoat_Roughness, 0.25f); // just a bit of roughness to diffuse the sun a little
material->SetProperty(MaterialProperty::Normal, 0.1f);
material->SetProperty(MaterialProperty::TextureTilingX, 1000.0f);
material->SetProperty(MaterialProperty::TextureTilingY, 1000.0f);
material->SetProperty(MaterialProperty::TextureTilingX, 2000.0f);
material->SetProperty(MaterialProperty::TextureTilingY, 2000.0f);
material->SetProperty(MaterialProperty::VertexAnimateWater, 1.0f);

// create a file path for this material (required for the material to be able to be cached by the resource cache)
Expand Down

0 comments on commit d40b685

Please sign in to comment.