#Fwog and co.
1 messages ยท Page 17 of 1
I think it's about human perception/dynamic range
e.g., screens appear to become dark in direct sunlight
It's talked about in this presentation
https://gpuopen.com/wp-content/uploads/2016/03/GdcVdrLottes.pdf
First half: less ambient light = monitor effectively has more dynamic range
Second half: designing a tonemapper for HDR output (I can't tldr this)
I guess it's less of a perceptual thing, and more that all monitors reflect some light
If you are curious: #1067777224528375858 message
here are some pertinent slides
there must be a human element too. I face a window when I'm on my computer and I notice that the dynamic range on my monitor (and other dark areas of the room) is improved if I use my hand to block outside light from reaching my eyes
real gamers exist in total darkness, i don't understand the relevance of this work
seen this
also I've been telling all this time that aces sucks
"The ACES project began its development in 2004 in collaboration with 50 industry technologists."
50 industry technologists walk into a bar
1 tonemapper please
insert punchline here
if you tune your tonemapping to a calibrated monitor but no one else's monitor is calibrated... is your tonemapping really calibrated?
I like that it's got richer dark colors... but it's in the negatives? what is that scale
Yes, because in practice non-calibrated monitor/TVs are not that far off anyway.
Avalanche did a test for one of their Just Cause game (if I recall) and over 100 TVs tested, most of them were not to badly calibrated. So they didn't have to worry about it.
one might even say true gamers are born in it, molded by it
not 100% sure but I think 10 is white point so -10 is... black point ig
even though the LUT maps from reinhard 1/(x+1) so it would make sense to use that same remapping of 0 to inf but maybe it'd be harder to demonstrate on that scale
this image shows gradients more clearly so you can see that hue shifts (Abney effect) do not happen
hehe that reminds me of an indian colleages from ages ago
he had his monitor (CRT back then) dimmed down so much it was on that level that when you go one button click further you wont see anything at all, ie black
can you calibrate mine
Jaker is suddenly going to pop up at your house, calibrate your monitor, will refuse to elaborate and will just leave
and hide in the walls again
uncalibrated monitors going extinct in jakers neighbourhood
hehe
picture him during summer holidays, knocking on all the neighbors doors, as if he wants to mow the lawn ๐
the srgb spec says that the standard viewing environment is an 80 nit display in a dimly lit office, which probably isn't far off from this
you couldnt see anything
plus the glas was covered in 29034809493847u9 fatty fingerprints from all the other colleagues
looked like PBR metal texture when you looked from the side
I'm surprised the consumer tvs would have non-shit calibration
Or maybe they had a different standard of "not too badly calibrated"
@long robin would it make sense to add GL in here https://github.com/JuanDiegoMontoya/FidelityFX-FSR2/blob/master/build/GenerateSolutionsDLL.bat#L55 ? Also to the other batch build script.
okok
I've also noticed that this generates some linker errorhttps://github.com/BoyBaykiller/FidelityFX-FSR2/blob/master/src/ffx-fsr2-api/gl/ffx_fsr2_gl.cpp#L612.
Adding backendContext->glFunctionTable. before fixes it
oh crap
thanks for letting me know
can you raise an issue so I don't forgor
speaking of which, I need to close the other issues 
Could I also just make an PR now?
i saw that ๐
ah I see how I ignored the GenerateSolutions.bat changes this whole time
Changes (1096)
in build/.gitignore there is GL/ so it shouldnt track those
Yeah that was before I pulled
I guess the bug was fixed too late to be in that release
But I can confirm that I tested the fixed driver and it works
oh you could already test the unreleased driver thats cool
when are you getting a job at AMD
ye
I wonder if you can apply to be a janitor at AMD
remote janitor 
apply to be an AMD maid
Remote employees get their own catboy maid to clean up after them
Intel Open Image Denoiser next?
Doesn't seem like it's for realtime
Also I don't see a Vulkan backend, which means it'll take actual effort to port
real time dedicated denoisers are a bit 
It only has these
OIDN_DEVICE_TYPE_DEFAULT select the likely fastest device (same as physical device with ID 0)
OIDN_DEVICE_TYPE_CPU CPU device
OIDN_DEVICE_TYPE_SYCL SYCL device (requires a supported Intel GPU)
OIDN_DEVICE_TYPE_CUDA CUDA device (requires a supported NVIDIA GPU)
OIDN_DEVICE_TYPE_HIP HIP device (requires a supported AMD GPU)
they were the final nail in the coffin for me not doing occlusion with area lights
I don't use twitch so idk what that emote means ๐คฐ
just svgf homie
then add the 3000 small improvements to it that have been researched over the years

honestly svgf isn't that bad once you understand that it's fundamentally a temporal reprojection pass and a blur pass (the variance guiding isn't even useful in all contexts, so it can be ignored)
ah, oki ๐
or, in colloquial terms, a monad
added a little cmake flag and define to conditionally enable FSR 2
so our linux homies can run this example
now I can finally merge dis branch
let me try sis
ah that thing again
cmake/vscode isnt picking up the project again
oh
ok changes are pushed to fsr2-test
don't forget that you need to enable FWOG_BUILD_EXAMPLES in cmake to run the exshrimples
and FSR 2 is enabled with FWOG_FSR2_ENABLE
aye
something is fucked
vscode isnt pickign up anything
let me try clion
it wont show its typical cmake status bar with all the build targets and actions
cmake's delete & reconficture isnt pulling any deps, with/without deleting 'build' first
hmm lemme try cloning my own repo
it only detects fwog and libglad as targets
did you do this
oui
hmm
in example/cmakeilsts.txt
option(FWOG_FSR2_ENABLE "Enable FSR2 for examples that support it (currently 03_gltf_viewer). Windows only!" TRUE)
option(FWOG_BUILD_EXAMPLES "Build Examples" TRUE)
hmm
wait
the 2nd option is in fwogs cmakelist already
and with fsr2 enabled i still get
CMake Error at cmake-build-debug/_deps/fsr2-src/CMakeLists.txt:69 (message):
Cannot find MSVC toolset version 142 or greater. Please make sure Visual
Studio 2019 or newer installed
that's normal, but I'll see if I can deal with it
btw I can run my own thing from a fresh clone
ye, im just dumm
# Check MSVC toolset version, Visual Studio 2019 required
if(MSVC_TOOLSET_VERSION VERSION_LESS 142)
message(FATAL_ERROR "Cannot find MSVC toolset version 142 or greater. Please make sure Visual Studio 2019 or newer installed")
endif()
somehow I doubt that this is necessary if you're just building the gl backend
can you try going to the cmakelists.txt in question and removing those lines
I'm using glad.h for the function declarations and constants, but not glad.c
the user provides the function loader
line 69 ๐
there is another one in
sr2-src/src/ffx-fsr2-api/CMakeLists.txt:46
ah those are also msvc flags it seems, in there
what compiler are you using?
gcc
heck
i replace it wif set(FSR2_PLATFORM_NAME x64) for now
it was able to conf the project
wat im getting permission denieds when building ๐
ah
/home/deccer/Private/Code/External/Fwog/build/_deps/fsr2-src/src/ffx-fsr2-api/../../tools/sc/FidelityFX_SC.exe: Permission denied
cmke output
perchance if one could instantiate a wine/proton session and invoke those binaries and redirect their output to some dir outside of wine/proton
ideally not wine but the proton installation which comes with steam when you enable proton support : >
no clue why this is
because the path doesnt exist perhaps.. let me confirm
it exists
but linux cant just invoke a random windows binary
mfw (w is windows)
added a little cmake flag and define to conditionally enable FSR 2
you have to disable the flag to run it on linux
instructions were unclear, patient died
instructions indeed unclear
but i can build everything with fsr2 disabled
ye that's the intent
ye
fsr2 is windows-only
it even says here ๐
unless someone gets those shader binaries to run under proton
well
that could have been some leftover
and i treated it as such
knowing the goofy history ๐
I could try that one fsr2 fork that adds linux support
but I'm sure it wouldn't immediately work
probably a big chungus of pain in the ass
exactlee
tbh it probably wouldn't be that hard to add if I actually had a Linux vm set up
fsr runs under vkd3d/dxvk I think?
no idea, i have not tinkered with either of those nor had the muse to invoke proton/wine from cli (theres something called wstart)
After I've builded fwog how can I build the examples?
Is is not
cd example
mkdir build
cd build
cmake ..
```?
you need to also enable FWOG_BUILD_EXAMPLES in cmake
as a neanderthal I only know how to do it from within visual studio's json editor or cmake-gui
alright, let me try
further enabling FSR 2 for the gltf example requires enabling FWOG_FSR2_ENABLE
๐
re: bad fsr2 gl perf on nvidia
I looked at the spirv that is actually used in the slow pass and it is basically identical to that used in the vulkan backend (save for some extra OpImage instructions in the GL version due to my use of combined samplers)
I had to delete all the unique identifiers though because that was making my diffing tool think all the lines were different
I am also able to compare the actualโข๏ธ binaries used by the driver, but uh 
chalking this one up to gl driver magic gone wrong (in the hood)
lmao
nice try amd employee
If only there were a tool that could let us view shader binaries with readable ISA 
i think fsr2 in opengl is a big deal you could make a reddit post or smth
I also write shader assembly i hebrew
Nice ISA tbh
Ye just gotta document some more stuff I guess
Maybe release the blog post at the same time, idk
The post is mostly an unhinged rant, idk how much value it has to the average user lol
i actually attempted to make bindings but it keeps hard-crashing because of this dispatch https://github.com/JuanDiegoMontoya/FidelityFX-FSR2/blob/master/src/ffx-fsr2-api/ffx_fsr2.cpp#L1025 : (
unfortunately, not really. I just know that this optional sharpening pass also causes a crash (if I dont exit fast enough I have to restart pc) https://github.com/JuanDiegoMontoya/FidelityFX-FSR2/blob/master/src/ffx-fsr2-api/ffx_fsr2.cpp#L1041
must be something wrong with my bindings I guess. But its all simple blittable structs so idk where to look
Btw Jaker, does Fwog support compressed textures with ktx2
Compressed textures are on my to-do list, but I can expedite support for u
As for ktx specifically, I think you'll still have to do some manual work as fwog doesn't deal with that kind of thing
I haven't touched ktx though so we'll see
its also on me list
why is maxPerStageDescriptorStorageImages 1048576 for NV gpus, but then GL_MAX_IMAGE_UNITS a pathetic 8
toomuchvoltage works for nvidia, maybe we task him to find out ๐
what do they do there
im not exaclty sure but possibly driver dev
that's the first thing everyone assumes when they hear I work at AMD 
@long robin I'm looking at this, what about creating a context struct? Instead of keeping a global state? (with Fwog::Initialize and Fwog::Terminate)
though maybe that's a bad idea
thought about it and decided it's pointless because you can't reasonably have multiple OpenGL contexts
yeah
I'd rather have the convenience of global access, just like raw GL, than artificially impose a context that must be passed around
if I were abstracting any other API, I'd happily make a context object
but only because those APIs aren't as dumb
time to add s3tc to my glad.h
also threw in khr_shader_subgroup because I'm silly
where did the name BPTC come from anyways
it's just an alias for BC7 and BC6H
kinda annoying that GL_EXT_texture_sRGB was added 5000 years ago in gl 2, but I need it for the srgb dxt formats
didnt read the fine print in them GL_*.txt files, hey? ๐
eew it adds compressed luminance formats
I also find it schtrange that opengl adds the super advanced BC6H and BC7 formats in 4.2 core, but not the BC1, 3, and 5 formats
@dapper gorge do you know if it is absolutely necessary to use glCompressedTextureSubImage to update the contents of a compressed texture
I see it adds an imageSize parameter, so I guess the answer is yes
what a pain in the ass
I'm also gonna have to update my scene loader (probably by adding libktx) to actually test these and spot the 3000 incorrect assumptions of Allah
I think so
At least if you want mips you need to copy parts of the image (of different sizes ofc) at different offsets
yeah after thinking about it I realized that it's probably necessary since block compressed formats are a thing
now that you have fsr2 your downsampling thing that doesn't really work right is redundant
that one when you render indirect at quarter res or something I don't recall what it was exactly
huh
the quarter res thing is part of the original rsm paper. I don't even use that in the advanced RSM
and yeah it's annoying because it doesn't even modulate albedo properly, so it gets all blurred when you lower the render resolution
?
#1019779751600205955 message
oh, that downsampling thing
it works perfectly fine if you don't downsample to absurdly low resolutions like that, so I assumed you were talking about the other one ๐
but yeah fsr2 mostly makes it redundant, so I already disabled it for now
I tried making a runtime slider for changing the rsm downscaling ratio, but it was horribly bugged and I couldn't be bothered to fix it
hmm
I have a feeling that the imageSize parameter of glCompressedTexSubImage*D can be inferred by the format and dimensions of the data
e.g., some bcn format might have 64 bits per 4x4 texels
I also find it odd that you need to specify a format when you upload compressed data (it's already specified when you create the image). surely opengl can't automatically convert between compressed formats 
oh god astc uses trits and quints in its encoding ๐
https://themaister.net/blog/2021/08/29/compressed-gpu-texture-formats-a-review-and-compute-shader-decoders-part-3-3/
TIL "POV-Ray SDL" (in ktx-software repo)
what is that lmao
some haskell ray tracing thing apparently
no clue really
clicking on the thing brings me to a "no results found" page
so it existsn't
spaghetti monster lives in people's walls too
The Persistence of Vision Raytracer: http://www.povray.org/ - GitHub - POV-Ray/povray: The Persistence of Vision Raytracer: http://www.povray.org/
#macro Trace(P, D, recLev)
#local minT = MaxDist;
#local closest = ObjAmnt;
// Find closest intersection:
#local Ind = 0;
#while(Ind < ObjAmnt)
#local T = calcRaySphereIntersection(P, D, Ind);
#if(T>0 & T<minT)
#local minT = T;
#local closest = Ind;
#end
#local Ind = Ind+1;
#end
// If not found, return background color:
#if(closest = ObjAmnt)
#local Pixel = BGColor;
#else
// Else calculate the color of the intersection point:
#local IP = P+minT*D;
#local R = Coord[closest][1].x;
#local Normal = (IP-Coord[closest][0])/R;
#local V = P-IP;
#local Refl = 2*Normal*(vdot(Normal, V)) - V;
// Lighting:
#local Pixel = AmbientLight;
#local Ind = 0;
#while(Ind < LightAmnt)
#local L = LVect[Ind][0];
// Shadowtest:
#local Shadowed = false;
#local Ind2 = 0;
#while(Ind2 < ObjAmnt)
#if(Ind2!=closest & calcRaySphereIntersection(IP,L,Ind2)>0)
#local Shadowed = true;
#local Ind2 = ObjAmnt;
#end
#local Ind2 = Ind2+1;
#end
#if(!Shadowed)
// Diffuse:
#local Factor = vdot(Normal, L);
#if(Factor > 0)
#local Pixel=Pixel+LVect[Ind][1]*Coord[closest][2]*Factor;
#end
// Specular:
#local Factor = vdot(vnormalize(Refl), L);
#if(Factor > 0)
#local Pixel =
Pixel +
LVect[Ind][1]*pow(Factor, Coord[closest][3].x)*
Coord[closest][3].y;
#end
#end
#local Ind = Ind+1;
#end
// Reflection:
#if(recLev < MaxRecLev & Coord[closest][1].y > 0)
#local Pixel =
Pixel + Trace(IP, Refl, recLev+1)*Coord[closest][1].y;
#end
#end
Pixel
#end
the "sdl" stands for "Scene Description Language"
such a nice programming language
at least it's readable
iirc it detects languages by file extensions
yeah can't you set it somehow (for the entire project)
so it doesn't think .fs files are F# if they're really fragment shaders
yeah
you might be able to coerce it via .gitattributes but meh
just name your shaders foo.2letterstage.glsl ๐
makes syntaxhighlighting in any editor shrimpler as well
yeah that do be what I do
as of a while ago, I got annoyed at having to change settings on everything ๐
.ps if you do hlsl is usually postscript files not pixelshaders ๐
I thought this said foo.2strangeletters.glsl ๐
I read some legal thing on a gltf document and learned something
OpenGLยฎ is a registered trademark and the OpenGL ESโข and OpenGL SCโข logos are trademarks of Hewlett Packard Enterprise used under license by Khronos.
I didn't know HP had anything to do with any of this
unironically saved that trivia now to my obsidian note on 'Misc Notes'
it sits next to the screenshot where u taught me that log2 can tell u how many times u can cut an image into two
which in hindsight is kinda embarassing because... yea its in the definition of what a log is i just forgor to connect it
damn, I can't even load gltfs that have basisu texture compression in blender
I should've foreseen that when I saw that you can't export those
I'm afraid tinygltf cannot do ktx ๐ฆ
wait
I think this is just enough info to load a ktx texture (bufferView + mimeType)
mashallah I thought I was gonna have to rewrite a ton of my scene loading code
perhaps because you are not watching the repo
maybe
yeah I wasn't watching it 
will have to break my oath and finish implementing this ktx stuff to my loader tomorrow
I headcanon that jakar is unironically muslim
what gives you that idea habibi
something something fastgltf
though its not like it loads the ktx for you either
I did search ktx in the issues on tinygltf, only to find an issue that Sean commented on 
The author of tinygltf made some basic support for ktx literally 400 commits ago
what I've grown to dislike about tinygltf is that for any extension it basically just gives you the JSON and says "you're on your own buddy"
But it doesn't matter, I am gonna use libktx to load it anyways
but fastgltf actually makes an effort to treat extensions like they're actually part of the spec
yeah tinygltf should do something for the common ones
ktx isn't an issue though. It still gets the mimetype, which is all I need
but the extensions that add more stuff are probably a huge pain
I remember adding the specular ext was annoying enough and that was just a few extra fields on materials
just a big chunk of ugly JSON DOM walking to do stuff the parser should
especially since the specular ext adds a few texture fields and you completely lose all of tinygltf's image handling convenience there
basically, use fastgltf
I might, if I encounter more severe annoyances
But for now I'm going to continue not changing everything
Praise be to Hajji Jakar Al-Hamdi
I live in a city where there are non arab muslims (they mostly malay)
Its interesting becos growing up thatd be my default impression and i still dont connect arab n muslim
anyways jakar based islam is the second most gp religion anyways
Muslims all worship around a hello world cube its amazing
opengllah
allahu akbar
Welcome to the opengl madrassah
๐
jaker has found the way of allah
@long robin New FSR 2 patch version๐
as if I don't have a stream of secret fsr info being pumped into my bloodstream at all times
then update fork already๐ญ
soon
I made an issue so I don't forget
btw, have you integrated fsr 2 in your engine yet
no. It keeps crashing on those two dispatches
fook
do you have any leads on the cause
my only guess is that somehow certain gl function pointers aren't being loaded
no and I dont really know where to look. At this point I am very much certain its not the actual interop code. But I also know the the fsr gl backend should be working (although the one missing depth format made me a bit suspicious)
can you attach a debugger to it 
maybe. I dont have any experience with that kind of stuff though. Too lazy to set that up
oh you mean that. ye I can
do you have a stacktrace of where it crashed
I'm trying to recall that one pic you sent (I can't find it in discord search)
when this scheduled dispatch gets executed it crashes I think. Meaning I have to restart pc
I dont have a stacktrace or much info at all really
I need to look deeper into it
oh I see
a normal debugger wouldn't catch that kind of crash
must be API misuse on my part somehow, because UB in CPU code normally doesn't result in that
well, your C# bindings add another element of uncertainty
the gl backend runs fine on my AMD card
Yep. I keep jumping between the fsr2 libary and my bindings thinking "This must work why I am looking here"
are you bindings on github somewhere
I could take a kwik look (not a C# expert, but I might spot something)
thats nice I'll make a repo tomorrow and then share link here
hmm didnt want to let me take a look, noted : )
I kinda wish there was a unique_ptr that has a size member
I wanna manage these pointers from C APis better
oh well, I guess I have to delete the data() of a span since there is no stl template that satisfies my needs 
that doesn't explicitly store the size
I'd have to do something terribly laborious like make a pair<unique_ptr<T[]>, size_t> to get what I want
not worth
i believe the stl calls this type ๐ ฑ๏ธector
I'm getting a pointer from a C lib
my condolences
don't wanna copy it to a ๐ ฑ๏ธector, as that would be inefishent
Truly a fate worse than death
today is "not knowing unique_ptr day"
back then I still had some hope.
You can look now ๐
https://github.com/BoyBaykiller/FidelityFX-FSR2-CSharpBindings
I get cancer every time I want to make a unique ptr from a raw pointer
unique_ptr<T>(T*)?
Or rather, when I want to assign a raw pointer to a unique ptr
Then the compiler complains and says there is no conversion from T* to unique_ptr<T>
I cry everytim
i'd cry too if i'd be riddled with cancer
oh mfw my issue is just another one of reading comprehension 
the ctor I want is explicit, but I got baited by some implicit ctors that take an extra deleter arg
a case for RRA
A plague that will not get better unfortunately
you could also use reset
yeah
@long robin I know it's 4am but do you mind reading my ramblings in #1090390868449558618 to see if they make sense

Uh can I save it for tomorrow
Sure thing lol
I have mind frog atm, as you can clearly tell
I'm all out of brainpower as well for now, gotta recharge
btw did you find anything suspicious in my fsr2 bindings yet
I'm looking at em now (somehow didn't see them earlier)
what does Pack = 8 mean in these unsafe structs
8 byte alignmend. I've found that what the cpp compiler does too
the whole struct or each member?
each member
that doesn't seem right
only 8-byte types get that alignment in c++
I don't know what you should put to get the same alignment
Just spam alignas 8 on each member
but members aren't aligned like that on most c++ compilers 
:misalignment:
would that be the same as doing #pragma pack(push, 8)
I am not sure, I think that aligns the whole struct to 8 bytes, not necessarily all its subobjects
I may very likely be wrong
I just checked and it doesn't align them all to 8 bytes
It seems to be on every struct member so should be the same as Pack
Specifies the packing alignment for structure, union, and class members.
And I am using#pragma pack(push, 8)
okay
Can you name which one so I can manually check the cpp/c# offsets
so hopefully this isn't the issue then
I just did this
#pragma pack(push, 8)
struct joe
{
int a, b, c, d;
};
constexpr int i = sizeof(joe);
sizeof(joe) is 16, which means there is no extra padding after members of this struct
thats consisent with c# Pack behaviour
I reckon if you alignas(8) before int a,b,c,d you'll get sizeof 32
I must be tripping fr
pack for both of these cases (C++, C#) can only lower alignment
8 would increase the alignment of those ints, so it doesn't do anything
isn't the whole point of alignas to overalign though
alignas isn't pack tho
o
my issue was that I put alignas in the wrong spot, so it compiled but did nothing 
I did int alignas(8) a;, but putting the alignas literally anywhere else would have caused it to work
How does that even compile
idk but at least gcc warns
mfw C++ grammar is literally: idk lmao
@digital lion do you have a test program using C# fsr I can run
yes, project or executable?
project so I can debug pls
https://github.com/BoyBaykiller/IDKEngine/blob/4e29d30e0f18e737395b621f60abbd876335f14e/IDKEngine/src/Render/TAAResolve.cs#L181
Thats the relevant commit and code section. But can't guarantee it ill work
what is nint and does ref byte match with void*?
https://github.com/BoyBaykiller/FidelityFX-FSR2-CSharpBindings/blob/master/src/FFX_FSR2/GL/GL.cs#L21
nint should be size_t. And ref byte comes down to void*.
Actually nuint is size_t
I'll try cloning the project at that commit and running it
it doesn't crash when I run it
do I need to do something to enable fsr2?
I see you have TAA already, but I'm guessing it's not fsr2
nice. You want to uncomment this https://github.com/BoyBaykiller/IDKEngine/blob/4e29d30e0f18e737395b621f60abbd876335f14e/IDKEngine/src/Application.cs#L124
if you are on amd it likely crashs on nvidia I was just getting weird output
I'm on the latest commit btw
do I want to comment out the RunTAAResolve too or nah
because fsr 2 needs aliased input
yes comment RunTAAResolve
well that can come later
anyways, I get a crash when it calls GetScratchMemory because the dll is missing
oh
the dll path is hardcoded ๐
try the older commit
wait real quick how did you even got it working on the newest commit. I removed fsr2
try 4e29d30e0f18e737395b621f60abbd876335f14e (update dlls)
should fix the hardcoded dll path
uh
(on rtx 3070)
hm never test on that specific card but works on rtx 3050 ti laptop (and a bunch of others)
this is without RunFSR2 right
oh I uncommented the fsr2 line
so it is WITH fsr2
looks fine without fsr2
I think these results are to be expected
hmm I can't step into fsr2.contextdispatch
maybe I can give it symbols
ah, but you compiled fsr2 with #pragma pack, right?
the dlls in that specific commit I think dont have it
I need symboools
the .pdb you mean?
I might be able to provide it with my own symbols
why does that matter here btw
because I won't be able to just slip in my own dll with symbols already
ah ok
one sec ill make a new branch containing the symbols
done
git pull
git checkout fsr2-test
Nice, I'll try it out in a minute
oh, gitignore filtered out the files hehe. Fixed
hmm it's already up to date
(on fsr2-test branch)
this is as far into the call stack as I can get
ah wait
oh ok. I dont know what to do. The symbols are there and build in debug
aha
I needed to enable native code debugging
now it's at least giving me this when I step into the pinvoke
oh. I never did that stuff
it's trying to use a location on your computer since that's where the source code is
but I can just give it my own
ok tell me when I should upload more stuff to the branch or fix something
it do be getting kinda late though. Need to see the ๐๏ธ
did you modify the fsr2 source at all
yes
hm
might mess up the source mappings for me
looks like it's just one line off, presumably from your pragma packs
yes the pragma and two print statements in ffx_assert.cpp
should I update the repo dlls to cotain non edited fsr2 source files?
nah it's okay right now
I can step through the fsr2 source from your code 
being off by 1 line is still usable
I'm mainly looking to see if the arguments are horribly corrupted
yep good idea. Can you send a screenshot of the native code debugging your are doing. Just for my understanding because I never did that before. How it looks
I'll do u one better
yo that is cool
i gotta go sleep now I can already hear the birds chirping. Thanks for taking the time
(i expect it to be fixed when I wake up)
gn
well so far I haven't found any issues
all the parameter structs seem fine
the gl backend struct seems fine
good to have confirmation from the pros
oh jeez I can't renderdoc this because it requires bindless textures
rip, nsight also crashes
"unknown assertion" epic
issue was wrong working directory, but now I can't capture a frame for some reason
at least I could generate a useful trace with apitrace
kinda hard to debug since there are either no frame markers or apitrace doesn't show them
nsight is really weird for me
multiple independent programs i've written have not worked with it
ye it usually doesn't give an obvious reason for why it failed (which I guess makes sense if nsight itself crashed lol)
heh
on loonix i have to tell nsight to use glfinish as the separator, it wont pick up glxswapbuffers
for some reason, tinygltf is not giving me correct indices for ktx textures 
ah 
this is why
source is normally a property of the texture itself, not the extension
krill me
time to do a little json parsing 
oh, tinygltf is kind enough to store unknown extensions in an extension map
mashallah
good froge
oh jeez, tinygltf uses std::map unironically
why not ๐
unnecessary ordering guarantee (for most cases)
when is this actually a problem?
btw i remembered the thing
std::map acquiring a global lock when iterator debugging == 2 in MSVC
is it really this bad when you add a few things to that specific map?
in case of tinywtf
global lock my deccy
yes
oh, it's global? ๐
means you can multi๐ tinygltf but it serializes nicely under iterator debugging
unspecified transgressions of the opengl kind
thats why everyone uses unordered_map instead?
eh nevermind, i feel like getting slapped in the next 5s for asking ๐
Perhaps
Truth is all maps are garbage in C++ 
btw this is the chain I need to go through to access the texture source index in tinygltf now 
std::map is just especially bad
int textureSource = texture.source;
if (auto it = texture.extensions.find("KHR_texture_basisu"); it != texture.extensions.end())
{
struct Hack : tinygltf::Value
{
Hack(const tinygltf::Value& basisuExtension)
: Value(basisuExtension) {}
int GetTextureSource() const
{
return this->object_value_.at("source").GetNumberAsInt();
}
};
textureSource = Hack {it->second}.GetTextureSource();
//printf("source: %d\n", textureSource);
}
const auto& image = images[textureSource];
I want 2 die
I have to use a struct because the value I want is a protected member of tinygltf::Value 
; (
I just wanna load compressed textures
not really
its just something unexpected
perhaps the real reason is that the standard mandates that it do be kwite slow (regardless of this)
i wouldnt know, and expect map to be a dictionary like structure for when i need a dictionary and assume its well implemented, given its part of a standarlib
๐
not to be too harsh on the tinygltf guy but a lot of its code strikes me like C++ isn't his first/main language
he writes so many C++ libs though
it sorta looks like he's generally used to something else but kinda knows about the fundamentals and STL containers to make a lib, but not how to really leverage C++
yeah seems like it
ouch!
I sentence him to 100 hours of cppcon talks
yeah I'll probably use a different lib next time I need to load gltfs
I have been using cgltf and can't complain
they are japanese iirc
a billion failed asserts later
s t r e t c h
that looks krispy
the textures are surprisingly correct, so I guess uvs are fooked (damn mesh quantization)

I think you need -noq -vpf
I can't even remember what this does, but I had to uncomment the GL_BYTE case to make it work
auto AddElementsNorm = [&]<typename Vec>()
{
for (size_t i = 0; i < accessor.count; i++)
{
// this doesn't actually work exactly for signed types
attributeBuffer[i] = Fvec(*reinterpret_cast<const Vec*>(buffer.data.data() + totalByteOffset + i * stride)) / Fvec(static_cast<float>(std::numeric_limits<typename Vec::value_type>::max()));
}
};
switch (accessor.componentType)
{
//case GL_BYTE: AddElementsNorm.template operator()<Bvec>(); break;
case GL_UNSIGNED_BYTE: AddElementsNorm.template operator()<UBvec>(); break;
//case GL_SHORT: AddElementsNorm.template operator()<Svec>(); break;
case GL_UNSIGNED_SHORT: AddElementsNorm.template operator()<USvec>(); break;
case GL_UNSIGNED_INT: AddElementsNorm.template operator()<UIvec>(); break;
//case GL_FLOAT: AddElementsNorm.template operator()<Fvec>(); break;
default: FWOG_UNREACHABLE;
}
otherwise it hit the unreachable path
wtf
ikr 

it's my code for converting gltf vertices to my runtime vertex format
now I remember that snorm requires a more complex integer->float calculation, so I didn't do it
i like the roof color contribution at the top of the scene
good eye
muchas gracias
made the glb a third larger though ๐
when the
when the quantization
I made a function for loading snorm attributes, but it still didn't work, so I tried those flags
try not to cringe challenge (impossible)
auto AddElementsSnorm = [&]<typename Vec>()
{
for (size_t i = 0; i < accessor.count; i++)
{
// max(c / (2^(b-1) - 1), -1.0)
// The second -1 is implicit due to truncation after division
attributeBuffer[i] = glm::max(Fvec(*reinterpret_cast<const Vec*>(buffer.data.data() + totalByteOffset + i * stride)) /
Fvec(static_cast<float>(std::numeric_limits<typename Vec::value_type>::max() / 2)), Fvec(-1));
}
};
oh wait that's wrong 
that looks neat
this is the "correct", "readable" version of it, but the mesh still renders incorrectly without lvstri's flags, so meh
oh wow this function isn't even my issue
uvs are unsigned shorts, no I've no clue why they're turning into doodoo
blender can load the quantized mesh fine
thats because of this https://github.com/BoyBaykiller/IDKEngine/blob/fsr2-test/IDKEngine/src/Windowing/GameWindowBase.cs#L100
I once put it there for making sure the screen is black on start up
multiplying all unorm attributes by 128 somehow makes it look almost correct
Perhaps you need meshopt_decodeVertexBuffer?
For TEXCOORD attribute, the transform can be specified using the offset/scale supplied by KHR_texture_transform extension. Note that this requires merging existing offset/scale values, if present, with the dequantization transform.
oh boy, struct Hack2 : tinygltf::Value let's go
btw I ctrl+f'd "hack" and found this line in my loader
texcoords.resize(positions.size()); // TEMP HACK
quite amazing
I think that's for meshes with no texcoords
Hack 3? :pog:
no worries, i do the same
why is the texture transform a property of the texture
hmm, I guess it helps keep your mesh quantized in a small range
me after 6 hours of compressed textures and gltf self-flagellation
https://youtu.be/2eEcAvzR0FI
heh
time to rest your heavy ass
sleep well https://www.youtube.com/watch?v=7hewSKpkgSM
#nasheed #dua #prayer #islamicmusic #uae #ahmedbukhatir
ูููููููู ููู ูููู ูููุดููุนูุจ ููุฏุงุฏุงู ููููููููู ุญูููุจููููู ูููุฃุฑุถู ู ูููุฏุงุฏ
ููููู ู ุฃููุช ููููู ุนุจูุฑุช ุนููููุง ู ุจูููููุชู ุงูู ุฌูุฏู ุฃุทูุงุฏูุง ุดููุฏุงุฏ
ุฃูุชู ูููุง ู ูููู ุดุนุจู ุฃู ูุจูุฑูููุง ุนูุดุชู ููู ุญูููููุชู ููุดูุนุจ ู ููุฑุงุฏ
ุฒุงููุฏู ุงูุฎูููุฑุงุช ุณูู ุนูู ูุดู ูุงูุง ู ุฌููููุจููุงู ููููุฌูููุฏุงู ู ูููููุงุฏุง
ุฌุงู ูุนู ุงูุฃุดุช...
a lullaby to put me to sleep, nice
you could've just used fastgltf
its not ramadan why would he need to fastgltf
I don't get how KHR_texture_transform can be a "used extension" but not a required one
what is the line that separates required extensions from "unnecessary" ones?
like, KHR_texture_basisu is required because you can't properly load textures if you ignore it
but ignoring KHR_texture_transform will screw up your UVs horribly if you ignore it
it might be an oopsie from the exporter
perhap
the spec only says this
All glTF extensions required to load and/or render an asset MUST be listed in the top-level extensionsRequired array
it's a pretty weak specification
they even use KHR_materials_sheen in the example of a non-required extension, and I'm pretty sure you'd need to support that to render the asset properly lmao
uhhhh
that seems smart to me
required vs non required is like... should an engine reject this asset entirely if it doesn't support this extension
yeah?
and how should that be determined?
subjectively
that is evidently how they decided this
i think texture transform can be optional in some cases
like if you're using it for detail textures, you don't necessarily need support for it
and because you need to favor optional usecases over failing use cases, it fits into that category
pretty much everything can be optional in some circumstances with that reasoning
I guess gltfpack doesn't use any logic to determine whether texture transform is "actually needed"
all four newsponza models now fit in under 4gb of vram 
tree
this server needs a frogchamp emote
I thought the RSM would make it more colorful
can barely see any bleeding
yeah newsponza curtains have a big gap in the middle which means more multicolored light from the wall can hit the floor
I just realized that it actually makes sense
most of the DI covers bland gray walls not colorful curtains
so indirect is largely gray too
yeah, this is the best I can focus the light on the curtain
k I see the blue thing now
i feel like the discrete curtains colors were a big part of sponza, you could see the colored bounces so clearly
and orange too below
have you tried any fun scenes besides sponza and miguel san?
though maybe you need more bounces to truly bring out the color bleeding
when I attempt to load textures as BC3
lol just realized that I named my compressed formats incorrectly
I just did DXTn -> BCn when converting from my API enums to opengl
turns out DXT3 = BC2
then opengl randomly calls BC4 and BC5 "RGTC"
my bad, it's not BC4 and BC5. It just happens to share an identical encoding with this extension 
ye no more corruption now
i love compressed formats, you fiddle with them for hours but then its so obvious when you look at the result
khronos should put the entire format encoding spec in the compressed format enumerators so we don't forget
the parkour between different naming conventions hurts
anywhomst, fwog now supports the full spectrum of BC formats
though I still don't know what is supposed to happen when you copy or download compressed images 
instant defenestration
also notice how all the dxt ones come from an extension
well actually, I have to use yet another extension to get the sRGB versions of the DXT formats
that looks neat
btw @digital lion I updated my fsr2 fork with the latest upstream changes (2.2.1) and also changed the interface slightly (removed unused parameters in the ffx_gl header)
so I'm afraid you'll have to update your bindings if you want the latest fsr ๐ณ
actually that's not even true, you can just checkout this commit to avoid changing your bindings
https://github.com/JuanDiegoMontoya/FidelityFX-FSR2/commit/25cf567f7c365a923b1f71095c322e834e5f903b
wunderbar
secured myself one of them newfangled usernames
there are a surprising amount of four letter usernames left, like fvec, bsdf, and vec5 (random ones I tried)
Your account is now worth 5 billion dollars
@long robin did you figure out quantization in the end
KHR_mesh_quantization and KHR_texture_transform?
Just the first one
somehow I didn't have a problem with that ext specifically (I think), even though I want using the quantization transforms
though, I'm thinking about upgrading to fastgltf now that I looked at how clean the code is in #1019965526434394173
and it supports all these extensions (and more)
I'm pretty content with cgltf, I don't think I understand how strides work
what are you conchfused about
I have quantized positions in uh
one sec
Ah yes, quantized for 14 bits, I forgor
2^14 is 16384 and it shows as maximum in the accessor, all is good
hmm
Except the accessor tells me that the component type is vec3
so is the stride sizeof(uint16) * 3?
Note that to comply with alignment rules for accessors, "VEC3" accessors need to be aligned to 4-byte boundaries; for example, a BYTE normal is expected to have a stride of 4, not 3.
btw fastgltf would automatically handle this (I think)
||let the shilling begin||
jk 
I may or may not use fastgltf for the vulkan thing
I don't feel like rewriting model loading in GL
I wonder how to make gltfpack export a gltf with mesh quantization but not texture transform
I don't want to have to change my shaders
-v -tc -kn -km -kam -ke -ac -vpi -vp 14 -vt 12 -vn 8 -vc 8 -tj 24 -tq 10```
ya welcome
Ah one of these flags is an impostor
which one turns off texture transform optimization
It's a custom flag I coded myself into gltfpack, it avoids nodes merging
Great question 
why would you not want this
Occlusion culling dies (frustum too)
rip in pepino
Alright if everything works well
I should've compressed vertices from 64 bytes to 20
Now if this doesn't make SM throughput the TOP sol I'll go to NVIDIA's HQ for, uh, talking yes, just talking
Just for talking
its ackchually quite impressive what you do already my spaghetti dude
I don't see how smaller vertices would increase occupancy
I'm limited by VRAM (also by register allocation)
Ah I hallucinated what you said
concinve jaker to have him ship one of them workstation 48gb cards to you
Yeah it should help with vram, probably not worth registers though
Hmm yes, do that please Jaker
My team doesn't use those cards
We only use consumer cards
hehe
and/or you lustri you should write about it
and share it
gloat that your shit is better than GL_NV_mesh_shader
the peeps in the industry might see it
Mesh Shaders have a huge advantage though
its a smol world
Which is not mesh shaders 
It's task shaders, they can basically dispatch work onto the GPU
So the GPU basically dispatches work to itself, which is huge
mdic is the same thing ๐คฐ
You can do culling and unpacking there, dispatch mesh shaders and render only what's visibile
Kind of yes, but with task shaders you can dispatch arbitrary work
20 bytes๐
show vertex struct please
struct meshlet_vertex_format_t {
alignas(4) glm::u16vec3 position = {};
alignas(4) glm::u8vec3 normal = {};
alignas(4) glm::u16vec2 uv = {};
alignas(4) glm::u8vec4 tangent = {};
};```
struct { char data[20]; };
It's smol, doesn't have a lot of attributes
normal could be u8vec2 if you use oct encoding
and I think you can get away with u16 (or even nothing) for tangent if you go full tryhard
actually just ignore me and read this
https://www.jeremyong.com/graphics/2023/01/09/tangent-spaces-and-diamond-encoding/
I will be going full tryhard
This vertex struct shall occupy only 1 bit
Until then I won't stop
you could technically get it below 1 bit in some non-practical cases
like if you apply lz4 on your vertex data and it happens to repeat a lot, but then you have to decompress in the vertex shader which is ๐
I like to imagine at one point the vertex shader becomes somewhere you do literally anything except transforming vertices to clip space 
it would probably run pretty poorly but that's definitely worth being able to brag you have 0.5 bits per vertex
There is gdeflate, which you could use to decompress data on the GPU
--bababooey
1 bit vertex buffer => if bit is 1, then lookup gl_VertexIndex'th vertex of Sponza from a hardcoded array
i have yet to see any other use of engines than rendering the sponz, so this seems like a very applicable compression scheme
Jaker, could you peek at my issue in me thread
I'm tempted to try that, but I'm guessing the shader just won't compile
I looked, but
Hmm, I'll try with the trusty default blender cubeโข๏ธ
@long robin is Fwog texture compression up on GitHub?
Yes
this is not an option
btw there is a todo on that page. I am accepting memes to put there
there also should be no editing mistakes in there because I used ms word to check
GP slang leaking
F
I actually nearly spat out my coffee 
just put a link to this and don't explain it https://www.youtube.com/watch?v=cHqfk5lMw-E
FACEBOOK : https://www.facebook.com/Famille-Musulmane-1387173144911054/
www.famillemusulmane.com
At last the long awaited official video of the famous song BISMILLAH - 2013 version !
man wtf is this 
i watched it, and then i read on, and i have the same question
"i would come in your dream"
is that why I wake up "sweaty" every night
๐
Really liked the article :) Also, TIL about GL_EXT_shader_explicit_arithmetic_types
it seems like when feeding opengl with spirv you get access to all these typically vulkan-glsl extensions like this one?
Because as far as I know nvidia doesnt support it when using raw-ass glsl
yeah it's kinda sus
I don't think they're "intentionally" supported
but there is also no way to query supported shader extensions, so meh
I guess they added that one feature to query spirv extensions, but there are barely exts to query
definitely fewer than what exists in reality
OpenGL GLSL extensions have been the death of me as a NV extension silently works on my AMD laptop but with small artifacts. Honestly didn't know that GL ingested spirv so it's worth looking into
Side note I like how hyper specific the froge meme is
I stole it from #frogshed-๐
yeah the spirv situtation is weird
current amd drivers are especially cursed. Your problem could be related to this:
https://community.amd.com/t5/opengl-vulkan/opengl-bug-preprocessor-names-of-extensions-exposed-which-arent/m-p/561518#M4415.
Also can I know which particular NV ext you mean?
I also experienced some bugs on RDNA 2 (or maybe it was Pascal) after uploading all the shaders in my voxel engine as spir-v, so I just undid that change
the fsr2 shaders seem to work on both vendors as spir-v, albeit nvidia pessimizing two of the passes severely
On phone rn but it literally is this exact situation, just with a different NV extension. Will follow that issue as well thanks ๐
wait jaker do you have read access to the internal bug ticks from the opengl driver team
reddit username reveal ๐ณ
Nah, that's just some guy who copied me
are samplers and textures different objects in gl tho?
Yes
Textures have built-in sampler state, but you can make separate sampler objects that you can bind to override that
yes ik its silly and trivial asf but well just my way of showing I still care about the fwog ๐
mmm yeah I need to put an assert for that in more places, thx for the reminder
๐
I remembered that idea of making a Fwog version of CMake-Template
then I realized after forking that it shouldn't be a fork persay
what is this 
I wanted to adapt https://github.com/deccer/CMake-Glfw-OpenGL-Template but with Fwog example and inside by default
because why not lol plus it'd be a good way to start new Fwog projects for ppl with a template
since the examples aren't really a template (I did use them as such naively my first time)
originally made it as a Fork then I realized 'wait, but its not intended to ever be merged into the original thats not what a Fork is supposed to be'
I didn't even know about the virtual assistant
yea same.
I only found it from here.
interesting
@fiery sorrel describe in your own words wth you are actually trying to do
A cmake template based off yours but with a Fwog scene inside already
So ppl can use it to code something with fwog straight away in new projects
I can choose not to make it public if you prefer it not existing
So Deccer Cmake Template + Fwog
that i got, i just dont understand the unfork nonsense
It is Deccer's CMake Template but Fwog version.
why ๐ข
it dieded
epic
some stuff kinda messy in da code but its fine so far. I'll improve it later
I see cube. It has example of using samplers and texture. honestly just needs a skybox example and itd be a good 'starter scene' for anyone ig
I think Deccer cubes would be good
prob should go with a less harsh shade of green for the screenshot
[0, 1, 0] is a nice, pleasing color
0.1, 0.2, 0.3
maybe as an extra scene. I actually used Deccer's Cmake Template to do my Deccer's Cube and I had to like block my eyes while I deleted the Deccer solution as it was a spoiler
so why did I make this? Just felt like it because as said no actual template for Fwog but turns out it was a decent way to refactor some Plane Game code indirectly
there we go
(yea I flipped the 0.2 and 0.3 because i figured fwog should be green)
oh yea and this template is public so if @long robin or @robust bough (who hates the globalist) wanna refactor the example to have better practices I'd accept the PRs
i can use the feedback too.
I tried to, unlike the example with the triangle in Fwog examples, use these scary things called... classes...
oh they ended up being structs nvm
only thing left is have fwog use fetchcontent for glad
So urm
Templates dont have an Issues board
oh no they do
i just need to enable them somehow?
there we go
check fwog's exshrimples
@golden schooner that is from: https://github.com/JuanDiegoMontoya/Fwog/blob/main/example/common/Application.cpp#L241
you can post links without embed with < > arond the link
need to have a word with jaker about that ๐
ironically did that for the second one ๐
but forgot for the first haha
2-space indents are based ๐ค๐ค๐ค๐ค
I keep forgetting if I am setting up my 'local indent/spacing' style stuff properly
so that when I can push and stuff it can be to some standard which dont look nice on my screen but is standardized
then on my IDE or editor I can do whatever I want
actually idc about the width as long as it's 2 or 4 spaces, I just don't like tabs because it makes consistently formatting stuff across devices harder
isn't there a way for my visual studios and visual code to auto convert my tabs to two spaces
that way i can use my pinky but still be in the space lifestyle
yeah it should show at the bottom of the text editor which mode it's in
or use a .clang-format file
oh sweet didn't know that
that means ive been living a space lifestyle without realizing it
This must be what those kids whose parents fed them brownies that had spanish baked in them felt like
And now in a weird cycle of life, I can go back and put Fwog Template stuff inside Alberquerque's codebase as a project, even tho its based off refactoring Alberquerque's Plane Game code ๐
yep, tab is a nono, tabs as spaces should be a setting set in any editor of yours, be it the editor itself or something like .editorconfig/.clang-format etc
vs defaults to tabs as spaces aka "smart tabs"
I use 2-space indents because that's what my first programming professor forced us to use (our assignments would be checked for formatting and would insta-fail if we didn't adhere to conventions lol)

we were given a tool to check formatting so it was 100% our fault if it wasn't up to par
tons of people STILL managed to submit code without checking formatting and failed assignments as a result
ye ๐ฆ
but there is also .clang-format AND .editorconfig and resharper has its projectName.DotSettings (but also supports .editorconfig)
we were also given a driver program to use to test our assignment and people wouldn't run it and just submit a wrong assignment instead
oh man
his way of weeding out the dum dums
a bunch of people got caught cheating on the early assignments too
which were trivial things like fibonacci or sieve of eratosthenes
oh we had to do sieve of eratosthenes in x86_64 assembly for an assigment once
oh wait no it was finding square roots of an input nvm ๐
just use fsqrt 
heh didnt know that was a thing. ofc the point was to just use only mov, add and stuff. had to keep track of a stack for the parameter
the trick I used was googling x86 sqrt
Any preferences for the skybox? Else I'd just make it numbered and draw my own crudely.
"numbered"?
Labelled*
Front, Back, Top, Down in the file
and in the image
but if u have an actual skybox u wanna use and have license for i can put it as example
ok. I'll keep the 'green' but have an example 'skybox' thats just labelled 'front' and stuff on a transparent png
and then its basically 'done'
I just wanted to have a skybox example as Fwog doesn't have any and it'd be cool to have one as making skyboxes in fwog is easy
Let me help
Peffecto. I can include both and allow user to switch in the dear imgui.
Gonna let Jaker decide tho since its still representing his framework at end of the day
Here you go
๐
You're the one making something, therefore you choose
Make it organic instead of something that I have my grubby fingers deeply embedded within
oki! I'd prob use this one
u got the one without the letters too
then i can make it so the letters are a toggle
