#Baldur's Gate 3

1 messages Ā· Page 2 of 1

eternal radish
#

waiting release

strange lantern
#

This is going to be fun

devout briar
strange lantern
#

VULKAN ADDON

  • Removed Larian's custom ACES 2 beta grading
  • Removed the disgusting shadow saturation boosting
  • Using PsychoTM for tonemapping + Stockman LMS and co
  • Act 3 crowd NPC fresnal glow as been removed
  • Added film grain
  • Added bloom slider
  • Upgraded RTVs so less banding and UI characters are now unclamped

Instructions

If you had previous .addon and the grading now looks weird, dont forget to hit reset button

  1. Use the following custom reshade.dll (otherwise game explodes). You have to add it to C:\ProgramData\ReShade (or where ever your global reshade Vulkan layer .dll is)

  2. Load VK via using the regular BG3.exe (not DX11.exe)

eternal radish
strange lantern
#

Its all fixed

#

Larian slop

#

Musa slop

eternal radish
#

@barren marsh

#

vulkan addon

strange lantern
#

Its a mod rewrite

eternal radish
#

@floral raft

amber stream
#

Fresnal

strange lantern
#

yes

#

Fresnel

#

Fresnal

#

Let me know how it goes with the addon

#

AyyMD memes

#

Ultrameme display user memes

barren marsh
#

Nice

strange lantern
#

@low steeple you said no decompilation issues

#

you lied

low steeple
#

Bruh

#

Your game is cursed

strange lantern
#

maybe its my script

#

what do you use?

#

well I am decomping to .slang

low steeple
#
for /r %%i in (*.spv) do (
    spirv-cross.exe -V --stage comp --relax-nan-checks "%%i" --output "%%~dpni.glsl"
)
#

Just this

strange lantern
#

lemme test

low steeple
#

Its outputing to glsl tho and you need to change the stage type

amber stream
#

just do everything in glsl gigachad

low steeple
#

Yeah don’t even bother with slang (maybe you can do it with glsl validator exe)

#

Compile spv yourself

strange lantern
#

but glsl doesnt have pretty colours

#

its all just greeeey

#

whatever, theres probably an extension for it

#

I cba to fix .slang

#

yep glsl works

#

Miru saving me #42634562344357

amber stream
#

bottom right corner

strange lantern
#

ewww

#

they use HBAO

#

not HBAO+

#

just bog standard HBAO

#

explains why crevices look like asscheeks and dont shade

strange lantern
#

@low steeple I might be getting filtered by this tile system

#

they use tile deferred for all the different comp shaders

#

you apply some sort of modification and you see square tiles because the other 20 shaders dont have the modifications to account for your change

Soo you get harsh transitions

low steeple
#

Oof

strange lantern
#

its not like Endfiled where theres a clear env deffered

#

or grass deferred

#

abysmal

low steeple
#

Did you try taking a capture in graphics debugger yet

strange lantern
#

nsight

#

but some views are garbage

#

maybe this is a VK thing

#

some RTVs either dont show up or have this striped then shifted view

low steeple
#

looks like swizzled i dunno

#

Does devkit show the same

strange lantern
#

yep

#

not all RTVs

#

but the same ones are cooked as nsight

low steeple
#

So its probably what the game writes

#

Or I think its view format is wrong

#

Since the colors are all fucked up

strange lantern
#

this is dreadful to work with

(undraw shader as a comparison)

#

even the slightest difference creates massive square mismatches

#

couldnt just use a regular deferred

#

noooo

#

had to tile it all

#

CSM RTV shows shadows

#

game doesnt cast shadows

#

No wonder the whole scene looks flat

low steeple
#

But you can see the environment is lit up by other lights that don’t have shadow map

strange lantern
#

right but this is a dark ass cave, that they lit up with some sort of over head light source

low steeple
#

Does dx11 show the same problem

strange lantern
#

for?

#

DX11 is also tiled

#

also lacks shadows

#

they gimped shadows as they updated the game

#

a modder released a mod to readded shadow casting flags for foliage and other meshes

#

instance meshes I think it was

#

Larian removed shadows for those with Update 7

#

The base game is even more dreadful to look at

low steeple
#

Well lights that don’t cast shadow are the main problem

strange lantern
#

light leak everywhere

#

oh yh base game has no shadow casting

#

at all

#

the above mod activates it at the very least

#

for some light sources

low steeple
#

I’ve never worked on a tiled deferred game before tho so I don’t know the inner workings

strange lantern
#

nor have I

#

first time

#

I will have to look into it

#

I dont know how devs build shaders in this case

#

how do you keep up and make sure all the tiles match e.g dont run into the issue I have

low steeple
#

Hmmm I read from AI, doesn’t seem like tiled shading will swizzle the shading so it’s weird for me

low steeple
#

Then their renderer chooses which to use

#

So for you you need to edit 30+ shaders but devs only need to change 1

strange lantern
low steeple
#

Btw are gbuffers swizzled in your capture

strange lantern
#

some

#

I will need to take a look at the code

low steeple
#

To me it looks like broken view format 😳

strange lantern
#

Larian likes to meme

#

in their GDC talk they mentioned that the mesh quality setting was a placebo

#

because the game had no LODs anyways

#

Not BG3 but their previous game

strange lantern
#

and they properly built lighting around it

#

e.g not using sun shadow

#

some funny business is going on

low steeple
#

Normal lights don’t usually render to a separate shadow RTV, they will just sample their light perspective shadow maps when shading lighting

#

Sun lights usually have its own shadow RTV

strange lantern
#

if (_36._m0.w > 0.0)
shadowFactor = texelFetch(shadowBuf, coord, 0).x; // read CSM output
else
shadowFactor = 1.0; // completely ignore shadow buffer

#

so they counted grymforge as = underground

#

but they built it around CSM shadows (the map is an open cavern / cave so the sun is meant to still reach)

#

which are disabled because = underground

#

I am going to test removing _m0.w = 0

strange lantern
#

vanilla / modified

#

kinda works

#

not sure why the pillar on the right is much darker though

#

Need to check and see if the other areas get griefed or not

low steeple
#

No idea

low steeple
#

Just a constant so I dunno what that is hmm

low steeple
#

I feel like _36.m0 could just be like sun intensity

strange lantern
#

yh so it now makes areas in shadow even more in shadow in other scenes

#

time to add SSGI to solve

low steeple
#

You need SS trace shadows for hundreds of lights

#

Maybe just apply AO to lights

strange lantern
#

did that

#

AO for direct lighting

#

since base game doesnt do it

#

I should replace AO with xegtao as well

#

maybe I can figure out cboofer or hash

#

so it only applies to that one area instead of every scene

#

game uses the same deferred shaders throughout the whole game

low steeple
#

Hmmm so it’s just one deferred shading for all lights?

strange lantern
#

yep

#

well

#

theres 20 something deferred shaders

#

that make up the scene

#

depending on the tile, one does hair, one does skin and so on

#

but they use the same shaders throughout the whole game

low steeple
strange lantern
#

No idea

#

They mentioned in the GDC the whole game was a clusterfuk

#

They wanted to fully move over to Vulkan but couldnt

strange lantern
#

thought it was broken decomp again but no

#

this happens with vanilla shaders

blissful ember
#

Looking at Forge fixing games live is so satisfying. Who needs asmr.

devout briar
#

Looking at Forge malding is so satisfying too

strange lantern
#

If the game didnt use tiled deferred I would have added PT by now

eternal radish
#

@strange lantern is it normal sk and reshade detect d3d11 api instead of vulkan.11 ?

eternal radish
strange lantern
#

The game has two .exes

eternal radish
#

how would i even inject

#

sk to vulkan

#

locally

#

it's not possible right

strange lantern
#

Reshade shows Vulkan for me in device

eternal radish
#

can i still use dx11 texture thingy in vulkan

#

i don't think so ?

#

so sk is pointless

strange lantern
#

No idea

#

vanilla / fixed shadows / fixed + Bend style shadows additions

#

@naive lichen

#

we cooking?

#

@shy torrent

#

With that, I am off

amber stream
#

need kevin interactive approved bend shadows in every game

narrow scroll
#

If there's excessive flickering with like black boxes around bright highlights at the title screen (vista of Baldur's Gate city), does that mean I borked the custom Reshade installation or what? I even tried triggering a shader recompile but it didn't fix it. The game definitely runs in vulkan and the reno addon's sliders function, so I don't know what's wrong...

#

It's flickering very rapidly between normal screen and mostly balck screen; I hope the screenshots here illustrate is enough:

blissful ember
devout briar
#

Yeah 3rd one is with SSS

blissful ember
#

Lesss gooooo !!!

#

Good sss is so god tier with grass.

#

And small rocky stuff

feral tartan
#

wait is sss already in the new version of the mod? or still to be added

#

looks amazing

eternal radish
#

I'm not even sure bg3 vk is better than dx11 despairge

#

I need confirmation

devout briar
#

Its PITA for Forge to make it in DX11 I think

eternal radish
#

I get it for new features

#

I was thinking about sk texture cache thing

devout briar
#

Oh yeah idk about that

strange lantern
#

Looking at your screenshots

#

RTV upgrades maybe? AMD?

#

Also double check that ReShade64.dll in ProgramData is using Ritsu's custom .dll

devout briar
strange lantern
#

if you right click , properties you should see it say 6.7.3 unofficial

#

DX11 had these memes

#

but VK is different

#

it doesnt shit the bed when I upgraded

#

I am only doing

r8g8b8a8_unorm = back buffer e.g matches your swapchain res (needed to unclamp upgrade UI)
r10g10b10a2_unorm = needed to unclamp ui character RTV specifically

#

This shouldnt grief AMD

#

If you're Nvidia and have lackwell card like me, I updated to the latest drivers and that stopped some random black screening / CTDs for me

#

wait I noticed the screen looked a bit aliased?

#

FSR?

#

TAA?

#

inb4 its FSR 4 int8 memes

devout briar
narrow scroll
narrow scroll
narrow scroll
strange lantern
#

green tint is normal for Vulkan reshade HDR

#

right

#

next is log

#

send it here

balmy wraith
#

holy shit - (judging by screenshots only) this is looking ā¤ļøā€šŸ”„

#

been meaning to get back to/restart this game tbh

#

is there any downside to the VK vs DX11 renderer?

#

that i should/would need to consider before just choosing VK

strange lantern
#

DX11 runs like ass

balmy wraith
#

bc new addon looks amaze

#

ok

#

so

#

sounds like all upside for VK lmao

#

^^

strange lantern
#

DX11 has CPU bottlenecks on main thread especially if you use Goshko's shadow mod

#

Also RTV upgrades broke textures

balmy wraith
#

yah only just reaquainting myself with the current mod sitch

strange lantern
#

which doesnt happen with Vulkan

balmy wraith
#

wild that i need a mod to add shadows back

#

ty mate @strange lantern šŸ™

strange lantern
#

I am going to make a post in one of the BG3 modding servers

#

maybe some smort people can point me to some engine level stuff

balmy wraith
#

oh lastly - do i care about the layered on DXGI swapchain or not in nv settings?

strange lantern
#

I have it set to auto

balmy wraith
#

i have it default to layered on DXGI but thats mostly a legacy default from when SK used to be the only decent HDR option

strange lantern
#

The rendering improvements arent in the addon yet

#

Since I need to debug and test

#

the current pin has fixed grading and I disabled the forced Act 3 NPC fresnel

balmy wraith
#

i tried to speed read the thread above, it sounds like youre working on future stuffTM that sounds super excite

#

this game can defs use any possible improvements to anything lighting related

narrow scroll
#

Here's the log. Just played a bit and I couldn't find a combination of settings that would remedy it. It's also weird that it affects only certain realatively small elements in every scene. Btw. I really need to go to bed now or work tomorrow will be torture. I hope the log helps you -- and thank you for doing this mod in the first place!

eternal radish
#

highlights still going above my peak

#

hardclipping forgeeee

strange lantern
#

where

#

show pic

#

becasue I added a roll off

#

Unless its some TAA memes

night river
#

looks pretty clipped

strange lantern
#

now set either scene grading to 0%

#

or bloom to 0%

#

send pic

night river
#

2 sec

#

weirldy enoug the "press any key" part looks clipped as well, but fine in pngs

#

jxr works

strange lantern
#

Do the same

#

set either grading to 0% or bloom to 0%

#

then send

night river
#

scene grade / bloom

#

scene grade

strange lantern
#

Their bloom boosts highlights

#

and the LUT also boosts highlights

#

guess I can try rolling off pre LUT maybe

night river
#

the main menu is actually fine in the screenshots

#

the heck

strange lantern
#

ok so visually I guess it looks 'clip' what about graph?

#

does it peak over?

night river
#

graph looks normal

#

I'm not sure how those screenshots look on your end

#

but 1k or 4k nits look just as clipped

#

4k peak looks way more saturated tho

night river
#

clipped is maybe the wrong word

#

Reno/Vanilla

#

looks a bit too blown out

strange lantern
#

I will look into it

#

Maybe some Psycho stuff I havent accounted for

#

Working on fixing shadows atm

naive lichen
#

if we are talking about that torch fire

#

xd

strange lantern
#

Vanilla HDR has some digusting pink hues

night river
#

looks a bit too blown out to me

#

even worse with bloom

naive lichen
#

might be screen?

#

i can see almost everything in that flame

night river
#

it's more the torch itself

#

where i see less compared to vanilla

#

also the flame itself toward the top

#

something is definitely funny on my end too

#

all screenshots I take are darker than they're supposed to be

naive lichen
#

Hard to capture this shit but I can see almost every detail in it

#

ffs pic doesnt really work

strange lantern
#

@eternal radish I need a graph from you

eternal radish
#

idk man any highlight

#

some can go beyong my 3080 nits

#

like

#

3300

#

i need to find it again

#

(it was a joke btw)

#

(it's meaningless)

naive lichen
eternal radish
#

some people go cookoo if the game pushes 500 nits of 460 nits screen

naive lichen
#

i wouldnt say thats too blown out

#

thats just right for fire imo

#

if you see less details than on that image then its your screen

night river
#

No actually the flame looks fairly similar

#

its more the torch part that i see less in

#

or rather

naive lichen
#

wym

night river
#

that i think is too blown out

#

this part

naive lichen
#

i see

#

could maybe use a tad bit more color i suppuse

night river
#

here's 1 with bloom 50

night river
#

again looks darker throughout than what's on my screen

#

and actually better

#

what the fk

naive lichen
#

whats it look like with like highlight saturation 51

night river
naive lichen
#

maybe minimally better but yeah i guess forge will have to touch blowout a little

night river
#

but vanilla has the same exact thing

#

peak brightness increases saturation

#

but it doesn't look any more or less clipped to me

#

If anything I see more details in the 4k nits image which makes no sense

strange lantern
#

camera matrix shifting shadows

#

oof

low steeple
#

Thats your SSS?

strange lantern
#

yes

low steeple
#

Looks like the light direction just changed randomly XD

#

Sun light direction

strange lantern
#

Doesnt happen to every region

#

Will have to debooog

low steeple
#

Does the light dir actually change in the game tho

#

Matrices shouldnt make it jump like that

strange lantern
#

Sloppa on my end then

#

Let me see

low steeple
#

Maybe you can check cbuffers you are using

#

in DX11

strange lantern
#

BRUUUUUUUUUH

#

I am a donut

#

I am doing viewspace

#

not worldspace

#

uno momneto

#

yep solved it

#

I was doing stepDir = ivec2(round(marchDir * 3.0))

replaced with

ivec2(round(marchDir * 2.0 * float(i)))

#

doesnt snap anymore

#

direction is consistent now

night river
#

im not very smart

strange lantern
night river
#

screenshots looked fine cuz my reshade screenshots halfs brightness for whatever reason

#

i cannot

night river
#

too real

naive lichen
strange lantern
#

Vanilla flames

night river
#

magical pink fire

low steeple
#

hmmm also ivec2?

#

Should the direction be float2 in screen space or float3 in viewspace/worldspace

#

Usually marching is done in viewspace tho so I'm not sure

strange lantern
#

soo my current implementation is actually a cope 2D one

I use round and ivec2 because of texelFetch

#

You're right

#

I need to re make it to use viewspace 3D

#

I told you

#

I am a donut

low steeple
#

No sampler?

#

Oh wait you cant use linear sampler because its depth sampling

strange lantern
#

Maybe I am also doing it a janky way, right now I am editing the deferred shaders

#

I should just make a separate comp shader

#

then combine SSS with CSM RTV

low steeple
#

Yeah you can steal the bindings from current bound descriptor tables then do a compute pipeline

strange lantern
#

I jumped back and forth between the acts

#

werksTM but there might be some glitches

#

so I am putting it out as a test

strange lantern
#

Posted 1hr ago in BG3 modding server

#

no upvooootes

#

no replies

#

nada

strange lantern
#

I scrolled through some pics

#

SDRlets are living on another planet

naive lichen
strange lantern
#

any sort of custom map just looks like this

naive lichen
#

peak

strange lantern
#

I dunno if its because they forgot to generate CSMs or what

#

zero shadows

naive lichen
#

ohgod

strange lantern
#

disgusting colours

naive lichen
#

ive never seen this game in sdr

strange lantern
#

Game's grading is a meme

naive lichen
#

did you fix tm

strange lantern
#

No, I have been shitposting in another server

naive lichen
#

blasphemy

dull cobalt
#

Can you push the updates? @strange lantern

narrow scroll
strange lantern
#

I bet RTX HDR would slap soo hard on this

strange lantern
strange lantern
#

uhh

#

RTV upgrades are borked on your end

#

completely failing and spamming the log

#

As you why

#

Dunno

#

Anyone else having the same problem

#

wait

narrow scroll
strange lantern
#

you're running special K

#

I see it in the log

narrow scroll
strange lantern
#

:12:10:278 [10108] | INFO | Successfully compiled 'C:\Users\AppData\Local\Programs\Special K\Global\ReShade\Shaders\ShortFuseFilmGrain.fx' in 0.003000 s.

#

I dunno

#

Maybe SK is interacting with the vulkan layer or something

narrow scroll
strange lantern
#

log is spamming 448 "Resource already destroyed" warnings

narrow scroll
strange lantern
#

Ritsu might know

#

Maybe I am doing something bad

#

I am using GoG version of the game

#

but that shouldnt effect shaders

#

Unless Steam overlay is playing tricks again

dull cobalt
#

Log isn't showing anything super weird

narrow scroll
dull cobalt
#

I'm reworking resource upgrades anyways, wait for that

#

Though that's not a resources issue imo

narrow scroll
#

Btw. do you mind uploading a couple of versions, one without the 8-bit upgrades, and one without the 10-bit ones to see which one is at fault?

strange lantern
#

Sure

#

For CMakeLists.txtā€Ž I added glsl compilation

#

so you dont need to do glsl to .spv before hand, cmake does it for you

dull cobalt
#

This'd break any game that wants pure glsl

strange lantern
#

oh

dull cobalt
#

What's wrong with slang?

strange lantern
#

borks deferred shaders

#

cba to figure out decomp issues

dull cobalt
#

Makes sense. Most likely it's a glsl -> slang issue

strange lantern
#

The other shaders are fine

#

but .slang chokes on the 8000 line deferred

amber stream
#

pure glsl is goated

strange lantern
#

me omw to do 4 way

#

.spvasm

#

.glsl

#

.slang

#

.hlsl

#

@narrow scroll

eternal radish
#

or it won't conflict

strange lantern
#

they work together

#

I cant set shadow casting inside the shaders for light sources, thats engine side which is what the shadow mod does

narrow scroll
#

So... it seems it is the upgrades. Now there's only the question why it does work on your end and not on mine. Interesting indeed. I'll post logs for both versions -- perhaps you can make something out of them.

narrow scroll
strange lantern
strange lantern
#

oh no

#

this is pure sloppa

#

@low steeple they used screen-space normals from dFdxFine / dFdyFine for bias direction. Temporal jitter shifts screenspace derivatives as you move the camera ofc so the whole CSM flickers and has shadow acne

#

why would they not just use gbuffer normals?

#

anyways I switched over to gbuffer normals

#

and that fixed the digusting acne and flickering

low steeple
#

Dunno which purpose its used for

#

ddx and ddy are used to generate vertex normal from depth

#

usually

low steeple
low steeple
strange lantern
#

I rewrote the addon for Vulkan now

novel lion
#

ah I see

strange lantern
#

Has better perf and stability

novel lion
#

I prefer dx11

I feel tht half of my mods ll break in vulkan

#

I ll try vulkan l8 tho

strange lantern
#

Mods work for me

#

I am using Listonomicon

novel lion
#

Iam still on my manual modded run xD

strange lantern
#

mismatch causes the flickering

low steeple
#

_4 * _130? Ngl I don’t understand

#

CSM sampling doesn’t need any ray marching

strange lantern
#

let me record, maybe it will make more sense

low steeple
#

Usually they do world space position * light projection matrix for CSM uv

#

That world position is usually reconstructed from screen uv and depth.

#

If the use a jittered screen to world matrix to do that, it would be fine

strange lantern
#

The CSM RTV is showing jitter, then in the deferred shader they unjitter their UVs before ray interpolation

#

but they dont unjitter CSM

#

so as I understand

#

the mismatch causes flickering

#

as you move the camera

#

and it casues acne

low steeple
#

So should the deferred lighting rtv

#

Basically everything before TAA should jitter

low steeple
#

Dunno why you would unjitter that in deferred lighting hmmm

low steeple
#

Or the game’s shadow maps

strange lantern
#

games CSMs

low steeple
#

Bruhh

#

Can you show the csm temselves

low steeple
#

Like the square texture

strange lantern
#

I need to open up nsight

#

oh yh why doesnt VK show textures used by a shader?

#

just an API thing?

#

it only shows RTVs

low steeple
#

VK in devkit yes. It’s hard to track resources in dx12 and vulkan

#

You can click track all/descriptors in devkit

#

It might show but your fps will be gone

strange lantern
# strange lantern

Using lightdirection as bias normal also solves this but then the shadows are wrong and other meshes get acne because of uniform bias for all surfaces regardless of orientation

#

so I dunno

#

trying to figure out a fix for this

#

but yh, the base CSM RTV flickers, has acne and does these half shaded triangle thingy on the meshes

#

Doesnt apply to all surfaces or meshes

#

just some

low steeple
#

Maybe they are using the ddx ddy to calculate the slope for slope bias

#

Maybe if you post the shader

strange lantern
#

CSM?

#

sure

low steeple
#

Yeah

strange lantern
low steeple
#

I mean the glsl

strange lantern
#

uno memento

naive lichen
strange lantern
strange lantern
#

I fixed it now

#

so no more pinkish flames and lava

naive lichen
strange lantern
#

I was applying hue correction on the LUT which was giga pink already

#

it corrected a bit but not fully

#

now its solved

#

as for the clipping I am not sure

#

LUT is at fault

#

and their bloom

#

I can rework bloom but LUT I dunno what to do

low steeple
#

That’s so large

strange lantern
#

MiruGPT solve problem

#

Make no mistakes

naive lichen
novel lion
#

does act3 textures unload fo ru guys v fast?

#

like the houses unload so fast

#

i tried eveything

#

:/

low steeple
# low steeple That’s so large

I couldn’t make much sense of it, it calculates the vertex normal then compare the light direction and that normal and does a ton of flags with that

#

And sometimes they added bias to the position for something

#

Then they sample the shadow maps with some noises in 9 taps

strange lantern
eternal radish
#

looks gud

#

ur mod

#

it looks bery gud

strange lantern
#

Trying to get xegtao working

#

its crashing the game

blissful ember
#

We believe

#

šŸ¤‘

devout briar
strange lantern
#

nearly 2000 texture bindings

#

for one shader

dull cobalt
#

That must be a bug, no fucking way

strange lantern
#

it just repeats 16x16 square tiles

#

with different colours

#

This is in Act 3 as well

#

the other acts dont have this

#

"Man I wonder why Act 3 runs like ass"

#

Want to figure out how to force 4096x4096 for the CSMs

#

base game's highest shadows only go up to 2048

#

which shimmers the hell out of foliage and other fine detail

#

@low steeple is it possible?

#

or does this have to be an engine side change

strange lantern
#

yh

low steeple
#

Hook create_resource call

#

How to filter out the shadowmap resource during its creation

strange lantern
#

let me get hammon diffuse in then I can test

strange lantern
#

Reno HDR / Reno + improvements

#
  • Added Hammon Diffuse
  • Probe now has AO modulation
  • Horizon occlusion
  • Specular occlusion
low steeple
#

XeGTAO?

strange lantern
#

havent added it yet

#

HBAO isnt too bad actually

#

its 720p as well

#

but is actually good unlike Endfield

#

its just missing on grass and foliage

#

which I sort of went around by adding AO modulation to the deferreds

devout briar
#

Doesnt this looks weird?

strange lantern
#

stopped lightleak

strange lantern
#

this is what I mean by their tiled deferred

#

one slight mismatch and its ogre

#

basically the backside of the leaf should be in shadow but the very edge is handled by another shader

devout briar
#

Holy jank

strange lantern
#

yh

#

its abysmal

#

I sort of test the main deferred since it handles most of the scene lighting

#

then if it works, I will go ahead and update the rest of the 18 shaders

devout briar
#

Larians new game will come out and it will look 500x worse than Forge's BG3

strange lantern
#

cope they will use RT

#

What I am currently doing doesnt even have a perf hit

#

its all just utilising whats available to us but isnt being used

#

Vanilla HDR / Reno

#

its also insane how pink this game is

#

@worthy belfry I dont even bother with grading contrast any more

#

hammon diffuse is the subtle contrast booster

#

and I think I know why most games still stick with lambert

#

hammon in SDR doesnt really look that good here in BG3 atleast

#

HDR its great

#

but SDR just makes the scene look brighter

low steeple
#

Cyberpunk and dying light games

#

It’s a bit darker than lambert in general

strange lantern
#

every single one I have checked is lambert sloppa

#

UE5 is all lambert

#

BG3 uses burley which is why characters look pretty good

strange lantern
#

its not even my issue

#

base game has the same jank

devout briar
strange lantern
#

luv to see it

#

my code improves on it if anything

#

but it depens on the location and camera angle

#

this is probably caused by whatever causes that shadow acne in Grymforge

#

"No way... look how good Ray Reconstruction is in BG3"

#

think I fucked up my mod load order

#

oh this is a nice find

#

their sky irradiance cubemap applies uniformly onto a scene

#

so another source of light leak

#

and wow

#

game doesnt use inverse-square of light curve

#

they use pow(1 - (d²/r²)², falloff)

strange lantern
#

umm wat

#

I thought DX only supports up to 16k

strange lantern
#

burley / hammon

devout briar
strange lantern
#

no clue

#

RTV view is utter garbage

#

looks like a mega texture or something

#

that or a bug

#

becasue I swear DX and VK have an upper limit of 16k

strange lantern
#

I can only have 32 floats (128 bytes)

#

Time to merge the toggles

#

but I cant merge until I know all the tiles match

devout briar
#

Do you regret going into this? kekpepehands

strange lantern
#

no

strange lantern
#

jeezers

#

I found their hero lighting

#

time to disable that shit

#

First view = normal
Second = kill all area lights
Third = kill all probes
Fourth = kill both area lights and probes

#

So I guess the mod only disabled area lights

#

which caused the probe to darken it too much

#

if we disable both for the character we gucci

worthy belfry
strange lantern
#

giga glowing?

worthy belfry
#

got a lot darker

#

and more shimmer tm

low steeple
#

what is the hammon math in hlsl

strange lantern
#

// ============================================================================
// 3.1 Hammon 2017 Diffuse BRDF
// ----------------------------------------------------------------------------
// Earl Hammon Jr., GDC 2017
// "PBR Diffuse Lighting for GGX+Smith Microsurfaces"
//
// Drop-in replacement for Lambertian (albedo / PI) that accounts for:
// • Single-scatter Fresnel darkening at grazing angles
// • Multi-scatter energy compensation between microfacets
//
// Designed to pair with a GGX NDF + Smith height-correlated geometry term
// on the specular side so total surface energy is conserved.
//
// Parameters (all expected saturated [0,1]):
// NdotL – saturate(dot(normal, lightDir))
// NdotV – saturate(dot(normal, viewDir))
// NdotH – saturate(dot(normal, halfVec))
// VdotH – saturate(dot(viewDir, halfVec)) (== LdotH by symmetry)
// roughness – perceptual roughness [0,1]
// albedo – surface base color (linear)
//
// Returns: albedo-weighted diffuse contribution, ready to multiply by
// NdotL * lightColor.
// ============================================================================

low steeple
#

i mean in hlsl syntax XD

strange lantern
#

float3 HammonDiffuseBRDF(
float NdotL, float NdotV, float NdotH, float VdotH,
float roughness, float3 albedo)
{
// ---- Facing term --------------------------------------------------------
float facing = 0.5 + 0.5 * VdotH;

// ---- Rough surface approximation ----------------------------------------
// The term (0.5 + NdotH) / NdotH can blow up at grazing angles where
// NdotH approaches zero. DivideSafe only catches exact zero, so tiny
// values like NdotH ā‰ˆ 0.0001 still produce ratios of ~5001.
// Hammon's original GDC 2017 presentation uses max(NdotH, 0.1) which
// caps the ratio at (0.6 / 0.1) = 6.0, preventing bright glow artifacts.
float rough = facing * (0.9 - 0.4 * facing)
* ((0.5 + NdotH) / max(NdotH, 0.1));

// ---- Smooth surface approximation (Fresnel-weighted) --------------------
// pow5(1 - x) expanded manually for broad shader-model compatibility.
float oneMinusNdotL = 1.0 - NdotL;
float NdotL5 = oneMinusNdotL * oneMinusNdotL;
NdotL5 *= NdotL5 * oneMinusNdotL; // (1 - NdotL)^5

float oneMinusNdotV = 1.0 - NdotV;
float NdotV5 = oneMinusNdotV * oneMinusNdotV;
NdotV5 *= NdotV5 * oneMinusNdotV; // (1 - NdotV)^5

float smooth_val = 1.05 * (1.0 - NdotL5) * (1.0 - NdotV5);

// ---- Single-scatter: blend smooth ↔ rough by roughness, Ć· PI -----------
float single = lerp(smooth_val, rough, roughness) * 0.318309886; // 1/PI

// ---- Multi-scatter energy compensation -----------------------------------
// Approximates the additional energy returned by light bouncing more than
// once between microfacets. Multiplied by albedo² because each bounce is
// attenuated by the surface color.
float multi = 0.1159 * roughness;

return albedo * single + albedo * albedo * multi;
}

#

basically this

low steeple
#

I think

#

It becomes very dark in @worthy belfry 's case is because you need to multiply pi to the lighting (or albedo)

strange lantern
#

yes

#

for existing games with lambert

#

or Burley

#

thats already there

worthy belfry
#

ah lol

strange lantern
#

Halo is phong so lacks it

worthy belfry
#

yep

low steeple
#

ngl thats a really weird fresnel, my knowledge is only up to date with burley XD

#

And albedo multibounce I think in games they compute it from GTAO now

#

HBAO might not be physically correct for multibounce tho

low steeple
#

Very weird

#

Lambert vs burley

worthy belfry
#

hammon in the beast when? (:

strange lantern
#

its HBAO+

low steeple
#

beast is burley same as dl2 i think

#

Yeha

#

all new games use gtao then use it for multibounce albedo

strange lantern
#

ah ok

#

Hammon made the diffuse model for titanfall 2

low steeple
#

or use RTAO

#

any physically correct AO can do it

strange lantern
#

from what I understand

#

Hammon noted this in the presentation

#

which is why he developed hammon diffuse

low steeple
#
float3 AOMultiBounce( float3 BaseColor, float AO )
{
    float3 a =  2.0404 * BaseColor - 0.3324;
    float3 b = -4.7951 * BaseColor + 0.6417;
    float3 c =  2.7552 * BaseColor + 0.6903;
    return max( ( AO ).xxx, ((AO * a + b) * AO + c) * AO );
}
strange lantern
#

to solve short commings of both lamber and burely

low steeple
#

Just this

#

disney version of burely tried to do energy conservation which is what dl2 uses

#
// Disney diffuse BRDF as in: http://blog.selfshadow.com/publications/s2012-shading-course/burley/s2012_pbs_disney_brdf_notes_v3.pdf
// with the conservation correction factor from: 
float3 DiffuseBRDF(float NdotV, float NdotL, float LdotH, float3 albedo, float roughness)
{
    // Disney diffuse with energy correction factor from Frostbite
    float energyBias = 0.5 * roughness;
    float energyFactor = -0.337748344 * roughness + 1.0; // lerp( 1.0, 1.0 / 1.51, roughness );

    float fd90 = energyBias + 2.0 * LdotH * LdotH * roughness;
    float lightScatter = SchlickFresnel(1.0f, fd90, NdotL);
    float viewScatter = SchlickFresnel( 1.0f, fd90, NdotV);
    return albedo * ( lightScatter * viewScatter * energyFactor * INV_PI );
}

#

stolen from cyberpunk

#

what specular model does hammon use then?

worthy belfry
#

hammon is basically oren-nayar built to work with smith ggx iirc

strange lantern
#

yep

#

its meant to be a drop in replacement for existing lambert

#

or Burley

#

assuming you have smith ggx

#

or the standard cook terrance setup

low steeple
#

So what else you cooked

strange lantern
#

a bunch of stuff

#

just making sure they all work

#

with the tiled deferred

#

going to disable hero lighting now

#

and try to stop windows from leaking light

blissful ember
#

Since its transparent and stuff 🄲

strange lantern
#

well you see

#

larian doesnt do that

#

they treat windows as glowing light sources

#

to light up interiors

#

so the interior leaks light colour whilst on the outside the window is dark

eternal radish
#

@strange lantern overshooting by 200 nits heihachiPlasma

dull cobalt
#

@strange lantern I wanna test the new resource cloning system, lemme know if you update your branch

novel lion
#

@strange lantern how stable is vulkan for u compared to dx11 hm?

strange lantern
#

bruh I come back and theres 3 pings

devout briar
#

Mr.Popular

strange lantern
strange lantern
#

DX11 was also slower to load in, either on start up or into a save

#

VK doesnt do that, it just werks

#

and has better CPU perf

amber stream
#

is it not just sharpening or something

#

causing peak to go over

strange lantern
#

could be, they have DLSS sharpening but it shouldnt be used if you have newer than DLSS 2

#

unless dio forgor

#

to update

amber stream
#

oof is dlss running after tm

strange lantern
amber stream
#

aa after tm will also make it go over

strange lantern
#

fuk

#

could be

amber stream
#

that means its not real overshoot anyway

strange lantern
#

Yh, I fixed the borked hues now by using pre lut colours

#

all I have left is the brickwalling

#

I dunno whats causing the highlights to brickwall

#

their LUT

#

and their bloom are doodoo

#

I guess I could set a highlight roll off in the lutbuilder

#

but then Dio wont have his 4K nit yellows

strange lantern
#

vanilla / rendering

#

a decent chunk of lightleak should now be gone

eternal radish
#

wow crushing black levels gj

#

noice

#

smort

#

the allegations will never stop

amber stream
#

skippping grading

strange lantern
#

lemme go back to pink flames instead

amber stream
#

are you skipping 2.2 emulation

#

don't need that shit anymore

strange lantern
#

oh no I am not entirely using pre lut colours

#

just for hue shifting

#

to fix flames

strange lantern
#

game has no gi other than dogshit probes

#

which leak light

#

pathtracing gaming cant come soon enough

#

anyways, here I am also using the darker Shadowland mod

#

so it makes everything blick anyways

#

Banilla shadowlands are brighterr

#

WIP Rendering Test 2

  • Using prelut colour for hue shifting (stops all forms of pink sand, cliffs and flames
  • Added more stuff
  • Hammon BRDF
  • Toggle for fake hero lighting
strange lantern
#

I will need to add GTAO or atleast upgrade HBAO to use full res

#

its causing low res artefacts now with all my stuff

devout briar
strange lantern
#

yes

#

what Miru showed

#

you can hijack RTVs / textures

#

assuming the game doesnt blow up from it

devout briar
#

Might try that on horizon

dull cobalt
#

Finally clean addon code 😭

#

Endfield addon traumatized me

strange lantern
#

@devout briar

strange lantern
low steeple
#

Pretty much what I did with the DOF in endfield, without having to recreate the pipeline

#

But if you more resources than what the game has then you will need to clone and modify the pipeline despairge

low steeple
devout briar
low steeple
#

DX11 much easier

low steeple
# low steeple DX11 much easier

Hmm actually no, overriding on resource create is just as hard in dx11. I was thinking of "switching game resource to your own resource" XD

strange lantern
#

WIP Rendering Test 2

  • Using prelut colour for hue shifting (stops all forms of pink sand, cliffs and flames
  • Added more stuff
  • Hammon BRDF
  • Toggle for fake hero lighting

(Added corpses and Material ID 7 characters to also be affected by hero lighting toggle)

**Instructions for Vulkan are below **

#1466367902923096105 message

feral tartan
#

looks awesome, is this meant to be used with the shadows mod?

strange lantern
#

yes

#

I think you can use it separately

#

but it might also spawn new permutations for shaders

#

which I cba to edit every single one of them

#

If the game used a regular deferred system it wouldnt be as much as a hassle but right now I need to match multiple tile deferred shaders

#

oh wait

#

I should probably added instructions for VK every pin

strange lantern
# strange lantern

This also works consistently, the mod ones either break with VK for some reason or randomly toggle on and off depending on save load, location ect

frank flare
devout briar
#

They dont know ball

strange lantern
#

Well I aint most players

#

Again, per the GDC Larian added it becasue 'muh visibility'

#

but it looks atrocious

#

TW: Warhammer 3 also did this but it was caused by LUT mismatching gamma or some BS

#

caused all the unit models to glow

#

Anyways, theres a toggle so

if you want = use

if you dont want = dont use

frank flare
#

and larian added it for them

#

i wish it was an option in the vanilla game

low steeple
foggy ember
#

Forge this is unreal, cheers

strange lantern
#

I am going to work on fixing this highlight brick walling now

strange lantern
feral tartan
#

it looks incredible in game. In dark scenes (like the opening area) I can't see shit but it may be skill issue - also not viewing in a dark room rn

devout briar
strange lantern
#

@worthy belfry @low steeple I tested out the laplacian texture blending I found in that paper

#

pretty good

#

vanilla / laplacian

#

so I am using it here on the terrain gbuffer shader

low steeple
#

Hmm what does it do mainly

strange lantern
low steeple
#

My phone screen is too small to see xd

strange lantern
#

lemme give you a tldr

#

So standard texture blendinghas an inherent problem where no single blending radius works for all frequency content.

You tend to have either
• Small radius → sharp, but low-frequency features show a visible seam
• Large radius → smooth, but high-frequency details lose contrast/ghost

Paper's solution is to to the following

Split textures into frequency bands using the existing mipmap chain as a Laplacian pyramid, then blend each band with an appropriately sized radius

• Low frequencies → wide blending radius (smooth color transitions)
• High frequencies → narrow blending radius (preserve sharp detail)

#

it also helps to solve seems

#

they have this live demo

#

in game for me it looks like you've almost applied a higher AF amount

#

the terrain just has more detail and almost like a subtle local contrast

#

kinda looks like micro shadow detail as well

low steeple
#

Huh interesting

#

Does it only work with multiple textures blending

strange lantern
#

yes

#

since if you dont have multiple blends then its pointless

#

I think I saw it mentioned somewhere that you can use it for tonemapping

#

like you make multiple mipmaps

#

and you can use it to preserve highlights better

low steeple
#

Yeah I dunno about that one, it’s like local contrast

strange lantern
#

that might be it

#

I guess you can use it as a local contrast for colour base stuff

low steeple
#

Although I might help with more advanced perceptual tonemap ping, I’m no expert on that. Need Kevin to explain to us peasants

strange lantern
#

I will probably try messing around with it in Crimson

#

or it might be good for games like Wilds

#

where the whole game is just washed out

#

Nier

devout briar
#

Will you be able to finish BG3 till crimson or will you leave it unfinished

strange lantern
#

'finished'

devout briar
#

šŸ’€

strange lantern
#

I will probably post WIP 3

#

and thats all you lot get

#

until I return 4 months later

low steeple
#

When is CD releasing

devout briar
#

19 i think

strange lantern
#

19th

#

so this thursday

strange lantern
#

never beating the anti soul gas allegations

strange lantern
#

zamn

#

they have the full TLoU2 eye rendering setup

#

eyelid + eyelash shadowing

#

Iris parallax refraction

#

Limbal darkening

devout briar
#

It cant be all slop ig

strange lantern
#

anti soul gas is INZANE

#

native HDR / Reno Dee legs

#

near 1nit raised black floor

#

This will be a slider users can adjust for volumetric fog

frank flare
#

and hey Forge, awesome job with the shadows in the game

strange lantern
#

they all love slappering everything in volumetrics

#

mfw when I walk into a room in rl and dont have a constant haze as if the whole building was on fire

#

where is that meme

#

let me find it

#

zero contrast because everything just has a permanent grey haze

shy torrent
#

Grey haze sounds like a fire ass weed

strange lantern
#

ofc the Dutchoid is just thinking about the devil's lettuce

naive lichen
naive lichen
strange lantern
#

abysmal

naive lichen
#

They seem to be GI affected now? Not completely dark?

strange lantern
#

yes

naive lichen
#

POG

strange lantern
#

You have a toggle in reno dee legs menu