#Fwog and co.

1 messages Β· Page 11 of 1

long robin
#

I'm doing a ray march in light (view) space, which is somehow going horribly wrong

#

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

heavy cipher
#

contact denoising

long robin
#

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

golden schooner
#

ship it

#

frame generation of all these new DLSS supporting games looks muh worse

long robin
#

Maybe I can plug in dlss to fix dlss

brisk narwhal
#

if one dlss doesn't work, two will do the trick smart

long robin
#

we've had one dlss, yes, but what about second dlss?

oak garden
#

i love it when my release build crashes

long robin
#

uh is this the right channel nervous

#

I guess it does fall under "and co."

oak garden
#

oh yeah

#

kek woops

#

My brain turned off my bad lol

heavy cipher
#

co stands for co-pain, shared suffering with our comrades

gilded widget
golden schooner
long robin
#

frogstare has gained a rival

shell inlet
#

looks like variance shadow map bleeding but is most likely unrelated though

#

or is it πŸ€”

long robin
#

Well it is related to high depth discrepancies in the shadow map

long robin
oak garden
#

Is said pdf the vulkan spec kek

long robin
#

lmao I wish

#

reading some stuff about PBR right now

oak garden
#

I guess that would be multi-thousand page pdf yeah

long robin
#

perchance

gilded widget
#

Vulkan based pdf readerKEKW

golden schooner
long robin
#

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

heavy cipher
#

this may have been an animation

long robin
#

tru

#

the pics are definitely compressed

heavy cipher
#

and the energy loss is for rough

long robin
#

ah, that's probably what the thing on the bottom right means

#

varying ruffness

heavy cipher
#

yuh

long robin
shell inlet
golden schooner
#

so

#

@shell inlet

#

you keep helping all the lost frogs

#

with all the brainwormy things

#

when do you create a project fred πŸ™‚

shell inlet
#

never

golden schooner
#

to show off what all the brainworms were able to cook up

#

aww

#

ok

shell inlet
#

ok I can't promise that though

golden schooner
#

: )

shell inlet
#

as it stands currently I can only extrapolate into never

golden schooner
#

fari enoguh

#

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

final cove
#

you know what that means

golden schooner
#

hehe

long robin
#

Multiview is for efficient VR rendering I thought

daring surge
#

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

long robin
golden schooner
#

heh

#

i was finking gl_ViewIndex for shadow cascades

heavy cipher
long robin
#

Idk I need to keep reading these PBR things

shell inlet
#

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

long robin
#

Aight I'll keep readin'

#

Maybe I'll actually add PBR to the gltf viewer

shell inlet
#

why are you interested in ms before implementing regular one first

golden schooner
#

i would be interested in clustered volume + pbr πŸ™‚

long robin
shell inlet
#

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

long robin
#

No need to put sweatshop in quotes

shell inlet
#

I'm quoting devsh

final cove
#

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

long robin
final cove
#

nice I am definitely gonna have to take a look at this

long robin
#

It's fr giving me a much better understanding

golden schooner
#

it is fr indeed, friday

#

πŸ˜„

long robin
#

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)

golden schooner
#

i feels like vsauce or veritasium made a video about it already

long robin
#

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

golden schooner
#

: )

long robin
#

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.
shell inlet
#

opengl πŸ€“

long robin
#

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

heavy cipher
#

that debug drawn image be flippin out

#

good stuff though

long robin
shell inlet
#

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

long robin
#

I think part of the problem is the tone mapping hiding it

shell inlet
#

why'd you put tonemapper there

#

while still implementing it

long robin
#

another thing limiting the penumbra width is the fallback for when a ray reaches its max iteration count

heavy cipher
#

is this panning or smth

long robin
#

probs

#

it has all the usual artifacts and more

heavy cipher
shell inlet
#

can you do more than 10 steps per ray for science

heavy cipher
#

wait

#

why does the penumbra increase in size?

#

wouldn't eat into the umbra?

shell inlet
#

no penumbra be getting bigger irl

#

ok wait

heavy cipher
#

yes, i think you are right

long robin
#

if the source is thicc enough then there is no umbruh past a certain distance

long robin
heavy cipher
#

why not

shell inlet
heavy cipher
#

just change the number in the source code bro πŸ™‚

shell inlet
#

penumbra bigger

heavy cipher
#

yeah, i thought about it a bit more and realized

shell inlet
#

I did 2d simulation in paint

long robin
shell inlet
#

ok nice, that's epic, poggers, blessed

long robin
#

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

shell inlet
#

depth peeping

long robin
#

the rays be slippin through the cracks

shell inlet
#

peeling

#

what if you store min and max depth or something

long robin
#

depth peeling is actually one of the first things I thought of to add more info

#

but idk, seems expensive

shell inlet
#

can you raster once and store min and max depth

long robin
#

plus it's not infallible

long robin
shell inlet
#

but like

#

you can imagestore to make voxelization

long robin
#

I had that thought too

#

voxelize like for VXGI

#

would be quite expensive though

shell inlet
#

but here just somehow do software depth compare

long robin
#

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

shell inlet
#

that's ugly

long robin
#

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

shell inlet
#

same, gn

shell inlet
#

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

long robin
long robin
#

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.

shell inlet
#

that does not actually explain what the heuristic is

long robin
#

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

long robin
#

my cousin is visiting so my time is getting the succ

shell inlet
#

πŸ‘ πŸ‘Œ

long robin
#

I kinda wanna work on my galaga clone game soon

shell inlet
#

2d?

long robin
#

yeah

#

there is a thread or project post somewhere

#

naturally, the most recent convo was something completely unrelated

shell inlet
#

galunga ld results?

#

gulaga?

shell inlet
#

"galunga github" 1st result

long robin
#

kek

#

I guess because a) it got traffic from the jam; and b) some commits reference galunga

shell inlet
#

just b I think

#

it would have to be getting google traffic for a

long robin
#

but then why doesn't the actual galunga repo appear when you google it

shell inlet
#

I wonder

#

CEO?

#

more links to the repo?

#

so google sees it as more important

long robin
#

no clue tbh

shell inlet
#

I mean if you linked it from ld website then that would probably count as a cite

#

for webcrawlers

#

unless nofollow

long robin
#

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 bleakekw

long robin
#

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

heavy cipher
#

ungabunga: avoided

#

its a mobile thang

final cove
#

it is? it looks like it originates from the dynamic rendering EXT

long robin
#

I see that it is both a qualcomm thang and a dynamic rendering thang

heavy cipher
#

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

long robin
#

is that for subpasses

heavy cipher
#

wdym

long robin
#

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

heavy cipher
#

its not UB

long robin
#

ok then that's just a glism

heavy cipher
#

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

long robin
#

I don't get the purpose of that one

#

it seems like load_op_dont_care would be sufficient

heavy cipher
#

i don't follow

#

sufficient for what?

long robin
#

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

heavy cipher
#

yes

#

but thats not the same thing as for the store op

long robin
#

ah, can you still do per-fragment ops?

#

the "contents within the render area are not needed after rendering" bit makes me think that

heavy cipher
#

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

long robin
#

yeah that makes sense

#

I wonder if that has any practical implications, since you still need to write to memory for per-fragment ops

heavy cipher
#

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

long robin
#

it all makes sense now

#

I'm terminally desktop-brained

heavy cipher
#

on pc you can still get a small benefit by less cache traffic I think

long robin
#

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

heavy cipher
#

you can use dyn rendering now

#

and by that i mean vuk

shell inlet
#

does anything except mobile even need render passes

oak garden
#

VK_VUK_dynamic_rendering

heavy cipher
#

(vuk doesn't use dyn rendering atm)

long robin
#

does it even matter tho

heavy cipher
#

no

#

thats the point

long robin
#

the real question is when r u gonna use descriptor buffers

heavy cipher
#

looking at my backlog, soon

#

one or two kalpas max

long robin
#

I'll be counting

golden schooner
long robin
#

In what context?

golden schooner
#

drawbuffers

long robin
#

Hmm perhaps

golden schooner
#

since you kind of have to set that exschleppingly too for some reason

long robin
#

I don't like thinking about gl framebuffers tbh

#

They are yucky

golden schooner
#

then i didnt say anything

#

and i was not here

long robin
#

I think you right tho

#

I gotta look at the spec

golden schooner
#

are you contemplating on a vulkan variant of fwog? πŸ™‚ whilefighting ombies

long robin
#

Lmao discord's game detection gets stuck

#

My computer isn't even on

#

Anyways, a Vulkan abstraction will perhaps come at some point

golden schooner
#

a vuk2 will be based on fwog2whichisbasedonvk or a fwog2 on vuk?

#

excuse me, i meant vwog

heavy cipher
long robin
#

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 bleakekw

long robin
#

turns out the sampler that I called "nearest" was actually linear so it was sampling garbage bleakekw

golden schooner
#

intermeresting effect still

long robin
#

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

daring surge
#

algorithm is left as an exercise to the reader

long robin
#

there is a particular aesthetic about this image

shell inlet
#

generative art

oak garden
#

Looks different every time you run it

final cove
long robin
#

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

heavy cipher
#

remove some docs and rely on underflow

heavy cipher
#

not great myself at documenting either

long robin
#

in this case I was actually referring to the wrap function, but I was indeed browsing your docs to copy them as well KEKW

heavy cipher
#

i think the doc setup is neat

#

so copy that

#

i don't think copying vuk documentation verbatim will help fwog users (misinfo)

long robin
#

idk how to copy the doc setup

#

the problem is that I only used doxygen a few times in college for some trivial schtuff

heavy cipher
#

fortunately for your frogly self, i remembered where i copied mine from

#
C++ Team Blog

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

long robin
heavy cipher
#

lmao

#

what you need is the refpage approach

long robin
#

actually I was just about to ask about the different approaches

heavy cipher
#

multiple incomplete contradictory sources

long robin
#

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

heavy cipher
#

its not so shrimpl after all

long robin
#

FSR 2 does have code annotations for autogenerating docs

heavy cipher
#

FSR has a smaller api surface compared to fwog

long robin
#

well fwog is supposed to be intuitive, so maybe it doesn't need any docs smart

heavy cipher
#

dogjiff

heavy cipher
#

i always pass memes less than 8 months old by reference

long robin
#

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

golden schooner
#

@long robin you are supposed to rattle some cages at AMD

#

to have spelling errors fixed in $EXTENSION.txt

long robin
#

Lol the old ATI one?

golden schooner
#

yep πŸ˜„

#

maybe you can get an autogram from the old man, when you meet him

long robin
#

@golden schooner

#

you already reminded me though smart

long robin
#

though I don't think he'd like to be pestered about a little typo in this ancient ext πŸ˜„

digital lion
#

wait who

#

which extension

#

questions...

long robin
#

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

digital lion
#

ok

golden schooner
#

its not about pestering him

digital lion
#

what about Graham Sellers, do you know him? I've seen him on a lot of less ancient extensions

golden schooner
#

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 πŸ™‚

fiery sorrel
#

fwog

fiery sorrel
#

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

fiery sorrel
#

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

long robin
#

I haven't sufficiently bikeshedded a design to put into the API, so for now I just expect people to load shaders themselves

shell inlet
#

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

oak garden
#

its possible but i dont really like it

long robin
shell inlet
#

load from file - get the shader handle - feed into shader program

long robin
#

stb_include is nice

shell inlet
#

ok that should be a part of the custom preprocessor or custom lang that transpiles to glsl or compiles to spirv or whatever

long robin
#

sadly only the chonky shader compilers seem to have full support for includes

shell inlet
#

what's the problem?

#

write batch scripts or cmake

long robin
#

I don't want to ship shaderc with fwog, for example

shell inlet
#

but why do you need to?

long robin
#

I'd rather ship something lightweight, like stb_include

shell inlet
#

glsl in opengl doesn't compile to any IR anyways so you're stuck with either supply full source or path to full source

long robin
shell inlet
#

ok then what do you want, a function "check last modified metadata and recompile" + "custom #include sub"?

long robin
#

Just something simple that can load a shader with includes

#

As in: give file path, get a string with the processed shader back

shell inlet
#

btw what's wrong with include extension?

#

that's already in place

long robin
#

OpenGL doesn't support it, so you need middleware

shell inlet
#

but you have it working though

long robin
#

Nvidia actually supports Google_include_directive, oddly

shell inlet
#

does amd refuse to build the shaders with it?

long robin
#

But for now it's okay

shell inlet
#

or were you always having stb_include do the job?

long robin
#

I used shaderc in another project solely for preprocessing shaders

#

But it's so overkill

shell inlet
#

no wait

#

some fwog samples have includes in them

#

how was it done?

golden schooner
#

: )

#

good to see some activity in here again

shell inlet
#

I remember thinking it was google extension not working instead of no explicit casts

long robin
#

Base Fwog (without the samples) has no file loading thingy

shell inlet
#

btw what's the length limit for shaders?

long robin
#

Uh, infinite?

shell inlet
#

I think there was one at some point

#

like maybe on ancient gpus

long robin
#

Yeah

golden schooner
#

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

long robin
#

There was a max number of instructions

#

Ye I've no plans for dependency tracking and automatic recompilation

golden schooner
#

probably shrimpler to just actively (re)compile the program recreate the pipeline in question

long robin
#

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

golden schooner
#

we did?

long robin
#

Yeah like twice at least πŸ˜„

golden schooner
#

using paths likek that feels like a wonky idea, but i need to fink about it

shell inlet
#

exclusively constructor?

#

what if you want to recompile it

#

resupply the path?

#

delete old instance and replace with new?

long robin
#

The only concept of recompiling in Fwog is making a new shader and pipeline and deleting the old ones

shell inlet
#

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

fiery sorrel
long robin
#

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

fiery sorrel
#

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?

long robin
#

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

final cove
#

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

golden schooner
#

im also not a fan of providing include paths and whatnot

long robin
#

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

heavy cipher
#

who tf is Jake

long robin
#

some guy

heavy cipher
#

sussy

long robin
#

baka 😳

#

this isn't even all of the docs folders I've made so far

#

this isn't even my final doc

long robin
#

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?

heavy cipher
#

yeah, windbg

long robin
#

rip linux people tho

golden schooner
long robin
#

because the tutorial is only for Windows enjoyers

golden schooner
#

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 πŸ™‚

long robin
#

ye, but you'll have to call some posix functions or whatnot to do it

#

clearly, it is insurmountable

golden schooner
#

dlopen dlsym is the same as LoadLibraryX, GetProcAddress

long robin
#

I only interacted with these functions once in my operating systems class years ago potoo

golden schooner
#

: >

long robin
#

Back in the stone age for me

golden schooner
#

like a year and a half ago?

long robin
#

nah, like three and a half years ago now

golden schooner
#

time flies

long robin
#

since that was in my second year of college

shell inlet
#

this guy outSEOs your lib

long robin
#

I'm gonna strangle that fwog

heavy cipher
#

stwangle that fwog :3

viral haven
#

Does Fwog have any side projects? Just realized this thread is called 'Fwog and co'

long robin
#

It's called that because sometimes we discuss vuk in here

#

And other completely unrelated stuff

viral haven
#

I see. I thought you were working on a new Vk / Dx wrapper similar to Fwog (but using a better graphics API that is)

long robin
long robin
#

ngl I'm gaining a lot of incidental knowledge about vulkan by copying it with fwog

#

crazy how it be like that

long robin
#

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 bleakekw

#

what a pro

heavy cipher
long robin
#

now I just need to take what I learned in this tutorial and apply it to the actual project. 🦐le

long robin
#

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

oak garden
#

That sounds pretty useful ye

#

Idk how you’re gonna do the type deduction though

long robin
#

I imagine it would be integrated like shader printf, by having a hidden resource bound to your pipeline (in this case a render target)

long robin
oak garden
#

So just inspect shader code and bind the corresponding image based on that

long robin
#

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

oak garden
#

Seems reasonable tho

#

For simple ish cases at least

long robin
#

yeah

#

for example, trying to debug integer IDs can be painful

#

especially if they span a large range of values

oak garden
#

Yeah this is definitely nice to have for debug overlays and stuff

long robin
#

some automated histogram analysis could go a long way

heavy cipher
#

renderdoc has this feature

long robin
#

which one?

#

I only know of the histogram stuff

heavy cipher
#

that, ye

long robin
#

I want automatic render target deduction too

#

and automatic coloring for scalars

heavy cipher
#

open a new jar of elbow grease then

golden schooner
#

dont let that vulkan person talk you out of this glism

long robin
#

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

golden schooner
#

if the shader was generated

long robin
#

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

golden schooner
#

all you need to do is generate a shrimple string

#

isnt gobi working on something like that

#

that "shady" thing πŸ˜„

long robin
#

slim jimmy

#

that's just a shading lang

#

or a shading lang generator, I'm not really sure

golden schooner
#

me neither : >

#

slim jimmy made me laugh out loud

#

if only cminusminus had proper reflection

heavy cipher
#

just mangle it

golden schooner
#

it does

long robin
#

hmm, true

#

but how would I get the type of a var

golden schooner
#

you lookout for some bogus symbol, sensibly placed

long robin
#

I guess I could just always use RGBA32_float for now

golden schooner
#

hmm and artificially append soem layout (...) out vec4 magicattachment

long robin
#

Hehe I can see it now
debugVisualizeFWG(foo);

#

too bad a linter will complain

golden schooner
#

one would need to adjust the linter's grammar file then

long robin
#

If the linter just uses glslang then idk

#

Which it does btw

golden schooner
#

we can send them a PR

long robin
#

Hah

golden schooner
#

dont look for excuses

long robin
#

I don't need an excuse to not do it

golden schooner
#

double negations always irritate me

#

dont not do

long robin
#

But it's not a double negation

golden schooner
#

not negation

#

see you do it again

#

hehe

long robin
#

I never negate

golden schooner
#

serious talk

#

what would you actually write then

long robin
#

I can actually try to put this in fwog

long robin
golden schooner
#

would debugThingyEXT(somevariableinglsl) be the thing you want?

long robin
#

I haven't bikeshedded it enough

#

I need to figure out what it would look like from the API side

golden schooner
#

lets cook up some exshrimple

oak garden
#

You can easily add a #define that removes it when not running fwog

golden schooner
#

mayhaps that helps to come up with some apiism

long robin
#

but yeah you could put a define

golden schooner
#
#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?

long robin
#

yes but without the user having to define o_majeek themselves

golden schooner
#

yeah

long robin
#

it would just go into an unused location

golden schooner
#

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++?

long robin
#

probably not

golden schooner
#

mayhaps with that you could deschribe what debugVisualizeThingy is supposed to do

#

or is there something like expressions

long robin
#

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

golden schooner
#

hmm

#

and that format determines how the intrinsic writes values to it

long robin
#

the intrinsic writes to an intermediate texture that can be processed into something that can be displayed as color

golden schooner
#

how likely is it that you will ever use all 8 attachments

long robin
#

unlikely

#

so I'd just use max-1

golden schooner
#

yeah

#

attachments.DebugAttachment

#

hmm i didnt notice you changed TextureView to TextureProxy or i might have forgotten

long robin
#

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

golden schooner
#

so you just provide overloaded functions in an include file

long robin
#

It wouldn't be in an include file

#

But they could be

golden schooner
#

i mean they could be majeekally added to the string, without the include

long robin
#

Hmm the include would solve some things

golden schooner
#

ye, it would eliminate that hassle of where to add the shizzle

long robin
#

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

golden schooner
#

#extension GL_FWOG_debug_visualizer : require

long robin
#

And fwog still doesn't natively support include

long robin
golden schooner
#

mayhaps not require, but enable, to keep the compiler quiet

long robin
#

ye

golden schooner
#

its an eggcellent idea

long robin
#

Gotta finish docs first

golden schooner
#

ah the excuses

long robin
#

And the article martty and I were making

golden schooner
#

now im curious πŸ™‚

long robin
#

Smhmh

golden schooner
#

while (!queue.empty()) { queue.dequeue(); }

long robin
#

once it's publishedℒ️ you'll see

golden schooner
#

looking for double negations

wind trout
#

Does Fwog and Co mean eventually more than just OpenGL?

long robin
#

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

wind trout
#

Oh lol, I was wondering if FwogVk or something

#

Also sure

long robin
#

anyways

#
  1. it would be helpful to show how to construct a sampler from a uvec2 in a shader
#

it would just be 1 or 2 sentences showing how to do it, since sometimes it's nicer to manipulate uvec2s than sampler2Ds

#

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

wind trout
#

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

wind trout
#

Kind of scary though

long robin
#

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)

wind trout
#

Awesome thanks. I’ll add those in and put in a new link back to you!

Edit: Added both with links

long robin
#

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 πŸ˜„

fiery sorrel
#

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

long robin
#

do whatever you want

#

I want my fwog to be abused

#

and I mean it's basically just a GL wrapper

fiery sorrel
#

I always wanted to use Vulkan in 'story mode'

long robin
fiery sorrel
#

(easier Vulkan)

long robin
#

ah

#

it do be vulkan-inspired

golden schooner
#

its not JUST a gl wrapper

#

its more or less what opengl should have been since 3.0

long robin
#

it's a gl way of life

golden schooner
#

its what nividia should have used for their opengl-to-vulkan guide πŸ™‚

long robin
#

gl 2.0

#

not to be confused with OpenGL 2.0

shell inlet
#

@long robin I mean like static probe based gi with cubemaps

#

DDGI needs rt

long robin
#

wdym static

#

like baked?

shell inlet
#

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

long robin
#

ah

#

well I'd need a probe structure for DDGI anyways smart

shell inlet
#

unfortunately I'm yet in educational limbo and only having wet dreams of contributing my weird ideas to fwog

long robin
#

I finally have all this autodoc stuff hooked up to fwog, but now I need to debug this frogstare

#

problem for tomorrow me

shell inlet
#

is doxygen the only doc generator out there

#

it's everywhere

#

so either that or it's really good

long robin
#

doxygen is just good at autogenerating references from public headers

final cove
#

I've never seen anything else used for C++, it's really good at dealing with C and C++ specifically

shell inlet
#

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

long robin
#

Not hard

#

I think you have to create a 2D texture view of each face in order to render to it

shell inlet
#

I want to try to tackle the probe based static GI

#

half life 2 style but with interpolation

long robin
#

One thing I don't get

#

Is how interpolating radiance probes is supposed to work

shell inlet
#

just lerp bro

#

pick neighbouring probes, sample and mix

long robin
#

Well, the lerp is easy, but I imagine the results will be wrong

#

But idk

shell inlet
#

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

long robin
#

Yeah but I've no idea how the tetrahedra thing works

#

I've seen rickomax use it

shell inlet
#

you did the depth map ssr tho no?

#

cubemap depth map ssr

long robin
#

yeah that's what it was

#

depth cube tracing

shell inlet
#

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

long robin
#

That sounds hard

shell inlet
#

kinda borderline software rt

#

but basically can use low poly geometry proxies with bvhs

#

at that point why not just rt

long robin
#

lol I put /// @namespace Fwog and now I get several screens of this

oak garden
#

Time to start documenting :p

long robin
#

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!

oak garden
#

Fun times

long robin
#

110 updates for MiKTeX available bleakekw

rugged notch
#

Abandon the entire project while you still can

#

Dont want to? That's sunken cost fallacy my friend

long robin
#

finally, docs

rugged notch
#

Sseth here

long robin
#

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

hybrid pivot
#

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);
long robin
#

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

long robin
#

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

long robin
#

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

heavy cipher
#

helpful

#

or as kids these days would say: F

long robin
#

πŸ‡«

long robin
#

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

long robin
#

now I can finally schleep

#

mfw there's a misspelling in that page

#

oh well I fix it later

heavy cipher
#

well done

final cove
#

smart == has branching conditions

#

basically AI

long robin
#

how do I tell VS to not autocomplete

  /// <summary>
  /// 
  /// </summary>

when I type ///

#

I found it

valid oriole
#

Apps & Programs -> Find VS -> Right Click -> Uninstall

#

shit you were faster

#

I had the stackoverflow q in my clipboard already

long robin
#

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

long robin
#

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

golden schooner
#

make it a class πŸ™‚

#

and make the 2 private

long robin
#

I could make vertexShader a reference

#

only "downside" is that it forces you to bind the reference immediately

golden schooner
#

that works?

long robin
#

yes

golden schooner
#

c-isms

long robin
#

you can put references and const members

#

but they have to be bound/set when the object is constructed

#

which means no delaying it

oak garden
#

too bad optional<T&> is not allowed

long robin
#

std::optional<std::reference_wrapper<T>> bleakekw

golden schooner
#

hmm

#

my poipioloine object has shader sources

long robin
#

tbh I think my best bet is just going with Shader& in the struct

golden schooner
#
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

long robin
#

so I'd have a constructor for my thing that exists because another thing has too many parameters to put into a constructor this_is_fine

#

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

golden schooner
#

that sounds shify

golden schooner
long robin
#

I'm referring to some other thing that entered my train of thought

golden schooner
#

ah

long robin
#

w.r.t. to the UB stuff

golden schooner
#

i was finking about the

struct ism
{
    someRef& reff;
};
``` thing, eh, i clearly know too little about c/c++ and its isms
long robin
#

yeah that construct is legal

#

I think I will use it

golden schooner
#

thats not what i meant πŸ™‚

#

my question is if you can forbid people to ism i;

long robin
#

wha

golden schooner
#

and force its creation only via some ism CreatePipopleoine(ismDescriptor);

long robin
#

you have to bind a reference at construction time

golden schooner
#

ah otherwise the compiler will yell at you?

long robin
#

so if you have a reference member, it needs to be a constructor parameter or provided in the initializer list

golden schooner
#

ok

long robin
golden schooner
#

excuse this waste of time πŸ™‚

long robin
#

no way

#

maybe one of us learned something

long robin
#

wtf bleakekw

    this->~Fence();
    return elapsed;
golden schooner
#

looks cursed

long robin
#

3000 undefined behaviors of allah

    this->~Fence();
    sync_ = std::exchange(old.sync_, nullptr);
    return *this;
golden schooner
#

looks even cursor

long robin
#

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

long robin
#

efficient SSGI and AO

golden schooner
#

@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

digital lion
#

uh why u asking me lol

#

i guess that would work

#

seems like it would be more efficient

golden schooner
#

i believe you posted that back when, but its so far up that i cba to find it again xD

oak garden
golden schooner
#

ah, indeed, the labeling is a little deceiving

digital lion
golden schooner
#

ah thats what it was, i just flew past it and didnt pay attention to the stuff around it

digital lion
#

from jakers blog hehe

oak garden
#

as so you write to it manually anyway

#

i see

#

yeah ig you could pack it then

golden schooner
long robin
#

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

oak garden
#

lol

wind trout
#

Maybe dumb question but how do you jump to the first post?

long robin
#

I don't think there is a straightforward way

wind trout
#

dang

#

time to scroll

long robin
#

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

wind trout
#

ahh ok glad I decided to give up early, yeah that's the smart way

#

need to check out the new Fwog docs

long robin
#

they aren't up yet

wind trout
#

oh cool ok, bookmarked

long robin
#

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

long robin
#

I wonder if there's a way to make doxygen/sphinx/readthedocs spit out links to the source code in the generated docs

long robin
#

I think I'll just make a doc page for configuring Fwog rather than relying on doxygen comments

wind trout
#

Doxygen wouldn’t do a good enough job with the comments in this case?

long robin
#

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 πŸ˜‚

wind trout
#

That makes sense, doxygen seems like such a nice little tool

long robin
#

Indeed

#

I wonder what deccer thinks about documentation

golden schooner
golden schooner
#

if it only consists of

// clear's framebuffer
void Foo::ClearFramebuffer(Framebuffer ...)
{
}

then its also no use

long robin
#

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"

golden schooner
#

sounds reasonable

long robin
#

It's still kinda hard to know what to document sometimes

#

I'm erring on the side of "too much" as a result

golden schooner
#

the reference docs perhaps, should be good to understand what what function does

long robin
golden schooner
#

and then yuo just cook up some general use, and perhaps some mansplaining about the architecture or reasoning

golden schooner
long robin
#

I get what you meant ofc

long robin
#

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

golden schooner
#

if you use doxygen for the api reference that should also work

#

how to use and mansplaining could just sit in wiki/some.md

long robin
#

Ye

#

Current setup is a bit weird in terms of API reference

golden schooner
#

unweird it πŸ™‚

long robin
#

It's more like me not understanding my tools

golden schooner
#

ah

#

hehe

long robin
#

I need to unweird me

golden schooner
#

i gtg for now but if you need help with something still we could talk later

long robin
#

I just need to read some more docxs

#

Ye I schleep

golden schooner
#

: )

#

gn8 spaniard

stray warren
#

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 frogeheart

fiery sorrel
#

shrimple*

stray warren
#

Ah yes 🦐 my bad froge

golden schooner
#

its what its

fiery sorrel
#

i wasnt 100% sure if the joke would land

#

earlier I was like 'u forgot an r'

stray warren
#

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

fiery sorrel
#

its efishicent

#

fish quite frankly

long robin
#

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

long robin
#

wtf sphinx makes list text bold if it has a submember

#

oh okay, the solution is to simply add blank lines bleakekw

#

very intuitive

long robin
#

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 bleakekw

oak garden
#

kekw of course

long robin
#

I appreciate the verbosity of C++ a little bit more every day

fiery sorrel
#

too tired to do anything too brain heavy but also kinda bored. I think I'll poke around the Fwogland

#

lets go

fiery sorrel
#

alright lets go

#

now we just gotta debug those callbacks

shell inlet
#

very trianglish

fiery sorrel
#

only because the colors are triangle

#

so lets make them not triangleish

shell inlet
#

that's just because srgb weird and nonlinear perceptually

fiery sorrel
#

we have become a green

#

I need to figure out how to debug those

oak garden
#

ah, my classic test scene

#

green quad

fiery sorrel
#

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

oak garden
#

generic error

#

very useful

fiery sorrel
#

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

oak garden
#

pray to allah it never comes back

fiery sorrel
#

anyways folks we did it. A program made with Fwog

#

It really makes you feel like Vulkan

shell inlet
fiery sorrel
#

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

shell inlet
#

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

oak garden
#

the fact that its a command doesnt necessarily imply that theyre buffered

fiery sorrel
#

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

golden schooner
#

there are no commandbuffer-esque-isms in fwog yet

long robin
#

Congrats on the rectangle

#

Not sure what the deal with those warnings is

golden schooner
#

hmm who is calling Context::InvalidatePipelineState()

#

so far nobody

long robin
#

Yep

golden schooner
#

im also slightly conchfused about srgb

#

common/Application.cpp enables it always

oak garden
#

tbh it probably should be

golden schooner
#

and then you check whether you disable it or not by negating whether it should be enabled or not