Quick fix for big cloud lighting artifact
This commit is contained in:
parent
da27cc9b1e
commit
c49dec4331
2 changed files with 2 additions and 2 deletions
|
@ -129,7 +129,7 @@ static void _walkerMaterialCallback(CloudsWalker* walker)
|
|||
|
||||
data->out_scattering += 0.5 * density_integral;
|
||||
|
||||
Color in_scattering = renderer->applyLightingToSurface(renderer, segment->start.location, VECTOR_UP, &layer->material);
|
||||
Color in_scattering = renderer->applyLightingToSurface(renderer, segment->start.location, VECTOR_ZERO, &layer->material);
|
||||
in_scattering.r *= density_integral * 5.0;
|
||||
in_scattering.g *= density_integral * 5.0;
|
||||
in_scattering.b *= density_integral * 5.0;
|
||||
|
|
|
@ -175,7 +175,7 @@ Color lightingApplyOneLight(LightDefinition* light, Vector3 eye, Vector3 locatio
|
|||
double specular = v3Dot(reflect, view);
|
||||
if (specular > 0.0)
|
||||
{
|
||||
specular = pow(specular, material->shininess) * material->reflection * light->reflection;
|
||||
specular = pow(specular, material->shininess) * material->reflection * light->reflection * normal_norm;
|
||||
if (specular > 0.0)
|
||||
{
|
||||
result.r += specular * light_color.r;
|
||||
|
|
Loading…
Reference in a new issue