#Unity Engine

1 messages · Page 3 of 1

main wharf
#

I think cb0[13].x is bloom intensity.
And cb0[6].x: pre-tonemap exposure adjustment.

#

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 kekwsit

#

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.

main wharf
#

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?

main wharf
main wharf
#

Mmh, I think I broke everything with the max channel change, gonna rollback this and gamut compression for now.

main wharf
#

^ Reverted some of the latest changes until I figure out why is broken

proper vine
#

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

proper vine
#

also to be clear im not saying mine looks better if you thought that

#

mines actually more orange than yours

proper vine
#

suprised it didn't do much

main wharf
#

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

proper vine
#

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

main wharf
#

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.

fiery sail
#

Is Risk of Rain 2 not working at the moment?

main wharf
#

It should, what issue are you having?

fiery sail
#

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

main wharf
#

🚧 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)

haughty dock
#

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?

main wharf
#

Yea I got confused by this too first, then figured it was doing the same as original code.

saturate() was added there though

main wharf
#

Mh, I guess there are a couple characters rendered, so yea I dunno

main wharf
proper vine
#

💀

#

Saw it here

#

I still don’t know what it does tbh

haughty dock
#

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

proper vine
#

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?

haughty dock
#

it's something built into tonemappass now I believe

#

the blowout restoration slider and sat correction and what not

proper vine
#

this code is so complicated

#

got me tranforming into a computer with all this recursion

desert herald
# proper vine I still don’t know what it does tbh

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
last nexus
#

does it still work ?

crude flower
remote edge
#

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 🙏

crude flower
remote edge
#

doesn't work for me...

last nexus
#

could be a newer build clamping the game

#

can you share yours @crude flower ?

crude flower
#

Excuse the blown out screenshot

#

Just tried the latest build from here and it's still working for me: #1413695723404398674 message

remote edge
#

just tried to unistall and reinstall

#

same thing

remote edge
last nexus
#

how does it work with particles

last nexus
crude flower
#

Particles and stuff should be in HDR range

#

The level-up screen is also pretty bright

remote edge
#

200 nits

#

it's like stuck or smt

main wharf
#

Check game settings maybe, if game has Exclusive Fullscreen it should be avoided.

remote edge
#

i'm bordeless

crude flower
#

I mean the one when you level up via XP that has the bright lines in the background

remote edge
#

i played a bit never got higher t'an 500 nits

#

ah yes those lines

crude flower
#

Yeah

remote edge
#

it should go to max brightess no ?

main wharf
#

It really depends how game renders things, not every highlight is gonna reach peak.

crude flower
#

Yeah, certain effects certainly get really bright

#

Like the rockets

remote edge
#

ok ok thx

proper vine
#

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

main wharf
proper vine
#

looks pretty good

main wharf
#

My bad I originally misunderstood, thought the issue was saturation so I suggested Blowout and Highlights Saturation kekwsit

main wharf
#

^
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.

main wharf
#

Yaaaaaaaay it works..!

fiery vapor
#

alright so when I disable this shader it causes the bloom to do this

#

does that mean this shader might be important?

main wharf
#

-# why ask me I'm clueless kekwsit

fiery vapor
#

0.03125,0.03125,0.03125,0.03125 looks like a tonemapper

main wharf
#

Nah

#

I think maybe it's the bloom builder ?

fiery vapor
#

also, I figured out that Beat Saber has aces in materials that have reflections

main wharf
#

As in, one of the shaders that contributes to creating the bloom texture

fiery vapor
#

probably nothing important (for now)

main wharf
#

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.

main wharf
#

Also so many of them, hundreds

main wharf
# crimson spear 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).

crimson spear
#

The Hundred lines has a super bright UI element due to overdraw

#

Would this help?

main wharf
#

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?

crimson spear
#

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

main wharf
#

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... 😅

crimson spear
#

I will check it out later, thanks

desert herald
#

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

proper vine
main wharf
#

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

proper vine
#

The first one lol

#

What sort of visual issues does doing this fix?

main wharf
#

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)

proper vine
main wharf
#

It is very much what I did

proper vine
#

The hard part is figuring out what to clamp I guess huh

main wharf
#

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.

proper vine
#

Cool thanks for explaining

#

Makes since

last nexus
#

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 kekpepehands

fiery vapor
fiery vapor
main wharf
#

Mh, will check demo but I thought this was working already 🤔

main wharf
#

Nvm got it, uses Beautify same as Party Animals

fiery vapor
#

eyy that fixed it

#

@main wharf I think you might've just optimised the game 😭

#

nvm Im going crazy

#

anyways it looks great now

fiery vapor
#

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

main wharf
#

I doubt my ugly unoptimized code improves anything lol

main wharf
fiery vapor
#

looks beautiful

#

although I wish there was more fine control of the effects

#

might be in the release version

main wharf
#

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

fiery vapor
#

chromatic abberation is one that can't be disabled

main wharf
#

Lemme see if I can find where this comes from

fiery vapor
main wharf
#

Aw yea thanks I do see it now. Didn't notice any corresponding code yet though, let's see

main wharf
#

Oh yea I think so

main wharf
#

No it was not kekwsit

#

Ooooor

#

Oh yes it is nvm

#

Mmmh, just gotta figure how to do slider

main wharf
#

@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));
crude flower
#

BALL x PIT works

delicate orchid
#

Does this version work with Atelier Resleriana?

main wharf
warm geyser
#

unless unity is missing shaders, there is no reason not to use it

fallen linden
#

oh wow they are finally not using the gust engine

delicate orchid
#

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

main wharf
main wharf
delicate orchid
#

instead of

delicate orchid
main wharf
#

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

delicate orchid
#

lovely, thanks!

uneven sluice
#

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

fiery vapor
#

hold on gonna buy the full game now

fiery vapor
#

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

main wharf
#

What is master spark, can I do that in demo kekwsit

#

Or feel free to trigger whatever it is with devkit loaded, then dump all and send

fiery vapor
#

but I do also know that pulling off a perfect dash can also cap the image

woven crag
#

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)

fiery vapor
#

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…

Price

$8.49

Recommendations

388

▶ Play video
#

ok 8.5

woven crag
#

an actual tohou game that's not slop?

fiery vapor
woven crag
#

that would be really nice

fiery vapor
#

well, here it is!

#

it's really damn good

#

it's peak

woven crag
#

we've been waiting for this forever. and mod works fine?

fiery vapor
#

yep

#

even some of the effects have been made to be adjustable with renodx (like the chromatic abberation)

woven crag
#

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

main wharf
#

Possible I don't know. FSR1 can have R10G10B10A2_Typeless upgrade requirement

woven crag
#

anything wrong if we just click all the options on hoping something would work?

main wharf
woven crag
#

oh ok i think i broke the game already 😂

#

had to try

main wharf
#

I'll have a look at demo

woven crag
#

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

woven crag
# fiery vapor looks beautiful

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 🤷‍♂️

main wharf
#

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

woven crag
#

The LUT sliders often don't seem to work, do they need a restart? I adjusted gamma within ilium black floor shader

main wharf
#

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.

fiery vapor
#

wait wtf fotonica is a dx9 game???

#

eh, probably don't need unity renodx for it lol

main wharf
# main wharf I'll have a look at demo

FSR1 things, once again. That's a new one though kekwsit

  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

woven crag
#

Well, its just a demo after all. High possibility this will change on release. Maybe not worth pursuing this for now

main wharf
#

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

glacial plank
#

Do you just need to invert the scaling at the start of the fsr shader

#

And then apply the scaling again at the end

main wharf
#

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

glacial plank
#

Well not 16 samples but still

woven crag
#

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)

main wharf
woven crag
main wharf
woven crag
#

i'll try some more with vanilla

main wharf
# woven crag its grayed out?

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.

woven crag
#

somehow all of that is grayed out

main wharf
#

RIP

#

Yea greyed out means not available

#

Well, in theory 😅

woven crag
main wharf
#

Does bloom slider affect UI?

#

Or uuuh, anything actually

woven crag
#

nope none of the effects sliders dont do anything

main wharf
#

Wut

#

Does color grading affect UI then ?

#

Like, Blowout 100 or Saturation 0

#

These are obvious

woven crag
#

that works fine

#

i mean it affects entire game

main wharf
#

Yea but does it affect UI ?

woven crag
#

uhmm

main wharf
#

Nevermind I'll download demo and see what's going on dw

#

Thanks for the report once again ^.^'

woven crag
#

yes it affects entire game including UI

main wharf
woven crag
#

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

main wharf
#

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.

woven crag
#

sweet

#

So you can just keep adding stuff on top of each new version and it all remains compatible? pogg

main wharf
main wharf
#

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... 😅

woven crag
#

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 kekpepehands

#

You know exactly what autohdr would do with that white blob, but here it's actually below 200 nits as it should be

fiery vapor
#

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

fiery vapor
#

maybe touhou project was made for HDR games fubukigrin

main wharf
fiery vapor
fiery vapor
#

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

proper vine
#

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

woven crag
woven crag
woven crag
main wharf
main wharf
#

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.

main wharf
main wharf
main wharf
proper vine
proper vine
#

the game as a lot of goofy a stuff going on

main wharf
#

Did you figure UI?

proper vine
#

not really

main wharf
#

I still haven't had time to take another look

proper vine
#

i got a lil bit of it

#

just using a saturate function

main wharf
#

Uhm, does this help UI brightness application?

proper vine
#

there's a still a shader for the mouse movements i gotta find

main wharf
#

I don't mean overbright UI, that's no issue, to me anyway

#

I mean the scaling (Game brightness/UI brightness)

proper vine
#

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

main wharf
#

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

proper vine
#

huh

#

its at default

#

why do you say rg11b10

main wharf
#

Because looks hard clamped to bt709

main wharf
proper vine
#

yeah

main wharf
#

I guess yea, previous one would've been clamped

proper vine
#

working hard to make the work on mine pointless lmao

main wharf
#

I think something is output ratio or any size if you use Super Resolution lower than 100

#

I did nothing but unclamp fsr

proper vine
#

kidding lol

main wharf
#

Ah, my bad

haughty dock
#

Is that what that compute shader is?

main wharf
#

yea

#

I think so ?

#

Whatever they call Super Resolution in game settings

#

I assume that's Fidelity Super Res

haughty dock
#

I was assuming it was some sort of anime filtering thing just because of the game lol

proper vine
main wharf
#

Or is there an issue? I'm confused what you're saying

proper vine
#

oh yeah i didn't even notice lol

main wharf
#

I don't know how game is supposed to look xD

proper vine
#

images look so similar

haughty dock
#

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.

main wharf
#

Uhm what

proper vine
#

yeah idk how you got urs to be unclamped without that part speaking about a different shader

main wharf
#

Does it happen when doing something in particular?

#

I did not play the demo at all

haughty dock
#

Can’t send shader I’m on my phone

main wharf
#

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 😅

proper vine
main wharf
#

Game/UI Brightness scaling

proper vine
#

idk how you got it unclamped

main wharf
#

What do you call grading shader?

#

Isn't that just unity's lutbuilder..?

haughty dock
#

Idk what this shader was, just know it was sent to me lol runs after fsr1

proper vine
main wharf
#

That's a blit I think

#

Probably doesn't do anything, did you confirm by checking cbuffers?

haughty dock
#

No

main wharf
#

I'm fairly sure they keep everything linear

#

So these are basically "dummies"

haughty dock
#

Toggling draw made it look like grading

proper vine
#

ill take ss

main wharf
#

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

haughty dock
#

I just don’t get why this is so clipped

main wharf
#

Is that unityengine?

haughty dock
#

Yeah

main wharf
#

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

proper vine
#

it was bypassing the code with untonemapped

haughty dock
#

Oh that’s right

proper vine
#

undrawing it pauses the game

haughty dock
#

Maybe I missed that it was multiple textures

main wharf
#

What is r1.xyzw = t1.Sample(s0_s, v0.zw).xyzw; ?

#

untonemapped is completely skipping that

proper vine
#

yeah thats what i thought it there a way to actually skip those?

proper vine
main wharf
#

Looks like wrong gamma space or something ? I dunno

#

Well, wrong as in linear/gamma, not srgb/2.2

proper vine
main wharf
#

I'd have to get hands on, but I'm confused why you even need to change this shader

proper vine
#

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

#

😭

haughty dock
#

lol

#

It be like that sometimes

main wharf
# proper vine still looks the same to me

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

main wharf
main wharf
#

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...

woven crag
#

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

main wharf
#

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

woven crag
woven crag
#

this one

#

the universal looks normal, just can't adjust peaks

main wharf
#

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

haughty dock
#

I'm not 100% sure what's goin on either at this point lol

#

I haven't loaded the game up myself

woven crag
woven crag
#

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

main wharf
woven crag
#

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

woven crag
#

it's probably fine I just made an oopsie

main wharf
#

xD no worries it's been confusing

woven crag
#

yeah i f'ed up bad just a sec

#

so the old one obviously doesn't work for peaks, now let me test correctly

woven crag
# woven crag

this actually looked more correct to me and UI slider didn't mess up things as much as it does now despairge

#

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)

main wharf
#

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

woven crag
#

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

main wharf
woven crag
#

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

main wharf
#

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

woven crag
dense thorn
#

that game looks deepfried no cap

woven crag
#

just on a glance which one do you prefer?

woven crag
woven crag
# woven crag

if you mean this I would agree, this looks charred kekpepehands

main wharf
#

Yea it seems borked

#

wrong color space or something I'll check

fierce maple
fierce maple
#

Oh whoops. I'll post there

main wharf
woven crag
#

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

main wharf
#

Adap's addon

woven crag
#

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

main wharf
#

Well it doesn't seem too broken

woven crag
#

I certainly enjoy it a lot but is it technically correct i have no clue

main wharf
woven crag
# woven crag

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

glacial plank
main wharf
#

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 kekwsit

desert herald
#

pow(x, yes)

main wharf
#

Maybe this thing..?

proper vine
#

one sec

#

these were supposed to be set

#

ill fix addon

woven crag
#

you sure about that 💀

proper vine
#

scrgb too

woven crag
#

I mean that's what happens if I set to srgb. or did I missunderstand?

#

"none" looks better

proper vine
#

for the "encoding" setting

#

not the two i sent earlier

main wharf
#

Also uhm, rg11b10_float should be upgraded, in case not already done, or WCG is gonna be clipped

woven crag
#

output size or all?

main wharf
#

Output size is enough if game's Super Resolution setting is 100

#

Else I think should be ratio or all

proper vine
woven crag
main wharf
#

Game and UI brightness should be set to the same value

woven crag
#

yeah ik but it's not that much change, I just like UI slightly darker

proper vine
#

whats it look like

main wharf
woven crag
woven crag
main wharf
#

Tried to increase Clipping..?

woven crag
#

uh no let me see

#

no difference

#

reducing internal lut strength makes it burn less but it's still a lot

main wharf
#

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

desert herald
#

in before using sk

#

also they have scrgb selected not pq, might be related

#

or some reshade fx

main wharf
#

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

desert herald
#

reshade.log usually reveals more than what's in images

main wharf
#

Ooooh yea, definitely increase clipping

#

Untonemapped goes reaaaaaaally bright

desert herald
#

it shouldn't move midgray though

#

something is off there

#

that looks like contrast dialed up

main wharf
#

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

desert herald
#

i meant in the images they uploaded. midgray is way boosted, clip shouldn't move mid gray that much

main wharf
#

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

main wharf
proper vine
#

Also gave it that brightness

main wharf
#

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

proper vine
#

Might be why mine is

main wharf
proper vine
#

Mines still clamped with that lol

main wharf
#

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

main wharf
#

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

woven crag
glacial plank
main wharf
#

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

glacial plank
#

well its multiplying something too

#

* r0.xyzx;

#

wait no that was the orignial color

#

idk

#

confusing

#

ya its just decode and encode I think

main wharf
#

cbuffer is 0

#

It doesn't even run kekwsit

#
  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

proper vine
#

what even are these cbuffers i don't understand them

main wharf
#

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 kekwsit

proper vine
main wharf
#

0

main wharf
proper vine
#

how so where does the 0 come from

#

or is the value in the cbuffer

main wharf
#

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

proper vine
#

what do the channels have to do with the cbuffer then?

main wharf
#
  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 kekwsit

#

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

proper vine
#

what shader are you even looking at now

main wharf
#

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

proper vine
#

i don't see a cb0[135].x anywhere

main wharf
#

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

proper vine
#

oh okay

main wharf
#

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

proper vine
#

this game is so goofy

#

urs looks so much different than mine

#

all i've done is a simple tonemappass so

main wharf
#

I'm not sure tbh

#

Is tonemappass in lutbuilder?

proper vine
#

haven't touched the lutbuilder stuff yet

main wharf
#

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

proper vine
#

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

fiery vapor
#

Pretty sure this is ANOTHER shader

main wharf
#

The one you sent is exactly the same as the one I had added already

fiery vapor
#

Hmmm

main wharf
#

I just never shared a build with it before

fiery vapor
#

Ah

main wharf
#

So I'm confused how you would even know it's a different one 😅

fiery vapor
#

Ohhh

#

I guess you got to the shader before I did 😅

main wharf
#

Anyway let me know if something is borked

main wharf
fiery vapor
#

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)

main wharf
#

No rush xD

main wharf
#

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

woven crag
#

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?

main wharf
#

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.

main wharf
main wharf
#

Mmh, seems FXAA also needs 0-1 range to work properly (?)

glacial plank
#

might just have to do it in pq then

main wharf
#

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 kekwsit

#

Just gonna do peak normalization, at least shouldn't get worse, maybe something improves

main wharf
#

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

desert herald
fiery vapor
#

(this is a beat saber shader)

main wharf
#

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...)

fiery vapor
#

before

twin wharf
#

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.

main wharf
#

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 kekwsit

#

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

main wharf
#

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.

desert herald
#

at least if you only want swapchain pass only if writing to swapchain

main wharf
#

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()

desert herald
#

not in C++

#

C++ is backwards

#

not like javascript

main wharf
#

I don't know any javascript

#

Uhm, backwards as in reads from bottom to top ?

desert herald
#

yep

main wharf
#

Oh.

desert herald
#

no overrides

#

ignores if already exists

#

afaik most languages override when you append to a map

main wharf
#

Thanks, will look into that again then. Whatever I encountered was probably skill issue

desert herald
#
#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

main wharf
#

I see, very convenient indeed.

desert herald
#

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

main wharf
#

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...

desert herald
#

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

main wharf
#

Proxy runs on game restart as expected

#

I just thought I could enable it without restarting, just with alt+enter

fiery vapor
#

alright gonna dump some audiosurf 2 shaders since some of them need fixing

main wharf
#

-# Less than 4 ideally

#

-# 4 included I guess

fiery vapor
#

well first thing that needs to be fixed is the hud

main wharf
#

Yea UI is fine, especially if Unity default UI shader

fiery vapor
#

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

#

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

fiery vapor
main wharf
#

Use either Black Floor Fix or RenoDX's SDR EOTF something (previously gamma correction)

fiery vapor
#

hold on I gotta try this again

main wharf
#

Not both at same time since the idea of both I believe is to fix same issue

fiery vapor
#

hmm

#

OH

#

OHHHH

#

I just realised

#

enabling swapchain proxy allows swapchain encoding to actually work

main wharf
# fiery vapor 0x49e25d6c

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

fiery vapor
main wharf
#

0x2013 something

#

Sometimes it's not used in exclusive fullscreen, but appears when in windowed/borderless, eventually after a game restart

fiery vapor
#

anyways, I feel like I can't really find any shaders to dump since the game now "just works"

#

I can send AV1 videos onto discord right?

#

might try doing that

kind kernel
main wharf
fiery vapor
fallen linden
fiery vapor
#

Audiosurf 2

fallen linden
#

thanks

fiery vapor
#

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

fading cradle
#

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

fiery vapor
#

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)

main wharf
#

Mmh, wait nvm

fiery vapor
#

draw order

#

huh, Audiosurf 2 is actually quite fun with slower songs

#

I could try sending both and see which one works

main wharf
#

None of the sliders seem to clamp tho

#

Can't bloom be disabled?

#

Shaders not sliders kekwsit

fiery vapor
#

when both shaders are disabled, the bloom disappears

fiery vapor
main wharf
#

I mean in game settings

#

Aw right

fiery vapor
#

it's per environment too

#

stadium doesn't have bloom, neon does

fiery vapor
#

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

main wharf
#

Oh yea screenshot is better please

#

I have potato internet and for some reason videos on Discord particularly can take years to load

fiery vapor
#

anyways
neon has bloom

main wharf
#

I just download them when I need to look, still a bit long but at least I'm not stuck on Discord channel

fiery vapor
#

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

main wharf
fiery vapor
#

well, I guess there are blends

main wharf
#

Meanwhile, still can't boot Rocksmith 2014 with ReShade kekpepehands

main wharf
fiery vapor
#

but it doesn't seem to be on the ones that use 0xd2e0af35

#

you might find this one interesting

#

part of the "Dusk" skin

main wharf
# fiery vapor or 0x4690c0dd

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...

fiery vapor
#

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

main wharf
# fiery vapor

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 😒

fiery vapor
#

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

main wharf
#

What's the deal with bloom?

#

Just gotta hook slider right..?

fiery vapor
#

I just realised that wine wayland keeps making the bloom look desaturated

fiery vapor
fiery vapor
#

however I then lose the ability to use my downloaded songs 😔

main wharf
# fiery vapor or 0x4690c0dd

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

fiery vapor
#

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

fiery vapor
main wharf
#

Uhm. I'm not sure what to do with any other than 0x4690c0dd

#

Is it always used when bloom is used?

fiery vapor
#

yeah

#

I think

#

I'm not really sure, I'm kinda tired right now

fading cradle
delicate orchid
#

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?

main wharf
#

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

fiery vapor
#

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

#

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... huhh

#

oh my god it's in unity 5

#

are you kidding me 😭

kindred nacelle
#

Anyone tried this with Overcooked 2 ?

#

the screen is washed out for me

fiery vapor
#

have you tried changing the swapchain encoding to gamma?

fiery vapor
fiery vapor
#

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

kindred nacelle
#

encoding to gamma fixed the washed out looking, but the game is clamped to 203 nit

#

swapchain proxy already enabled

#

R11G11 on output size

fiery vapor
#

try upgrading R10G10B10A2_TYPELESS?

main wharf
# fiery vapor

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);

fiery vapor
#

yeah I only saturated the last component

fiery vapor
kindred nacelle
main wharf
#

You can add what I wrote after last existing line

#

Well like:

  o0.xyzw = v1.xyzw * r0.xyzw;
  o0.w = saturate(o0.w);
fiery vapor
#

strangely doing it like that doesn't work
but saturating o0.xyzw does work

main wharf
#

Try max(0.f

#

o0.xyzw = max(0.f, o0.xyzw);

fiery vapor
#

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

main wharf
#

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 kekwsit

fiery vapor
#

ohhhhh

main wharf
#

Ok let's put it another way, max(0 is more conservative than saturate() because it preserves values above 1.

fiery vapor
main wharf
fiery vapor
#

green is before blue right?

main wharf
#

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

fiery vapor
#

maybe it's working backwards

main wharf
#

It is also possible saturate() looks nice and max(0 is broken because value shouldn't be above 1

fiery vapor
#

yeah

#

unless there's a way to flip it to go into negative

#

or possibly multiply it by a negative value

main wharf
#

Uuuh

#

No idea really

fiery vapor
#

hmm, well I guess instead of trying to make it go into the negative I could just multiply it by a decimal

main wharf
#

Wait what

fiery vapor
#

o0.xyzw = max(0, o0.xyzw) * 0.5;

#

decrease the intensity while still allowing it to stay unclamped

main wharf
#

Ooooh

#

I see

fiery vapor
#

however this decreases the intensity of EVERYTHING connected to it

main wharf
#

Is it too strong? Maybe it has to be below 1

fiery vapor
#

hmmm

#

I starting to think saturate might've been a better idea

main wharf
#

Woopsie 🙈

#

Yea, I don't know what these values are

#

Maybe it has to be between 0-1

fiery vapor
#

yeah

#

I wonder if making the element ITM'd would also help

#

or maybe neon skin just has funky colours