More realistic texture presets

This commit is contained in:
Michaël Lemaire 2013-06-11 18:00:59 +02:00
parent b15ea439d2
commit 4033162040
2 changed files with 8 additions and 8 deletions

View file

@ -57,13 +57,13 @@ static void _layerValidateDefinition(TexturesLayerDefinition* definition)
} }
noiseClearLevels(definition->_displacement_noise); noiseClearLevels(definition->_displacement_noise);
noiseAddLevelsSimple(definition->_displacement_noise, 4, 1.0, -1.0, 1.0, 0.0); noiseAddLevelsSimple(definition->_displacement_noise, 7, 1.0, -1.0, 1.0, 0.0);
noiseNormalizeAmplitude(definition->_displacement_noise, -1.0, 1.0, 0); noiseNormalizeAmplitude(definition->_displacement_noise, -1.0, 1.0, 0);
noiseValidate(definition->_displacement_noise); noiseValidate(definition->_displacement_noise);
noiseClearLevels(definition->_detail_noise); noiseClearLevels(definition->_detail_noise);
noiseAddLevelsSimple(definition->_detail_noise, 4, 0.1, -1.0, 1.0, 0.0); noiseAddLevelsSimple(definition->_detail_noise, 5, 0.1, -1.0, 1.0, 0.0);
noiseNormalizeAmplitude(definition->_detail_noise, -0.005, 0.005, 0); noiseNormalizeAmplitude(definition->_detail_noise, -0.01, 0.01, 0);
noiseValidate(definition->_detail_noise); noiseValidate(definition->_detail_noise);
} }

View file

@ -35,14 +35,14 @@ void texturesLayerAutoPreset(TexturesLayerDefinition* definition, TexturesLayerP
switch (preset) switch (preset)
{ {
case TEXTURES_LAYER_PRESET_ROCK: case TEXTURES_LAYER_PRESET_ROCK:
definition->displacement_height = 0.1; definition->displacement_height = 0.3;
definition->displacement_scaling = 2.0; definition->displacement_scaling = 2.0;
definition->displacement_offset = 0.0; definition->displacement_offset = 0.0;
definition->material.base.r = 0.6; definition->material.base.r = 0.6;
definition->material.base.g = 0.55; definition->material.base.g = 0.55;
definition->material.base.b = 0.57; definition->material.base.b = 0.57;
definition->material.reflection = 0.02; definition->material.reflection = 0.006;
definition->material.shininess = 3.0; definition->material.shininess = 6.0;
break; break;
case TEXTURES_LAYER_PRESET_GRASS: case TEXTURES_LAYER_PRESET_GRASS:
zoneAddHeightRangeQuick(definition->terrain_zone, 1.0, -6.0, -5.0, 3.0, 15.0); zoneAddHeightRangeQuick(definition->terrain_zone, 1.0, -6.0, -5.0, 3.0, 15.0);
@ -53,8 +53,8 @@ void texturesLayerAutoPreset(TexturesLayerDefinition* definition, TexturesLayerP
definition->material.base.r = 0.12; definition->material.base.r = 0.12;
definition->material.base.g = 0.19; definition->material.base.g = 0.19;
definition->material.base.b = 0.035; definition->material.base.b = 0.035;
definition->material.reflection = 0.003; definition->material.reflection = 0.001;
definition->material.shininess = 2.0; definition->material.shininess = 4.0;
break; break;
case TEXTURES_LAYER_PRESET_SAND: case TEXTURES_LAYER_PRESET_SAND:
zoneAddHeightRangeQuick(definition->terrain_zone, 1.0, -5.5, -4.5, -4.0, -3.0); zoneAddHeightRangeQuick(definition->terrain_zone, 1.0, -5.5, -4.5, -4.0, -3.0);