SOme adjustments

This commit is contained in:
Maximilian Giller 2023-01-27 05:36:27 +01:00
parent 81e9a162be
commit 9b228bff61
2 changed files with 8 additions and 3 deletions

View file

@ -121,8 +121,13 @@ Color CloudShader::lightMarch(const Scene &scene, Vector3d currentInCloudPositio
float transmittance = getDensityTransmittance(density); float transmittance = getDensityTransmittance(density);
float scatter = scatterFactor(normalized(lengthDistance), illumination.direction); float scatter = scatterFactor(normalized(lengthDistance), illumination.direction);
float factor = settings.darknessThreshold + float factor = transmittance;
(1.0f - settings.darknessThreshold) * (transmittance * scatter); // (transmittance * scatter) if (density > 0)
{
factor = settings.darknessThreshold +
(1.0f - settings.darknessThreshold) * factor * scatter;
}
cloudColor += factor * illumination.color; cloudColor += factor * illumination.color;
} }

View file

@ -17,7 +17,7 @@ struct CloudSettings
float scale = 10; float scale = 10;
float densityOffset = -0.57f; float densityOffset = -0.57f;
float densityIntensity = 7.0f; // 7.0f float densityIntensity = 7.0f; // 7.0f
float darknessThreshold = 0.07f; // 0.07f float darknessThreshold = 0.1f; // 0.07f
float shadowIntensity = 0.6f; float shadowIntensity = 0.6f;
float shadowLightAbsorption = 1; float shadowLightAbsorption = 1;
float lightAbsorptionTowardsLight = 1.0f; float lightAbsorptionTowardsLight = 1.0f;