Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support bloom #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

support bloom #12

wants to merge 1 commit into from

Conversation

zomb-676
Copy link
Contributor

@zomb-676 zomb-676 commented Nov 26, 2024

Summerize

this pull request supports particles which is an instance of MadParticle to be bloomed, but this is
not important. This pr mainly introduced a pipeline that does bloom and merges bloom results into the origin image. You can bloom anything by the pipeline, just making a proper change.
bloom

Imporat things

//size extraLight
MemoryUtil.memPutFloat(start + 32, particle.getQuadSize(partialTicks));
if ((irisOn || BloomManager.INSTANCE.isBloomOn()) && particle instanceof MadParticle madParticle) {
    MemoryUtil.memPutFloat(start + 36, madParticle.getBloomFactor());
    } else {
    MemoryUtil.memPutFloat(start + 36, 1.0f);
}

currently, extra light's second component will also be set
and when it is greater than 1.001f(hardcode in the shader), we consider it should participate in the bloom pipeline.
Most bloom related stuffs are located in BloomManager with detailed comments, see them if you need

Note

this pr only supports the instance OIT pipeline, others are not yet supported.
works under sodium and other things that need future tests.

If you have seen code in shimmer, you may find that the shader code is similar, that is true. So if this pr was merged, you could add mention to that project in a way you like.

If you need more help, contact me recently. I may be busy soon.

@zomb-676 zomb-676 changed the title support bloom by oit pipeline support bloom Nov 26, 2024
@USS-Shenzhou
Copy link
Owner

私密马赛,上周天天十一二点下班,实在没腾出时间来。

TODO

  1. 似乎开光影时不显示 这个得修一修
  2. 颜色溢出行为的老问题:比如一个蓝色泡泡给了很高的bloomFactor,泛光应该仍然是泛蓝的而不是全白
    image
    image
  3. 设置得加一项 Bloom off/on/using-iris-off

考虑到最近还有其他优先级更高的TODO,这仨我大概留到一二月份来修/合并。

非常感谢贡献!

@USS-Shenzhou USS-Shenzhou added enhancement New feature or request next version Will be resolved in next major/mid version labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next version Will be resolved in next major/mid version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants