Fixed terrain preview not using specified material
This commit is contained in:
parent
7f0a13c02b
commit
7ea28826bb
1 changed files with 2 additions and 0 deletions
|
@ -59,11 +59,13 @@ Renderer* terrainCreatePreviewRenderer()
|
||||||
|
|
||||||
TexturesDefinition* textures;
|
TexturesDefinition* textures;
|
||||||
textures = TexturesDefinitionClass.create();
|
textures = TexturesDefinitionClass.create();
|
||||||
|
layersClear(textures->layers);
|
||||||
TexturesLayerDefinition* layer = layersGetLayer(textures->layers, layersAddLayer(textures->layers, NULL));
|
TexturesLayerDefinition* layer = layersGetLayer(textures->layers, layersAddLayer(textures->layers, NULL));
|
||||||
layer->displacement_height = 0.0;
|
layer->displacement_height = 0.0;
|
||||||
layer->material.base = colorToHSL(COLOR_WHITE);
|
layer->material.base = colorToHSL(COLOR_WHITE);
|
||||||
layer->material.reflection = 0.05;
|
layer->material.reflection = 0.05;
|
||||||
layer->material.shininess = 2.0;
|
layer->material.shininess = 2.0;
|
||||||
|
TexturesDefinitionClass.validate(textures);
|
||||||
noiseClearLevels(layer->_detail_noise);
|
noiseClearLevels(layer->_detail_noise);
|
||||||
|
|
||||||
TexturesRendererClass.bind(result, textures);
|
TexturesRendererClass.bind(result, textures);
|
||||||
|
|
Loading…
Reference in a new issue