Skip to content

Commit

Permalink
Inner wood material. (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonlee0212 authored Jan 16, 2025
1 parent 2aaf147 commit 28b048c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void main(){
uint material_index = instance.material_index;
if(fs_in.Color.x > 1e-6f){
material_index = uint(snow_material_index);
}else if(fs_in.Color.y > 1e-6f){
}else if(fs_in.Color.y > 0.5f){
material_index = uint(inner_wood_material_index);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ void SetUpTriangleVertex(uint vertex_index, vec3 vertex_normal, uint particle_in
}
float tex_y = float(uniform_particle.segment_index) * v_multiplier;
ms_v_out[vertex_index].TexCoord = vec2(tex_x, tex_y);
ms_v_out[vertex_index].Color = uniform_particle.override_color;
vec4 vertex_color = uniform_particle.override_color;
if(is_bark == 0){
vertex_color.y = 1.f;
}
ms_v_out[vertex_index].Color = vertex_color;

if(vertex_colors == 0){

} else if(vertex_colors == 1){
Expand Down
6 changes: 3 additions & 3 deletions EvoEngine_Plugins/EcoSysLab/src/DynamicTreeStrands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,21 @@ void DynamicTreeStrands::OnCreate() {
bark_material_ref = material;
material->material_properties.roughness = 0.5f;
material->material_properties.metallic = 0.1f;
material->material_properties.albedo_color = glm::vec3(0.6f, 0.3f, 0.0f);
material->material_properties.albedo_color = glm::vec3(0.4f, 0.3f, 0.2f);
}
if (!inner_wood_material_ref.Get<Material>()) {
const auto material = ProjectManager::CreateTemporaryAsset<Material>();
inner_wood_material_ref = material;
material->material_properties.roughness = 0.5f;
material->material_properties.metallic = 0.0f;
material->material_properties.albedo_color = glm::vec3(0.6f, 0.3f, 0.0f);
material->material_properties.albedo_color = glm::vec3(1.f, 0.6f, 0.3f);
}
if (!splinter_material_ref.Get<Material>()) {
const auto material = ProjectManager::CreateTemporaryAsset<Material>();
splinter_material_ref = material;
material->material_properties.roughness = 0.5f;
material->material_properties.metallic = 0.0f;
material->material_properties.albedo_color = glm::vec3(0.6f, 0.3f, 0.0f);
material->material_properties.albedo_color = glm::vec3(1.f, 0.6f, 0.3f);
}
if (!leaf_material_ref.Get<Material>()) {
const auto material = ProjectManager::CreateTemporaryAsset<Material>();
Expand Down

0 comments on commit 28b048c

Please sign in to comment.