#Unity Engine
1 messages · Page 3 of 1
Code looks ok to me, but I was never able to use renodx::draw::ToneMapPass successfully myself so I may be missing something.
Might be better to ask other modders for that specific part
I'll have a look but I'm still not sure what even is wrong.
They seem to be same colors to me
HDR is more saturated I think?
Narkowicz ACES can clip pretty early especially if input exposure isn't lowered
Maybe Reinhard would be a better fit than Daniele I don't know, but one would have to reduce Contrast and maybe decrease Shadows to make up.
I can try something like that
Oh, it could also come from the effects following tonemap.
There's like... Vibrance and Tint there.
Also Contrast and I think dithering but these shouldn't make a difference (?).
// r0.y = dot(r1.xyz, float3(0.298999995,0.587000012,0.114));
r0.w = renodx::color::y::from::NTSC1953(r0.xyz);
Be careful, these are not the same.
The formula (y::from::NTSC1953) is fine but you gotta keep same variables and components so
r0.y = renodx::color::y::from::NTSC1953(r1.xyz);
I did clamp Vibrance's minimum as I don't think this should ever be negative:
r0.x = max(r1.y, r1.z);
r0.x = max(r1.x, r0.x);
r0.y = min(r1.y, r1.z);
r0.y = min(r1.x, r0.y);
if(injectedData.toneMapType != 0.f){
r0.y = max(0.f, r0.y);
}
Without it things would desaturate more than vanilla.
I tried abs( instead of max(0 and it would get worse
Tho yea, again whether it is the look of game or the CIE graph, things look pretty close to me, I'd appreciate precisions on what feels wrong.
Is SDR picture gamma corrected?
There may be a mismatch between SDR and HDR pics depending how they were captured
If not doing anything to SDR, then I think Gamma Correction in RenoDX should be disabled to match.
Or the other way around, add Lilium's SDR TRC fix to SDR so it matches HDR with 2.2 Gamma.
SDR EOTF something* not gamma correction 
If you view SDR with HDR enabled in Windows, it is by default likely displaying wrong.
SDR viewed with HDR disabled in Windows should look ok as monitor in SDR mode does the "gamma correction" (decodes using about 2.2).
This being done by monitor, not software, it can't be captured on screenshot.
I think is this:
r1.xyzw = t2.Sample(s2_s, v1.xy).xyzw; // samples bloom texture
r1.xyz = cb0[13].xxx * r1.xyz; // Bloom intensity
r1.xyz = r2.xyz * r0.xxx + r1.xyz; // add bloom to render
o0.w = r2.w; // alpha output
r1.xyz = cb0[6].xxx * r1.xyz; // pre-tonemap exposure adjustment
I personally consider the exposure part of tonemap, but I think it doesn't really make a difference in my case.
Again I don't know at all about ToneMapPass.
Yea I dunno, I don't even think it's gamma mismatch.
Analysis graphs are too close, so unless the graph does some sort of correction for SDR maybe..?
But then I'm still not sure what is wrong, colors look the same to me.
Did you try to just increase Blowout or decrease Highlights Saturation?
Maybe Vibrance's "max" part should also be limited..? I don't know, can try that later.
Though original tonemapper goes above one and everything is clipped by resource format later
Mmh, I think I broke everything with the max channel change, gonna rollback this and gamut compression for now.
This is likely what the issue was it just changes the ui from yellow to orange which is a whole new thing idk if there's really anything to be done about it
other than maybe clipping the menus earlier or if there's a shader for just the background
I didn't really look too closely at it much in game so its probably fine
thanks for letting my know im not sure if there's anything to be done to these settings so ill just keep them the same
also to be clear im not saying mine looks better if you thought that
mines actually more orange than yours
oh yeah thanks lol i forgot to change it after copy past lmao
suprised it didn't do much
Nah all good. Feedback is just very welcome, I am here to learn and improve, so whether or not you make a dedicated mod, I appreciate you letting me know anything that feels off
it's weird how different ours looks though
the tonemap function does seem to be doing something since when switching functions in the renodx settings its change so it's not just untonemapped i don't think idk
i have to go to work i can look at the unity one further when i get back
sorry for all the trouble lol
No trouble, feel free
Yea I really don't know about ToneMapPass, whether it has to be tweaked further, maybe.
I know there are some extra sliders you can add to play with, Saturation Correction, Blowout Restoration and such. I can't help with anything ToneMapPass related tho, so maybe #🆘helpdesk is better for that.
Is Risk of Rain 2 not working at the moment?
It should, what issue are you having?
I haven't tried it yet, I just saw that it had the little "under construction" icon on the github with no note. Ill give it a try when I can
🚧 is essentially "lacks testing" for most games.
I think a few people have been playing Risk of Rain, should be ✅ probably.
Anyone can edit wiki so feel free if you play through a game with no issue.
Or let us know here so someone can update status.
I should probably set a note for the one game I know that needs work for sure (Bionic Bay)
that yellow is a very plausible SDR hue shift
though it definitely looks intended
though I'd expect tonemappass to keep that a lot more than it is there
wait why are you doing this? saturate(r2.xyz / graded_sdr_color);
is that just rewriting the way the code was already written?
Yea I got confused by this too first, then figured it was doing the same as original code.
saturate() was added there though
Yea, in a game specific addon I would probably try to have vanilla tonemapper run when in title menu.
Doesn't really make any sense to unclamp that background
Mh, I guess there are a couple characters rendered, so yea I dunno
Maybe hue correction/hue shift would do the trick then. To me they're the same color 
I don’t remember tbh I think I might’ve been testing to see what it did and forgot about it
💀
Saw it here
I still don’t know what it does tbh
Nah voosh was right it’s in that original code, I just forgot the original was there
Do any shaders come after this one?
Could be something in a UI shader giving you issues. Also how does it look in-game?
Also also, are you using per channel corrections sliders? I could see blowout restoration doing this
Me?
That pic was jus the first one that didn’t look awful for me so I haven’t really added much
What is per channel corrections?
it's something built into tonemappass now I believe
the blowout restoration slider and sat correction and what not
yep
this code is so complicated
got me tranforming into a computer with all this recursion
it's a fitted expression of ```cpp
(ax^2 * bx) / (cx^2 + dx + e)
to, supposedly, fit ACES SDR. from <https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/>
Basically like using <https://mycurvefit.com/> with a bunch of points
does it still work ?
Yeah, I've been playing it with HDR
hello i need some help
i tried to use reno for megabonk but i seem to have a problem with my settings
could you help me pls 🙏
Hmm, I didn't do much, just put the Unity plug-in in the folder and that's it
doesn't work for me...
Excuse the blown out screenshot
Just tried the latest build from here and it's still working for me: #1413695723404398674 message
yes i just dowloaded from this link
cuz this is clamped completely
Particles and stuff should be in HDR range
The level-up screen is also pretty bright
200 nits
it's like stuck or smt
Check game settings maybe, if game has Exclusive Fullscreen it should be avoided.
i'm bordeless
I mean the one when you level up via XP that has the bright lines in the background
Yeah
it should go to max brightess no ?
It really depends how game renders things, not every highlight is gonna reach peak.
ok ok thx
yeah just felt like it with all these abstract functions and functions inside functions
feels like just following a trail backwards when you have no clue how the code looks
This is how it looks with these
(vanilla > reno)
looks pretty good
My bad I originally misunderstood, thought the issue was saturation so I suggested Blowout and Highlights Saturation 
^
Added some global-ish clamp to alpha channel.
Now to revisit games for which I added manually clamped shaders as these may not be needed anymore.
Yaaaaaaaay it works..!
alright so when I disable this shader it causes the bloom to do this
does that mean this shader might be important?
it looks like this
-# why ask me I'm clueless 
0.03125,0.03125,0.03125,0.03125 looks like a tonemapper
also, I figured out that Beat Saber has aces in materials that have reflections
As in, one of the shaders that contributes to creating the bloom texture
maybe...
so it's tonemapping the reflections lol
probably nothing important (for now)
You can check in the snapshot tab, if t0 is render and RTV is a smaller size (downsample).
Maybe texture previews are available, would confirm that is bloom texture being built here.
Yea I remember the shaders with ACES approximation looked rather complicated, nothing I recognized from the usual other post-processing effects
Also so many of them, hundreds
How?
Abusing BlitCopy shaders once more.
Realized they do a bunch of invisible draws (probably happens a single frame or something I'm not sure the technicals).
Mmh I doubt it, UI is usually too late, likely either drawing on swapchain or into FinalBlit shader.
Is that unity game?
Seems not.
Mmh it depends why it is bright, maybe some blend?
I think it's a custom engine
I think it keeps drawing white elements on top of each other
additive blend or whatever
Nothing major, was just interested
I see, yea might not have anything to do with alpha channel going over 1, but rather the blend operation.
@desert herald dealt with that I think, see #💬lounge message
In p5r it seems. I do wonder if @snow wyvern's clamp compute shader was also to deal with this, it's in p5r_archive.
I tried to make it work for Guild Wars 2 but skill issue and all that... 😅
I will check it out later, thanks
Concept is the same: clamp the alpha. I should go back to P5R. Could clean up the logic to use shader callbacks instead of directly using ondraw, ondrawindexed events
What’s the point of doing this? Just curious
To fix visual issues mainly.
Or do you mean the point of revisiting games..?
In which case, just allows to remove shaders that are not needed anymore
Upgrading resources from _unorm to rgba16_float allows for values outside of 0-1 range.
So before upgrade, even if shader maths return below 0 or above 1, output would be clamped to 0-1 by unorm resource.
After upgrade, you can get values outside of 0-1 range that are non-sensical and cause visual issues.
As for sort of issues, uhm, I've seen a lot of different stuff.
From overly bright to super dark deepfried
The funniest one was some text in Teardown
Lemme see if I can find a pic...
Text is supposed to fade out, and that is done by diminishing alpha channel
Except after fade out was over, alpha channel would keep going below zero into negative
So text not only wouldn't fade away but it would also remain in a very broken state forever
A simple o0.w = saturate(o0.w); at the end of shader fixed that
saturate() means clamp between 0 and 1 btw.
There is also o0.w = clamp(o0.w, 0.f, 1.f); which I believe does effectively the same thing, except you can change range limits. (clamp)
Yeah I was about to ask why couldn’t you just use the saturate function on it lol
It is very much what I did
The hard part is figuring out what to clamp I guess huh
But instead of doing it on each unique shader that needs to be clamped, I'm doing it in one very commonly used one and so far it seems to do the trick.
voosh you need to fork this for godot engine so i can play brotato in native hdr

all i can say is that the swapchain encode gamma thing did something 
finally
Cassette beasts in HDR 
oh yeah this is the shader that caps the output to 250 nits in Touhou Dystopian demo
looks like a post processing shader
Mh, will check demo but I thought this was working already 🤔
Nvm got it, uses Beautify same as Party Animals
This should work.
eyy that fixed it
@main wharf I think you might've just optimised the game 😭
nvm Im going crazy
anyways it looks great now
I thought the game was getting like
80ish fps before and then now it was 144
but agian, I think I might've been crazy
I doubt my ugly unoptimized code improves anything lol
Anyway thanks for letting me know, and glad it works.
Hopefully doesn't break in release version 🙏
looks beautiful
although I wish there was more fine control of the effects
might be in the release version
Oooh, yea I noticed there is a bloom slider, not a toggle
Which is nice!
But then not much of anything else
Addon's Bloom and Vignette sliders may work
Don't think I noticed any other effect...
Dithering maybe
chromatic abberation is one that can't be disabled
Lemme see if I can find where this comes from
Aw yea thanks I do see it now. Didn't notice any corresponding code yet though, let's see
Ah, might be this one shader you sent
Oh yea I think so
^ You can now increase CA with slider 😈
/jk
@glacial plank thank you again, managed to fix both RCAS and FSR1.
That's a year long mystery solved 😅
- r12.yw = t0.Gather(s0_s, r0.zw).zw;
+ r12.yw = t0.GatherRed(s0_s, r0.zw).zw;
- r16.yw = t0.Gather(s0_s, r0.zw).zw;
+ r16.yw = t0.GatherGreen(s0_s, r0.zw).zw;
- r17.zw = t0.Gather(s0_s, r0.zw).wz;
+ r17.zw = t0.GatherBlue(s0_s, r0.zw).wz;
RCAS one would just be this it seems:
- r1.x = (int)-r0.w + 0x7ef19fff;
+ r1.x = asfloat(2129764351u - asuint(r0.w));
BALL x PIT works
Does this version work with Atelier Resleriana?
It should yea, though in the end I don't know if someone actually played game with this generic addon.
There's also a game specific mod @warm geyser did:
thats super scuffed
unless unity is missing shaders, there is no reason not to use it
oh wow they are finally not using the gust engine
Tested both, the generic one looks better. 🙂
Would it be possible to disable the shader for the shitty diagonal white vignette at the top?
broken in the inventory 🙁
or rather menu in general
I don't have the game myself.
Uhm, this may be part of UI. Either way you can try ShaderToggler addon for that.
Mmh, I don't know about this. Maybe try to reduce RGBA8_TYPELESS resource upgrade to Output Size or Output Ratio
found the shader, but disabling it also disables the color grading for the map 😄
instead of
Output Size seems to work
Mmh that is odd, post-processing shader would be Unity's vignette which should be affected by Vignette slider.
Gonna double check I didn't forget anything
Oh, there is some code that's unknown to me in a couple shaders used by the game..!
Will try to decode that and add sliders in next version
lovely, thanks!
Tinykin seems to work ootb, only needs R11G11B10_FLOAT to Output Size to unclamp from bt.709
Oh the game + dump was mentioned in the Den already lol
oh yeah much clearer now
hold on gonna buy the full game now
ok it still works
hmmm master spark causes image to become capped...
@main wharf, do you think it should stay like that for the effect or should it still be uncapped?
actually it might be better to uncap just for improving vision
Probably a missing shader permutation?
What is master spark, can I do that in demo 
Or feel free to trigger whatever it is with devkit loaded, then dump all and send
oh master spark is marisa's ultimate
marisa is in the full game
but I do also know that pulling off a perfect dash can also cap the image
just wanna confirm that your latest build runs perfectly in Starsand Island too, this is so nice I'm gonna cry it's just what I wanted and it's already working perfectly out of the box 😭 😭
the damn UI in that beatiful game is just so in your face but thank god the sliders worked right away oh it's so much better I can actually play the game now (it strangely makes the game brightness higher as UI goes down but that's ok can just counter adjust it doesn't seem to mess with anyting else, it works)
game is $7 bucks rn get it it's good
This is a third-person action roguelite game. Players will play one of several protagonists to challenge powerful enemies in the Animal Realm and solve the source of the incident.
The game will include 4 protagonists with different fighting styles to unlock, 9 boss battles based on various Touhou characters, and nearly 100 kinds of enhanced a…
$8.49
388
ok 8.5
an actual tohou game that's not slop?
yup
that would be really nice
we've been waiting for this forever. and mod works fine?
yep
even some of the effects have been made to be adjustable with renodx (like the chromatic abberation)
god bless
so, starsand island looks good and bright enough to me, but I still wonder why hdr analysis is saying it's capping at 400 nits? it looks brighter to me than that 👀 do I have to press any of those magic typeless float buttons to fix that maybe?
it's an SDR screenshot but another interesting bit those little dots in the loading bar are popping 1000 nits but this is the only place
Possible I don't know. FSR1 can have R10G10B10A2_Typeless upgrade requirement
anything wrong if we just click all the options on hoping something would work?

I'll have a look at demo
god bless 🙏
it's actually so funny, only certain UI elements like sparkle particles when you craft or achive something pop at 1000 and it makes for a really nice effect
you can see that in the loading screen too, and i'm actually glad it's like this makes for nice fun details while the UI itself remains unintrusive
How did you get rid of the raised blacks? It's not just black floor but it's like there's a different color filter on top of every stage
I might just adjust the gamma 🤷♂️
Game's visual adjustment settings (brightness, gamma, contrast) should most of the time be left to default.
Make sure game is not set to exclusive fullscreen
Prefer using RenoDX sliders if needed (for brightness/contrast)
Lut Scaling (there are 2 sliders) can help if raise comes from LUT, else Flare should do the trick.
What else... Vanilla Film Grain eventually, and a wide bloom maybe, both can be controlled in Effects section.
I believe touhou game offers a bloom slider anyway
The LUT sliders often don't seem to work, do they need a restart? I adjusted gamma within ilium black floor shader
User LUT slider is always active but feature is rarely used. Internal LUT slider should be greyed out if game doesn't currently use it.
As for Scaling, it may not do anything if there's nothing to scale
There should be a warning if Tonemap/color grading sliders aren't available in real time.
Else, only what's in "Resource Upgrades" section requires a game restart.
FSR1 things, once again. That's a new one though 
r6.xyz = min(float3(1,1,1), r6.xyz);
r8.xyz = min(float3(1,1,1), r8.xyz);
r7.xyz = min(float3(1,1,1), r7.xyz);
r10.xyz = min(float3(1,1,1), r10.xyz);
r9.xyz = min(float3(1,1,1), r9.xyz);
r12.xyz = min(float3(1,1,1), r12.xyz);
r11.xyz = min(float3(1,1,1), r11.xyz);
r14.xyz = min(float3(1,1,1), r14.xyz);
r13.xyz = min(float3(1,1,1), r13.xyz);
r16.xyz = min(float3(1,1,1), r16.xyz);
r15.xyz = min(float3(1,1,1), r15.xyz);
r18.xyz = min(float3(1,1,1), r18.xyz);
r17.xyz = min(float3(1,1,1), r17.xyz);
r20.xyz = min(float3(1,1,1), r20.xyz);
r19.xyz = min(float3(1,1,1), r19.xyz);
r5.xyz = min(float3(1,1,1), r5.xyz);
I'm not sure it's first FSR... But it can't be disabled, still runs with "Super Resolution" slider set to 100
Well, its just a demo after all. High possibility this will change on release. Maybe not worth pursuing this for now
I unclamped FSR1 so HDR works.
Game/UI brightness scaling is broken though, they do something unusual which I didn't have time to look into yet
Do you just need to invert the scaling at the start of the fsr shader
And then apply the scaling again at the end
Invert scaling on 16 samples, nah no way xD
I would rather count shader and just scale at the end of FSR's one.
But nah, it is something else with UI I think
Well maybe it is FSR related, but I don't think it's FSR shader, rather what follows
That’s what I did for eagle vision in ac1
Well not 16 samples but still
About the DemoThe demo features a specifically selected stage where you can experience everything from the game's core mechanics to an intense boss battle.
Both the stage's combat and platforming sections are playable for the first time ever.
The demo will be available for a limited time only until the game's full release, so don't miss your chan…
Peak brightness works correctly, but it's another one of those "UI brightness = entire game"
Thankfully the UI is not intrusive and somehow it only affects speculars correctly, as is. I tried toggling floats and typless but no change (it's perfectly fine as is tho)
Oh and I have to use PQ lut shader to make it work (for the speculars hitting max)
What you can try in that situation is Scaling Offset in compatibility section (if available). This takes effect immediately (no need to reboot game).
its grayed out?
That's not unusual, vanilla is probably no encoding (linear) which doesn't support HDR range.
upon more testing this seems to be not true works in vanilla too
i'll try some more with vanilla
Means it's not available here. Mmmh very odd, this would mean either:
- post-processing runs on UI
- or there's a bug in addon
Oooh, may be first one..? I seem to see some bloom on UI.
Ok what you could try then is to set Blit Copy Hack to Scaling only (still in Compatibility section).
Hopefully Scaling offset should then be available, so you can try that.

nope none of the effects sliders dont do anything
Wut
Does color grading affect UI then ?
Like, Blowout 100 or Saturation 0
These are obvious
Yea but does it affect UI ?
uhmm
Nevermind I'll download demo and see what's going on dw
Thanks for the report once again ^.^'
yes it affects entire game including UI
Ok
thanks for checking but just so you know it's perfectly playable somehow the UI doesn't get above uhmm 200 nits ish, it's actually really fine. but effects do pop really nicely all the way up to 4k somehow it just works
i was just curious why it behaves this way and if there's a way to fix it, just wanna learn more
Yea I thought so. How annoying.
The built-in solution would be Scaling offset, with BlitCopyHack "scaling only" mode if needed.
Unlucky that is not available, though I think there are a few more BlitCopy shaders I could add.
I'll check demo and see what I can do.
sweet
So you can just keep adding stuff on top of each new version and it all remains compatible? 
Addon rewrites post-processing, as this is most commonly where games go from HDR to SDR range (tonemapping and/or grading).
Since post-processing is usually last step before UI, it is convenient to apply game brightness there.
In this case, game seems to render UI before post-processing, so UI gets affected by everything addon does.
Uhm, that's honestly the hardest part of it all.
I've been thinking about it and theorizing for months before I actually started project. First experimented with other "engine" addons tho waaaaaaay lesser scale (3 or 4 games).
Unity despite the name is quite fragmented, multiple pipelines and versions, and also heavily customizable... Addon has to be super flexible to support everything, it's challenging.
Well "everything". Addon won't ever support all Unity games out there... 😅
Damn, that's quite something. Thanks for explaining it all. You're doing gods work here. It's hard to imagine how messy it could get if you would have to split the mod into multiple forks but I guess that's something it's being done for other games already, it's a wonder tho that it still works for a lot of games in unity as is
this is what I was saying, even tho it affects entire game, the UI remains comfortably below 300 nits, but in combat you see things go much higher (specially the flames are very bright on qdoled)
it's just such an improvement over auto/rtx hdr, even when it's working trough the UI it stll works correctly 
You know exactly what autohdr would do with that white blob, but here it's actually below 200 nits as it should be
okay ngl, unity addon makes touhou dystopian feel like it was made for HDR
maybe someone should contact the dev of touhou dystopian and ask about helping them get HDR added to the game natively
I think the clamp you mentionned also happens in demo with whoever is demo's character, it's just very short and barely noticeable, there's an extra LUT there. Added shader, hopefully is the same for other characters.

I would if I was a dev..!
I can still barely spell Youmu's name (I keep thinking there's an extra o) so don't worry about not knowing her name
ok I disabled a bunch of effects and the clipping finally disappeared
now to find what it is
found it
oh this was the image I was supposed to post
were you actually able to get it to work i didn't see someone had already looked at this game
just spent the whole day with jon teaching me what i can do to fix this game
unity one didn't work for me though besides the goofy 1k nit ui elements
i have a VERY rough addon you can use for it if you want i plan to work on it more
Since it's a limited time demo I was thinking maybe best to address this after release, I was just curious what's going on under the hood
Oh for sure I'd be happy to give it a try
Yep I was amused by that as well
Yup' that is the LUT one I added
Just gotta figure UI scaling but I got everything else working already, it is generic Unity except for FSR that runs at the very end and clamps.
Can try that already if you want.
There are a lot of other changes, I wanna test this build a bit more before I pin it, though help is welcome.
All dithering was moved to PQ bt2020 (instead of SRGB). Added HDR10 swapchain option. Added warning when missing output shader. Changed rgba8_typeless default upgrade to output size.
^ you can try this build to control the effect, is Lens Dirt slider
^ this should be improved a bit, as in UI brightness still won't affect every UI element (health bar), but should affect some more (menus, dialogs).
One output shader was missing, I added a warning in addon for that, so in the future you can know instantly in that case.
^ has that one LUT shader in touhou
generic? this was a pain in the ass 😭
I (jon) got one mine working a lil bit last night it looks pretty good imo but i still got a lot to do
the game as a lot of goofy a stuff going on
Did you figure UI?
not really
I still haven't had time to take another look
Uhm, does this help UI brightness application?
there's a still a shader for the mouse movements i gotta find
I don't mean overbright UI, that's no issue, to me anyway
I mean the scaling (Game brightness/UI brightness)
um idk
it looked a bit cooked tbh
you'd be a better judge of it than me idk the issue you're refering to
this is the screenshot i took of urs
Seems to be missing rg11b10 upgrade?
Also Game and UI brightness should be left at default because borked
Actually, maybe it's fine as long as both Game and UI are set to same value
Because looks hard clamped to bt709
Also was that this build?
yeah
I guess yea, previous one would've been clamped
working hard to make the work on mine pointless lmao
I think something is output ratio or any size if you use Super Resolution lower than 100
I did nothing but unclamp fsr
kidding lol
I mentionned it all the way back here
Ah, my bad
Is that what that compute shader is?
yea
I think so ?
Whatever they call Super Resolution in game settings
I assume that's Fidelity Super Res
I was assuming it was some sort of anime filtering thing just because of the game lol
still looks the same to me
It's unclamped ? xD
Or is there an issue? I'm confused what you're saying
oh yeah i didn't even notice lol
I don't know how game is supposed to look xD
images look so similar
For the record adap, we were gonna get to that upgrade, I just wanted us to get everything else working before throwing another upgrade at it
Also voosh the game has another grading shader after tonemapping that does not clamp but does boost brightness and clip, I think anyway.
Uhm what
yeah idk how you got urs to be unclamped without that part speaking about a different shader
Can’t send shader I’m on my phone
It's just that one custom-ish FSR shader I had to unclamp
Haven't seen any grading or anything else I dunno
Anyway if you're doing game specific addon I take it I don't have to figure out the UI thing 😅
actually wait yeah the grading shader does clamp by default
Game/UI Brightness scaling
idk how you got it unclamped
Idk what this shader was, just know it was sent to me lol runs after fsr1
this one i think
That's a blit I think
Probably doesn't do anything, did you confirm by checking cbuffers?
No
Toggling draw made it look like grading
ill take ss
Because "draw" on a shader doesn't necessarily only affect the shader itself
In this case it's a copy, probably copying grading output or something
And this gets "cancelled". That would be my guess anyway
I just don’t get why this is so clipped
Is that unityengine?
Yeah
Probably just increase Clipping slider, it's done for that
🤷
It should be exposed in any settings mode
With the game config thing for upgrades etc, it's probably possible to also change default slider values
it wasn't draw
it was bypassing the code with untonemapped
Oh that’s right
undrawing it pauses the game
Maybe I missed that it was multiple textures
What is r1.xyzw = t1.Sample(s0_s, v0.zw).xyzw; ?
untonemapped is completely skipping that
yeah thats what i thought it there a way to actually skip those?
Looks like wrong gamma space or something ? I dunno
Well, wrong as in linear/gamma, not srgb/2.2
if you set it before it looks messed up
I'd have to get hands on, but I'm confused why you even need to change this shader
it had a saturate function at the end of it but now that i think about it it might've just bee me testing what things did
lemme dump it again
yeah just me being stupid
@haughty dock
😭
So is there an issue with that? As I said I don't know what game is supposed to look, but unless it's omega broken, it may just be a matter of moving a couple sliders
Clipping probably? If game actually gets bright, you may want to increase that, from 10 to 50, fine tuning this really depends on the game
Assuming this is possible, then I don't mind setting different default Clip value for games along specific upgrades and stuff
I don't mean to ask much really, but that kind of feedback would be really helpful.
Kinda the whole point of these preview builds, so that things are nice when addon finally releases...
I would like to help I'm just not up to what's the issue?
oh I see adap just posted his version let me see
I don't even know lmao. I'm just trying to understand what they meant, I'm not even sure they're talking about unity addon 🤷
Anyway if something is broken, please report it. Even if a game-specific addon for the game in question is made, doesn't mean feedback isn't gonna help other games or the addon in general.
Not only bugs, any feedback/idea/improvement suggestion is welcome. Thanks
yeah not much else i can say but it's same on my end too, looks crushed, messing with sliders didn't help it's all I could do
Which addon is that..? xD
this one
the universal looks normal, just can't adjust peaks
Even this ?
Game/UI brightness should be both same value I think, that's the only think I know is broken for sure. But then apparently something else might be wrong, I'm not sure to understand
I'm not 100% sure what's goin on either at this point lol
I haven't loaded the game up myself
oh I completely missed this post, will try rn
the funny thing is the original universal addon looks just fine to me, and peak adjustments work too
there really isn't anything to complain about tbh
while the new ones posted today just look oversaturated and contrasty, and clipped
as for the whole UI thing being wonky... I remember this behaviour in native Genshin (which is a fork of unity I think?) HDR implementation exactly the same - if you keep reducing the UI brightness slider without touching the paper white, it will start to do some very weird things. it's like they're not entirely seperate and there's some fuckery going on
So last build I shared is broken? I'll check thanks
it just doesn't look right to me i'll post a screen
~~what's crazy to me is that I don't remember peak brightness slider working on the old universal addon yesterday, but now it works? ~~
omg i'm an idiot i have multiple addons in my folder I didn't clean it up
give me a minute i have a whole mess on my end
it's probably fine I just made an oopsie
xD no worries it's been confusing
yeah i f'ed up bad just a sec
so the old one obviously doesn't work for peaks, now let me test correctly
this actually looked more correct to me and UI slider didn't mess up things as much as it does now 
this is with adap's mod from earlier and I think it's just fine. UI works correctly again as well (it affects both game and UI but it doesn't "ruin" the game)
Yea I haven't yet taken a look at that UI thing, game does something unusual I think.
I can have UI brightness affect everything again, though this should be the same as setting both Game and UI brightness to same value until I figure that out
i mean yeah with your newest one i get this oversaturation/contrast
just looks harsh tho honestly i'm not sure what is more correct but I prefer the top one
i'll delete some of the garbage i wrote since it was a mistake on my end
I'll have a look, might have messed something unrelated to the game, I did a lot of changes I haven't had time to test in that latest build. Is why it's not pinned.
I'm sure gamingtech would prefer the second one and maybe it's actually more correct but just looked so harsh on first glance. i would have to take a look at the game in SDR first since i can't even remember what it's supposed to look like
I probably messed some of the PQ conversion. Either dithering or HDR10 swapchain
That's expected tho, just the dither change was like over 300 shaders with multiple lines changed/rewritten, I'd be surprised I didn't mess anything tbh
that game looks deepfried no cap
just on a glance which one do you prefer?
what does that even mean 
if you mean this I would agree, this looks charred 
Found these two lutbuilders for Bloodlines 2.
Oh whoops. I'll post there
Thank you very much for checking and all
nah bro I did nothing i'm just like the plasma guy; kinda clueless but can't restrain my passion for it, we should all be thanking you guys for doing this gods work 🙏
wow SDR just goes raw
it's so dead to me
makes me wonder what correct HDR even is for this then, it looks soooo different
yeah i like this one a lot
but I will agree we do seem to have a black crushing issue overall
and colors hmm just different
Well it doesn't seem too broken
I certainly enjoy it a lot but is it technically correct i have no clue
Isn't this just Gamma correction?
Depending how you are viewing SDR, it may be lacking
I still don't like the shadows here the gamma seems too dark? and I can't fix them with shadow slider
i think it just needs some gamma fix yeah, gamma still looks off to me, just too dark
looks like it got double linearized or something
Ooooh
Maybe SwapchainPass is decoding gamma when game and UI are both linear or something?
I think default does that, but I can't help as I never was able to get it right myself 
pow(x, yes)
oh i forgot to set defaults
one sec
these were supposed to be set
ill fix addon
you sure about that 💀
scrgb too
I mean that's what happens if I set to srgb. or did I missunderstand?
"none" looks better
I can't seem to reproduce this, but I'm at the very beginning. If missing output shader, there should be a red warning in addon.
Else did you try to increase Clipping slider? If it's just clipped and strong highlights, may just be this
Also uhm, rg11b10_float should be upgraded, in case not already done, or WCG is gonna be clipped
output size or all?
Output size is enough if game's Super Resolution setting is 100
Else I think should be ratio or all
this one should have the right defaults but the games looking a lot more cooked than i remember last night
it's still cooked to me, these are the settings I use
Game and UI brightness should be set to the same value
yeah ik but it's not that much change, I just like UI slightly darker
whats it look like
Doing so is what clips...
burned like this
this is with the defaults
Tried to increase Clipping..?
uh no let me see
no difference
reducing internal lut strength makes it burn less but it's still a lot
I'm not sure what's going on, this is vanilla and default settings with clipping increased, both SRGB eotf
Looks fine to me..? Or at least it doesn't look more contrasty to me at all
in before using sk
also they have scrgb selected not pq, might be related
or some reshade fx
Maybe I should reduce highlights a bit for Unity Neutral
It is very dim
Right now is just Reinhard with 0 adjustment instead
Yea could be something else mixed up, I'm still confused whether one or two people experienced the same issue
reshade.log usually reveals more than what's in images
it shouldn't move midgray though
something is off there
that looks like contrast dialed up
Uhm, I'm using renodx::tonemap::config::Apply; with mid gray from running tonemapper on 0.18
Unity neutral doesn't move much anyway, is still 0.18 something
i meant in the images they uploaded. midgray is way boosted, clip shouldn't move mid gray that much
Ooooh
Probably the Game / UI brightness
Scaling is broken currently in that one demo, I'm just looking at it now
It seems UI renders first, then render, and a shader lerps between both at the end
Reflections be so comfy
Oooh, it's that one shader!
Both srgb decoding (on scene and ui) are running, the encodings don't.
But... What is it decoding, isn't Uber output linear..?
It is, so uhm.
Aw, there's another blit with encode right before. Wait, how is color not clamped 🤔
Maybe I'm reading cbuffers wrong
Might be why mine is
rg11b10_float has to be upgraded unless you do ToneMapPass in this UIBlit shader, but I dunno if it makes any sense to do so
Mines still clamped with that lol
Aw, I'm not sure then. If using resolution scaling (lower than 100) then upgrade has to run on aspect ratio or any size
I'm still unsure what goes on
Other shader draws multiple times 
What kind of SRGB conversion is this
r1.xyz = float3(0.0549999997,0.0549999997,0.0549999997) + r0.xyz;
r1.xyz = float3(0.947867334,0.947867334,0.947867334) * r1.xyz;
r1.xyz = log2(abs(r1.xyz));
r1.xyz = float3(2.4000001,2.4000001,2.4000001) * r1.xyz;
r1.xyz = exp2(r1.xyz);
r2.xy = float2(0.0773993805,0.0773993805) * r0.yz;
r2.zw = cmp(float2(0.0404499993,0.0404499993) >= r0.yz);
r2.yz = r2.zw ? r2.xy : r1.yz;
r3.xyzw = cmp(float4(0.00313080009,0.00313080009,0.00313080009,0.0404499993) >= r0.xyzx);
r4.xyzw = float4(12.9232101,12.9232101,12.9232101,0.0773993805) * r0.xyzx;
r2.x = r3.w ? r4.w : r1.x;
r1.xyz = log2(abs(r0.xyz));
r1.xyz = float3(0.416666657,0.416666657,0.416666657) * r1.xyz;
r1.xyz = exp2(r1.xyz);
r1.xyz = r1.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
r1.xyz = r3.xyz ? r4.xyz : r1.xyz;
The end of shader:
r2.xyz = r2.xyz + -r1.xyz;
r1.w = saturate(-1 + cb0[135].x);
r1.xyz = r1.www * r2.xyz + r1.xyz;
r1.xyz = r1.xyz + -r0.xyz;
r1.w = saturate(cb0[135].x);
o0.xyz = r1.www * r1.xyz + r0.xyz;
o0.w = r0.w;
r0 at the very beginning is FSR output
i'm also confused why Voosh is getting different results. I have nothing else active in my reshade
thtat loos like decode immediately followed by encode
Yea kinda, I'm not sure why the components mix up, maybe a compiler thing. I'm lazy to check, or rather I'll start with cbuffers, this may not even run
well its multiplying something too
* r0.xyzx;
wait no that was the orignial color
idk
confusing
ya its just decode and encode I think
cbuffer is 0
It doesn't even run 
r1.xyz = r1.xyz + -r0.xyz;
r1.w = saturate(cb0[135].x);
o0.xyz = r1.www * r1.xyz + r0.xyz;
This lerp returns r0.xyz which is original color untouched 😄
Explains why addon isn't clamped to bt709 when this runs after lutbuilder/uber
what even are these cbuffers i don't understand them
Still a bit obscure to me too.
In simple words cb0[135].x here contains a value that is calculated/determined elsewhere (as in not in the shader).
For example when a game has a brightness or gamma slider, corresponding value is often "communicated" to shader(s) thanks to a cbuffer. We use them in RenoDX to communicate sliders values to shaders.
Communicate is a weird word here, and I still managed to use it twice 
what is the value being communicated here?
0
^
Devkit can expose cbuffers values after you tick "Trace Constant Buffers" in the settings tab.
cb0[135].x = 0 in this case, in the scene I'm in at this moment of the game
Given what it does, I doubt it ever changes. Maybe for some menu I guess (?), but unlikely during gameplay
what do the channels have to do with the cbuffer then?
Game needs a restart after enabling that I think.
Else uhm, tools like RenderDoc, I'm not sure about Pix but probably expose cbuffers values in captures.
REST addon can also monitor cbuffers, in real time and has the benefit of having a window that doesn't close when ReShade UI is hidden, allows to have a small window with cbuffers in a corner if needed, I find it really convenient
r1.xyz = r1.xyz + -r0.xyz;
r1.w = saturate(cb0[135].x);
o0.xyz = r1.www * r1.xyz + r0.xyz;
// is the same as
o0.xyz = lerp(r0.xyz, r1.xyz, saturate(cb0[135].x);
// saturate(cb0[135].x) = 0, so o0.xyz = r0.xyz
The notes here should help with some of the decompilation quirks.
The formula here is ((b-a) * t) + a = lerp(a, b, t)
with a being r0.xyz, b being r1.xyz and t being the cbuffer value clamped
And the lerp is uhm... that 
LinearintERPolation..?
Or LinEaRinterPolation
-# I just don't know how to explain it
Basically with t = 0 it returns a
with t = 1 it returns b
and with t somewhere in between it returns somewhere between a and b
what shader are you even looking at now
The one you sent
UI one
I don't get it, something is weird
Everything works if that shader doesn't run
Is demo... broken? Actually I should boot in SDR see what goes on
i don't see a cb0[135].x anywhere
Aw sorry you meant that
It was 0x13F9BD51
It runs right before the UI one, but it does nothing so I went back to UI one
oh okay
I understood "now" as in right now, since I'm still looking at the game while chatting
Aaaaaaaaaaaaah of course
_unorm_srgb something something
This is where the decode comes from in UIBlit
Well I guess anyway, soooo
Should probably just remove that and call it a day
this game is so goofy
urs looks so much different than mine
all i've done is a simple tonemappass so
haven't touched the lutbuilder stuff yet
It should be the same, just moving ToneMapPass from I assume uber shader to lutbuilder
Tonemapper is at the end of lutbuilder, something like this
Though you should probably compare with UIBlit draw disabled
was gonna figure it out today jon gave me some tips for what to do next but i think i just need to understand more of the concepts first
got distracted
Wait it's already added?
Pretty sure this is ANOTHER shader
You mean depending character..?
The one you sent is exactly the same as the one I had added already
Hmmm
I just never shared a build with it before
Ah
So I'm confused how you would even know it's a different one 😅
^ Pinned build is past me saying I added shader
Anyway let me know if something is borked
Build is this but also had a bunch of untested changes because in the middle of it right now
Ah lemme turn my PC on (I just woke up)
Hold on because I just woke up
clears throat
(I'm not doing this again)
No rush xD
Here, and with Game/UI brightness working, though with a kick in when you change it due to FSR1, similar to what happens with TAA in some other games.
Oh
Means it's temporal FSR
💡
I could've guessed from 2 UAVs maybe
Well 3 actually..? But one is like, luma histogram or something
omg how do you guys even do this black magic, YES... it's.. perfect now!! 😍 ✨ 😭
I wonder which tonemapper do you prefer/think is correct to use? ussually there's not much difference but in this case ACES is much more vivid/deeper, gives that "vivid anime oled" look I like, while Reinhart/Daniele are closer to vanilla sdr (and need some extra gamma correction, at least for my taste) both are usable but what would you pick?
Always default one imo. Well depends what you want, but default one should always be closest to vanilla
I think it's better to use dedicated sliders rather than change tonemapper.
For example, instead of changing to Daniele, just increase Clipping or reduce Highlights.
Instead of changing to ACES, increase Contrast/lower shadows.
Sliders offer a better control, ACES is a bunch of contrast and sat but with no control over it.
Aw I forgot, also fixed FSR1/RCAS decompilation issues, removed previous hacky workaround as not needed anymore...
Added normalization for RCAS when in HDR.
Also untested 😅
Mmh, seems FXAA also needs 0-1 range to work properly (?)
might just have to do it in pq then
Oof
Wouldn't normalizing by peak work ?
I did that for RCAS 🤷
With an extra FastTonemap which is... max channel?
Probably cheaper than PQ, especially on multiple samples
Aw, also PQ means using bt2020 or clipping wcg
So would have to adjust luminance formula, I guess...?
But does it even work in PQ, sounds weird, y::from::bt2020(pq::encode(bt2020::from::bt709(color)))
I couldn't even tell FXAA was broken when I had added borked decompilation in multiple mods, obviously I can't tell it doesn't work properly with values beyond 0-1 
Just gonna do peak normalization, at least shouldn't get worse, maybe something improves
Oh, is normalized by paper white, not peak
Mmmh
Right, hence the max channel tonemap
float3 PerformRangeReduction(float3 input, float minNits, float maxNits)
{
float3 ICtCp = RotateOutputSpaceToICtCp(input); // This is in PQ space.
float linearLuma = PQToLinear(ICtCp.x, MAX_PQ_VALUE);
#if RANGE_REDUCTION == HDRRANGEREDUCTION_REINHARD_LUMA_ONLY
linearLuma = ReinhardTonemap(linearLuma, maxNits);
#elif RANGE_REDUCTION == HDRRANGEREDUCTION_BT2390LUMA_ONLY
linearLuma = BT2390EETF(linearLuma, minNits, maxNits);
#endif
ICtCp.x = LinearToPQ(linearLuma);
return RotateICtCpToOutputSpace(ICtCp); // This moves back to linear too!
}
float3 PerformRangeReduction(float3 input, float minNits, float maxNits, int mode, float hueShift)
{
float3 outputValue = input;
bool reduceLuma = hueShift < 1.0f;
bool needHueShiftVersion = hueShift > 0.0f;
if (mode == HDRRANGEREDUCTION_NONE)
{
outputValue = input;
}
else
{
float3 huePreserving = reduceLuma ? HuePreservingRangeReduction(input, minNits, maxNits, mode) : 0;
float3 hueShifted = needHueShiftVersion ? HueShiftingRangeReduction(input, minNits, maxNits, mode) : 0;
if (reduceLuma && !needHueShiftVersion)
{
outputValue = huePreserving;
}
else if (!reduceLuma && needHueShiftVersion)
{
outputValue = hueShifted;
}
else
{
// We need to combine the two cases
outputValue = lerp(huePreserving, hueShifted, hueShift);
}
}
return outputValue;
}
I think Unity's HDR equivalent of Neutral Tonemap is just Reinhard, luminance or per channel or lerp between both as hue shift option (?)
I'm confused by the BT2390EETF though
// Ref: https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2390-4-2018-PDF-E.pdf page 21
// This takes values in [0...10k nits] and it outputs in the same space. PQ conversion outside.
// If we chose this, it can be optimized (a few identity happen with moving between linear and PQ)
float BT2390EETF(float x, float minLimit, float maxLimit)
{
float E_0 = LinearToPQ(x);
// For the following formulas we are assuming L_B = 0 and L_W = 10000 -- see original paper for full formulation
float E_1 = E_0;
float L_min = LinearToPQ(minLimit);
float L_max = LinearToPQ(maxLimit);
float Ks = 1.5f * L_max - 0.5f; // Knee start
float b = L_min;
float E_2 = E_1 < Ks ? E_1 : P(E_1, Ks, L_max);
float E3Part = (1.0f - E_2);
float E3Part2 = E3Part * E3Part;
float E_3 = E_2 + b * (E3Part2 * E3Part2);
float E_4 = E_3; // Is like this because PQ(L_W)= 1 and PQ(L_B) = 0
return PQToLinear(E_4, MAX_PQ_VALUE);
}
Aw and
/// BT2390 EETF Helper functions
float T(float A, float Ks)
{
return (A - Ks) / (1.0f - Ks);
}
float P(float B, float Ks, float L_max)
{
float TB2 = T(B, Ks) * T(B, Ks);
float TB3 = TB2 * T(B, Ks);
return lerp((TB3 - 2 * TB2 + T(B, Ks)), (2.0f * TB3 - 3.0f * TB2 + 1.0f), Ks) + (-2.0f * TB3 + 3.0f*TB2)*L_max;
}
Oooh, it's a tonemapper (?)
Seems to run either Reinhard or this EETF thing
Practical application
The sample curves shown in Fig. 20 are designed for tone mapping to display black level up to 0.1
cd/m2 and display white level as low as 100 cd/m2.
I guess
it's in the repo as hermitespline
oh boy this shader has been incredibly difficult to try and modify to be more saturated
(this is a beat saber shader)
No idea what it does by looking at code
I haven't messed with stuff that isn't post-processing, except to remove/add clamps (saturate(), max(0, min(1...)
ok replacing the last line with o0.w = saturate(r0.x); seems to work well enough
before
after
Always preferable, yes 🙂
Latest builds should be able to hook into Unity Engine while the game's already running and apply all code patches for input and timing.
Can inject ReShade into the game while it's running that way also.
Local injection is just an initialization race nightmare for pretty much no benefit.
Even for the older Unity engine games that aren't flip model, you can basically just press Alt+Enter twice after injecting SK and presto 😛
Was a neater trick before Windows 11 could just turn any window into flip model.
Alt+Enter trick is nice, also forces monitor resolution/aspect ratio in a lot of Unity games that don't expose it in game settings (pretty common on ultrawide).
I noticed RenoDX's Swapchain Proxy can be enabled that way without game restart, I'd like to make corresponding button update cbuffer value on fullscreen mode change rather than on game boot only.
I guess it's not really fullscreen mode change that is relevant, but rather what event alt+enter triggers that allows proxy to be enabled on the fly.
Something with swapchain I guess, maybe re-created or something, will look into that
Yea, seems it is destroyed and created again (?). Will check a few more games
Right, so OnDestroySwapchain() > OnCreateSwapchain > OnInitSwapchain > OnSetFullscreenState... Let's mess with that already 
Oh, I could display a warning when Unity's SwapchainBlit shader isn't available and proxy has to be enabled. That should be within my ability
Yet another callback 🙈
CustomShaderEntryCallback(0x20133A8B, [](reshade::api::command_list* cmd_list) {
finalBlitDraws += 1.f;
finalBlitCheck = renodx::utils::swapchain::HasBackBufferRenderTarget(cmd_list) ? finalBlitDraws == 1.f : false;
return true;
}),
Mmh, I already have void OnInitSwapchain() for the monitor peak detection thing, let's see if I can do something to enable proxy on the fly...
It's really just the cbuffer update that's missing
Alternatively I could have SwapchainBlit replace only if proxy is disabled, that would be even smarter, but I don't know how to exclude one shader from __ALL_CUSTOM_SHADERS macro
Oof, apparently Swapchain Proxy can't be enabled with alt+enter in every game
Ah well, I can't reproduce this at all now.
this exists
at least if you only want swapchain pass only if writing to swapchain
I'm also checking for shader to only draw once, as a few games use it as a "normal" blit in an earlier draw.
That said, I would expect __ALL_CUSTOM_SHADERS macro to "override" CustomSwapchainShader()
yep
Oh.
no overrides
ignores if already exists
afaik most languages override when you append to a map
Thanks, will look into that again then. Whatever I encountered was probably skill issue
#define CustomSwapchainShader(crc32) {crc32, {crc32, __##crc32, -1, renodx::mods::shader::invoked_custom_swapchain_shader = &renodx::utils::swapchain::HasBackBufferRenderTarget}}
this is just a macro to not replace (will still draw) if it's not swapchain
also enables renodx::utils::swapchain::Use() for you, but you're already doing mods::swapchain::Use(), so you enabled it already
if (trace_unmodified_shaders || invoked_custom_swapchain_shader != nullptr) {
renodx::utils::swapchain::Use(fdw_reason);
}
the check is useful for games with native HDR where you're not messing with swapchain itself, but want to still track swapchain writes
struct CustomShader {
std::uint32_t crc32;
std::span<const uint8_t> code;
int32_t index = -1;
// return false to abort
std::function<bool(reshade::api::command_list*)> on_replace = nullptr;
4th entry is .on_replace
so tunic and silksong use it, so early usage of the 0x201 shader (not swapchain) isn't affected
silksong doesn't use pixel proxy shader
I see, very convenient indeed.
if you have a shader that is basically checking a cbuffer to know if it should use vanilla or custom logic, on_replace works better
I do have a cbuffer currently, so that SwapChainPass doesn't happen twice (both in Unity's FinalBlit and Swapchain Proxy)
I was thinking maybe I don't even need it if I do something like:
CustomShaderEntryCallback(0x20133A8B, [](reshade::api::command_list* cmd_list) {
finalBlitDraws += 1.f;
finalBlitCheck = renodx::utils::swapchain::HasBackBufferRenderTarget(cmd_list) ? finalBlitDraws == 1.f : false;
return g_use_swapchain_proxy == 0.f;
}),
With g_use_swapchain_proxy being binded to proxy slider
But I can't get proxy to enable on alt+enter again
Not sure what changed, maybe I dreamt that part...
should be on every present, unless it recreated the swapchain (resized) and something broke
because it won't run proxy on unfamiliar/nonupgraded swapchains
which... hmm
i guess a resize is nonupgraded maybe
you should see something in the log when it breaks, like mods::swapchain::OnInitSwapchain(Abort from ShouldModifySwapchain:
are you sure it's not running at all? or maybe some texture stayed in rgba8u. that's what happens in tunic for me
so i do UpgradeRTVShader to track the main render and upgrade it that way
Proxy runs on game restart as expected
I just thought I could enable it without restarting, just with alt+enter
alright gonna dump some audiosurf 2 shaders since some of them need fixing
Yea UI is fine, especially if Unity default UI shader
looks like UI is a custom shader
or uhh
well, it's just very washed out
oh
the UI is linear
hold on
I gotta enable swapchain proxy
ok that fixed the 9999999 brightness but now the UI is even brighter
and the UI is still controlled by game brightness
oh
ok so it's actually a shader in renodx that's causing the HUD to be controlled by UI brightness
0x49e25d6c
audiosurf 2 menu background
oh joy
there's
there's no tonemapper
there's no post processor
well, turns out that I can just use HDR black floor fix to make it look good
ok so now suddenly the colours are normal???
ok suddenly it just works now
maybe the trick is to enable this and then disable it?
Use either Black Floor Fix or RenoDX's SDR EOTF something (previously gamma correction)
hold on I gotta try this again
Not both at same time since the idea of both I believe is to fix same issue
hmm
OH
OHHHH
I just realised
enabling swapchain proxy allows swapchain encoding to actually work
That's BlitCopy shader, you can try to disable BlitCopyHack if it's causing trouble.
Or you can try different values for Scaling offset slider, might fix whatever is going on
yeah, audiosurf 2 uses gamma instead of linear
Only if Unity's SwapchainBlit shader isn't availble
0x2013 something
Sometimes it's not used in exclusive fullscreen, but appears when in windowed/borderless, eventually after a game restart
anyways, I feel like I can't really find any shaders to dump since the game now "just works"
excuse the low quality I was trying to get it under 1gb
I can send AV1 videos onto discord right?
might try doing that
AV1 works, I share all my clips with it
Aye. If needed you can play with Tonemap and Scaling offsets in Compatibility section, commonly both on same value.
That is only in case Game/UI brightness don't behave correctly, and maybe if color grading affects UI or something like that
one day a FOSS video editor will have PQ export support, then I'll be able to fade the music in 😔
yo what is this game
Audiosurf 2
thanks
ah ok so the neon environment does have bloom
seems to be a common pattern with rhythm games that have custom content that the environments would have their own shaders lol
I found the bloom
it's either 0x79b283be
or 0x4690c0dd
Hi. There is such a game as Narita boy, it is built on Unity 2019. I'm interested to know if it makes sense to make a RenoDx mod for this game. Just curious to know? Maybe this universal mod its good for this game
if there's anything that doesn't get upgraded feel free to dump the shaders
only game so far that has been "maybe it's better if a separate mod was made for it" has been Beat Saber (the reflections in the environment objects are ACES tonemapped)
draw order
huh, Audiosurf 2 is actually quite fun with slower songs
I could try sending both and see which one works
when both shaders are disabled, the bloom disappears
uhhhh
lmao
lemme just fix up the proton prefix so I can access my music quicker
oh, I gotta actually post a picture and/or video so you actually understand what I'm talking about 😅
oh just realised they're called skins not environments
actually why am I recording a video I can just post a screenshot
Oh yea screenshot is better please
I have potato internet and for some reason videos on Discord particularly can take years to load
anyways
neon has bloom
I just download them when I need to look, still a bit long but at least I'm not stuck on Discord channel
stadium has very little bloom
(it also copies the colours of the album art of the song you're playing which is pretty cool actually)
the mystical skin has pretty much no bloom
but the ending fade to white does flashbang the fuck outta you
the car in the dusk skin looks kinda goofy
this skin has bloom
I'll see what the shader looks like
I'm giving this information but idk what to do with it
Also check corresponding draws in snapshot tab. I'm a bit worried it does Blend things
well, I guess there are blends
Meanwhile, still can't boot Rocksmith 2014 with ReShade 
Uh no, scary 🙈
but it doesn't seem to be on the ones that use 0xd2e0af35
you might find this one interesting
part of the "Dusk" skin
This one (0x4690c0dd) I think it builds the bloom texture with tint and intensity in cbuffers at the end.
Then the other shader maybe samples bloom and does a blend to add it, because I can only see one texture in the other shader...
ahhh
I think also the bloom might be affected by the intensity of the song
I guess that's the gist of Audiosurf 2
it dynamically changes based on the intensity of the audio file you plug into it
This looks a bit scary. I recognize 4 lines which are SRGB encoding approximation... Pretty much it
3.14159274 sounds familiar
PI?
Yea, definitely scary 😒
oh my god
lmao
this made me think
I wonder what a Pi tonemapper would look like
when was this game made
holy shit
2015
Oh wait, I just realized
What's the deal with bloom?
Just gotta hook slider right..?
I just realised that wine wayland keeps making the bloom look desaturated
yeah
I might download the community patch because it makes the game 64 bit, which means gamescope might actually recognise that the game is in HDR
however I then lose the ability to use my downloaded songs 😔
Well the builder should do then, this 0x4690c0dd.
This assumes the rest (tonemapping/color grading/game brightness) already works correctly when bloom is used.
I think cb0[4].www is game's "Bloom intensity" value. It's really just guess, I'm also hoping that way I don't mess with the possible blend there is then 😒
And cb0[4].xyz would be bloom's tint/color
yeah hold on I'm just gonna make my game 64 bit and hope that it doesn't completely re-arrange the shaders
oh, uhhh yeah that community patch breaks playing local music
I think there might be 4 shaders that affect bloom but idk
Uhm. I'm not sure what to do with any other than 0x4690c0dd
Is it always used when bloom is used?
I put it a little wrong because I'm writing through a translator. I don't know how to make such mods myself, and I just wanted to find out if there is any mod already made that is suitable for this game, or maybe someone could make a separate mod, or maybe there is no point in improving anything there?
Had a cutscene and now the game looks like this lol
persists even after restarting the game, maybe the city is using a new shader now?
Yep, likely. Can move LUT Shaper slider to Vanilla to confirm, though this will clamp to SDR (in this case, not all games).
I'mma have to add missing shader to addon.
Next build will have a warning explaining basically this ^
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
Devkit link: http://clshortfuse.github.io/renodx/renodx-devkit.addon64
I think for the neon skin only
I'll check if any other skins use it
OH
classic skin uses that shader too
okay so it's not just neon that uses 0x4690c0dd
I think rendox breaks the rocket flame shader
so that one might have to be fixed manually with an SDR reference image
ah yep
SDR
HDR
oh wtf the flame is part of a blend shader
and is the same shader as the tunnels???
hmmm
maybe the tunnels are also broken and need fixing too...
this game is weird... 
oh my god it's in unity 5
are you kidding me 😭
have you tried changing the swapchain encoding to gamma?
IT WAS A 1 LINE CHANGE??????
this is all I had to add in order to fix it
@kindred nacelle try enabling swapchain proxy, setting swapchain encoding to gamma, then restart the game
encoding to gamma fixed the washed out looking, but the game is clamped to 203 nit
swapchain proxy already enabled
R11G11 on output size
try upgrading R10G10B10A2_TYPELESS?
@main wharf one line fix for the ship flames in Audiosurf 2
Did you try to only saturate last component?
o0.w = saturate(o0.w);
If that's not enough, I think this should be:
o0.xyzw = max(0.f, o0.xyzw);
yeah I only saturated the last component
and it looks like that did it but I might try this as well
Still clamped, but at least not washed out anymore
I did this
there's no o0.w
You can add what I wrote after last existing line
Well like:
o0.xyzw = v1.xyzw * r0.xyzw;
o0.w = saturate(o0.w);
strangely doing it like that doesn't work
but saturating o0.xyzw does work

just need to ask what you're trying to accomplish with the max
because with the single line change the flame does already look proper
Yea I was getting to that, just gotta figure how to word this so it makes sense xD
Uhm, issue is likely undesired negative values, which both max(0 and saturate() strip.
That's all max(0 does, whereas saturate() also limits to 1, like an additional min(1.
That is terrible 
ohhhhh
Ok let's put it another way, max(0 is more conservative than saturate() because it preserves values above 1.

Just to be clear, I meant my wording
green is before blue right?
I guess sometimes some values shouldn't go above 1, depends what value is really...
In this case I don't know, depends tbh.
It is possible saturate() would fully clamp the effect, and max(0 would keep whatever highlight is there
maybe it's working backwards
It is also possible saturate() looks nice and max(0 is broken because value shouldn't be above 1
yeah
unless there's a way to flip it to go into negative
or possibly multiply it by a negative value
hmm, well I guess instead of trying to make it go into the negative I could just multiply it by a decimal
Wait what
o0.xyzw = max(0, o0.xyzw) * 0.5;
decrease the intensity while still allowing it to stay unclamped
however this decreases the intensity of EVERYTHING connected to it
Is it too strong? Maybe it has to be below 1

