From 182ccf7e96dafc9b878a81e4740d6c749e66d2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Thu, 17 May 2012 16:18:29 +0000 Subject: [PATCH] paysages : Small change. git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@329 b1fd45b6-86a6-48da-8261-f70d1f35bdcc --- lib_paysages/clouds.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib_paysages/clouds.c b/lib_paysages/clouds.c index 2b377e3..89907e8 100644 --- a/lib_paysages/clouds.c +++ b/lib_paysages/clouds.c @@ -493,13 +493,16 @@ static Color _applyLayerLighting(CloudsLayerDefinition* definition, Renderer* re { Vector3 normal; - normal = v3Scale(_getNormal(definition, position, 3.0), 0.25); + normal = _getNormal(definition, position, 3.0); if (renderer->render_quality > 5) { - normal = v3Add(normal, v3Scale(_getNormal(definition, position, 2.0), 0.25)); - normal = v3Add(normal, v3Scale(_getNormal(definition, position, 1.0), 0.25)); + normal = v3Add(normal, _getNormal(definition, position, 2.0)); + normal = v3Add(normal, _getNormal(definition, position, 1.0)); + } + if (renderer->render_quality > 5) + { + normal = v3Add(normal, _getNormal(definition, position, 0.5)); } - normal = v3Add(normal, v3Scale(_getNormal(definition, position, 0.5), 0.25)); normal = v3Scale(v3Normalize(normal), definition->hardness); return renderer->applyLightingToSurface(renderer, position, normal, definition->material);