Add Normal in vertex. And add light in shader.

This commit is contained in:
Troispoils 2024-02-28 17:07:45 +01:00
parent 8908ef1332
commit 0e96615b32
16 changed files with 221 additions and 85 deletions

View file

@ -1,12 +1,6 @@
using AC2RE.Definitions;
using ImageMagick;
using LandblockExtraction.DatEngine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace LandblockExtraction.AtlasMaker;
public class AtlasBuilder : IDisposable {
@ -21,7 +15,7 @@ public class AtlasBuilder : IDisposable {
public bool AddTexture(int index, DataId matId) {
var img = texturesImage.GetImage(matId);
if(img == null) return false;
if (img == null) return false;
textures.Add(index, img);
return true;
}
@ -41,7 +35,7 @@ public class AtlasBuilder : IDisposable {
int x = (index % count) * (int)TEXTURESIZE;
int y = (index / count) * (int)TEXTURESIZE;
atlas.Composite(kvp.Value, x, y);
index++;
if (index >= count * count) break;
}