#Unity Engine

1 messages ยท Page 2 of 1

main wharf
#

I meant, uuuh, only the bloom was not clamped

#

So the highlights you were previously getting were basically just the bloom

#

I think anyway, from what I've seen there

fiery vapor
#

ah

#

hold on

#

unorm?

#

I think there are a few unorm shaders

#

this one has an RTV0

#

that points to the previous shader tho

#

wait hold on

#

I think Beat Saber has multiple post processing bloom shaders?

#

or am I confusing myself

main wharf
#

That is not unusual, bloom is often multiple draws

#

It is possible it does bloom twice though

fiery vapor
#

oh yeah it does do bloom twice

#

well, it grabs from both of these

#

not sure if that means "does bloom twice" though

#

surprisingly ref 043, which is shader 0x60AE51EB has things in r11g11b10_float

#

a fair amount of the shaders happen to do things in r11g11b10_float

#

I doubt this one is doing anything since it's just a gradient

main wharf
#

Blend, scary ๐Ÿ™ˆ

fiery vapor
#

there's these 2

#

I guess I'll disable bloom post processing to see what it could be

#

that should make it easier to find out what it is

#

oh god

#

don't tell me it's just a "yeah make the emissive part white then put a coloured glow around it"

#

I really hope it isn't... (but I feel like it could be)

#

okay so the laser has a glow material which looks like this

#

when I remove the shader for the object I guess it looks like it's kinda clamped?

main wharf
#

I really can't help with any of that stuff, I barely understand tonemapping and post-processing and that's all I've been doing ๐Ÿ™ˆ

fiery vapor
#

๐Ÿ˜”

main wharf
#

I guess I could make rgba8_typeless upgrade default for all, and disable it for the few games that don't need it.
This would make a decent amount of games work out of the box already.

#

Oh yea, looking at the list, I definitely should do this. Now to figure how

ebon stream
#

It worked if i load into a game! Heres a dump for dungeon 2. Peak slider works, ui slider does not, brightness slider affects a random part of the minimap.

#

there are some random black squares around with the addon, any ideas?

main wharf
main wharf
#

Fixing broken shader(s) is what I prefer there (when I technically can), but using Resource Cloning for upgrades can possibly do the trick, with some performance hit (mainly vram usage I think, depends on the amount and size of cloned resources/resolution)

ebon stream
#

nvm scaling and tonemap offset to 1 fixes both ui and game slider

main wharf
#

I added clamp to peak in swapchain, to prevent people from getting flashbanged when testing.
Means peak slider will now always work (except vanilla/untonemapped), so that's not reliable anymore since last build

ebon stream
#

did you mean this one for the NaNs

main wharf
#

Any upgrade really. There is a chance the glitch disappears by having less upgrades

#

So sticking to Output_size may do the trick, assuming that's enough to unclamp the game

ebon stream
#

ok no upgrades did it with resource cloning on

main wharf
#

Else, enabling "Use Resource Cloning" also has a chance to fix that kind of stuff

ebon stream
#

fun game

main wharf
ebon stream
#

yep

main wharf
#

Aye, nice

ebon stream
#

analysis is broken

#

but it gets brights enough

main wharf
ebon stream
#

no numbers show up in the graph or top right corner

#

some rare game do it for some reason

main wharf
#

Ooooh

ebon stream
#

but one can usually tell if hdr works

main wharf
#

It happens game triggers ReShade to reload effects for example when pausing or loading, and I'd get missing Analysis part.
Usually doing "Reload" at the bottom of ReShade Home tab does the trick.

#

Tho maybe this is something else here in D2... I wonder if it has something to do with title menu being broken

fiery vapor
#

Oh yeah I forgot to mention that Beat Saber material shader uses alpha channel on textures for bloom

#

You're welcome upsidedowncry

main wharf
#

No idea what this means or why it matters tbh.

fiery vapor
#

also FINALLY

#

The Billie environment's sun is uncapped

fiery vapor
#

it's a bit amateurish so idk if I'll buy it yet

#

this feels like a "I know I shouldn't get it based on the reviews buuuut..."

fiery vapor
#

I'll wait until there's a demo maybe

warm dome
#

Even with the recommended settings for blazblue entropy effect increasing any of the sliders in renodx causes parts of the game to start turning black, is there anything i can do to change that?

#

Of course i figure it out 5 seconds after asking the question, my ingame gamma and brightness were not at the standard values ๐Ÿ™‚ setting both to their default value of 5 fixes it....

main wharf
#

Ooooh yea, thanks for that, I intended to add this to wiki as a general advice at the top, then forgot.
Edit: done

fiery vapor
#

I'm not sure if it can be changed using renodx, but if not, then it'll probably have to be changed with a bsipa plugin

main wharf
#

here

vapid pulsar
#

I started Cult of the Lamb the other day (great game). The end game boss was extra handicap mode with reno making the arena super red. For the most part reno worked fine. I did have to turn off a lighting feature in-game called "remove lighting effects" because area were extremely bright red. Here is my game vs what a SDR video was supposed to look like.

fiery vapor
#

hmm
I wonder if it can be reduced to just a few shaders

#

already got the bloom uncapped

#

(or it could be reduced to a few shaders and a bsipa plugin)

main wharf
#

Lemme check dump again

#

These numbers:

  r1.xyz = r0.xyz * float3(2.50999999,2.50999999,2.50999999) + float3(0.0299999993,0.0299999993,0.0299999993);
  r1.xyz = r1.xyz * r0.xyz;
  r2.xyz = r0.xyz * float3(2.43000007,2.43000007,2.43000007) + float3(0.589999974,0.589999974,0.589999974);
  r0.xyz = r0.xyz * r2.xyz + float3(0.140000001,0.140000001,0.140000001);
  r0.xyz = saturate(r1.xyz / r0.xyz);
fiery vapor
desert herald
#

Yep 2.43

fiery vapor
#

on another topic
Parkitect seems to be working well

#

oh

#

I forgot to upgrade

#

god damnit

#

yeah upgrading R8G8B8A8_TYPELESS works perfectly

#

and it's the only upgrade that's needed too, UI brightness adjustment works perfectly

#

although it is somewhat of a visually basic game...

true carbon
#

HDR truly adds new life to games, man.

fiery vapor
#

still waiting for shader model 2 decomp... ๐Ÿ˜”

#

I'm also trying to look for games that would be the "easiest" to upgrade

#

but that's a discussion for #๐Ÿงชlab

desert herald
#

always clips to mush

fiery vapor
#

ah

#

nice

desert herald
#

"brown" is a relative color (technically contrasted orange), so SDR doesn't have the range to show the contrast at times

haughty dock
#

that technology connections video was fun

fiery vapor
#

glad to know that renoDX kinda works with Vivify lol

#

(modded content)

main wharf
#

What even is Vivify

fiery vapor
#

shaders, models, materials, etc

main wharf
#

Aye

fiery vapor
#

oh yeah this looks so much better than specialK (when it works)

main wharf
#

Had a quick look Vivify's source, and couldn't find any shader. Rest is all gibberish to me so I'm not sure, maybe since it uses Unity assets or whatever there are some shaders unclamped by Unity Engine addon.

You can always check with devkit if you're curious. That's not a request!! ^.^'

fiery vapor
main wharf
#

Ah lol

fiery vapor
#

I'll send you the github for "You."

main wharf
#

Thanks

#

Can't seem to find any familiar shader

#
float3 gammaCorrect( in float3 col)
{
    return pow(saturate(col), 2.2);
}
#

This function from /Assets/CGIncludes/Colors.cginc is used in a couple shaders:
/Assets/Shaders/Effects/CircleOutline.shader
/Assets/Shaders/Effects/Shaft.shader
And there are a few more saturate() here and there. Don't think there's any tonemapping in this tho

fiery vapor
#

most of the shaders seem to work anyways thankfully

#

although in some of the other vivify maps there are a lot of black boxes

main wharf
#

Sounds like NaNs, broken maths somewhere and they're clamped by resource format in SDR.

You can try fewer resource upgrades if possible. Using Resource cloning can also prevent these sometimes.
Else one has to identify responsible shader, and make the maths inside safe (or manually clamp the output, o0 = max(0 ,o0); deletes negatives and also NaNs)

fiery vapor
#

oh, an extra fact about how Beat Saber tonemaps
I asked one of the devs (because Beat Saber is indie enough where you can just have a casual chat with the devs) Beat Saber uses ACES Filmic generally, and for the bloom on PC, the bloomuses Reinhard tonemapping

#

(this doesn't really change how difficult it would be, but I thought you'd find the info interesting)

fiery vapor
#

oh yeah speaking of bloom

#

and I don't think you can do that with a live loaded shader

main wharf
#

It is possible, by setting Devkit's Live Path for example to renodx\src\games\beatsaber

fiery vapor
#

something something I'm on linux :(

main wharf
#

Oh, no idea how building renodx addons works there

main wharf
#

Aye, well as I said I really can't include those 200 shaders with ACES approx curve in Unity Engine addon

fiery vapor
#

I think the bloom is more than enough tho

#

it's a "you wanted Beat Saber HDR? here, have Beat Saber HDR"

main wharf
#

I can try to blindly make a dedicated addon when I get some time.
It is probably gonna look really rough, I bet some effects post tonemapping (like bloom) currently expect SDR input, so this may require some more work than just replacing ACES with HDR equivalent

fiery vapor
#

yeah

fiery vapor
#

(for now)

main wharf
#

I was gonna suggest that yea

#

sure

fiery vapor
#

thanks!

#

I think if I hand you a Beat Saber dump again I'll make sure to split the dump into the environments

main wharf
#

Not sure what this means

#

Uh, just keep all shaders in same folder, is fine

#

.cso

fiery vapor
#

most of the older environments share shaders up until Linkin Park

main wharf
#

wtf

#

Lady Gaga kekwsit

fiery vapor
#

yeah

main wharf
#

Yea I think I'mma just stick to hlsl

#

๐Ÿ™ƒ

fiery vapor
#

lol

#

they have lizzo

main wharf
#

I don't know who that is

fiery vapor
#

same

#

there's actually a few more environments after queen that aren't mentioned in that article

#

anyways, I got an appointment

main wharf
#

@crimson spear to the rescue once again, addon survives (for now) ๐Ÿ™
Rgba8_typeless upgrade is enabled by default now (thanks @haughty dock for the help, @calm nacelle & @warm geyser for the tips).
Wiki list was updated accordingly, looks a bit less messy.
Other fixes and improvements here and there, thanks everyone for the reports/shaders dumps as usual โค๏ธ

ebon stream
#

great work as always! did you manage a look at the dump for dungeons 3? latest addon hasnt caught all the shaders. ui brightness control whole image brightness, peak brightness seems to work while game brightness and grading sliders dont. swampchain proxy on.

#

different offsets didnt help either

main wharf
#

Oh I missed that one, oops.

#

Yea doesn't seem to be using Unity's post-processing/tonemapping.
Might be a plugin, a few of them use that same ACES approximation.
Will add these for next build

main wharf
#

Very nice, I think I still have that one Unity game I can test it on

#

I don't think I have any other installed currently

#

Can't make this one work, checkbox unchecks itself when I restart game. ReShade.ini still has this tho:

[DisplayCommander]
HideHDRCapabilities=1
#

Game is Nocturnal btw, I can't think of any other currently installed

fiery vapor
#

okay so you know how Beat Saber had the issue of the game objects being ACES filmic and the Bloom not?
well... I don't think Beat Saber is the only game that does that...

#

(ror 2 is weird tho since it might be an intentional choice)

main wharf
#

How do you mean?

fiery vapor
#

oh

#

scratch that about it being intentional

#

in the pause menu, even with bloom off that light thing is DEFINITELY supposed to be green

main wharf
#

RoR2 uses ACES indeed, though in this case it is in a LUT which is sampled on the whole screen (bloom included).

I'm not sure about Beat Saber but I understand they tonemap items individually maybe ?

fiery vapor
#

I'll go look at the shader with the dev kit

main wharf
#

I'm confused though, what is happening exactly ?

fiery vapor
#

from what I'm seeing
the bloom shows that the object is supposed to be greenish, but the object is white, when pausing the game, it shows what the colour of the object is supposed to be

#

I think this is vanilla behaviour

#

so I'm gonna poke at it and see what happens

main wharf
#

Bloom can be colored I think, it is not necessarily the color of the object behind.

fiery vapor
#

good learning experience too

#

even when bloom is disabled, the object shows it's original colour in the pause menu

#

which makes me wonder if it's capped

main wharf
#

It is possible bloom is re-enabled when game is paused?

fiery vapor
#

maybe

main wharf
#

And I would say maybe depth of field aswell

#

Or some blur

fiery vapor
#

kinda weird if it re-enables on pause

main wharf
#

Pause menu using post-processing isn't unusual

fiery vapor
#

ah

main wharf
#

Imagine if you had a depth of field toggle, and pause menu wouldn't have this blur effect with it disabled. Kinda ugly ๐Ÿ˜’

fiery vapor
#

true

main wharf
#

Did you try Bloom slider ?

#

This may work in pause menu

fiery vapor
#

hmm
pause menu might actually be a screenshot that's then blurred

#

oh

#

menu isn't affected by bloom slider

#

I found the shader for the light parts

main wharf
#

Maybe it's a different shader, it's not in addon so it's output may be broken.
You can try to change Lut Shaper when paused, see if there is any difference.
That is assuming tonemap/color grading sliders work in real time in this game, I forgot

fiery vapor
#

I do notice that the shader for the lights (0x56D31D83.ps_4_0) has a T0

#

that is VERY early on

#

ok I just disabled something and now the image looks vastly different

#

following the origins for this shader leads me to a dispatch shader

fiery vapor
#

I'm unfamiliar with how these shaders work specifically,
is the LUT supposed to be multiple shaders?

#

okay, it's supposed to be multiple shaders

main wharf
#

Uh, depends what you mean, but there can be a shader that creates LUT or mixes multiples baked LUTs for example, and another shader would have to sample it to apply the color correction.

It can also just be one shader to sample LUT if LUT comes straight from disk/game files

fiery vapor
#

actually maybe it's not that surprising

#

disabling them both looks like this (really ugly)

fiery vapor
fiery vapor
#

oh, the fuck?

main wharf
#

Disabling a draw can have... how to put it... unexpected consequences

fiery vapor
#

huh,

main wharf
#

Like, sometimes I lose the whole post-processing just by disabling AA shader

fiery vapor
#

when I disable AA in options, the image doesn't change

#

but when AA is enabled, the image becomes desaturated

main wharf
#

I'm not sure how to explain, but like, it's because of how shaders interact with each other I think

#

For example maybe post-processing uses AA output, so disabling AA shader means post-processing "doesn't get anything" from AA shader so post processing doesn't happen (?), or something along the lines maybe

#

Weird interactions like this, I'm not sure really so take it with a grain of salt

fiery vapor
#

well, I guess now I know that the weird light thing is supposed to be green/yellow, I guess all I gotta do is find out what the post-processor is

main wharf
#

Is this Unity addon btw? Did you try playing with sliders? Highlights saturation maybe

fiery vapor
#

hmmm

#

not yet

main wharf
#

Default value (50) isn't neutral when Daniele is default tonemapper/game originally uses ACES

#

There is some desaturation by default

fiery vapor
#

oh,

#

huh

#

I'll have to try that

main wharf
#

Should match vanilla (?), let me know if it doesn't, I'm still polishing values eventually

#

But point is, there is also some recovery to be done there eventually by increasing slider a bit

fiery vapor
#

first I gotta get a run where I get the environment I was taking a picture of

#

oh, yeah highlights saturation does nothing

#

(in vanilla it caps to white anyways)

main wharf
#

Nothing at all? Maybe game doesn't build LUT every frame, I can't remember.
There should be a Warning somewhere if settings don't work in real time

fiery vapor
#

oh not like literally does nothing

#

but for that specific decoration, the centre doesn't get any greener/yellower

#

oh, would enabling trace help with this?

main wharf
fiery vapor
#

oh

main wharf
#

I assume you're taking snapshots, so it's already doing trace

fiery vapor
#

hmm
do you have 0x3DA2FC5F?

#

looks to be a 16 bit colour

#

and yet again shows the actual colour of the orbs...

main wharf
#

I don't but does it need any work?
Seems to output fp16 aswell

fiery vapor
#

yeah

#

something is bringing it back down...

#

how does this one sound?

#

hmm

#

the preview for the RTV looks like this

#

hold on I gotta check with the addon enabled to make sure I'm not asking about things that have been already upgraded

#

ok, I think I've been on a wild goose chase

main wharf
# fiery vapor how does this one sound?

This I do have, doesn't clamp for sure, it just copies stuff.
That's the one used by "Blit Copy Hack" feature, though it really shouldn't trigger in this game, or most games anyway

main wharf
fiery vapor
#

hm

#

alright, maybe it is supposed to be white

main wharf
#

Might be clamped in some earlier shader I dunno

fiery vapor
#

I'm not really sure what to think of this

#

but I can't really find anything else

#

hmm

#

eh, nvm, I couldn't really find much

main wharf
#

Oh, and that's right before post processing

#

Maybe game's color grading..? Could try to mess with LUT strength. Internal probably, I don't remember game uses baked/user LUT.

fiery vapor
haughty dock
#

I tried quickly making a mod for it a while back

#

The addon is in hdr den somewhere, it unclamps effects but a lot of the game is SDR still.

#

Though Iโ€™d guess that this mod works similarly.

main wharf
main wharf
#

Lut strength 100

#

Lut strength 0

#

Woops, I had Highlights Saturation boosted on both. But result is same anyway, the desat is in grading.

main wharf
# fiery vapor

Kinda suspected it with this, but I'm never sure what is preview corresponding to, since I believe it always shows the "latest" draw using that one resource, so not necessarily where one clicks.
Anyway assuming that preview is right before bloom, then it doesn't leave much, there's only uber shader left then so bloom/vignette/CA/grain and color grading/tonemapping LUT.
Only latest would desat like this

#

If grading is consistent across areas and isn't used for some effect or something, maybe you can disable LUT strength and replace with your own grading.
Looks like grading is mostly just a bunch of contrast and some desat.

main wharf
haughty dock
#

it is, yeah

#

I just did tonemappass in the output

#

untonemapped was less bright than tonemapped iirc

main wharf
#

Aye, it do be like that sometimes.
If you ever feel like updating your mod, that one lutbuilder is in multiple addons already (Beyond Blue, 1000xResist, Beton Brutal...) so you can have a look

haughty dock
#

eh, I only did it cause someone requested it and I thought I could knock it out in 30 min

fiery vapor
#

Wait

main wharf
#

I had Highlights Saturation increased also, tried this first and forgot to reduce it before I tested LUT

fiery vapor
#

Hold on nvm I just woke up lol

main wharf
# ebon stream great work as always! did you manage a look at the dump for dungeons 3? latest ...

^ This has Dungeons 3 shaders, hopefully game doesn't have any effect after tonemapping/LUT so game brightness will work properly.
I got Dungeons 2 to check the artifacts, seems to be caused by bloom as they disappear when setting is turned off.
Game doesn't need any resource upgrade, so you can disable all, no need cloning either, and no artifacts even with bloom on.
UI Brightness also affects Bloom, I'm not sure what to do with that, something something Plus blend I need to learn about.

fiery vapor
#

I'm sure that decompiling a renodx addon won't have any moral & ethical consequences whatsoever Clueless

haughty dock
#

I think I posted the source lol

fiery vapor
#

oh nice

#

time to go look for it silly

haughty dock
fiery vapor
#

this is good advice for testing RoR2

#

ah, turning internal LUT strength to 0 makes the weird orbs actually greenish / yellow

#

then you add highlight saturation

main wharf
#

Yea it's their color grading

fiery vapor
#

internal LUT strength does also handle the colour correction

main wharf
#

Highlights saturation isn't even necessary I think, but 56 is neutral in this case.

fiery vapor
#

so setting internal LUT strength to 0 does wash out the picture a bit

main wharf
fiery vapor
#

oh yeah contrast slider works pretty well

main wharf
#

I dunno, these are really rough approximations, you can probably find something better

fiery vapor
#

although what's funny is that when bringing the contrast back up the weird orb light things go white again

#

I wonder if it'll require a direct shader edit ๐Ÿ˜”

main wharf
#

Oh, I think I was away from the orbs when I tried the Contrast replacement

#

Ooooh

#

Uh, maybe luminance tonemapping would blow out less

#

But it's gonna be really washed out by default because per channel gets considerably more saturation from contrast.
So you may have to play with Saturation, Highlights Saturation and Blowout slider to get Saturation right

#

Can try back to LUT Strength 100 first.
Something like 80 Saturation and 80 Blowout.
Or maybe 80 Saturation, 40 Highlights Saturation and 65 Blowout...
Just throwing ideas here

fiery vapor
#

I think I'm getting pretty close to something decent

main wharf
#

Because imo it's really all happening here

#

It's the LUT

#

Combo of heavy contrast grading + ACES

fiery vapor
#

80 saturation 55 highlights saturation

#

highlight saturation could do with a little bit of reduction but it's a very good start

#

actually, it looks fine on my screen but looks more saturated when saved as a png

main wharf
#

What are you saving and viewing png with

#

Reshade for saving

fiery vapor
#

reshade for saving,

main wharf
#

So uuh, view?

#

Oh nvm

#

It's gonna be linux something I won't know about

fiery vapor
#

reshade through steam proton for saving

main wharf
fiery vapor
#

I think it's more of a proton issue

main wharf
#

So I played around with stuff after you reported this in two games (Herdling and Lego thingie) and I think I managed to do some improvements regarding WCG these past couple builds.
Doesn't mean every game is suddenly gonna push crazy colors, but you were right saturation was indeed somehow still clamped. ๐Ÿ™

fiery vapor
#

huh, well I'll be, turns out adding that beat saber shader allows the game brightness to stay separated to the UI brightness
already feels like Beat Saber support is pretty much done

#

(other than the VR part, but I think that'd require either a reshade or reno re-write)

main wharf
#

Also bloom slider should work

fiery vapor
#

noticed that

main wharf
#

It was in same shader so I thought might aswell

fiery vapor
#

hold on do UI shaders have to be edited to make them look proper as well?

main wharf
#

What do you mean look proper

fiery vapor
#

the UI for the Beat Saber editor looks much brighter with the renodx unity addon compared to SDR

#

especially the spectrogram

main wharf
#

Aw. It depends, it can happen UI shaders need some work, but it's not all the time

fiery vapor
#

wait hold on

#

I turned my UI brightness down

#

default UI brightness

#

ah, okay, so Beat Saber's UI shaders are called Custom/CustomUI
no wait that doesn't change anything

main wharf
#

If you got Any Size upgrade, you can try to decrease to Output Size

#

Heeeeeh, from my personal experience it does kinda mean something

fiery vapor
#

it is just the waveform and the spectrogram that have the weird colours

main wharf
#

I think about 90 or 95% shaders I had to manually fix in Unity games were custom shaders.
I feel basic Unity stuff is really solid.

fiery vapor
#

oh.. hold on yeah the spectrogram is part of the UI shader

main wharf
#

Do you know what edit to do in there?

#

Maybe this

-o0.w = r0.x;
+o0.w = saturate(r0.x);
true carbon
#

Niceeeee

#

I finished the game already now, though. But next Unity title I try, be curious how it goes.

#

Oh, yeah

#

LEGO Voyagers

#

Tried it there? They have a friend pass that you can download to launch game.

main wharf
#

But then I'm stuck in menu lol, I tried it the other day ^.^'

true carbon
#

oh

#

LOL rip

fiery vapor
#

nope, the UI is still over saturated

main wharf
#

Then try to addo0 = saturate(o0); maybe.
Basically clamping output

fiery vapor
#

wait hold on I need to make sure I'm using the right terms

#

okay, it looks more de-saturated than saturated

main wharf
#

xD

fiery vapor
#

yeah, the spectrogram when there's a lot of noise is pink instead of red

#

yeah the UI needs a saturation boost

main wharf
#

Maybe issue isn't this shader

fiery vapor
#

well, I do think it's the ENTIRE UI that gets desaturated...

#

maybe if there's a way to increase the saturation of the shader (wishful thinking Clueless )

#

oh

#

I found it

#

r0.xyzw = r0.xyzw ? float4(1,1,1,1) : 0;1

#

I guess I gotta play around with this till I get something good

#

oh never mind this controls transparency

#

ah

#

it's the gamma

#

the gamma of the UI needs to be modified in-shader

#

hold on people making mods for other games have had a similar problem

#

oh

#

I can just divide the output by 2

#

I'm a dumbass

#

ok that doesn't solve the saturation problem, but it does reduce it from being too bright

main wharf
#

Didn't saturate() reduce brightness? It limits values to 0-1 range

#

saturate(x) is same as clamp(x, 0, 1)

fiery vapor
#

I don't think so

#

because the UI brightness is actually working correctly, it's just desaturated

#

(hold on gonna double check)

#

yeah UI brigthness works correctly

#

so you're right that it could be something else

#

I'm at the menu and here are the shaders that are snapshotted

rocky steppe
#

world is so small, tom94 hwo made that hdr image viewer i used to talk to and even skype with sometimes

bronze galleon
#

Where can I download previous official ReShade build ?

#

Seems a bunch of my Unity games can't work with SK anymore since 6.6 so it sucks. I should never update stuff that works...

kind kernel
#

You can replace the version number in the url with whatever version you need, and delete the _addon part for the non-addon build

bronze galleon
#

Ooooh awesome ! Thank you so much for tip ! dsxCatHeart

main wharf
#

Yea 6.6 has something funky going on, freezes and crashes games...
Seems to have to do with ReShade Effects, something like Reloading these triggers the crash it seems.
Having this in ReShade.ini helps:

[GENERAL]
NoReloadOnInit=1
crude flower
#

Megabonk works well

torn rose
#

seems to work in Songs of Conquest with 0 tweaks in advanced section

#

Any suggestions on what to try to make it work in Hellish Quart?

main wharf
torn rose
#

Also if you load the level the rendering is broken, terrain doesnt load but i am not sure its related.. i will have to get back home and check without addon

main wharf
#

Mmh regarding broken terrain you can try to reduce resources upgrades, by using Output Size or Output Ratio.

Deep frying may be a few different things... Can try to set LUT Shaper to Vanilla in RenoDX. If this works it means I'm missing a shader. HDR may or may not work, depends what "Vanilla" is in this case.
Or I see game has FSR. Assuming that's FSR1, maybe check game settings and disable it if not already off.

Make sure to use Borderless window, or at least avoid exclusive fullscreen. Tho after a thought, missing swapchain blit shader would make picture washed out, not deep fried, so nevermind this.
Well, it still applies to all games, but doubt it has to do anything in this case.
Still to be safe, can try to enable Swapchain Proxy (requires game restart to take effect).

main wharf
#

You can check 2nd part of this message for shaders dump process, it's nothing complicated, just make sure to fully load game and not just title menu so all shaders are gathered.
I may be able to figure out what's going on/do the necessary with that

haughty dock
torn rose
main wharf
grizzled valley
#

What would be the difference between using this or making a custom mod for a game ?
(Lay of the Land, UE 5.6.1)

junior river
#

Custom mode would have access to more shader controls (bloom, lens, vignette ect especially if they're custom coded)

Custom add-on can also utilise UE HDR path to solve FG flicker

#

Some games also do shenanigans

#

So you need to have access to shader compared to just lutbuilders

grizzled valley
#

Hmm, the game does have DLSS-FG 310.3.0 (Though I won't use it)
But this generic would still unclamp to get proper HDR ? (the game has no HDR support)

junior river
#

Bruh

#

This is Unity

grizzled valley
#

loll

#

I misclicked then

junior river
#

Curse both engines beginning with the same letter

main wharf
#

It's all UE kekwsit

#

FYI Unity Engine addon has sliders for post-processing effects (bloom, vignette, chromatic aberration, dithering noise, film grain strength with perceptual alternative).
I don't have Lens effects but I think I could add this aswell.

junior river
#

Den of Wolves with Reno (when it releases)

#

I await

torn rose
#

changing this made sliders work but terrain is still bugged. Both size and ratio - looks the same

main wharf
main wharf
torn rose
#

it's buged once addon placed in the folder

#

terrain bugged and game looking fryed

#

changing this resourse line fixed the deep fryed look

#

but terrain is still bugged

#

just for science - i will try to remove the mod and see if the terrain is still bugged

main wharf
#

Maybe terrain issue isn't related to resources upgrades.
Funnily enough, I encountered something similar in one game, and it stopped happening before I could identify the cause. ๐Ÿ˜…

#

Something with injected cbuffers maybe, I'm not sure

torn rose
#

no mod - terrain is fine

main wharf
#

It's even weirder it happens in a different game.
Terrain is missing right? Invisible textures?

torn rose
#

on some maps yes its missing

#

on others - stretched and looks like characters are neck deep in it

main wharf
#

wtf ๐Ÿ˜’

#

That one is very odd. I hope it's magically fixed with next build because I really have no clue what to do with that.

#

On the bright side, game should be supported if this is fixed

#

I'll see if I can reproduce it again.

torn rose
junior river
#

Pnmox worked out what the issue was

main wharf
#

Oooooh lol I remember this

junior river
#

Issue happened even with empty addon

main wharf
#

Right, I just have to disable buggy code, EZ

glacial plank
#

even if I disable everything in the addon

main wharf
#

Awesome thanks. Well not awesome that it happens, but good to know it's not something I derped.

I guess I have been pulling RenoDX basecode commits every now and then, maybe that's why issue appeared and disappeared on my end I dunno.

main wharf
torn rose
#

sure, i will report back if this helps

#

a bit later

junior river
#

For future reference, where is this located and how do we fix?

#

In case my add-ons start bugging out as well

main wharf
junior river
#

still invis geometry?

#

RIP in that case

fiery vapor
#

ok I actually wonder if Touhou Dystopian needs the r11g11b10_float upgrade

#

it looks the same when disabled

#

the picture looks quite washed out in the hub

#

might have to upgrade the bloom

#

oh you know what's even funnier

#

disabling this allows the game to go above 250 nits hyperxd

#

before disabling:

#

after disabling:

main wharf
fiery vapor
#

Oh damn you're right

main wharf
#

Mmh. I think I should add more upgrades.

Missing Copy Source seems to cause issues

#

Oh wait, I did move the Upgrade Copy buttons below upgrades in addon.cpp, could this have to do with that ๐Ÿค”

main wharf
#

Nah, Copy Source is just never upgrading.
I guess it's uncommon to have a resource that is solely used as copy source, might just make a custom rule for this game

#

Mmh, what would be the chances this is also the issue in Hellish Quart... Worth a shot ? Maybe

main wharf
main wharf
woven crag
#

hey Voosh, do you have a link where can we get your latest builds, or are they just posted in this thread? I'm also looking for the 32bit versions that some games need

main wharf
#

It should get you there if you click the link in pinned message

#

I update it everytime I share a new build.
Tho this is only temporary until I get github snapshot running

#

I should note that some of the 32-bit games do actually have a 64-bit version on Linux/Mac.
I wasn't able to test addon there, but I did try both 32-bit and 64-bit in a couple games that ship both on Windows and it worked, so worth a shot.

woven crag
#

hmm got any tips if neither of those still don't work properly? messing around with settings or nothing i can do?

main wharf
#

Yea, depends what doesn't work exactly

woven crag
#

allright, i'm just curious why this happens actually. I've been trying to get it working in Blackwind, github page only says "32 bit" in the notes, running latest build of reshade, tried keeping both 32bit and 64bit addons in the folder, but it's stuck at 200 nits peak.. also the game is weird, i need to force autohdr to work at all (should I have been doing that?)

#

however if I toggle other reshade shaders like "Advanced AutoHDR" or Lilium's Inverse Tone Mapping, it unlocks the max luminance to as much as i want

#

oh and what Reno does in this game is changing game and UI slider both adjust peak luminance up to 500 if you max them both

#

(there is a very distracting big main objective text in #ffffff in top right I can't get rid of)

#

oh wait, UI slider does actually work properly for the annoying text

#

it just doesn't work without activating AutoHDR / tonemapping first

main wharf
#

R8G8B8A8_TYPELESS under Resources Upgrades at the bottom of advanced settings should be enabled

woven crag
#

ahh thanks nice ok let me try

main wharf
#

It should be enabled by default

#

But that's the only thing I can think of that would cause this behavior in the game

woven crag
#

these are the defaults tho?

#

do i switch to output size?

main wharf
#

Yea it's enabled already.
No need, output size is included in any size

#

What is that about forcing AutoHDR..? Maybe it's causing issues I don't know

woven crag
#

let me try it a few more times

#

you know what, that was it. I had some issues at first (even Ilium's hdr analysis failed to load, had ctds too) with different versions of reshade and renodx, now with your latest build it runs perfectly just had to disable autohdr

main wharf
#

Awesome.
FYI latest official ReShade (6.6.0) is buggy with ReShade effects (causes games to freeze/crash consistently on my end).
I suggest to use latest nightlie (linked in #๐Ÿ“welcome if needed), it has all 6.6.0 improvements + the fix for its bug.

Alternatively you can use previous official ReShade release.

woven crag
#

awesome thanks!

main wharf
#

Oh, seems I broke resources upgrades kekwsit

main wharf
#

.usage_include = reshade::api::resource_usage::undefined, is upgrade everything patrickNotes

junior river
#

Voosh there's some strangeness going on with Endless Space 2.

I wanted to check if Unity add-on works as otherwise I might practice and make another addon

#

Game CTDs on start up

#

Some bs about res and window management

main wharf
#

Shaders are in the addon, but because dx12, something something happens

junior river
#

The game is DX12?

main wharf
#

I think so

junior river
#

Pcwiki said DX11

main wharf
#

Demo was

junior river
#

Actually wait

#

I found some mentions of DX11TODX12 in the dump

#

For the crash log

#

๐Ÿคทโ€โ™‚๏ธ

main wharf
#

Oooooooh

#

Maybe why I couldn't even make a single game addon with just a couple shaders work in demo

#

Uuuuh, well feel free to try a mod for it, and feel free to re-use anything I've done if it helps

#

I can't remember if they were tonemapping, but definitely was some HDR internal LUT, so HDR grading at least.

junior river
#

Cheers

main wharf
torn rose
#

yes, just a sec

torn rose
#

story mode is work in progress

#

pick the map below the basketball court floor, but i guess any map is bugged

main wharf
#

I don't have any VR set so I feel I'd miss part of the experience

torn rose
#

i test in practice vs idle oponnent

torn rose
#

it's side view like any fighting

#

any setting, any fighter

main wharf
# main wharf

^

  • made resource upgrades upgrade moar because why not (fixes an issue in Slime Rancher 1, maybe other games)
  • fixed UAV/copy upgrades that were accidentaly removed in last build
  • game specific upgrades added for V Rising and Lost In Random: The Eternal Die
  • added Lens Dirt slider
    and a few more fixes here and there
main wharf
#

Yea Hellish Quart is same issue I encountered in Altheia.
Seems to happen with the &shader_injection part of renodx::mods::shader::Use, which I think is cbuffers related.
No idea why it happens, and after I tried everything I could think of to fix it in Altheia, it ended up working again "randomly" with some of the newest builds.

I thought it was due to having too many injected cbuffers but I've been told this shouldn't be a thing, so I'm not sure what to do with that.
Game's early access, don't think I'mma spend more time on it.
It's not impossible it starts working at some point, either after a game or a mod update. ๐Ÿคท

junior river
#

Oof

#

ES2 is kill

#

Devkit works and all

#

But swapchain is kill

#

Resources upgrades is kill

#

0x00007FFC9D49711D (dxgi) D3D11On12CreateDevice
0x00007FFC9D45FA43 (dxgi) UnhookWindowsHookEx
0x00007FFC9D403158 (dxgi) UnhookWindowsHookEx
0x00007FFC9D4EC7B2 (dxgi) DXGID3D10RegisterLayers
0x00007FFC9D4EB7E6 (dxgi) DXGID3D10RegisterLayers
0x00007FF63AEC56F5 (EndlessSpace2) physx::shdfnd::Allocator::default constructor closure' 0x00007FF63AE79A8D (EndlessSpace2) physx::shdfnd::Allocator::default constructor closure'
0x00007FF63AE7F3FE (EndlessSpace2) physx::shdfnd::Allocator::default constructor closure' 0x00007FF63AE7E94D (EndlessSpace2) physx::shdfnd::Allocator::default constructor closure'
0x00007FF63A8B8282 (EndlessSpace2) physx::shdfnd::Foundation::getErrorMutex
0x00007FF63A8BA263 (EndlessSpace2) physx::shdfnd::Foundation::getErrorMute

main wharf
#

dx12 can be a bit different, as in trickier/less stable

#

I've only done 2 mods and one is broken, could very much be skill issue on my end

#

But this kinda matches what I encountered with demo. Things were just... Weird

junior river
#

I always kept hearing how DX12 modding is harder compared to DX11 (in regards to shaders and renderer)

#

to the point that people didnt want to mess with it

#

ofc I have to see it for myself

main wharf
#

d3d11on12 may make things even harder I dunno, it sounds cursed to me xD

#

Oh, iirc someone might have messed with reno and d3d11on12... Some game was using it for XeSS or something... Maybe @warm geyser ?

#

This was my experience with demo

#

I even copied generic addon to make a game specific one so it's easier to debug, but I couldn't figure out anything

junior river
#

I will need to become more gigabrained in that case

#

Will just stick with DX11 for now

#

I just thought that ES2 was DX11

junior river
#

Did just learn this though

#

Wonder if it will be DX12

main wharf
#

The only other dx12 Unity game I can think of now is... Peak!

#

This, PEAK in caps
Someone posted a dump, shaders are same as dx11 and were already in addon iirc, but addon would also crash on launch or something.
I wonder if it's also d3d11on12 shenanigans

proper vine
#

Still can't get party animals to work how come the upgrades just don't work for some games?

unborn current
#

Some games do custom stuff that requires custom mods

main wharf
#

I had accidentally broken some upgrades in previous build I think, so make sure to try latest.
Can't say for sure without having a look, but chances are it's still clamped in shader code somewhere.
I think game was mentionned already, don't think I got a dump tho.
Will try to have a look

unique apex
main wharf
#

Thanks for the dump!
It looks like custom post-processing to me, and possibly a lot of shaders...
Will have a look when I get the chance but really can't promise anything there

haughty dock
#

anybody try skate story yet?

main wharf
#

Disable native HDR tho

haughty dock
#

yeah makes sense

#

I wonder how it compares

main wharf
#

yea

#

Messages sent in wrong order because of upload time sorry

#

Vanilla in mod with game's HDR disabled is SDR, I assume you meant how HDR compares to HDR so I dunno about that.
Seemed a bit broken, I didn't bother

#

Aw, also gotta upgrade RG11B10 (for WCG)

main wharf
#

Interesting, they use a different DarkToDim gamma for ACES

#

Didn't even know this was customizable

main wharf
#

^
Added effects sliders and perceptual film grain, forgot 'bout that.

sweet mural
#

Still not working properly with Marsupilami ๐Ÿ˜•

main wharf
#

No dump option in addon yet, but you can use renodx-devkit for that if you want.

#

For the dump, you can use RenoDX devkit addon (can be loaded along other addons).
Make sure to fully load game, not just title menu, so devkit can catch all shaders.
In devkit window, press "Dump Shaders", then you can zip \renodx-dev\dump in game folder and send here. Corresponding ReShade.log can be joined if you wish, eventually helps every once in a while

sweet mural
#

I guess you need to choose Daniele (2) tone mapper instead of Reinhard (1) in Yooka to get a more appropriate look

main wharf
sweet mural
#

It does a similar effect, but what's the difference?

desert herald
main wharf
#

Right is Daniele

desert herald
#

unless it's in per channel

main wharf
#

I think the difference comes from Clip, which Daniele does not have

desert herald
#

contrast is different, looks per channel tbh

#

daniele usually starts messing up higher peak nits, like 2000+

main wharf
#

Oh yea there's that too, different "Contrast" at different peak

#

Apart from that tho, Contrast is 1.0 here, at least by default.

desert herald
#

not sure why the colors are different though

sweet mural
#

I don't think HDR works properly in this game

desert herald
#

daniele and reinhard should be identical for the most part, except contrast and white clip. but if it's by luminance there shouldn't be saturation difference

main wharf
sweet mural
#

Reinhard & Daniele

main wharf
#

It is per channel indeed

desert herald
#

yeah, that doesn't make sense...

#

ah

#

yeah, per channel contrast

main wharf
#

From Clip..?

desert herald
#

maybe there's a per channel bug

#

@sweet mural what does by luminance look like

main wharf
#

That's Scaling in Tone Mapping section.

Maybe increasing Clipping slider would also have them look closer, since Daniele doesn't use Clip (= it's likely a high value like 50 or 100)

desert herald
sweet mural
desert herald
#

yeah, reinhard a bit more highlight push, but should look mostly the same. there's something wrong with per-channel

#

though i'm seeing hue clipping

#

clamp_peak is on by default unfortunately

#

and reinhard gets to peak more often

main wharf
#

I'm not using SwapchainPass, tho I do clamp to peak there yea

desert herald
#

550 nit peak is going to hit more often as well

#

need to build some RENODRT_PRESET option to fix a lot of old legacy defaults

#

add gamut compression, and max channel for over peak, etc

#

if it samples a LUT, it's an absolute must, which i had to do in silksong

#
// Apply hue clip in perceptual space (OKLab)
    float3 neutral_sdr_perceptual = renodx::color::oklab::from::BT709(neutral_sdr);
    float3 untonemapped_perceptual = renodx::color::oklab::from::BT709(untonemapped);
    float neutral_sdr_chrominance = length(neutral_sdr_perceptual.yz);
    float untonemapped_chrominance = length(untonemapped_perceptual.yz);
    float2 new_ab = lerp(neutral_sdr_perceptual.yz, untonemapped_perceptual.yz, 1.f - CUSTOM_HUE_CLIP);
    float adjusted_chrominance = length(new_ab);
    new_ab *= renodx::math::DivideSafe(neutral_sdr_chrominance, adjusted_chrominance, 1.f);
    neutral_sdr_perceptual.yz = new_ab;
    neutral_sdr = renodx::color::bt709::from::OkLab(neutral_sdr_perceptual);

    float3 lut_input_color = renodx::color::correct::GamutCompress(neutral_sdr);
    float in_gamut_chrominance = length(renodx::color::oklab::from::BT709(lut_input_color).yz);
    float gamut_compress_chrominance_loss = in_gamut_chrominance / neutral_sdr_chrominance;
    gamma_color = renodx::color::srgb::Encode(lut_input_color);

    float max_channel = max(max(max(gamma_color.r, gamma_color.g), gamma_color.b), 1.f);
    gamma_color = gamma_color / max_channel;
    gamma_color.r = t1.Sample(s1_s, float2(gamma_color.r, 0.125)).r;
    gamma_color.g = t1.Sample(s1_s, float2(gamma_color.g, 0.375)).g;
    gamma_color.b = t1.Sample(s1_s, float2(gamma_color.b, 0.625)).b;
    gamma_color = gamma_color * max_channel;

    // Back to linear for BT2020 restoration
    gamma_color = renodx::color::srgb::DecodeSafe(gamma_color);
    float3 post_lut_perceptual = renodx::color::oklab::from::BT709(gamma_color);
    float post_lut_chrominance = length(post_lut_perceptual.yz);
    float restored_chrominance = 1.f / gamut_compress_chrominance_loss;
    post_lut_perceptual.yz *= restored_chrominance;
    gamma_color = renodx::color::bt709::from::OkLab(post_lut_perceptual);

all this for sampling a lut that can have negative colors and above 1.0 (from tonemap to 1 having stray channels)

#

just because it's tonemapped to 1.0 Y, doesn't mean it properly limited to 1.0, 1.0, 1.0

#

we're supposed to then also fit to display native primaries at the end

main wharf
#

I see, thanks.
I assume this can also be applied to baked 2D/3D LUTs?

Some of it looks a bit like what renodx::lut::Sample() does

desert herald
#

hades is simpler i think...

#
float4 main(
    noperspective float4 SV_Position: SV_Position,
    linear float4 COLOR: COLOR,
    linear float2 TEXCOORD: TEXCOORD) : SV_Target {
  float4 SV_Target;
  float _11 = (LUTSize + -1.0f) / LUTSize;
  float _13 = 1.0f / (LUTSize * 2.0f);
  float _16 = (PrevLUTSize + -1.0f) / PrevLUTSize;
  float _18 = 1.0f / (PrevLUTSize * 2.0f);
  float4 _19 = Texture.Sample(Sampler, float2(TEXCOORD.x, TEXCOORD.y));
  // float4 _29 = PrevColorGradingLUT.Sample(Sampler, float3((_18 + (_16 * _19.x)), (_18 + (_16 * _19.y)), (_18 + (_16 * _19.z))));
  // float4 _40 = ColorGradingLUT.Sample(Sampler, float3((_13 + (_11 * _19.x)), (_13 + (_11 * _19.y)), (_13 + (_11 * _19.z))));
  float4 _29;
  float4 _40;
  if (RENODX_TONE_MAP_TYPE == 0.f) {
    _19 = saturate(_19);
    _29 = PrevColorGradingLUT.Sample(Sampler, float3((_18 + (_16 * _19.x)), (_18 + (_16 * _19.y)), (_18 + (_16 * _19.z))));
    _40 = ColorGradingLUT.Sample(Sampler, float3((_13 + (_11 * _19.x)), (_13 + (_11 * _19.y)), (_13 + (_11 * _19.z))));
  } else {
    float3 input_color = _19.rgb;
    float max_channel = max(max(max(input_color.r, input_color.g), input_color.b), 1.f);
    _19 /= max_channel;
    float grayscale = renodx::color::y::from::BT709(_19.rgb);
    float lowest_negative_channel = min(0.f, min(_19.r, min(_19.g, _19.b)));
    float distance = grayscale - lowest_negative_channel;
    float ratio = renodx::math::DivideSafe(-lowest_negative_channel, distance, 0.f);
    _19.rgb = lerp(grayscale, _19.rgb, 1.f - ratio);

    _29 = PrevColorGradingLUT.Sample(Sampler, float3((_18 + (_16 * _19.x)), (_18 + (_16 * _19.y)), (_18 + (_16 * _19.z))));
    _29.rgb = lerp(renodx::color::y::from::BT709(_29.rgb), _29.rgb, 1.f + ratio);
    _29.rgb *= max_channel;

    _40 = ColorGradingLUT.Sample(Sampler, float3((_13 + (_11 * _19.x)), (_13 + (_11 * _19.y)), (_13 + (_11 * _19.z))));
    _40.rgb = lerp(renodx::color::y::from::BT709(_40.rgb), _40.rgb, 1.f + ratio);
    _40.rgb *= max_channel;
  }
  SV_Target.x = (_29.x + (Lerp * (_40.x - _29.x)));
  SV_Target.y = (_29.y + (Lerp * (_40.y - _29.y)));
  SV_Target.z = (_29.z + (Lerp * (_40.z - _29.z)));
  SV_Target.w = (_29.w + (Lerp * (_40.w - _29.w)));
  return SV_Target;
}

#

but obviously use case. max-channel is not a tonemapper, just something to squeeze tonemapped/sdr content to fit a lut

#
  • if above 1.0, scale down by max channel
  • sample lut
  • scale up by max channel
#

cyberpunk does a full tonemap/smooth-clamp to 1.0 per channel, which isn't the same.

#

this ^^^ has gamut compress mixed in

main wharf
#

Thanks, will add this to NeutralSDR + UpgradeTonemap for baked LUTs.
NeutralSDR is luminance so it could be going above 1 and getting clipped by LUT sampling.

desert herald
#
    float3 input_color = _19.rgb;

    // Find max channel to normalize input to never be above 1
    float max_channel = max(max(max(input_color.r, input_color.g), input_color.b), 1.f);

    // Scale down to fit in 0-1 range
    _19 /= max_channel;

    // Use grayscale as saturation 0 point
    float grayscale = renodx::color::y::from::BT709(_19.rgb);

    // If any channel is negative, use lerp to make it closer to grayscale to leave no negative channels
    float lowest_negative_channel = min(0.f, min(_19.r, min(_19.g, _19.b)));
    float distance = grayscale - lowest_negative_channel;
    float ratio = renodx::math::DivideSafe(-lowest_negative_channel, distance, 0.f);

    // Scale towards grayscale by ratio to ensure no negative values
    _19.rgb = lerp(grayscale, _19.rgb, 1.f - ratio);

    // Perform sample
    _29 = PrevColorGradingLUT.Sample(Sampler, float3((_18 + (_16 * _19.x)), (_18 + (_16 * _19.y)), (_18 + (_16 * _19.z))));

    // Lerp back grayscale ratio to restore lost saturation
    _29.rgb = lerp(renodx::color::y::from::BT709(_29.rgb), _29.rgb, 1.f + ratio);

    // Scale back up to original brightness
    _29.rgb *= max_channel;
#

again, works best with an SDR input for LUTs already around 1.0, which your neutral sdr should have (just don't let it clip to peak)

#

you may not have any negative channels in neutral_sdr based on your workflow, that could be stripped out. if you use any hue correction which uses oklab/ictcp, you can have negative channels

main wharf
#

Uhm, I'm using renodx::lut::Sample() which has something for negative colors I think

desert herald
#

yeah, it's not as great

#

it just clips and uses oklab i think

#

similar concept but not as good

#

.recolor i think

main wharf
# sweet mural It does a similar effect, but what's the difference?

To answer this, changing Tone Mapper impacts multiple things with no control over each, whereas using other sliders offers more specific fine tuning.

In this case if the Clipping value is too low, and Daniele only looks better to you because it clips way higher, I would suggest sticking to default tonemapper (Reinhard) and setting higher Clipping value instead.

It's really up to you in the end.

desert herald
#

i still have to find what's going on with perchannel though

main wharf
#

I really think it is clipping

desert herald
#

oh, clip 0 means clip to peak/reference

main wharf
#

As in, white clip or clipping slider or whatever it's called ๐Ÿ˜…

desert herald
#

but i can see some stuff probably isn't right with white_clip in per_channel. really need to take another look. i stopped using per_channel it honestly

#

per_channel LMS is probably going to be better than per_channel BT***

main wharf
#

Noice, I haven't gotten the chance to try any LMS tonemapping yet, but I've realized most of the WCG in Unity lutbuilder comes from the white balance in LMS.

#
  r1.x = dot(float3(0.390405,0.549941,0.00892632), r0.xyz);
  r1.y = dot(float3(0.0708416,0.963172,0.00135775), r0.xyz);
  r1.z = dot(float3(0.0231082,0.128021,0.936245), r0.xyz);
  r0.xyz = cb0[126].xyz * r1.xyz;
  r1.x = dot(float3(2.858470,-1.628790,-0.024891), r0.xyz);
  r1.y = dot(float3(-0.210182,1.158200,0.000324281), r0.xyz);
  r1.z = dot(float3(-0.041812,-0.118169,1.068670), r0.xyz);
desert herald
#

i need to read what they're doing there. white balance sounds weird in lms

main wharf
#

Here

//
// White balance
// Recommended workspace: ACEScg (linear)
//
static const float3x3 LIN_2_LMS_MAT = {
    3.90405e-1, 5.49941e-1, 8.92632e-3,
    7.08416e-2, 9.63172e-1, 1.35775e-3,
    2.31082e-2, 1.28021e-1, 9.36245e-1
};

static const float3x3 LMS_2_LIN_MAT = {
    2.85847e+0, -1.62879e+0, -2.48910e-2,
    -2.10182e-1,  1.15820e+0,  3.24281e-4,
    -4.18120e-2, -1.18169e-1,  1.06867e+0
};

float3 WhiteBalance(float3 c, float3 balance)
{
    float3 lms = mul(LIN_2_LMS_MAT, c);
    lms *= balance;
    return mul(LMS_2_LIN_MAT, lms);
}
#

Same op in bt709 or ap1 depending whether game uses ACES or not

sweet mural
desert herald
#

might be bradford with ap1 d60 baked

#
// Build Bradford chromatic adaptation matrix from source to target white point
float3x3 ChromaticAdaptationMatrix(float3 srcWhiteXYZ, float3 dstWhiteXYZ) {
  const float3x3 M_Bradford = float3x3(
      0.8951, 0.2664, -0.1614,
      -0.7502, 1.7135, 0.0367,
      0.0389, -0.0685, 1.0296);

  const float3x3 M_BradfordInv = float3x3(
      0.9869929, -0.1470543, 0.1599627,
      0.4323053, 0.5183603, 0.0492912,
      -0.0085287, 0.0400428, 0.9684867);

+  float3 srcLMS = mul(M_Bradford, srcWhiteXYZ);
  float3 dstLMS = mul(M_Bradford, dstWhiteXYZ);
  float3 scale = dstLMS / max(srcLMS, 1e-5);  // Safe division

  float3x3 ScaleMatrix = float3x3(
      scale.x, 0, 0,
      0, scale.y, 0,
      0, 0, scale.z);

  return mul(M_BradfordInv, mul(ScaleMatrix, M_Bradford));
}
#

and the scaling is probably computed CPU-side and passed as cbuffer

#

that's probably done in CPU and balance is passed as cbuffer

desert herald
#

yeah $precision3 balance = $precision3(w1.x / w2.x, w1.y / w2.y, w1.z / w2.z);

#

$precision is probalby a macro for float or half

main wharf
main wharf
#

C# looks friendlier than C++.
Or maybe that's just because of how code is written, pretty readable

sweet mural
sweet mural
#

I think this could even be added to the description on the Wiki about bloom. If the developers don't change anything later

main wharf
#

I think this may apply to most RenoDX mods for games with no native HDR, unless game isn't very bright in the first place or bloom is very subtle.

#

Something about Bloom being a kind of "fake brightness" effect in SDR, which feels less needed in HDR where there's "real brightness".
Terrible wording kekwsit

fiery vapor
#

oh yeah I might have a look at the Beat Saber shaders myself, what does Narkowicz's ACES approx look like in the HLSL?

fiery vapor
#

ok just realised that beat saber uses r0.yzw = r0.yyy * float3(0.00392156886,0.00392156886,0.00392156886) + r1.xyz; for neon objects, and ACESA Filmic for non neon objects

#

oh wait that controls the noise

#

wait, that controls something other than the transparency
that's perfect

#

tv static laser

#

holy shit

#

I found it

#

I found out how to make the colour more saturated

#

turns out it has nothing to do with the tonemapper

#

it has to do with r1.xyz = saturate(cb3[r0.z+0].xyz * r0.www + r0.yyy);

#

changing the + to a * yields this result

#

(also in blue)

#

I kept thinking there was "fake tonemapping"
turns out I was unintentionally right

fiery vapor
desert herald
#

Looks like pick a rgb color from cbuffer3 and scale it by r0w then add some other value

fiery vapor
#

yeah seems like it
+ r0.yyy is "add white"

#

by getting rid of the white it's now only limited by the tonemapper

#

this is with the bloom post process disabled

#

and this is how I learn that there's different shaders when bloom post process is enabled pain

#

at least it's the same process? nvm it isnt

#

OH, so for bloom post processing, you have to add o0.w = saturate(r0.w);

#

or is it o0.w = saturate(r0.x);

#

no wait, o0.w = saturate(r0.x * r0.w);

#

wow

#

I'm actually editing shaders lets go

fiery vapor
#

gonna test if the live folder is recursive

#

oh it is

#

nice

fiery vapor
#

I'm progressing quite well shockingly

main wharf
proper vine
#

why would you put it on hold?

main wharf
# proper vine is that a question?

It is a question yea.
Well there's no point I take a look if you're gonna make a dedicated mod anyway.

Just to be clear, I mean to put on hold "having a look at Party Animals"

#

I had accidentally broken some upgrades in previous build I think, so make sure to try latest.
Can't say for sure without having a look, but chances are it's still clamped in shader code somewhere.
I think game was mentionned already, don't think I got a dump tho.
Will try to have a look
Was an answer to
Still can't get party animals to work how come the upgrades just don't work for some games?

#

I'm happy to help if you need with making a dedicated mod. (:

#

Up to you really

proper vine
#

oh okay i thought you were replying to someone else when i first saw that

main wharf
#

That was clumsy. I answered to my own message containing instructions to make a dump with devkit, in case you needed that to provide one.

#

My bad ๐Ÿ˜…

proper vine
#

yeah no do whatever you want im just trying to learn a bit about modding even if i were to mod a deidicated mod it'd probably be awful

#

either way i may try to figure some more things out myself maybe ask some questions here and there

#

or if you just wanna look at it urself i can compare what you do and learn from that

main wharf
#

Aye. I'll finish cleaning this addon for release, try to add some more comments if I find anything relevant to say.
You've probably done most of the job identifying that one shader.
There may be a few more permutations depending the scene or game settings.
From there I'm sure you can figure out the rest, Ritsu's video is there if needed https://discord.com/channels/1408098019194310818/1416068077312933968.
And yea feel free to ask really

#

I downloaded the demo/friend pass thing somewhen this week, didn't get the chance to launch it yet.
Probably won't be able to get past title menu, but sometimes it's enough if there's something rendered there.

proper vine
#

yeah i think you may be able to play offline games maybe even without a friend

#

there is some stuff rendered in the menu though

#

that's where i got the output shader from

main wharf
#

Aye

fiery vapor
#

there is a new bubsy game

#

post processing breaks hdr :(

main wharf
#

Yea, I am trying to clean things up to get a snapshot running.
Tho you can already check code if that's what you want, it's just not updated daily because too much of a hassle and also still work-in-progress

#

Oh right, yea totally. If the amount of shaders is an issue for main repository, I don't mind getting PRs in my fork instead.
I already broke a branch getting my first PRs ever from Ritsu, so hopefully I should be able to manage now ๐Ÿ˜‚

#

Well it's more about making main repository slower or something, I'm not sure the technicals really. @desert herald would know

#

1400 shaders something something...

desert herald
#

I have a PR to not generate shader stuff until build. Configure is slow

#

Configure scans every hlsl file. I need to also move that

#

But if you think an unreal game dev, they're doing 20000 shaders so there's probably a way

bitter kestrel
#

any chance blue protocol gets some support?

bitter kestrel
#

๐Ÿ™

fallen linden
fiery vapor
#

so post processing seems to clip it

#

probably the same situation as touhou dystopian

main wharf
# fiery vapor post processing breaks hdr :(

Yeaaaaa, a couple missing uber shaders.
Lutbuilder is already in addon, so it causes a mismatch.

And when post-processing is disabled, grading is skipped so mismatch is gone.

main wharf
#

There was a bug in addon also!!! With AA enabled.
Fixed!

#

Uhm, yea I gotta try that gamut compression thing

#

Or is that ok? Feels a bit too much I dunno

#

Maybe I shouldn't focus on graph too much ๐Ÿ™ˆ

#

I guess I can try the swapchain one instead of clamping bt2020 already, let's see

main wharf
#

bt2020 clamp / compress

#

Mmh, I need a game with a baked LUT, might make more difference there swapping out .recolor for this gamut compress thing

main wharf
rustic wharf
#

just tested Green Hell, had to enable swapchain proxy and fix up an unsafe pow in this shader (Custom/BrightnessSettingPP) but everything else seems to already be included in the mod

main wharf
#

Noice, thanks adding shader!
Lut3dBaker Neutral Tonemap, Uber, Final pass yea it's all there.

Rest is BlitCopy and I guess UI shaders then into Swapchain Blit

#

Aw wait

#

Why does it need swapchain proxy? I guess final shader isn't always used

#

Or maybe used multiple times sometimes

#

I could check for that and automatically enable swapchain proxy, but it would still require a game restart, and I don't have a way to warn user about that.

rustic wharf
#

but it seems to work properly now without swapchain proxy? lol

main wharf
rustic wharf
#

yea probably

#

that has to be it

main wharf
#

I've noticed this in multiple games. Exclusive fullscreen: no final blit shader.
Borderless or Windowed: final blit shader is there

#

Why exclusive fullscreen is still something games default to in 2025 is a mystery to me tho

#

Mmh, I'm hard, game is 5-ish years old

#

6*

#

(tho still tbh)

rustic wharf
#

yea xD with borderless everything works

main wharf
#

I stole borrowed Hollow Knight's exclusive fullscreen check/warning to test it in multiple games, and I couldn't even get to see it.
Booting any game with mod + exclusive fullscreen = CTD
Changing on runtime = CTD

This has been my experience since my very first Unity RenoDX mod xD

rustic wharf
#

I didn't even know ShortFuse made something like that for HK. just for testing I swapped back to exclusive and now green hell also CTDs lol

main wharf
#

It starts here, just ctrl+f exclusive or fullscreen to follow the stuff.

There is a note for user in UI, and some function that seemingly does nothing but changing that one float value, I don't get how it works at all

rustic wharf
# main wharf

there are some white sparklies on edges and near black colors with this build in green hell. they're not there with vanilla or none

main wharf
#

Mmh. Wasn't here in previous build? That is curious, what did I do kekwsit

#

Oh, could it be the gamut compress thing.

#

Oh, maybe I still need to clamp bt2020 after I compress to clear NaNs

rustic wharf
#

yea, I think it's coming from the blit shader

main wharf
#

0x2013 something ?

rustic wharf
#

yes

#

0x20133A8B

main wharf
#

Yeaaaa, that one

#

Final Blit, swapchain blit or whatever

#

Ok lemme try to reproduce it. I'm not sure if doing max(0 after the gamut compress in bt2020 is enough, I think it should (?)

#

Uhm, I moved the function to the shader itself because recompiling all shaders when only two use it is terrible.

#

Skill issue be like kekwsit

rustic wharf
#

that doesn't sound like it should cause those issues tho lol

#

I also tested reno draw's gamut compression and had some saturated bright blues turn black

main wharf
#

Oh

#

Yea I copy pasted code from there, the one in SwapchainPass

#

Doing it in bt2020 to replace previous clamp::bt2020

rustic wharf
#

but in green hell the issue looks completely different

#

wait wtf

#

the hdr png doesn't have the artifacts kekwsit

#

the jxr does

main wharf
#

It is pretty much the only thing I can think of that was changed

#

Maybe png format clears NaNs ..? like r11g11b10 ๐Ÿ˜…

rustic wharf
#

yea it seems like it lol

main wharf
rustic wharf
#

the artifacts are not there anymore

#

nice, ty

main wharf
#

Ok thanks, building addon32

#

Mmmh. I wonder why it happens. Maybe this, with negative luminance:

float grayscale = renodx::color::y::from::BT2020(color);
float encoded_gray = renodx::color::gamma::Encode(grayscale, encode_gamma);
#

What even is negative luminance kekwsit

main wharf
#

The whole current code is:

    color = renodx::color::bt2020::from::BT709(color);
    float grayscale = renodx::color::y::from::BT2020(color);
    const float MID_GRAY_LINEAR = 1 / (pow(10, 0.75));                          // ~0.18f
    const float MID_GRAY_PERCENT = 0.5f;                                        // 50%
    const float MID_GRAY_GAMMA = log(MID_GRAY_LINEAR) / log(MID_GRAY_PERCENT);  // ~2.49f
    float encode_gamma = MID_GRAY_GAMMA;
    float3 encoded = renodx::color::gamma::EncodeSafe(color, encode_gamma);
    float encoded_gray = renodx::color::gamma::Encode(grayscale, encode_gamma);
    float3 compressed = renodx::color::correct::GamutCompress(encoded, encoded_gray);
    color = renodx::color::gamma::DecodeSafe(compressed, encode_gamma);
    color = max(0.f, color);
    color = renodx::color::bt709::from::BT2020(color);
desert herald
#

Something is clipping values

main wharf
desert herald
#

Like, clip to peak

main wharf
#

Yes, I haven't changed to max channel yet

desert herald
#

Could be neutral SDR

main wharf
#

It's on todo list

#

Swapchain clamp I think

#

color = min(color, injectedData.toneMapPeakNits);

#

Lut3dBaker is HDR grading, no UpgradeTonemap/NeutralSDR involved here.

main wharf
#

Heeh, I guess it'll be updated in draw.hlsl when issue rises in other games, will just wait thanks.

desert herald
main wharf
#

Yea in SwapChainPass exactly the same.

#

I removed previous clamping to bt2020, so maybe that is the issue.
I've read in #๐Ÿงชlab I should clamp to AP1 before gamut compression

desert herald
#

There is no min to peak in swapchainpass

#

Using min (clamping) causes negative luminance

main wharf
#

Yes I updated it to max channel already, will try if artifacts still occur.

But the clamping to peak was happening after Gamut Compression anyway, so I'm confused how it could mess with it.

desert herald
#

In what colorspace though?

main wharf
#

The compression is in bt2020, the max channel in bt709

desert herald
#

Can't clamp to peak anything that has negatives. You can't have negative luminance without negative numbers

#

When you clamp positive values, they don't offset the negative values, causing negative luminance

main wharf
#

I see, thanks.
The white artifacts are gone using max channel instead of min(peak

#

I will still keep max(0, in bt2020 after GamutCompression tho, just in case

#

Well either that or clamp to AP1 before GamutCompression...
max(0 makes more sense to me, unless NaNs can mess with GamutCompression itself

#

Mmh yea nevermind, after a thought maybe clamp to AP1 before Gamut Compress makes more sense.

#

I dunno really. Ugh

desert herald
#

also ^

main wharf
#

I guess this goes inside shared.h ?

#

Thanks

#

Oh yea I had the Highlights slider version 2 commented out in there, forgot about that:
//#define RENODX_COLOR_GRADE_HIGHLIGHTS_VERSION 2

#

What's breaking in the game I'm testing is UI, NaNs from upgrade to rgba16f

#

I already have a slider to clamp UI and that cleans the NaNs

desert herald
#

could try clamping to -0.5

#

might save some stuff

#

but might break others

main wharf
#

Is that better than AP1 clamp?

#

I'm thinking RenoDRT already clamps its output to AP1, so anything beyond in SwapChainPass is likely to be noise

main wharf
#

Should I also be using this ?
#define RENODX_TONE_MAP_CLAMP_PEAK -1.f
I'm trying to understand what it does but I don't get it:

#if !defined(RENODX_TONE_MAP_CLAMP_PEAK)
#define RENODX_TONE_MAP_CLAMP_PEAK color::convert::COLOR_SPACE_BT709
#endif
  config.tone_map_clamp_peak = RENODX_TONE_MAP_CLAMP_PEAK;
#

Shouldn't it be AP1 clamp by default instead of BT709?

#

Nvm, I don't have anything set there and it's not clamping to bt709, so I'm just getting it wrong indeed

desert herald
#

yeah, clamp to bt709 is bad as well

#

just stuff we did to simulate hue shifts before

main wharf
#

I don't think I ever used this

#

Will just leave it blank I guess, maybe it doesn't do anything? I dunno

desert herald
#

it does, you should set to -1

#

you'll have to manually manage hue clipping

bronze galleon
#

I think there's a flaw that's been going on for a while with the Unity addon in that the framerate is very erratic with super short but massive dips

main wharf
#

Mmh, I don't think I experienced this, but I also never monitor framerate unless something feels wrong so if it's something that only shows on graph I wouldn't notice

#

Any specific game?

bronze galleon
#

All of those I test

#

A big dozen

#

They should (most of them anyway) be like pegged at 157fps (reflex cap) but drop to .1% 30fps

#

Happens on the "off" preset as well btw

main wharf
#

Make sure "Upgrade Copy Destinations" is enabled.
It was Off by default in early versions of the addon, maybe setting remained off if ReShade.ini was not cleared since (?).
Will try to monitor next gaming sessions

#

^ I changed this to On by default as "Off" was causing massive performance issues in multiple games

bronze galleon
#

Unless I missed a couple, most are indeed using Upgrade Copy Destinations

main wharf
#

Mmh, does it happen regularly? I can't seem to reproduce at all.

I'm using ReShade 6.6.1

#

Oh, is this it? But I think that's an increase rather than FPS loss

#

Yea nvm, not it

#

Fwiw I clean %localappdata%\Temp\ReShade after ReShade/Effects update.
Not sure if it could cause hitches, unless maybe if using ReShade effects.

#

"Clear effect cache" option in ReShade settings should do that

bronze galleon
#

I'm only using RenoDX alone and SK, doubt there's any cache but I should check

main wharf
#

SK you say uuh? Lemme try that

#

Also if you don't mind trying without SK on your side.

Unless game needs SK to upgrade swapchain kekwsit
Dungeons 2 title menu is black unless doing that (similar to Titanfall 2), there could be more I guess

#

Aw you said it happens in multiple games anyway

bronze galleon
#

Yeah but I only use DC in absolutely no other way cases (SK in the mix making it impossible to run) as SK still has tons of things I need/want

#

Especially the latest Unity stuff

main wharf
#

omg can't even boot game using SKIF despairge
I do have ReShade installed locally, maybe that's bad.
Will do local SK install as I would usually do

bronze galleon
#

Nevermind, it's not a Unity addon problem, it's a SK with RenoDX in Unity problem

#

Happens with @desert herald 's Tunic mod as well

main wharf
#

Thanks for checking.
Yea even with SK (installed locally) I can't seem to reproduce it.
I did not enable any feature, I'm really not familiar with the tool, so lemme know what I should enable to reproduce your setup

bronze galleon
#

Massive dips

glacial plank
#

some guy on nexus was saying berserker had bad performance with RenoDX, then he later said he was using SK at the same time

#

which ended up being the issue

desert herald
#

AMD?

bronze galleon
#

Instead of going comfy pegged at reflex cap, it dips massively even down to sub 30fps .1% lows

#

No, Nvidia

desert herald
#

Tunic runs at like 800-1300fps for me

bronze galleon
#

Oh it sure should be super light to run flawlessly

#

Sea of Stars is the same btw, big dips but super short

#

Like micro seconds but massive dips, it's super regular, like couple times a second

main wharf
#

What SK features are you using, that is not enabled by default?
Clean install I can't seem to reproduce, maybe it's one specific feature.

bronze galleon
#

They should all be similar (if not identical) to this one (Little Big Adventure Twinsen's Quest SK ini)

main wharf
#

Uhm, I don't know, still can't seem to reproduce it.
I think it is first time I'm disappointed by not having performance issues kekwsit

#

SK is installed locally, I'm not sure if that makes a difference, but that's what's consistently worked the best for me, though again I've only used SK in a few games

bronze galleon
#

@twin wharf would say Global Injection is to be favored though I'm sure

main wharf
#

I will try another game, maybe this one is blessed or something (Shape of Dreams)

#

Tho game runs terribly by itself per moment

bronze galleon
#

Oh and this issue happens with 6.5.1 (official and renodx), 6.6 (when it dared working catkek) and 6.6.1 reshades shrug

main wharf
#

6.6.0 is doomed, don't even try

bronze galleon
#

Eh it worked in some games

#

A few though

#

But 6.6.1 is still doomed with SK in the mix for others... Like Redout2, this is a nightmare (but that's UE Reno so I won't go offtopic)

main wharf
#

TLDR: freeze/crash fixes (for 6.6.1)

#

Nah, another game, still not happening.

I'm not sure really. Doubt it has to do with game settings if it happens in a bunch of games, so... driver maybe..?

bronze galleon
#

I mean if it were driver related it would happen regardless of SK

main wharf
#

Mmh, I'm no specialist, but I sure was surprised more than once how things can weirdly interact sometimes.

#

Never hurts trying a clean driver install especially if it's been a while

#

Also running windows' Disk Clean-up tool maybe, at this point who knows. Definitely not I kekwsit

main wharf
#

Nvidia App and RTSS are the most common ones causing issues afaik.
Reported symptoms were various, from crash on launch to resources upgrades not happening or broken output.
I know RTSS compatibility can be improved at least in some games by using Microsoft Detours API hooking and increasing Injection delay.

main wharf
#

Oof, played Skate Story tutorial with a broken build.
Didn't have symlink there for some reason so it did not update ๐Ÿ˜ž

main wharf
main wharf
proper vine
#

i feel so dumb trying to do this i've made zero progress the past 5 hours

proper vine
#

(trying to mod this shit myself i mean not the unity addon)

#

unity addon is working kinda the nits seems to be unlocked but the colors are really weird

#

i got some results that looked like these at one point during testing but i thought it was messed up lol

#

idk my brain hurts

haughty dock
#

unironically, ask AI to explain shaders to you. It will get enough of it right that it will help you piece things together faster

proper vine
#

i used my daily limit for cluade and gpt lmao

haughty dock
#

ah lol

proper vine
#

i think i learned some things but i still haven't even been able to do a proper tonemap

#

i've been trying to look at other mods as an example but they're all so different

daring talon
#

for the .addon64 unityengine, do I need to install reshade's latest or can I just add this to the game's directory??

main wharf
main wharf
#

My bad I should add instructions

daring talon
#

nvm, I had to update ReShade in this particular game anddd it loaded it in, so I can mess around with the settings

proper vine
#

lmao i was gonna send a pic from my testing saying how well it was going but it was so bright it was blinding even with a spoiler on it

#

how come some of these things use rgb and xyz interchangeably

#

i don't really understand what the values are for in the first place

#

i thought xyz was just a placeholder for rgb

main wharf
#

r0.xyzw = r0.rgba they're exactly the same thing, just two ways to write it

#

they're ultimately just registers determined by a compiler to hold arbitrary numbers, so don't focus too much on them being color components
from @calm nacelle, I couldn't word it better

proper vine
#

thanks makes since ig it's just weird how two different things count as the same thing

#

ig somewhere down the line they're set equal to each or something idk

#

object oriented programming

proper vine
#

idk i finally made some sort of progress on modding it myself tho

#

i think its just a slightly edited untonemapped version rn but atleast it's not broken and clamped like previous attempts

#

This is what im doing rn

  r1.xyz = cb0[13].xxx * r1.xyz; // can't notice a difference on/off
  r1.xyz = r2.xyz * r0.xxx + r1.xyz; // makes image black if off
  o0.w = r2.w;
  r1.xyz = cb0[6].xxx * r1.xyz; // makes image more orange closer to untonemapped i think

  // Original Narkowicz's ACES approximation
  // r2.xyz = r1.xyz * float3(2.50999999,2.50999999,2.50999999) + float3(0.0299999993,0.0299999993,0.0299999993);
  // r2.xyz = r2.xyz * r1.xyz;
  // r3.xyz = r1.xyz * float3(2.43000007,2.43000007,2.43000007) + float3(0.589999974,0.589999974,0.589999974);
  // r1.xyz = r1.xyz * r3.xyz + float3(0.140000001,0.140000001,0.140000001);
  // r1.xyz = r2.xyz / r1.xyz;

  float3 untonemapped = r1.xyz;

  // Apply original ACES tonemapping to get graded SDR
  r2.xyz = r1.xyz * float3(2.50999999, 2.50999999, 2.50999999) + float3(0.0299999993, 0.0299999993, 0.0299999993);
  r2.xyz = r2.xyz * r1.xyz;
  r3.xyz = r1.xyz * float3(2.43000007, 2.43000007, 2.43000007) + float3(0.589999974, 0.589999974, 0.589999974);
  float3 graded_sdr_color = r1.xyz * r3.xyz + float3(0.140000001, 0.140000001, 0.140000001);
  graded_sdr_color = saturate(r2.xyz / graded_sdr_color);

  // Tonemap
  r1.xyz = renodx::draw::ToneMapPass(untonemapped, graded_sdr_color);```
#

idk what the graded sdr color is supposed to be so i just ran the old code on the untonemapped bit and passed it as graded sdr

#

i could use some input on the top portion that i commented

calm nacelle
#

Like your cb0[13].xxx or cb0[6].xxx