#Minecraft Iris Shaders (w/ SpecialK)

100 messages · Page 1 of 1 (latest)

edgy wedge
#

bruh rip.

sick beacon
#

Yeah, but github says conflict

#

I may cherry pick important fixes and close the pr then if you cant fix the conflict

tender spindle
#

ah okay yeah much bettter

edgy wedge
#

i did reorder stuff, like #if & #endif, idk if they are more clear or not

sick beacon
#

I'll try cherry pick then

hollow rivet
#

@edgy wedge I think this might work

vec3 tonemap_lottes_hdr(vec3 rgb, float peak) {
    const vec3 a = vec3(1.5); // Contrast
    const vec3 d = vec3(0.91); // Shoulder contrast
    const vec3 hdr_max = vec3(8.0); // White point
    const vec3 mid_in = vec3(0.26); // Fixed midpoint x
    const vec3 mid_out = vec3(0.32); // Fixed midput y

    const vec3 b = (-pow(mid_in, a) + pow(hdr_max, a) * mid_out)
        / ((pow(hdr_max, a * d) - pow(mid_in, a * d)) * mid_out);
    const vec3 c = (pow(hdr_max, a * d) * pow(mid_in, a)
                    - pow(hdr_max, a) * pow(mid_in, a * d) * mid_out)
        / ((pow(hdr_max, a * d) - pow(mid_in, a * d)) * mid_out);

    return (peak * b * pow(rgb, a)) / (pow(rgb, a) * b + c);
}
edgy wedge
hollow rivet
#

bruh

sick beacon
#

cherry picked.

edgy wedge
#

im scared how it requires so many new functions may put off the merge even more.

sick beacon
#

Yes
Do you have a better way to emulate it?

edgy wedge
edgy wedge
sick beacon
#

Ofc if it's too bulky we can move functions to a separate header file

edgy wedge
#

im gonna do hdr-clean for complementary now

edgy wedge
#

when you use Complementary / Euphoria, it's with IntegratedPBR, right?

rocky iris
#

I wanted to use LabPBR for the shader pack support, but... it doesn't have the same feel

edgy wedge
rocky iris
#

Eh, it's alright

#

IntegratedPBR+ is quite nice for many things

#

On top of that, if someone finds a way to handle Supplemental Patches without going crazy, wouldn't everyone be able to write HDR shaders for whatever they want?

#

I did get it once to work, but the way I use to quickly update Complementary and Euphoria becomes quite slow if you include Supplemental

#

So I just preferred to take it out

edgy wedge
#

Looks like it patches world rendering, all before tonemapping

rocky iris
edgy wedge
rocky iris
#

Yeah

sick beacon
#

@edgy wedge Is R11F_G11F_B10F good enough for HDR?

sick beacon
edgy wedge
# sick beacon <@173540955280900097> Is R11F_G11F_B10F good enough for HDR?

somewhat. id prefer 16f for less banding (like sky, but sky is noised in photon i think).
i reverted because i couldn't get the pipeline declaration (buffers.glsl) to compile branch with HDR_ENABLED.
meaning

#ifndef HDR_ENABLED
  const int colortex0Format = R11F_G11F_B10F;
#else
  const int colortex0Format = RGB16F; //this one always compiles idk.
#endif
edgy wedge
sick beacon
#

Lemma check

#

Copying the whole buffers.glsl and move #ifdef to #include does work

edgy wedge
# sick beacon Copying the whole buffers.glsl and move #ifdef to #include does work

wait, this is easier. we just need #if to be outside the comment

/*
const int colortex0Format = R11F_G11F_B10F; //main color
const int colortex1Format = RGB8_SNORM;     //half res normalM
const int colortex2Format = RGB16F;         //taa
const int colortex3Format = RGBA8;          //(cloud/water map on deferred/gbuffer) | translucentMult & bloom & final color
const int colortex4Format = RGBA8_SNORM;    //normalM & reflection strength
const int colortex5Format = RGBA8;          //scene image for water reflections & volumetric cloud linear depth & volumetric light factor
const int colortex6Format = RGB8;           //smoothnessD & materialMask & skyLightFactor
const int colortex7Format = RGBA16F;        //(cloud/water map on gbuffer) | reflection temporal image (rgb) & previous depth
const int colortex8Format = RGBA16F;        //SSR results for WSR, topmost translucent opacity

const int colortex12Format = RGBA8;          //Improved Rain

const int colortex18Format = R8;            //shadow for voxy chunks (needs reprojection)
const int colortex19Format = RGBA8;         //scene image for voxy reflections (needs reprojection)
*/

#ifdef HDR_ENABLED
// Override declarations above with upgrades
/*
  const int colortex0Format = RGB16F;       //HDR: upgraded, else visible sky banding 
  const int colortex3Format = R16F;      //HDR: upgraded to store HDR values to final 
*/
#endif
#

(this isnt photon)

sick beacon
#

OK, thx

sick beacon
#

@edgy wedge After several comparison, I find out that vanilla minecraft (and probably also GUI) rendering is using gamma2.2 instead of sRGB

#

As not to break compatbility, I'll introduce a macro or uniform that relates to that

edgy wedge
edgy wedge
edgy wedge
rocky iris
#

I've seen that one act funny when HDR is on

edgy wedge
#

i am on 1.21.11 and maybe rrtt did something

loud valley
#

I also haven't ever noticed any issues with JEI

sick beacon
#

@edgy wedge You need relaunch
due to OpenGL's limit

edgy wedge
#

in complementary, im trying not to add new buttons, since there isn't any place for mod support

sick beacon
#

Yes

#

Because actual disable HDR would require recreation of Minecraft window, which is not possible unless restart
The mod only read "Enable HDR" once on initializing

#

Ofc I can also let the macro definer read "enable HDR" every time when shader reload instead of only reading once, which is easy

sick beacon
#

After several more comparison I think it's fine
The GUI colors (except blocks) is exactly the same between vanilla SDR and HDRMod w/o gamma correction
Minecraft actually knows they use sRGB instead of gamma, the color difference might actually be because of different world time
Or this might be because Linux tends to use gamma22 in SDR mode, while minecraft is outputing sRGB

edgy wedge
#

then you dont have to do Allow HDR macro in Photon

sick beacon
#

There is no Gamma22 to Linear

edgy wedge
# sick beacon

lol. maybe i should have copied that for the display_eotf function.

edgy wedge
edgy wedge
sick beacon
#

What behavior do you profer?

  1. When HDR is disabled in mod settings, HDR Mod will completely turn itself off on next launch, which means that you cannot turn on HDR (you can change the setting but will not immediately take effect) on next launch without another restart;
  2. When HDR is disabled in mod settings, HDR Mod will not turn itself off, instead only not define HDR_ENABLED and forces a shader reload. The behavior is like "false SDR".
edgy wedge
#

hmm. you can detect if the user can turn on HDR right?

sick beacon
#

OK, I'll make the change in HDR Mod 2.3.0.

sick beacon
edgy wedge
sick beacon
#

I'll make it an optional feature. On macOS this might not work.

edgy wedge
sick beacon
#

The warning might be annoying though

edgy wedge
edgy wedge
#

Update:

  • Complementary clean redo, all vanilla sliders work.
    • Can someone test? Is there enough blowout? Sometimes, I feel like there is too much red in highlights causing wonky pale orange, but then I'd go to a new place and it's not bad.
  • How to manual patch Euphoria (Google Docs)
    • Since clean, the difference is very self-contained, hopefully easy to do.
#

like magma maybe too orange than yellow, but to get it sacrifices other highlights.

sick beacon
#

Works pretty good for me

rocky iris
#

It's still about diffing files, but... eh.

#

Have we confirmed that euphoria actually does something different every time someone "patches" complementary?

rocky iris
#

or will they be the same?

drifting wharf
#

Euphoria patches is just addons to completely

#

It needs completely to exist already though so it’s not reposting that existing shader

#

So nothing should be different if it’s same version of completely and euphoria

#

That being said, I’m not sure how it interacts with the hdr patcher, but it should still be the same for both people

edgy wedge
edgy wedge
novel dagger
#

bro what did lottes ever do to you

#

cruel move stealing a toe

edgy wedge