-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Environment brightness, contrast, saturation restore with 3d LUT. #42761
Conversation
ebe5c46
to
58e1022
Compare
04bee64
to
6d6c254
Compare
Ready for review. |
Test project for future iFire. |
6d6c254
to
1f05098
Compare
1f05098
to
98b965c
Compare
Setting the Color correction [now] sets the screen grey and still doesn't work. Revised with Reduz's comments. |
98b965c
to
fac92d8
Compare
Will rebase. |
2179ca1
to
3a3391d
Compare
4217124
to
de30318
Compare
Go ahead.
On Nov 22, 2020, at 12:52 AM, Clay John <notifications@github.com> wrote:
@clayjohn commented on this pull request.
In servers/rendering/rasterizer_rd/shaders/tonemap.glsl:
@@ -23,7 +23,8 @@ layout(location = 0) in vec2 uv_interp;
layout(set = 0, binding = 0) uniform sampler2D source_color;
layout(set = 1, binding = 0) uniform sampler2D source_auto_exposure;
layout(set = 2, binding = 0) uniform sampler2D source_glow;
-layout(set = 3, binding = 0) uniform sampler3D color_correction;
+layout(set = 3, binding = 0) uniform sampler2D color_correction_1d;
+layout(set = 4, binding = 0) uniform sampler3D color_correction_3d;
Mobile devices can only have 4 uniform sets.
The easiest way for this to work is to use a new shader version as we discussed on IRC. A shader version is created by adding an ifdef statement.
If you want I can make a PR to your branch, just let me know.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
8aa7b58
to
e19c628
Compare
Used ClayJohn's revision. void Environment::set_adjustment_color_correction(Ref<Texture> p_color_correction) {
adjustment_color_correction = p_color_correction;
Ref<GradientTexture> grad_tex = p_color_correction;
if (grad_tex.is_valid()) {
if (!grad_tex->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &Environment::_update_adjustment))) {
grad_tex->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Environment::_update_adjustment));
if (grad_tex->get_gradient().is_valid() && !grad_tex->get_gradient()->is_connected(CoreStringNames::get_singleton()->changed, callable_mp(this, &Environment::_update_adjustment))) {
grad_tex->get_gradient()->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Environment::_update_adjustment));
}
}
}
Ref<Texture2D> adjustment_texture_2d = adjustment_color_correction;
if (adjustment_texture_2d.is_valid()) {
use_1d_color_correction = true;
} else {
use_1d_color_correction = false;
}
_update_adjustment();
} Also restored hard-coded gradient texture updating support. Probably want to make a note that if there's no hard coding, an editor restart is needed. |
e19c628
to
76fbf1a
Compare
76fbf1a
to
7ea0f47
Compare
7ea0f47
to
a747562
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! Great work!
Looks ok to me |
Note that the "Co-authored-by:" fields for @CptPotato and @QbieShay don't seem to work, I think you need to include their email (check their recently used name + email in |
5f23a0d
to
076908b
Compare
…ction. Allow gradients and 2d images. Use shader versions for LUT in tonemap Co-authored-by: alex-poe <3957610+CptPotato@users.noreply.github.com> Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com> Co-authored-by: Clay John <claynjohn@gmail.com>
@akien-mga Done. |
Thanks! |
Co-authored-by: CptPotato
Co-authored-by: QbieShay
Restored brightness, contrast, saturation adjustments.
Bugsquad edit: This closes #41257.
See also godotengine/godot-proposals#1382