Skip to content

Commit

Permalink
[forest] improved grass material
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Feb 21, 2025
1 parent 023a349 commit 5c4650e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion runtime/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,11 @@ namespace spartan
// create a material
shared_ptr<Material> material = make_shared<Material>();
material->SetResourceFilePath(ResourceCache::GetProjectDirectory() + "grass_blade_material" + string(EXTENSION_MATERIAL));
material->SetProperty(MaterialProperty::AnimationFoliageWind, 1.0f);
material->SetProperty(MaterialProperty::GrassBlade, 1.0f);
material->SetProperty(MaterialProperty::Roughness, 0.6f);
material->SetProperty(MaterialProperty::Clearcoat, 1.0f);
material->SetProperty(MaterialProperty::Clearcoat_Roughness, 0.7f);
material->SetProperty(MaterialProperty::CullMode, static_cast<float>(RHI_CullMode::None));
material->SetColor(Color::standard_white);
renderable->SetMaterial(material);

Expand Down
2 changes: 1 addition & 1 deletion runtime/Geometry/GeometryProcessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace spartan::geometry_processing
{
static void register_meshoptimizer()
{
static bool registered = false;
static std::atomic<bool> registered = false;
if (registered)
return;

Expand Down

0 comments on commit 5c4650e

Please sign in to comment.