Skip to content

Improve glass pane rendering#270

Merged
Dream-Master merged 34 commits into
GTNewHorizons:masterfrom
Majora320:fix-glass
Jun 4, 2026
Merged

Improve glass pane rendering#270
Dream-Master merged 34 commits into
GTNewHorizons:masterfrom
Majora320:fix-glass

Conversation

@Majora320
Copy link
Copy Markdown

@Majora320 Majora320 commented Apr 3, 2026

Currently the rendering for the clear glass and stained glass panes is somewhat broken, displaying unwanted vertical lines when viewed from certain angles. Stained glass rendering & connectivity is also not optimal. This commit implements custom glass rendering based off of Vanilla that should be an improvement and allow for artifact-free clear glass panes in builds.

Fixes #267

Before:
2026-04-03_16 09 40
After:
2026-04-03_16 10 25

Fixes rendering for both clear and stained glass panes, and cleans up
some older code. This commit is missing textures for the tops and
bottoms of the stained panes.
@Majora320
Copy link
Copy Markdown
Author

Majora320 commented Apr 3, 2026

Fixes #267

@Dream-Master Dream-Master added the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta label May 9, 2026
@DarkShadow44
Copy link
Copy Markdown

That doesn't look correct here:

2026-05-23_00 20 42

Comment thread src/main/java/tconstruct/smeltery/blocks/GlassBlockConnected.java
@DarkShadow44
Copy link
Copy Markdown

The panes don't really look good in an inventory, any specific reason you removed the 3d look?

Copy link
Copy Markdown

@Luca-Guettinger Luca-Guettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 nits. (I only looked at the code, not ingame for now)

Comment thread src/main/java/tconstruct/smeltery/model/PaneConnectedRender.java
Comment thread src/main/java/tconstruct/smeltery/blocks/GlassPaneConnectedMeta.java Outdated
Comment thread src/main/java/tconstruct/smeltery/model/PaneConnectedRender.java Outdated
@Majora320
Copy link
Copy Markdown
Author

The panes don't really look good in an inventory, any specific reason you removed the 3d look?

I did that to more closely match the look to that of vanilla glass, should it stay like that? I have no preference either way.

@Majora320
Copy link
Copy Markdown
Author

Majora320 commented May 27, 2026

That doesn't look correct here:
2026-05-23_00 20 42

I'm not sure if getting a perfect result in these edge cases is feasible unfortunately, I tried fixing the rendering for the top/bottom face in these, but the edges are still broken and it still looks kinda bad. Fixing this would require a lot of additional complexity + more textures...

2026-05-26_20 01 44

@DarkShadow44
Copy link
Copy Markdown

The panes don't really look good in an inventory, any specific reason you removed the 3d look?

I did that to more closely match the look to that of vanilla glass, should it stay like that? I have no preference either way.

I certainly liked the old look a lot better

@DarkShadow44
Copy link
Copy Markdown

Can you please fix the block breaking animation? In survival it looks very weird trying to break the panes

@DarkShadow44
Copy link
Copy Markdown

I'm not sure if getting a perfect result in these edge cases is feasible unfortunately, I tried fixing the rendering for the top/bottom face in these, but the edges are still broken and it still looks kinda bad. Fixing this would require a lot of additional complexity + more textures...

There has to be a simpler way... Can't we split the panes into middle and side parts and render each accordingly? If you want I could try and take a stab at it, but it would take some time until I get to it.

Copy link
Copy Markdown

@Luca-Guettinger Luca-Guettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 potential regression (torch placement on stained glass), 2 nits.

Comment thread src/main/java/tconstruct/smeltery/blocks/GlassBlockConnectedMeta.java Outdated
Comment thread src/main/java/tconstruct/smeltery/blocks/GlassBlockConnected.java Outdated
@Luca-Guettinger Luca-Guettinger removed their request for review May 30, 2026 10:46
@DarkShadow44
Copy link
Copy Markdown

There's still the two issues I mentioned:

  • The edge cases with connectivity
  • The survival block breaking being glitchy

@DarkShadow44
Copy link
Copy Markdown

@Majora320
Ah right, totally forgot about the block breaking animation, thanks for the fix! After testing so long with the flat 2D panes they kinda grew on me, so I retract my earlier preference for the old 3D look. But since you already went out of your way to restore 3D inventory rendering, I'll leave the final choice up to you.

What do you say to my changes regarding pane rendering? Both the look and the code logic.

Copy link
Copy Markdown

@Luca-Guettinger Luca-Guettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 minor bug (inventory bottom icon for stained panes), 1 nit.

Comment thread src/main/java/tconstruct/smeltery/model/PaneConnectedRender.java
Comment thread src/main/java/tconstruct/smeltery/blocks/GlassPaneConnectedMeta.java Outdated
@Majora320
Copy link
Copy Markdown
Author

After testing so long with the flat 2D panes they kinda grew on me, so I retract my earlier preference for the old 3D look. But since you already went out of your way to restore 3D inventory rendering, I'll leave the final choice up to you.

I think 3D isn't a bad idea to differentiate them from vanilla panes, otherwise they look very similar.

What do you say to my changes regarding pane rendering? Both the look and the code logic.

Looks good to me, thanks for doing the annoying work of handling all the edge cases :) the rendering is quite smooth now

Copy link
Copy Markdown

@Luca-Guettinger Luca-Guettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@Dream-Master Dream-Master merged commit 6cda160 into GTNewHorizons:master Jun 4, 2026
2 checks passed
@Dream-Master Dream-Master removed the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta label Jun 4, 2026
@DarkShadow44
Copy link
Copy Markdown

Great, thanks for your work, a welcome improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clear Glass doesn't Connect Properly

6 participants