Add a built-in bloom implementation to GT#4519
Open
screret wants to merge 89 commits intoGregTechCEu:1.20.1from
Open
Add a built-in bloom implementation to GT#4519screret wants to merge 89 commits intoGregTechCEu:1.20.1from
screret wants to merge 89 commits intoGregTechCEu:1.20.1from
Conversation
…y rendering mods, TODO fix)
… reason, I know there's verts in there)
…e bloom quads tho
# Conflicts: # src/main/resources/gtceu.mixins.json
# Conflicts: # src/main/resources/gtceu.mixins.json
This reverts commit bfb4afe.
# Conflicts: # dependencies.gradle # src/generated/resources/assets/gtceu/lang/en_ud.json # src/generated/resources/assets/gtceu/lang/en_us.json # src/main/java/com/gregtechceu/gtceu/GTCEu.java # src/main/java/com/gregtechceu/gtceu/api/GTValues.java # src/main/java/com/gregtechceu/gtceu/api/recipe/GTRecipeType.java # src/main/java/com/gregtechceu/gtceu/client/ClientProxy.java # src/main/java/com/gregtechceu/gtceu/client/forge/ForgeClientEventListener.java # src/main/java/com/gregtechceu/gtceu/client/renderer/machine/FusionReactorRenderer.java # src/main/java/com/gregtechceu/gtceu/client/util/DrawUtil.java # src/main/java/com/gregtechceu/gtceu/client/util/RenderBufferHelper.java # src/main/java/com/gregtechceu/gtceu/core/mixins/LevelRendererMixin.java # src/main/java/com/gregtechceu/gtceu/core/mixins/RecipeManagerAccessor.java # src/main/resources/assets/gtceu/textures/block/pipe/ld_fluid_pipe/overlay_right.png.mcmeta # src/main/resources/assets/gtceu/textures/block/pipe/ld_fluid_pipe/overlay_top.png.mcmeta # src/main/resources/assets/gtceu/textures/block/pipe/ld_item_pipe/overlay_bottom.png.mcmeta # src/main/resources/assets/gtceu/textures/block/pipe/ld_item_pipe/overlay_left.png.mcmeta # src/main/resources/assets/gtceu/textures/block/pipe/ld_item_pipe/overlay_right.png.mcmeta # src/main/resources/assets/gtceu/textures/block/pipe/ld_item_pipe/overlay_top.png.mcmeta # src/main/resources/gtceu.mixins.json
# Conflicts: # src/main/java/com/gregtechceu/gtceu/api/GTValues.java # src/main/java/com/gregtechceu/gtceu/client/ClientProxy.java # src/main/java/com/gregtechceu/gtceu/client/renderer/GTRenderTypes.java # src/main/java/com/gregtechceu/gtceu/client/renderer/item/ToolChargeBarRenderer.java # src/main/java/com/gregtechceu/gtceu/client/renderer/machine/impl/FluidAreaRender.java # src/main/java/com/gregtechceu/gtceu/client/util/RenderUtil.java # src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java
…s bloom texture be the original image (and thus making the entire world have bloom)
…verything and I've forgotten what
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds bloom to emissive GT blocks without depending on other mods.
Also adds the cable burning effect 1.12 has, as it was never ported to modern before now.
Implementation Details
I had to hook MC, forge and embeddium to capture emissive/glowing quads into a separate buffer that's used for filtering fragments for bloom in the shader pipeline.
I couldn't find a better way to do this than mixins, but if @embeddedt (or someone else) has suggestions, please do share them!
The system uses a (vanilla) post shader to draw the bloom. If Iris/Oculus shaders are active, I assume those will do the bloom themselves and chose not to try support them from GT's side.
IBloomEffect,GTParticle,GTOverheatParticle, etc. are mostly plain copies of the 1.12 code.Outcome
bloom!!! it glowyy!!!! :3
How Was This Tested
Additional Information
This PR depends on features added in #4491. Please merge it first.
In some cases, I noticed chunk model updates taking a much longer time than usual (e.g. blocks being invisible for a fraction of a second longer than normal). I don't see this as too big of an issue to block merging this PR, but if you disagree, do tell me.
I tweaked the formatting of arguments in
RenderUtil& co. (generally, I grouped the lines into what they do), because spotless had split the lines in odd places and I thought that made the method arguments harder to figure out. I did not change parameter order.Note that the mod compat mixin filter for embeddium has to be changed to sodium when porting to 1.21.
shaders/core/black_hole.fshalso existed in 1.12. I'd already finished fixing it up to work in 1.20 before I realised it's unused. I thought it was neat, so I kept it.Potential Compatibility Issues
DrawUtilwas renamed toRenderUtilbecause I think that's a better name. I don't think any dependents (except maybe CosmicCore) used it.Some parameters in various rendering classes were changed around, fixing them shouldn't be too hard (like
poseStack.last().pose()->poseStackin the case ofFluidBlockRenderer#drawPlane).