mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Fixed blocks UV
This commit is contained in:
parent
33b61fb499
commit
8161d84e36
2 changed files with 6 additions and 4 deletions
|
|
@ -59,8 +59,10 @@ ImageData* add_atlas_margins(ImageData* image, int grid_size) {
|
|||
if (srcdata[((soy+ly) * srcwidth + sox + lx) * 4 + 3]) {
|
||||
for (int c = 0; c < 3; c++) {
|
||||
int val = srcdata[((soy+ly) * srcwidth + sox + lx) * 4 + c];
|
||||
dstdata[((doy+ly) * dstwidth + dox + lx + 1) * 4 + c] = val;
|
||||
dstdata[((doy+ly + 1) * dstwidth + dox + lx) * 4 + c] = val;
|
||||
if (dstdata[((doy+ly) * dstwidth + dox + lx + 1) * 4 + 3] == 0)
|
||||
dstdata[((doy+ly) * dstwidth + dox + lx + 1) * 4 + c] = val;
|
||||
if (dstdata[((doy+ly + 1) * dstwidth + dox + lx) * 4 + 3] == 0)
|
||||
dstdata[((doy+ly + 1) * dstwidth + dox + lx) * 4 + c] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue