Skip to content

Commit

Permalink
Fixed Firefly Rendering for Iris/Complementary (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
quiqueck committed Jan 27, 2022
1 parent 32d7471 commit 3994619
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static LayerDefinition getTexturedModelData() {

modelPartData.addOrReplaceChild(GLOW, CubeListBuilder.create()
.texOffs(0, 10)
.addBox(0F, 0F, 0F, 5F, 5F, 5F), PartPose.offset(-2.5F, 18F, -2.5F));
.addBox(0F, 0F, 0F, 5.2F, 5.2F, 5.2F), PartPose.offset(-2.6F, 18.1F, -2.6F));
/*glow = new ModelPart(this, 0, 10);
glow.addCuboid(0F, 0F, 0F, 6F, 6F, 6F);
glow.setPivot(-0.5F, -0.5F, -0.5F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public RenderPhaseAccessor(String name, Runnable beginAction, Runnable endAction
protected static final RenderStateShard.TransparencyStateShard ALPHA_ADD_TRANSPARENCY = new RenderStateShard.TransparencyStateShard("alpha_transparency", () -> {
RenderSystem.enableBlend();
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
//RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
}, () -> {
RenderSystem.disableBlend();
RenderSystem.defaultBlendFunc();
Expand All @@ -32,7 +32,8 @@ private static final RenderType getFireflySetup(ResourceLocation texture){

RenderType.CompositeState multiPhaseParameters = RenderType.CompositeState.builder()
//.shader(MY_DEBUG_SHADER)
.setShaderState(RENDERTYPE_EYES_SHADER)
//.setShaderState(RENDERTYPE_EYES_SHADER)
.setShaderState(RenderStateShard.RENDERTYPE_TRANSLUCENT_SHADER)
.setTextureState(new RenderStateShard.TextureStateShard(texture, false, false))
.setWriteMaskState(COLOR_WRITE)
.setCullState(NO_CULL)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3994619

Please sign in to comment.