#Fwog and co.
1 messages Β· Page 11 of 1
oh I think I know what the problem is
view space Z gets smaller as you go 'away' from the camera
wew that was the problem
the whole time I was assuming that view space Z got larger, just like depth
actual contact hardening, kinda
contact denoising
some yummy artifacts
the rays are escaping through holes in the heightmap of the cart
increasing the fake thickness of the heightmap removes it, but makes the shadows harder
Maybe I can plug in dlss to fix dlss
if one dlss doesn't work, two will do the trick 
we've had one dlss, yes, but what about second dlss?
i love it when my release build crashes
co stands for co-pain, shared suffering with our comrades


has gained a rival
epic?
looks like variance shadow map bleeding but is most likely unrelated though
or is it π€
Well it is related to high depth discrepancies in the shadow map
be me
reading multi-hundred page pdf
accidentally tap end key while trying to navigate with arrows
https://youtu.be/iQs0bEGXhl8
I guess that would be multi-thousand page pdf yeah
perchance
Vulkan based pdf reader
I put these images on top of each other in paint.net and I still can't see any difference as I quickly switch between them
this may have been an animation
and the energy loss is for rough
yuh
GGX conserves energy at 0 roughness and starts to lose it as it increases so martty is on the money
so
@shell inlet
you keep helping all the lost frogs
with all the brainwormy things
when do you create a project fred π
never
ok I can't promise that though
: )
as it stands currently I can only extrapolate into never
fari enoguh
this is also hte most bare bone extension .txt ive ever seen https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_multiview.txt
hmm
can i use gl_ViewIndex in a vs in conjunction with glViewportIndexed?
or how/when does the vs know what gl_ViewIndex to use?
answer seems no as they are totally unrelated it seems
hmm its vulkan only ;C
you know what that means
hehe
Multiview is for efficient VR rendering I thought
yes
and holo lens :^)
but that's kind of VR too
oh wait i think that's the wrong name
i meant lightfield displays >w<
NO
i meant looking glass displays
i am having a moment
AR
Isn't there a term you can add to counteract the energy loss
Idk I need to keep reading these PBR things
you can naively compensate it back to 1 by preintegrating (into a LUT) and adding the missing energy back
howe ver it does not account for saturation
check out erik heitz paper for the ground truth multiscatter which has no closed form
alternatively check kulla-conty or turquin's papers with approximations
why are you interested in ms before implementing regular one first
i would be interested in clustered volume + pbr π
I'm not, it was just in some PBR presentation I was looking at
do I have double standards? I'm telling you to implement this and that first but I haven't implemented shit myself, only grokking papers
okay I actually implemented turquin's paper though
by stealing pbr code from nabla
going through it myself would have been a massive pita back then
why bother when devsh and his "sweatshop" did the job for me and put the code out there
I didn't do it without permission either and wasn't planning to ship it so I feel no guilt
No need to put sweatshop in quotes
I'm quoting devsh
I should probably look at nabla PBR code at some point, him pointing out the PBR on learnopengl was incomplete and wrong kinda trashed most of my interest in it
"so you're telling me I am gonna have to sit there and piece together how these layers of approximation formulas actually work and debug the math?" fuck that, retvrn to blinn-phong
@final cove I've been reading through the links on this page and they've been pretty good
https://interplayoflight.wordpress.com/2013/12/30/readings-on-physically-based-rendering/
nice I am definitely gonna have to take a look at this
It's fr giving me a much better understanding
Frogday
I learned yesterday that there's a material called spectralon which is an almost perfect lambertian material
And it's used for capturing the albedo of a surface in a photo (by placing in the image to serve as a reference white point)
i feels like vsauce or veritasium made a video about it already
Mayhap
I want to get some of it myself just for the lulz, but it's probably proprietary and costs $250 for a tiny amount
: )
fak off mate
OpenGL Debug message (131222): Program undefined behavior warning: The current GL state uses a sampler (0) that has depth comparisons disabled, with a texture object (0) with a non-depth format, by a shader that samples it with a shadow sampler. Using this state to sample would result in undefined behavior.
opengl π€
I just added that error to my ignore list because it's cancer
it happens because I clear all the bound samplers and textures at the start of rendering (in debug mode), which makes the GL think I'm about to commit war crimes on the sampler
btw do you think there's a way I can optimize this with trig identities
float theta = atan(radius * xi.y);
float cosTheta = cos(theta);
float sinTheta = sin(theta);
I realized I don't need the atan since I can just plug in the angle directly
joe
what not being cleared does to a mf(ramebuffer)
feels like it should be blurred more
here it almost looks like constant pcf with contact hardening, but I might be wrong
half asleep and don't want to open blender to confirm my sus
I think part of the problem is the tone mapping hiding it
another thing limiting the penumbra width is the fallback for when a ray reaches its max iteration count
is this panning or smth
probs
it has all the usual artifacts and more
anyways, here are all the parameters that influence penumbra width
just how grandma used to make
can you do more than 10 steps per ray for science
yes, i think you are right
if the source is thicc enough then there is no umbruh past a certain distance
I don't have 16k^2 shadow maps like UE5 unfortunately
why not
just change the number in the source code bro π
yeah, i thought about it a bit more and realized
I did 2d simulation in paint
10 steps is sufficient for the small object, but the larger one needs moar steps to be accurate
ok nice, that's epic, poggers, blessed
watch the frames go right out the window
UE5 apparently has some heuristic to estimate the surface thickness rather than having a hardcoded value like I do
scene-dependent parameter hell my beloved
depth peeping
the rays be slippin through the cracks
depth peeling is actually one of the first things I thought of to add more info
but idk, seems expensive
can you raster once and store min and max depth
plus it's not infallible
I would have to raster twice I'm pretty sure
but here just somehow do software depth compare
the nice thing about smrt is that you just plug a normal shadow map in
btw UE5 also does a thing where the ray length for directional sources depends on the distance from the surface to the camera
which is why there is that weird warping effect when you get close to the shadow
that's ugly
my guess as to why they have the variable ray length is to make both far and near shadows look good
anyways I gtg to sleep, gn my froges
same, gn
you merged rtsm to main?
also another thing to get thickness might be to use two shadowmaps one with front faces and another with back faces
didn't think too long about it so might be stupid
what does ue do tho
yeah
it looks at all the depths traversed so far and uses some heuristic to determine how thick it actually is
Since the Virtual Shadow Map only stores the first depth layer where naive iteration misses intersections with any occluders behind the first one, a variety of light leaking artifacts can happen where the occluders overlap. These types of light leaks are resolved using a gap-filling heuristic that extrapolates depths behind the first occluder based on depths seen before the point of occlusion.
that does not actually explain what the heuristic is
yeah it's not very helpful other than indicating that it has some magic
I would look at the source, but it's impenetrable to mortal eyes
my cousin is visiting so my time is getting the succ
π π
I kinda wanna work on my galaga clone game soon
2d?
yeah
there is a thread or project post somewhere
naturally, the most recent convo was something completely unrelated
"galunga github" 1st result
kek
I guess because a) it got traffic from the jam; and b) some commits reference galunga
no clue tbh
I mean if you linked it from ld website then that would probably count as a cite
for webcrawlers
unless nofollow
I can add this to fwog quite easily
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkAttachmentLoadOp.html
then I can use the fancy schmancy glInvalidate* functions and probably experience driver bugs since no one uses them
idk why I had bool clearOnLoad in my render attachment struct and not gone one step further to make it an enum
gonna have to update all the examples again 
I stumbled upon VK_ATTACHMENT_STORE_OP_NONE
seems like a way to avoid UB when a shader does not write to one of the targets of a framebuffer
it is? it looks like it originates from the dynamic rendering EXT
I see that it is both a qualcomm thang and a dynamic rendering thang
there is no point in having an unwritten attachment on desktop, since you can sample them instead
store op none is useful when you are loading a read-only attachment as a input attachment
is that for subpasses
wdym
the term "input attachment" scares me
anyways, isn't it UB to have store op store for a RT but the shader doesn't actually write to it
I thought store op none would also help with that
its not UB
ok then that's just a glism
its just an issue because if the data was read only
why are you storing it back
muh bw
and store_op_dontcare makes the result rt contents undefined
I don't get the purpose of that one
it seems like load_op_dont_care would be sufficient
the use case I can think of for the load op is when you know that the previous contents don't matter since they'll be overwritten
ah, can you still do per-fragment ops?
the "contents within the render area are not needed after rendering" bit makes me think that
let me give a motivating example (motivating you to understand it):
you want to render some depth tested geo as the final thing
so you want to LOAD the depth attachment contents, but you don't need it later so you can have STORE_OP_DONTCARE
yeah that makes sense
I wonder if that has any practical implications, since you still need to write to memory for per-fragment ops
its about mobile really
you have tile memory
this is management of loads from global mem to tile mem, and stores from tile mem to global mem
on pc you can still get a small benefit by less cache traffic I think
I can't picture how that'd work
the tile mem thing makes complete sense tho
kinda annoying how all these mobileisms creep into vulkan
does anything except mobile even need render passes
VK_VUK_dynamic_rendering
(vuk doesn't use dyn rendering atm)
does it even matter tho
I'll be counting
is that like GL's GL_NONE?
In what context?
drawbuffers
Hmm perhaps
since you kind of have to set that exschleppingly too for some reason
are you contemplating on a vulkan variant of fwog? π whilefighting ombies
Lmao discord's game detection gets stuck
My computer isn't even on
Anyways, a Vulkan abstraction will perhaps come at some point
a vuk2 will be based on fwog2whichisbasedonvk or a fwog2 on vuk?
excuse me, i meant vwog
btw, it is not
I wonder how benefishial it is to do glClearNamedFramebufferfi to clear depth and stencil at once, compared to two separate calls
it clamplicates my code so I want to remove it
eh fuggit, it's gettin delet
the fact that combined depth+stencil formats exist is 
turns out the sampler that I called "nearest" was actually linear so it was sampling garbage 
intermeresting effect still
I really have no idea how the gap-filling heuristic that UE5 uses for SMRT works
These types of light leaks are resolved using a gap-filling heuristic that extrapolates depths behind the first occluder based on depths seen before the point of occlusion
my guess is it's some kind of statistical test
though that's kinda obvious lol
maybe if the variance is high, the heightmap thickness can be increased to reduce the odds of light leaking
algorithm is left as an exercise to the reader
there is a particular aesthetic about this image
generative art
Looks different every time you run it
I'm debating whether or not I should add docs to fwog
pros: people would know how to use fwog
cons: I forgor how to make docs, I have 0 users that need docs
would be a good exercise at least
remove some docs and rely on underflow
not great myself at documenting either
in this case I was actually referring to the wrap function, but I was indeed browsing your docs to copy them as well 
i think the doc setup is neat
so copy that
i don't think copying vuk documentation verbatim will help fwog users (
)
idk how to copy the doc setup
the problem is that I only used doxygen a few times in college for some trivial schtuff
fortunately for your frogly self, i remembered where i copied mine from
Writing good documentation is hard. Tools canβt solve this problem in themselves, but they can ease the pain. This post will show you how to use Sphinx to generate attractive, functional documentation for C++ libraries, supplied with information from Doxygen. Weβll also integrate this process into a CMake build system so that we have a unified w...
what if I just copy FSR 2 and make a mega readme and call it docs
https://github.com/GPUOpen-Effects/FidelityFX-FSR2/blob/master/README.md
actually I was just about to ask about the different approaches
multiple incomplete contradictory sources
I think FSR 2 benefits from this megalith approach because it's a relatively new and unique API that must be "fully" integrated to work
whereas other APIs benefit from the autogen approach when the user just wants to know how one function works
its not so shrimpl after all
FSR 2 does have code annotations for autogenerating docs
FSR has a smaller api surface compared to fwog
well fwog is supposed to be intuitive, so maybe it doesn't need any docs 
dogjiff
i always pass memes less than 8 months old by reference
ok I might half-ass this
and just put the code annotations (fancy comments) but not actually generate docs
but I'll decide after I read that ms link
@long robin you are supposed to rattle some cages at AMD
to have spelling errors fixed in $EXTENSION.txt
Lol the old ATI one?
he's still here π€©
though I don't think he'd like to be pestered about a little typo in this ancient ext π
GL_ATI_meminfo
the author of it
I read it and found a tiny typo, then deccer wanted me to see if the author was still at AMD
ok
its not about pestering him
what about Graham Sellers, do you know him? I've seen him on a lot of less ancient extensions
just to talk to these peeps and coercing them to quietly continue work on OpenGL 4.9 and 5.0
i remember back when i was in vocational training, i had a guy i kept talking to, old fart, knew everything about mainframes and cobol etc
was super interesting to see how he hacked on the machine sometimes or how the machine worked best when fetching billions of records etc
also liked science fiction and fantasy books π
I don't know him
fwog
what would be easier than that
well i guess these shaders can be apart of some kinda resource manager for shader hot reloading
and hence i can store the frag and vertex shaders in an unordered_map or somethin ig
I like Fwog so far it reminds me of Vulkan in terms of CreatePipeline and codebase layout. That yummy 'BindLayout' stuff
@long robin i like
Well that's part of the examples, not Fwog itself
I haven't sufficiently bikeshedded a design to put into the API, so for now I just expect people to load shaders themselves
I've heard rust guys put a whole glsl->spirv compiler into the preprocessor
which optionally lets you load glsl or spirv from file
in their vulkan implementation
but also do you really need that? I don't think so
what else you need than load from file
its possible but i dont really like it
I'd like include handling to some degree
load from file - get the shader handle - feed into shader program
stb_include is nice
ok that should be a part of the custom preprocessor or custom lang that transpiles to glsl or compiles to spirv or whatever
sadly only the chonky shader compilers seem to have full support for includes
I don't want to ship shaderc with fwog, for example
but why do you need to?
I'd rather ship something lightweight, like stb_include
glsl in opengl doesn't compile to any IR anyways so you're stuck with either supply full source or path to full source
It'd be nice if Fwog has a shader loading utility
ok then what do you want, a function "check last modified metadata and recompile" + "custom #include sub"?
Just something simple that can load a shader with includes
As in: give file path, get a string with the processed shader back
OpenGL doesn't support it, so you need middleware
but you have it working though
Nvidia actually supports Google_include_directive, oddly
does amd refuse to build the shaders with it?
I'm currently using stb_include which isn't perfect because it can only search one directory
But for now it's okay
I was also surprised, you're the first person from whom I've learned that it actually works on nv
or were you always having stb_include do the job?
I used shaderc in another project solely for preprocessing shaders
But it's so overkill
I remember thinking it was google extension not working instead of no explicit casts
The samples use stb_include as a dependency
Base Fwog (without the samples) has no file loading thingy
btw what's the length limit for shaders?
Uh, infinite?
Yeah
there is one more thing to keep in mind, dependencies of your shaders, when you modify a Common.glsl then you need to compile all programs including Common.glsl
There was a max number of instructions
Ye I've no plans for dependency tracking and automatic recompilation
probably shrimpler to just actively (re)compile the program recreate the pipeline in question
We've talked about it before. I basically want a constructor for Fwog::Shader that takes a path to the shader (and maybe a path to the include directory) and automatically loads the shader and processes includes
we did?
Yeah like twice at least π
using paths likek that feels like a wonky idea, but i need to fink about it
exclusively constructor?
what if you want to recompile it
resupply the path?
delete old instance and replace with new?
The only concept of recompiling in Fwog is making a new shader and pipeline and deleting the old ones
I find constructing with path and deferring to .Compile() nicer
you can call it again for recompilation and the shader keeps the path
and what else I forgot dementia
ok yeah can make Compile() return itself I guess, for stupid Shader("path").Compile().Thing();
I wouldn't do that tbh
Thats why the comment confused me. I thought loading the shaders ourselves is expected lol
But it would be nice if Fwog could do it
Or not, idk
Writing a little std::ifstream wrapper is not hard
Handling includes is significantly harder
I still think of shaders like other violatile data like textures, model files, audio files etc @long robin
OH
I know what ur askin
Automatically scan some folder to build the shaders at startup?
Nah I mean just a utility function that you pass a path and get a source string (with processed includes)
Processing includes is the interesting part
you'd also need to be able to provide include search paths
I think filesystem interaction is a bit out of scope for a graphics lib personally, and properly supporting #include just welcomes that rabbit hole
im also not a fan of providing include paths and whatnot
I'll just stick with making the user do this schtuff, though I'm still tempted to add an stb_include wrapper since I use it a lot myself
I'm still just following the sphinx tutorial
who tf is Jake
some guy
sussy
baka π³
this isn't even all of the docs folders I've made so far
this isn't even my final doc
would be funny to do vulkan-fwog interop
with GL_EXT_memory_object
probably wouldn't be a fun debugging experience though
hehe forget this
can any debugger even handle two APIs at once?
yeah, windbg
I was trying to google if renderdoc supported it, but found this interesting article instead
https://gpuopen.com/learn/integrating-renderdoc-for-unconventional-apps/
rip linux people tho
why rip?
because the tutorial is only for Windows enjoyers
that stuff should work on lunix too
loading renderdoc's thing and invoking it from your code
i have that code in EngineKit, albeit unused π
ye, but you'll have to call some posix functions or whatnot to do it
clearly, it is insurmountable
dlopen dlsym is the same as LoadLibraryX, GetProcAddress
librenderdoc.so vs renderdoc.dll
I only interacted with these functions once in my operating systems class years ago 
: >
Back in the stone age for me
like a year and a half ago?
nah, like three and a half years ago now
time flies
since that was in my second year of college
this guy outSEOs your lib
I'm gonna strangle that fwog
stwangle that fwog :3
Does Fwog have any side projects? Just realized this thread is called 'Fwog and co'
It's called that because sometimes we discuss vuk in here
And other completely unrelated stuff
I see. I thought you were working on a new Vk / Dx wrapper similar to Fwog (but using a better graphics API that is)
ngl I'm gaining a lot of incidental knowledge about vulkan by copying it with fwog
crazy how it be like that
ruh roh
doxygen ain't generating the xml that I explicitly told it to generate π©
ah it IS generating the xml, but sphinx or breathe or whatever is looking in the wrong place for some reason
nvm there are like 50 index.htmls and I opened one that was stale 
what a pro
now I just need to take what I learned in this tutorial and apply it to the actual project. π¦le
I just had a thought for a hypothetical debugging feature
kind of like shader printf
where you can output any value from a fs to a hidden "debug" texture that deduces its format based on the type of the value
then some histogram is automatically applied to color the image
because I'm tired of having to debug tiny values by making sure they fit in one of my existing render targets and multiplying them by 1000 or whatever to be visible
or having to divide large values by an arbitrary huge number to see them
I imagine it would be integrated like shader printf, by having a hidden resource bound to your pipeline (in this case a render target)
just look at the variable type being written out
So just inspect shader code and bind the corresponding image based on that
it doesn't have to be efficient, just use RGBA32_INT or RGBA32_FLOAT
yeah it would definitely be something more easily implemented by a driver
yeah
for example, trying to debug integer IDs can be painful
especially if they span a large range of values
Yeah this is definitely nice to have for debug overlays and stuff
some automated histogram analysis could go a long way
renderdoc has this feature
that, ye
open a new jar of elbow grease then
dont let that vulkan person talk you out of this glism
basically I want to be able to write something like this
debugVisualizeEXT(someRandomScalarInMyFragmentShader);
and have it appear in some automagic render target that matches the variable type
if the shader was generated
well the API side of things would be messy
yeah generated shaders could do this, if I had full control over the API and shader compiler
like, ahem, a driver would
all you need to do is generate a
string
isnt gobi working on something like that
that "shady" thing π
slim jimmy
that's just a shading lang
or a shading lang generator, I'm not really sure
me neither : >
slim jimmy made me laugh out loud
if only cminusminus had proper reflection
doesn't the shader code pass through fwog?
just mangle it
it does
you lookout for some bogus symbol, sensibly placed
I guess I could just always use RGBA32_float for now
hmm and artificially append soem layout (...) out vec4 magicattachment
one would need to adjust the linter's grammar file then
we can send them a PR
Hah
dont look for excuses
I don't need an excuse to not do it
But it's not a double negation
I never negate
I can actually try to put this in fwog
I'll just accept that my linter isn't perfect
would debugThingyEXT(somevariableinglsl) be the thing you want?
I haven't bikeshedded it enough
I need to figure out what it would look like from the API side
lets cook up some exshrimple
You can easily add a #define that removes it when not running fwog
mayhaps that helps to come up with some apiism
well I'm not concerned about the shader not working outside of fwog tbh
but yeah you could put a define
#include <Fwog.DebugVisualizer.glsl>
layout (location = 0) vec4 o_color;
layout (location = 1) vec4 o_majeek;
void main()
{
o_color = DrawOwlTheBestWayPossible(drawParams);
o_majeek = debugVisualizeEXT(drawParams.SomeThingToInspect);
}
somehing like that?
yes but without the user having to define o_majeek themselves
yeah
it would just go into an unused location
MAX_LOCATION -1 perhaps
ah wait
and then you can generate the include file from code (under the hood)
hmm can you turn a lambda into a string somehow in c++?
probably not
mayhaps with that you could deschribe what debugVisualizeThingy is supposed to do
or is there something like expressions
well the shader intrinsic just writes to a hidden render target
then the API will process it somehow (maybe the user can choose from some preset algorithms) and give the user a rgba8_unorm texture they can draw
the intrinsic writes to an intermediate texture that can be processed into something that can be displayed as color
how likely is it that you will ever use all 8 attachments
yeah
attachments.DebugAttachment
hmm i didnt notice you changed TextureView to TextureProxy or i might have forgotten
You must be in some internal file
I wonder how hard it would be to patch spir-v in a similar way
I won't think about it
Btw the automatic type deduction of the intrinsic isn't actually that important
I can just make a different intrinsic for scalars and vec4s, with integer and float variants
Then I won't have to semantically analyze the shader
so you just provide overloaded functions in an include file
i mean they could be majeekally added to the string, without the include
Hmm the include would solve some things
ye, it would eliminate that hassle of where to add the shizzle
But at the same time, it'd be nice to not have to include anything to use this feature
Especially since including stuff in glsl sucks
#extension GL_FWOG_debug_visualizer : require
And fwog still doesn't natively support include
Lol would this be a disguised include
mayhaps not require, but enable, to keep the compiler quiet
ye
Gotta finish docs first
ah the excuses
And the article martty and I were making
now im curious π
while (!queue.empty()) { queue.dequeue(); }
Well that's for if you want to pester me to complete something
once it's publishedβ’οΈ you'll see
Does Fwog and Co mean eventually more than just OpenGL?
the "and co" is just a catch-all since the convo often ends up getting super derailed here
mostly because I talk about random stuff
@wind trout do you mind if I make a suggestion for your article about bindless textures (I'm snooping on your website)
well it's actually two things
maybe some day
anyways
- it would be helpful to show how to construct a sampler from a uvec2 in a shader
here's an example shader where I do that
https://github.com/JuanDiegoMontoya/GLest-Rendererer/blob/main/glRenderer/Resources/Shaders/gBufferBindless.fs
it would just be 1 or 2 sentences showing how to do it, since sometimes it's nicer to manipulate uvec2s than sampler2Ds
- make a note of how indexing textures with non-dynamically-uniform values invokes UB, then show how you can mitigate it (on NV, you just need GL_NV_GPU_shader5 enabled, and on AMD, you need GL_EXT_nonuniform_qualifier)
https://registry.khronos.org/OpenGL/extensions/NV/NV_gpu_shader5.txt
https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_nonuniform_qualifier.txt
your example code will probably break on AMD unless you use NonUniformEXT
it's annoying because it "just works" on NV (as you can see) since their hardware works differently
Oh wow yeah those are both really good. Is it safe to reference the first link? I couldnβt find a license in that. Iβm already linking to you actually in the other resources section, but for that I link to your blog
This is interesting to know since I donβt even think the superbible mentions this.
Kind of scary though
oh sorry about forgetting the license, you can use the code for free
you really just need to look at the two important lines, which are declaring the bindless texture in a buffer as a uvec2, and turning it into a sampler later on
which doesn't really need attribution π (but I appreciate asking)
Awesome thanks. Iβll add those in and put in a new link back to you!
Edit: Added both with links
also you could mention section 3.8.2 in the GLSL 4.6 spec, which talks about this
3.8.2. Dynamically Uniform Expressions and Uniform Control Flow
well
in case you don't want to explain exactly what causes the UB π
I can dog food Fwog as a primer for a NIH engine right? @long robin
let me rephrase: What would you like to see Fwog's dog food
do whatever you want
I want my fwog to be abused
and I mean it's basically just a GL wrapper
I always wanted to use Vulkan in 'story mode'
(easier Vulkan)
dont lie
its not JUST a gl wrapper
its more or less what opengl should have been since 3.0
it's a gl way of life
its what nividia should have used for their opengl-to-vulkan guide π
yeah the way I see it is you click a button and it takes a snapshot of the scene for each probe and generates irradiance maps that you interpolate between
could also add prb specular with split sum approx
unfortunately I'm yet in educational limbo and only having wet dreams of contributing my weird ideas to fwog
I finally have all this autodoc stuff hooked up to fwog, but now I need to debug this 
problem for tomorrow me
is doxygen the only doc generator out there
it's everywhere
so either that or it's really good
doxygen is just good at autogenerating references from public headers
I've never seen anything else used for C++, it's really good at dealing with C and C++ specifically
I might get a chance to cobtribute to fwog while I'm attending college
done with assignments the hope is they don't overload us with crap during session
how easy it is to generate cubemaps in fwog?
like render to cubemap
Not hard
I think you have to create a 2D texture view of each face in order to render to it
I want to try to tackle the probe based static GI
half life 2 style but with interpolation
it should work better with irradiance
glossy would look ugly without parallax correction
could try to fit a convex polyhedron to the scene by shooting rays randomly from the probe position though will look weird most of the time
still could be better than nothing
hand fitted polyhedra would look better
parallax correction is basically projecting the cubemap onto a convex polyhedron
usually a box
needs analytical intersection method
you can raycast if you have a depth map stored with cubemap
you've done it before
replace box intersection with any convex shape intersection code
I think you can even use concave shapes and if you can discard positions that are occluded from initial cubemap capture positions yet visible from the viewer's position, you can attempt to get the info from a neighbouring probe
That sounds hard
kinda borderline software rt
but basically can use low poly geometry proxies with bvhs
at that point why not just rt
lol I put /// @namespace Fwog and now I get several screens of this
Time to start documenting :p
well I actually get an error because apparently TeX isn't installed or something
H:\Repositories\Fwog\out\build\x64-Debug\EXEC : error : Problems running epstopdf. Check your TeX installation!
Fun times
110 updates for MiKTeX available 
Abandon the entire project while you still can
Dont want to? That's sunken cost fallacy my friend
finally, docs
Sseth here
I'm sadly learning that I don't know how to write doxygen comments that well
maybe if I just spam them on every public symbol it'll work
I find it difficult to write comments a lot of the time. Especially when it feels super obvious
/** Sets the clear color of the image. */
void SetClearColor(float, float, float, float);
yeah, some things are self-documenting
I need to figure out how to tell sphinx to make an API reference for a file
oh snap, if I use .. doxygennamespace:: Fwog it generates a reference for everything in Fwog
doxygenfile is where it's at
another possible brainworm: async pipeline creation
I guess it could be a simple future type that holds a maybe-"compiled" (linked) pipeline
the purpose would be to leverage magical driver parallelism for shader compilation
man why is making code blocks in sphinx such a pain
you must end a paragraph with :: and a blank line to start a code block, each line in which much be indented

π«
is it really "smart" if it does different things in different contexts
I'd've preferred for it to do one thing consistently so I don't have to check the docs when I'm confused by what's happening
now I can finally schleep
mfw there's a misspelling in that page
oh well I fix it later
well done
how do I tell VS to not autocomplete
/// <summary>
///
/// </summary>
when I type ///
I found it
Apps & Programs -> Find VS -> Right Click -> Uninstall
shit you were faster
I had the stackoverflow q in my clipboard already
the problem is that I half assed my search before I asked
then I noticed the search bar and typed "comment" as you can see, which immediately solved it
I have a weird "problem"
I have this
struct GraphicsPoipeloineInfo
{
...
/// @brief Non-null pointer to a vertex shader
const Shader* vertexShader = nullptr;
/// @brief Optional pointer to a fragment shader
const Shader* fragmentShader = nullptr;
...
};
obviously it's not ideal that there are non-null and maybe null pointers to shaders in the same struct
I could make vertexShader a reference
only "downside" is that it forces you to bind the reference immediately
that works?
yes
c-isms
you can put references and const members
but they have to be bound/set when the object is constructed
which means no delaying it
too bad optional<T&> is not allowed
std::optional<std::reference_wrapper<T>> 
tbh I think my best bet is just going with Shader& in the struct
internal record struct GraphicsPipelineDescriptor
{
public Label PipelineProgramLabel;
public string VertexShaderSource;
public string FragmentShaderSource;
public InputAssemblyDescriptor InputAssembly;
public VertexInputDescriptor VertexInput;
public RasterizationDescriptor RasterizationDescriptor;
public DepthStencilDescriptor DepthStencilDescriptor;
public ColorBlendDescriptor ColorBlendDescriptor;
}
hmm can you prohibit "direct" construction of your GraphicsPoipeloineInfo
and only let ::CreateGraphicsPipolinoe construct it
so I'd have a constructor for my thing that exists because another thing has too many parameters to put into a constructor 
hmm
the different kinds of shaders could be different types
I smell a virtualism coming on
I wonder how UB it is to destroy a derived object using a pointer to a base object that has no vritual destructor, if the derived object has no additional members
that sounds shify
are you referring to this?
I'm referring to some other thing that entered my train of thought
ah
w.r.t. to the UB stuff
i was finking about the
struct ism
{
someRef& reff;
};
``` thing, eh, i clearly know too little about c/c++ and its isms
wha
and force its creation only via some ism CreatePipopleoine(ismDescriptor);
you have to bind a reference at construction time
ah otherwise the compiler will yell at you?
so if you have a reference member, it needs to be a constructor parameter or provided in the initializer list
ok
ism i { myObj }; // okay, reff is bound during construction
ism j; // bad, won't compile
excuse this waste of time π
wtf 
this->~Fence();
return elapsed;
looks cursed
3000 undefined behaviors of allah
this->~Fence();
sync_ = std::exchange(old.sync_, nullptr);
return *this;
looks even cursor
my fence class is super crusty, I find as I add docs
it has a function called Signal which doesn't even signal the fence
this paper is pretty cool @shell inlet
https://arxiv.org/pdf/2301.11376v2.pdf
efficient SSGI and AO
@digital lion i saw that image again while looking for something else
and i was wondering if it makes sense to get rid of RT4 and put that value into RT0.A
since its the same datatype
uh why u asking me lol
i guess that would work
seems like it would be more efficient
i believe you posted that back when, but its so far up that i cba to find it again xD
id think that too but since its depth im not sure gl will like that unless you write to it manually
ah, indeed, the labeling is a little deceiving
ah you are right it's teardowns g buffer format #1019779751600205955 message
ah thats what it was, i just flew past it and didnt pay attention to the stuff around it
The actual depth texture is "Z-Buffer". RT4 is just R16_UNORM
from jakers blog hehe

yeah the g-buffer format in teardown is not optimal
lol I noticed in my writeup that I "introduced" the concept of transparent rendering twice
lol
Maybe dumb question but how do you jump to the first post?
I don't think there is a straightforward way
noooo
over 10k messages π
you'll be scrolling for a while
I have an idea
#1019779751600205955 message
I searched for "fwog" in:your-projects and sorted by oldest
@wind trout in case you are scrolling
ahh ok glad I decided to give up early, yeah that's the smart way
need to check out the new Fwog docs
they aren't up yet
they'll be here when they're "done"
https://fwog.readthedocs.io/en/latest/
oh cool ok, bookmarked
currently I'm just annotating the important bits of the API with doxygen comments
this is the easy part of doc writing since it's super mechanical
I wonder if there's a way to make doxygen/sphinx/readthedocs spit out links to the source code in the generated docs
I wonder how I should document the stuff in Config.h
https://github.com/JuanDiegoMontoya/Fwog/blob/main/include/Fwog/Config.h
I think I'll just make a doc page for configuring Fwog rather than relying on doxygen comments
Doxygen wouldnβt do a good enough job with the comments in this case?
I don't think they'd have enough necessary context
E.g., most of these require adding project-wide defines, so it's easier to just explain all that in a paragraph
The beauty of the doc system is that I can mix doxygen autodocs with longer hand-written stuff
Another issue is that I don't even know what to put the doxygen comments on in that file π
That makes sense, doxygen seems like such a nice little tool
you talk too much
if the documentation not overwhelming, showing how stuff is used with exshrimples then its good, and links to the reference docs
if it only consists of
// clear's framebuffer
void Foo::ClearFramebuffer(Framebuffer ...)
{
}
then its also no use
Ye
I try to at least document potentially surprising behavior or other not obvious preconditions
And I have to assume how much the reader knows, so I assume they'll be an "average OpenGL user"
sounds reasonable
It's still kinda hard to know what to document sometimes
I'm erring on the side of "too much" as a result
the reference docs perhaps, should be good to understand what what function does
This is a funny example because clearing a framebuffer has several surprising behaviors that ought to be documented
and then yuo just cook up some general use, and perhaps some mansplaining about the architecture or reasoning
hehe i should not have used the framebuffer in that example π
I get what you meant ofc
Yeah. I'll put that schtuff in the docs somewhere
So far I just have doxygenisms
The basic usage guide should be shrimple enough since the only new concepts to gl people are pipeline objects and render passes
if you use doxygen for the api reference that should also work
how to use and mansplaining could just sit in wiki/some.md
unweird it π
It's more like me not understanding my tools
I need to unweird me
i gtg for now but if you need help with something still we could talk later
Took a quick look at Fwog and was surprised at how shrimple it was to build and run the examples! Really appreciate it when there exist well documented and working examples for any lib 
shrimple*
Ah yes π¦ my bad 
its what its
Love the random usage of the underwater creature memes in unison lol π Like no one said it but we all just started to use them out of nowhere
is there a way to tell doxygen to generate docs for a #define that doesn't exist
context: I have this
#ifndef FWOG_DEFAULT_CLIP_DEPTH_RANGE_ZERO_TO_ONE
#define FWOG_DEFAULT_CLIP_DEPTH_RANGE_NEGATIVE_ONE_TO_ONE
#endif
and doxygen only wants to document FWOG_DEFAULT_CLIP_DEPTH_RANGE_NEGATIVE_ONE_TO_ONE since it exists
tried making a @def comment for both, but doxygen can see that the ZERO_TO_ONE define isn't real
ok looks like the only solutions that involve doxygen are massive hacks
good thing I have sphinx
wtf sphinx makes list text bold if it has a submember
oh okay, the solution is to simply add blank lines 
very intuitive
mashallah martty went through sphinx hell first so I wouldn't have to π
smh even after my prayer sphinx doesn't want to nest the elements of my toctree
ah, apparently using ====== vs ------ under headings has a semantic meaning, I should've guessed 
of course
I appreciate the verbosity of C++ a little bit more every day
too tired to do anything too brain heavy but also kinda bored. I think I'll poke around the Fwogland
lets go
very trianglish
that's just because srgb weird and nonlinear perceptually
alright we are having a good time and all
except
i gotta figure out what part of Fwog is cryin
texture?
renderdoc time
no callback errors when renderdocin
alright i did it
the errors now dont show up even in debug mode
how did I fix it?
i didnt do anything it just fixed itself
pray to allah it never comes back
anyways folks we did it. A program made with Fwog
It really makes you feel like Vulkan
have you used vulkan before?
yea
Fwog uses Vulkan like boilerplate
but i like that its less verbose and i dont have to worry about syncronization
should show the BindGraphicsPipeline part
does it have a command buffer or what's the point in calling it cmd
it can't be cause it's opengl, in opengl there's only command buffers via nvidia only extension
the fact that its a command doesnt necessarily imply that theyre buffered
it doesnt do command buffers
@long robin can explain it bettter but to me its like
opengl with a vulkan skin
not in terms of performance or capacility but how the codebase looks
i feel u bro
what does the Frog button do
||adds green fog||
ah i meant to say fwog is OpenGL with a Vulkan skin
there are no commandbuffer-esque-isms in fwog yet
Yep
tbh it probably should be
and then you check whether you disable it or not by negating whether it should be enabled or not

woops
