Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
d642cc1d
Unverified
Commit
d642cc1d
authored
Jun 04, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39271 from RandomShaper/fix_atlas_crop
Fix excessive bottom cropping in atlas generation
parents
910ddd28
fb7ae730
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
resource_importer_texture_atlas.cpp
editor/import/resource_importer_texture_atlas.cpp
+2
-1
No files found.
editor/import/resource_importer_texture_atlas.cpp
View file @
d642cc1d
...
@@ -130,7 +130,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
...
@@ -130,7 +130,8 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
double
dx_low
=
double
(
x
[
2
]
-
x
[
1
])
/
(
y
[
2
]
-
y
[
1
]
+
1
);
double
dx_low
=
double
(
x
[
2
]
-
x
[
1
])
/
(
y
[
2
]
-
y
[
1
]
+
1
);
double
xf
=
x
[
0
];
double
xf
=
x
[
0
];
double
xt
=
x
[
0
]
+
dx_upper
;
// if y[0] == y[1], special case
double
xt
=
x
[
0
]
+
dx_upper
;
// if y[0] == y[1], special case
for
(
int
yi
=
y
[
0
];
yi
<=
(
y
[
2
]
>
height
-
1
?
height
-
1
:
y
[
2
]);
yi
++
)
{
int
max_y
=
MIN
(
y
[
2
],
height
-
p_offset
.
y
-
1
);
for
(
int
yi
=
y
[
0
];
yi
<=
max_y
;
yi
++
)
{
if
(
yi
>=
0
)
{
if
(
yi
>=
0
)
{
for
(
int
xi
=
(
xf
>
0
?
int
(
xf
)
:
0
);
xi
<=
(
xt
<
width
?
xt
:
width
-
1
);
xi
++
)
{
for
(
int
xi
=
(
xf
>
0
?
int
(
xf
)
:
0
);
xi
<=
(
xt
<
width
?
xt
:
width
-
1
);
xi
++
)
{
int
px
=
xi
,
py
=
yi
;
int
px
=
xi
,
py
=
yi
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment