mirror of
https://github.com/Relintai/props.git
synced 2025-02-14 16:50:05 +01:00
Fix the normal's directions.
This commit is contained in:
parent
104a1c63d0
commit
12a4e03376
@ -548,22 +548,22 @@ void PropMesher::add_tiled_wall_simple(const int width, const int height, const
|
|||||||
|
|
||||||
void PropMesher::add_tiled_wall_mesh_rect_simple(const int x, const int y, const Transform &transform, const Rect2 &texture_rect) {
|
void PropMesher::add_tiled_wall_mesh_rect_simple(const int x, const int y, const Transform &transform, const Rect2 &texture_rect) {
|
||||||
//x + 1, y
|
//x + 1, y
|
||||||
add_normal(transform.xform(Vector3(0, 0, 1)));
|
add_normal(transform.xform(Vector3(0, 0, -1)));
|
||||||
add_uv(transform_uv(Vector2(1, 1), texture_rect));
|
add_uv(transform_uv(Vector2(1, 1), texture_rect));
|
||||||
add_vertex(transform.xform(Vector3(x + 1, y, 0)));
|
add_vertex(transform.xform(Vector3(x + 1, y, 0)));
|
||||||
|
|
||||||
//x, y
|
//x, y
|
||||||
add_normal(transform.xform(Vector3(0, 0, 1)));
|
add_normal(transform.xform(Vector3(0, 0, -1)));
|
||||||
add_uv(transform_uv(Vector2(0, 1), texture_rect));
|
add_uv(transform_uv(Vector2(0, 1), texture_rect));
|
||||||
add_vertex(transform.xform(Vector3(x, y, 0)));
|
add_vertex(transform.xform(Vector3(x, y, 0)));
|
||||||
|
|
||||||
//x, y + 1
|
//x, y + 1
|
||||||
add_normal(transform.xform(Vector3(0, 0, 1)));
|
add_normal(transform.xform(Vector3(0, 0, -1)));
|
||||||
add_uv(transform_uv(Vector2(0, 0), texture_rect));
|
add_uv(transform_uv(Vector2(0, 0), texture_rect));
|
||||||
add_vertex(transform.xform(Vector3(x, y + 1, 0)));
|
add_vertex(transform.xform(Vector3(x, y + 1, 0)));
|
||||||
|
|
||||||
//x + 1, y + 1
|
//x + 1, y + 1
|
||||||
add_normal(transform.xform(Vector3(0, 0, 1)));
|
add_normal(transform.xform(Vector3(0, 0, -1)));
|
||||||
add_uv(transform_uv(Vector2(1, 0), texture_rect));
|
add_uv(transform_uv(Vector2(1, 0), texture_rect));
|
||||||
add_vertex(transform.xform(Vector3(x + 1, y + 1, 0)));
|
add_vertex(transform.xform(Vector3(x + 1, y + 1, 0)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user