mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-20 04:19:40 +00:00
Add gbuffer_lightning (#1787)
This commit is contained in:
1 parent
24dae49c7f
commit
2317379df2
9 files changed
+110
-5
No files matched your search
@@ -18,6 +18,7 @@ public enum RenderCondition {
|
||||
HAND_TRANSLUCENT,
|
||||
RAIN_SNOW,
|
||||
WORLD_BORDER,
|
||||
LIGHTNING,
|
||||
SHADOW_TRANSLUCENT,
|
||||
// NB: Must be last due to implementation details of DeferredWorldRenderingPipeline
|
||||
SHADOW
|
||||
|
||||
@@ -3,5 +3,6 @@ package net.coderbot.iris.gbuffer_overrides.matching;
|
||||
public enum SpecialCondition {
|
||||
ENTITY_EYES,
|
||||
BEACON_BEAM,
|
||||
GLINT
|
||||
GLINT,
|
||||
LIGHTNING
|
||||
}
|
||||
@@ -395,6 +395,7 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
|
||||
null, null, ProgramId.Weather,
|
||||
// world border uses textured_lit even though it has no lightmap :/
|
||||
null, ProgramId.TexturedLit, ProgramId.TexturedLit,
|
||||
ProgramId.Lightning, ProgramId.Lightning, ProgramId.Lightning,
|
||||
ProgramId.ShadowWater, ProgramId.ShadowWater, ProgramId.ShadowWater,
|
||||
ProgramId.Shadow, ProgramId.Shadow, ProgramId.Shadow
|
||||
};
|
||||
@@ -724,6 +725,8 @@ public class DeferredWorldRenderingPipeline implements WorldRenderingPipeline, R
|
||||
return RenderCondition.ENTITY_EYES;
|
||||
} else if (special == SpecialCondition.GLINT) {
|
||||
return RenderCondition.GLINT;
|
||||
} else if (special == SpecialCondition.LIGHTNING) {
|
||||
return RenderCondition.LIGHTNING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ProgramSet {
|
||||
private final ProgramSource gbuffersEntities;
|
||||
private final ProgramSource gbuffersEntitiesTrans;
|
||||
private final ProgramSource gbuffersEntitiesGlowing;
|
||||
private final ProgramSource gbuffersLightning;
|
||||
private final ProgramSource gbuffersGlint;
|
||||
private final ProgramSource gbuffersEntityEyes;
|
||||
private final ProgramSource gbuffersBlock;
|
||||
@@ -120,6 +121,7 @@ public class ProgramSet {
|
||||
this.gbuffersEntities = readProgramSource(directory, sourceProvider, "gbuffers_entities", this, shaderProperties);
|
||||
this.gbuffersEntitiesTrans = readProgramSource(directory, sourceProvider, "gbuffers_entities_translucent", this, shaderProperties);
|
||||
this.gbuffersEntitiesGlowing = readProgramSource(directory, sourceProvider, "gbuffers_entities_glowing", this, shaderProperties);
|
||||
this.gbuffersLightning = readProgramSource(directory, sourceProvider, "gbuffers_lightning", this, shaderProperties);
|
||||
this.gbuffersGlint = readProgramSource(directory, sourceProvider, "gbuffers_armor_glint", this, shaderProperties);
|
||||
this.gbuffersEntityEyes = readProgramSource(directory, sourceProvider, "gbuffers_spidereyes", this, shaderProperties);
|
||||
this.gbuffersBlock = readProgramSource(directory, sourceProvider, "gbuffers_block", this, shaderProperties);
|
||||
@@ -229,7 +231,7 @@ public class ProgramSet {
|
||||
programs.addAll (Arrays.asList(
|
||||
gbuffersBasic, gbuffersBeaconBeam, gbuffersTextured, gbuffersTexturedLit, gbuffersTerrain,
|
||||
gbuffersDamagedBlock, gbuffersSkyBasic, gbuffersSkyTextured, gbuffersClouds, gbuffersWeather,
|
||||
gbuffersEntities, gbuffersEntitiesTrans, gbuffersEntitiesGlowing, gbuffersGlint, gbuffersEntityEyes, gbuffersBlock, gbuffersBlockTrans,
|
||||
gbuffersEntities, gbuffersEntitiesTrans, gbuffersEntitiesGlowing, gbuffersLightning, gbuffersGlint, gbuffersEntityEyes, gbuffersBlock, gbuffersBlockTrans,
|
||||
gbuffersHand, dhShadow, dhTerrain, dhGeneric, dhWater
|
||||
));
|
||||
|
||||
@@ -382,6 +384,10 @@ public class ProgramSet {
|
||||
return gbuffersEntitiesGlowing.requireValid();
|
||||
}
|
||||
|
||||
public Optional<ProgramSource> getGbuffersLightning() {
|
||||
return gbuffersLightning.requireValid();
|
||||
}
|
||||
|
||||
public Optional<ProgramSource> getGbuffersGlint() {
|
||||
return gbuffersGlint.requireValid();
|
||||
}
|
||||
@@ -437,6 +443,7 @@ public class ProgramSet {
|
||||
case Entities -> getGbuffersEntities();
|
||||
case EntitiesTrans -> getGbuffersEntitiesTrans();
|
||||
case EntitiesGlowing -> getGbuffersEntitiesGlowing();
|
||||
case Lightning -> getGbuffersLightning();
|
||||
case ArmorGlint -> getGbuffersGlint();
|
||||
case SpiderEyes -> getGbuffersEntityEyes();
|
||||
case Hand -> getGbuffersHand();
|
||||
|
||||
@@ -39,6 +39,7 @@ public enum ProgramId {
|
||||
Entities(ProgramGroup.Gbuffers, "entities", TexturedLit),
|
||||
EntitiesTrans(ProgramGroup.Gbuffers, "entities_translucent", Entities),
|
||||
EntitiesGlowing(ProgramGroup.Gbuffers, "entities_glowing", Entities),
|
||||
Lightning(ProgramGroup.Gbuffers, "lightning", Entities),
|
||||
ArmorGlint(ProgramGroup.Gbuffers, "armor_glint", Textured),
|
||||
SpiderEyes(ProgramGroup.Gbuffers, "spidereyes", Textured,
|
||||
new BlendModeOverride(new BlendState(GL11.GL_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO, GL11.GL_ONE)),
|
||||
|
||||
@@ -42,6 +42,10 @@ public final class EntityIdHelper {
|
||||
private EntityIdHelper() {
|
||||
}
|
||||
|
||||
public static boolean isLightningBolt(Entity entity) {
|
||||
return entity instanceof EntityLightningBolt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the entity ID for the given entity.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user