initial commit for entity-atlases (#2272)

This commit is contained in:
Eclipse-Sol authored and GitHub committed 2026-10-18 19:31:16 -07:00
1 parent fa8842a64b
commit 2d9d1a45b7
31 files changed
+978 -141

No files matched your search

@@ -2610,7 +2610,7 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
private static final ProgramId[] INSTANCED_PROGRAM_IDS = {
ProgramId.Block, ProgramId.BlockTrans, ProgramId.Entities, ProgramId.EntitiesTrans,
ProgramId.Shadow, ProgramId.ShadowWater, ProgramId.ArmorGlint
ProgramId.Shadow, ProgramId.ShadowWater, ProgramId.ArmorGlint, ProgramId.SpiderEyes
};
private static final ProgramId[] PARTICLE_PROGRAM_IDS = {
@@ -28,6 +28,7 @@ public class PBRTextureManager {
}
private final Int2ObjectMap<PBRTextureHolder> holders = new Int2ObjectOpenHashMap<>();
private int holderChanges;
private final PBRTextureConsumerImpl consumer = new PBRTextureConsumerImpl();
private NativeImageBackedSingleColorTexture defaultNormalTexture;
@@ -61,15 +62,24 @@ public class PBRTextureManager {
return holder;
}
public boolean hasLoadedPbrTextures(int id) {
return getHolder(id) != defaultHolder;
}
public PBRTextureHolder getOrLoadHolder(int id) {
PBRTextureHolder holder = holders.get(id);
if (holder == null) {
holder = loadHolder(id);
holders.put(id, holder);
holderChanges++;
}
return holder;
}
public int holderChanges() {
return holderChanges;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
private PBRTextureHolder loadHolder(int id) {
AbstractTexture texture = TextureTracker.INSTANCE.getTexture(id);
@@ -96,6 +106,7 @@ public class PBRTextureManager {
PBRTextureHolder holder = holders.remove(id);
if (holder != null) {
closeHolder(holder);
holderChanges++;
}
}
@@ -106,6 +117,7 @@ public class PBRTextureManager {
}
}
holders.clear();
holderChanges++;
}
public void close() {