paysages : Small fixes.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@255 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
e940bb0165
commit
dc88cc5f47
4 changed files with 17 additions and 3 deletions
3
TODO
3
TODO
|
@ -1,8 +1,7 @@
|
|||
- Restore render progress
|
||||
- Clouds are lighted without filtering from ground (clouds lighted at night !)
|
||||
- Camera should respect ratio aspect of render area.
|
||||
- All noises should use the same entropy pool (saved separately), and avoid reallocs.
|
||||
- Implement light multi-sampling (mainly for skydome).
|
||||
- Implement scaling and scrolling on previews.
|
||||
- Water and terrain LOD moves with the camera, fix it like in the wanderer.
|
||||
- Find the random segfault at start (in PreviewTerrainColor::getColor).
|
||||
- Restore render progress.
|
||||
|
|
|
@ -31,6 +31,9 @@ static int _getCoreCount()
|
|||
#endif
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
core_count = (int)sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
#ifdef DEBUG_ONETHREAD
|
||||
core_count = 1;
|
||||
#endif
|
||||
return core_count;
|
||||
}
|
||||
|
|
|
@ -174,6 +174,16 @@ Color terrainLightFilter(TerrainDefinition* definition, Renderer* renderer, Colo
|
|||
{
|
||||
return light;
|
||||
}
|
||||
else if (direction_to_light.y < 0.05)
|
||||
{
|
||||
return COLOR_BLACK;
|
||||
}
|
||||
else if (direction_to_light.y < 0.0000)
|
||||
{
|
||||
light.r *= (0.05 + direction_to_light.y) / 0.05;
|
||||
light.g *= (0.05 + direction_to_light.y) / 0.05;
|
||||
light.b *= (0.05 + direction_to_light.y) / 0.05;
|
||||
}
|
||||
|
||||
inc_factor = (double)renderer->render_quality;
|
||||
inc_base = 1.0;
|
||||
|
@ -228,6 +238,7 @@ static Color _getColor(TerrainDefinition* definition, Renderer* renderer, Vector
|
|||
|
||||
color = renderer->applyTextures(renderer, point, precision);
|
||||
color = renderer->applyAtmosphere(renderer, point, color);
|
||||
color = renderer->applyClouds(renderer, color, renderer->camera_location, point);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
|
|
@ -219,6 +219,7 @@ WaterResult waterGetColorDetail(WaterDefinition* definition, Renderer* renderer,
|
|||
material.base = color;
|
||||
color = renderer->applyLightingToSurface(renderer, location, normal, material);
|
||||
color = renderer->applyAtmosphere(renderer, location, color);
|
||||
color = renderer->applyClouds(renderer, color, renderer->camera_location, location);
|
||||
|
||||
result.base = definition->material.base;
|
||||
result.final = color;
|
||||
|
|
Loading…
Reference in a new issue