mirror of
https://github.com/Relintai/props_2d.git
synced 2025-02-12 16:50:18 +01:00
Look for terraman 2d instead of just terraman.
This commit is contained in:
parent
875f338a88
commit
8eaa94f0dc
4
SCsub
4
SCsub
@ -15,8 +15,8 @@ if os.path.isdir('../texture_packer'):
|
|||||||
has_texture_packer = True
|
has_texture_packer = True
|
||||||
module_env.Append(CPPDEFINES=['TEXTURE_PACKER_PRESENT'])
|
module_env.Append(CPPDEFINES=['TEXTURE_PACKER_PRESENT'])
|
||||||
|
|
||||||
if os.path.isdir('../terraman'):
|
if os.path.isdir('../terraman_2d'):
|
||||||
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
|
module_env.Append(CPPDEFINES=['TERRAMAN_2D_PRESENT'])
|
||||||
|
|
||||||
if os.path.isdir('../mesh_utils'):
|
if os.path.isdir('../mesh_utils'):
|
||||||
module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT'])
|
module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT'])
|
||||||
|
@ -951,8 +951,9 @@ void Prop2DMesher::bake_colors_lights() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TERRAMAN_PRESENT
|
#ifdef TERRAMAN_2D_PRESENT
|
||||||
void Prop2DMesher::bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &lights) {
|
void Prop2DMesher::bake_lights(MeshInstance *node, Vector<Ref<Terrain2DLight>> &lights) {
|
||||||
|
/*
|
||||||
ERR_FAIL_COND(node == NULL);
|
ERR_FAIL_COND(node == NULL);
|
||||||
|
|
||||||
Color darkColor(0, 0, 0, 1);
|
Color darkColor(0, 0, 0, 1);
|
||||||
@ -992,15 +993,6 @@ void Prop2DMesher::bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &li
|
|||||||
|
|
||||||
value *= light->get_size();
|
value *= light->get_size();
|
||||||
v_lightDiffuse += value;
|
v_lightDiffuse += value;
|
||||||
|
|
||||||
/*
|
|
||||||
float dist2 = Mathf.Clamp(Vector3.Distance(transformedLights[i], vertices), 0f, 15f);
|
|
||||||
dist2 /= 35f;
|
|
||||||
|
|
||||||
Vector3 value = Vector3.one;
|
|
||||||
value *= ((float) lights[i].Strength) / 255f;
|
|
||||||
value *= (1 - dist2);
|
|
||||||
v_lightDiffuse += value;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Color f = vertexv.color;
|
Color f = vertexv.color;
|
||||||
@ -1037,6 +1029,7 @@ void Prop2DMesher::bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &li
|
|||||||
// for (int i = 0; i < _colors->size(); ++i) {
|
// for (int i = 0; i < _colors->size(); ++i) {
|
||||||
// print_error(_colors->get(i));
|
// print_error(_colors->get(i));
|
||||||
// }
|
// }
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ using PoolVector = Vector<N>;
|
|||||||
#include "../mesh_data_resource/mesh_data_resource.h"
|
#include "../mesh_data_resource/mesh_data_resource.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TERRAMAN_PRESENT
|
#ifdef TERRAMAN_2D_PRESENT
|
||||||
#include "../terraman/data/terrain_light.h"
|
#include "../terraman_2d/data/terrain_2d_light.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class OpenSimplexNoise;
|
class OpenSimplexNoise;
|
||||||
@ -172,8 +172,8 @@ public:
|
|||||||
void bake_colors_lights_rao();
|
void bake_colors_lights_rao();
|
||||||
void bake_colors_lights();
|
void bake_colors_lights();
|
||||||
|
|
||||||
#ifdef TERRAMAN_PRESENT
|
#ifdef TERRAMAN_2D_PRESENT
|
||||||
void bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &lights);
|
void bake_lights(MeshInstance *node, Vector<Ref<Terrain2DLight>> &lights);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Array build_mesh();
|
Array build_mesh();
|
||||||
|
Loading…
Reference in New Issue
Block a user