From 4229a9dc4f0c85b3a618eaf9722c8c819435c3ac Mon Sep 17 00:00:00 2001 From: AEspinosaDev Date: Tue, 29 Oct 2024 18:44:59 +0100 Subject: [PATCH] Fix in hair strand shader --- include/engine/core/materials/hair.h | 4 ++-- resources/shaders/forward/hair_strand.glsl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/engine/core/materials/hair.h b/include/engine/core/materials/hair.h index b30ce2a..2cc7785 100644 --- a/include/engine/core/materials/hair.h +++ b/include/engine/core/materials/hair.h @@ -26,13 +26,13 @@ class HairMaterial : public IMaterial float m_thickness{0.003f}; bool m_R{true}; // Reflection - float m_Rpower{5.0f}; + float m_Rpower{1.0f}; bool m_TT{true}; // Transmitance float m_TTpower{1.0f}; bool m_TRT{true}; // Second reflection - float m_TRTpower{15.0f}; + float m_TRTpower{25.0f}; float m_roughness{0.4f}; float m_scatter{500.0f}; diff --git a/resources/shaders/forward/hair_strand.glsl b/resources/shaders/forward/hair_strand.glsl index 1b889f7..0736de7 100644 --- a/resources/shaders/forward/hair_strand.glsl +++ b/resources/shaders/forward/hair_strand.glsl @@ -255,6 +255,7 @@ vec3 computeAmbient(vec3 n) { // material.r, // false, // material.trt); + ambient = (scene.ambientIntensity * scene.ambientColor) * material.baseColor; }else{ ambient = (scene.ambientIntensity * scene.ambientColor) * material.baseColor;