paysages : Refactoring terrain and textures - WIP.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@210 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
e58660e47d
commit
201bd75625
2 changed files with 3 additions and 2 deletions
|
@ -260,12 +260,12 @@ static void _renderQuad(double x, double z, double size)
|
||||||
|
|
||||||
double terrainGetHeight(double x, double z)
|
double terrainGetHeight(double x, double z)
|
||||||
{
|
{
|
||||||
return _getHeight(&_definition, x, z, 0.01 / (double)render_quality);
|
return _getHeight(&_definition, x, z, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
double terrainGetHeightNormalized(double x, double z)
|
double terrainGetHeightNormalized(double x, double z)
|
||||||
{
|
{
|
||||||
return 0.5 + _getHeight(&_definition, x, z, 0.01 / (double)render_quality) / (_max_height * 2.0);
|
return 0.5 + _getHeight(&_definition, x, z, 0.0) / (_max_height * 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Color terrainGetColorCustom(double x, double z, double detail, TerrainDefinition* definition, TerrainQuality* quality, TerrainEnvironment* environment)
|
Color terrainGetColorCustom(double x, double z, double detail, TerrainDefinition* definition, TerrainQuality* quality, TerrainEnvironment* environment)
|
||||||
|
|
|
@ -123,6 +123,7 @@ static inline Vector3 _getNormal(TextureDefinition* definition, Vector3 point, d
|
||||||
|
|
||||||
ref.x = 0.0;
|
ref.x = 0.0;
|
||||||
ref.y = 0.0;
|
ref.y = 0.0;
|
||||||
|
point.y = terrainGetHeight(point.x, point.z) + noiseGet2DTotal(definition->bump_noise, point.x, point.z);
|
||||||
|
|
||||||
dpoint.x = point.x - scale;
|
dpoint.x = point.x - scale;
|
||||||
dpoint.z = point.z;
|
dpoint.z = point.z;
|
||||||
|
|
Loading…
Reference in a new issue