#GPU Zen 3: Virtual Shadow Maps
1 messages · Page 3 of 1
Guess who's back
I did nufin, irl stuff came up ☹️
all good. I'll get back to it soon™️
I'll see if I can move it into google's slide thing
no idea if that will work lol
Don't worry about it that much, I have PowerPoint from uni
Should be fine
Deadline is Sunday right?
uh
April 14th, 2024
Second Peer review period and all articles are final
April 28th, 2024
We start uploading software to GitHub
May 17th, 2024
Release on Amazon.com
For some reason I thought the draft was due Saturday
I asked over email and the editor said it can be in a rough state at that point (the 14th) 🤷
28th is very soon 
Wait
Or am I misreading and 14th is final
Tbf we were given a 3 weeks notice
Hard to navigate around
It says final but not really (for us)
Okay some breathing room
At least
But we should still try to get all the content in
Good luck folks, i'm sure it's going to turn out nicely
Read the article aloud to yourself, it will help examine the flow
Duck moment
We should call it rubber frogging to motivate GPers to do it more
Read the article out loud in VC to increase the pressure
the VSM share thingy is the most up to date article right?
the official™️ thing doesn't compile for me (timeout
)
isn't the clip equation wrong
currently it's max(ceil(log2(T_w/T_0)), 0) shouldn't it be ceil(log2(max(T_w/T_0), 0))
sorry, you're right I don't know my own heuristic 
it's ceil(log2(max(d / c_0, 1.0)))
but yeah the max there is pretty useless
can very well be shrimplified to clamp(ceil(log2(d / c_0)), 0, C)
True true
Does the stuff I wrote about their respective benefits/disadvantages make sense?
Very good
just keep familarizing yourself with the article
and read one or two of the other articles to get a feel for the style and organization

For a technicial writing tool, overleaf sure sucks at autocorrecting technical language
ye
also I hate writing introductions
so much
I wonder if the editors would be bewildered by a little cheekiness and alliteration
gonna have a shakespearean intro and the rest will read like the vulkan spec
the discussion in #1147711082702589973 made me realize that we should at least briefly mention why we decided against using tiled/sparse textures
Would tiled/sparse textures replace the virtual memory, or just allow parts of the "physical" memory store to not be resident or something?
API sparse textures just do the virtual stuff for you
ah gotcha
but it requires API calls on the CPU which is yucky
I assume you don't use that just because you cede a lot of control over the algorithm?
ah
yeah pretty much
so we'd have to do readback (latency) and making lots of small pages resident is incredibly slow
I structured the intro and previous work in a way that hopefully makes sense now
intro: explains problems encountered in shadow mapping
related work: explains CSM, SDSM, and screen-space shadows, then explains how Epic added VSM to UE5 and our motivation for creating our own version of it
the UE5 stuff had to be mentioned somewhere and it felt like this flowed better than putting it with the other stuff in the intro
@mystic lark you prefer "physical page", right? I think it's better than "memory page"
Yeah I like the naming physical and virtual but we need to introduce the naming and change everything to use it
shouldn't be too difficult
"memory page" would need to be defined anyway
hmm your allocation scheme is much more complex than mine tbh
which is ok as long as it's adequately described
I also see the term "shadow map page" used sometimes
is that a virtual page?
Yeah shadowmap page == virtual, memory page == physical
alright those should be updated
btw I made a bunch of edits and comments
some of the comments are action items
we need some code listings then some pictures
unfortunately pictures are kinda screwed up right now because we cannot do a full compile to see them
but code and tables are perfectly visible in fast compiles
when you're done reviewing my tiny edits please accept them to remove the spam
(I kept the spam because I want you to see what I changed)
alright I'm going to bed now
@wooden jolt you best be looking too. not much more needs to be written, it's just a few smallish sections at the end
I am lurking worry not
there's still a couple giant blocks of text that have no home
but I'm sure we'll find them a home or relocate them to dead
What's the status of the share doc, it looks the same as when I saw it last
mostly anyways
I'll copy it over before I go to bed again
Make sure you've incorporated the comments since they might get overwritten when you do that
I saw lvstri added a bunch
Good point
if ya'll want another pair of eyes, i'd love to take a look (mind you I'm a person very inexperienced with shadows) 👀
o
@wooden jolt you should be looking at the main article
added a bunch of comments, not text to be clear
ye the thing we sent you was in a sorry state 
Still gave us very useful feedback
I was wondering where lustri's comments were lol
(vvv is this ok to post here??)
this is the first attempt to move saky's mapping drawing to some kind of image or diagram thing
I haven't been able to move everything over since I'm not entirely sure what the state of the version we're using is
e.g. exact page entry bits, are we using the same visited/marked strategy and buffers, etc.
oh crap I just realized if you have dark mode enabled you'll have to open it in browser to get around dark on dark text
Oh this looks very good!
Virtual page has allocated, visited and dirty
Physical page has allocated and visited
And they both have the respective coordinates to the virtual/physical page
Ie physical page has coordinates of the owning virtual page
And virtual page has coordinates of the backing physical page
Yep, the reason for that is the allocator
And it's just handy in general, sometimes you like to iterate over the physical pages and sometimes over the virtual ones
what's the format of each page table
do they both use R32 UINT, then R32F for actual depth memory
Both are u32 images
Yes, exactly
Maybe I use R32UNORM for the depth, I'm not actually sure
i'm guessing that while you have NumCascades virtual page tables
you probably only have 1 physical page table right, assuming a single memory pool?
Yes, that's why it's so handy for the allocator
Instead of iterating over all the x cascade Virtual pages, potentially for multiple light sources, you just run over the memory pool
ok that makes sense
let me modify the diagram. I'll use VPT (virtual page table) and PPT (physical page table) to shorten
Okay, we can make those abbreviations in the article also
I haven't needed a bidirectional allocator tbh
But my allocation scheme is dead shrimple
It's mainly needed for the deallocation
So when I find a physical page that is allocated but not visited this frame I need to modify the previously owning virtual page to no longer hold the allocation
And the only way to sensibly do that is by storing a pointer back to the owning virtual page in the physical page
Pershrimps
I use a bitmask to represent which physical pages are free, and scan it in the allocator to find a free bit. Deallocation is just looking at the page table to find pages that are backed but not visible (after marking visible pages), then clearing their bit from the bitmask
Ye but you clear all not visible pages each frame no?
I clear the visible bit only
If they are marked visible once more, they remain backed and don't have their physical contents cleared
mine is similar to jaker's except with atomic queue
There's no point in explaining mine though because the article describes tido
Aha I see, yeah but then you have to scan over all the virtual pages to find something to deallocate
I have one pass that deallocates them in bulk and it takes basically 0 time to execute
My allocator is also completely moronic but takes 0 time lol
I actualy hadn't ever considered a bidirectional allocator
this is the first time I'm thinking it over lol
It's kinda funny how much time we spent bikeshedding allocators
Thinking it would be slow
yeah, we each ended up with our own
actually I still need to ctrl+a, backspace my sparse allocator
no need for 2 allocators anymore
Uhh yeah, I think I was prematurely optimizing, but this actually allows me to do some cool stuff later
But I think saky's allocator permits off-screen page caching which could be sweet
Yes it does that
you can do offscreen with linear allocator too
though I ended up disabling offscreen after we collectively decided it wasn't that helpful
It's cool as a fallback
Especially if I make only the higher clips be able to stay off screen cached for example
well at least to an extent
up to 15 frames unless you use more PT bits lol
Which is trivial with the allocator I have rn
let me upload the new diagram with bidirectional
only thing still missing is what looks to be some sort of
queues in the first diagram
Lol in dark mode the arrows on the right look like a portal from Portal
Don't worry about the queues for now
I've still yet to decide whether it makes sense to add them to the article
But the diagram looks very good now I like it a lot
What are these queues you speak of
One is the allocation request buffer, then I have free pages and not visited pages buffers
ah ok
Allocation request is just a buffer of coordinates to pages that need allocation this frame
The article calls them buffers, not queues
Free and not visited is what allocator puts out
Oh ups, sorry
I copied the naming from the convo here
Np I was just confused
(at least I think that's what J Stephano was referring to)
yeah I think that's what I was looking at in the original
i wasn't sure how to incorporate them into the new one
They are not really necessary for this diagram I think
I feel like it has enough as is haha
I think the top right table can give the wrong impression of how the cascades are stored
Because the lower levels are overlaid onto the higher levels in it
I think we can have a single cascade in the diagram
if they had a 3D tilt effect and were slightly spaced so you get a hint of the pages being covered, it would convey what happens more accurately
And then note in the description that you have one vpt per cascade and multiple vpts can point into the same ppt
I think I see what you mean
would it be like
almost like the old pyramid diagrams we were seeing when struggling with clipmaps
but more compact and slightly turned on the side?
Saky
Are there any places you want to add code listings
Which might make the description clearer perhap
I am really lost with the code snippets
I think we should do one for sampling perhaps
Sure
Show how you reproject, fetch clip level, Virtual page into physical page info
Idk if we want to do something more
Maybe the culling?
You mean building it?
Well I'm asking you lol
What part of culling
Something like this function maybe?
https://github.com/JuanDiegoMontoya/Frogfood/blob/2f821bfc6634ab94eb6444b296006844c06f0343/data/shaders/shadows/vsm/VsmCommon.h.glsl#L130
yeah something like that
but I'm not sure, seems kinda random
maybe just pseudo calls of fuctions to describe the process
It can also be used to visually break up the text hehe
Also
People seem to be super interested in the vsm drawing shader
We should at least provide that
that is a good one yes
simple enough so that it's not wall of code
but important and shows a bunch how we use VSMs
the whole lookup process
I like it
The vsm sampling one is good too
Then we need to sprinkle diagrams throughout
And move those big chunks of orphan text
And fill out the last couple sections
Then we'll be ready for review 😎
Easy crunch tomorrow
we are also missing text for stable adressing, drawing and culling
Fuggit Imma crunch today
hpb building
Yeah
Okay I'm going to bed so I can rise early tomorrow
Eh I can crank those parts out
Gn sweet prince
You did good
We all are! It's gonna be one fine article
wait I just realized
you are behind right, not ahead (time wise)
so it is tomorrow
the deadline I mean
yes I'm 9 hours behind you
it's only 4:44pm on Saturday here
I'm not sure what timezone the deadline is supposed to be. I'm guessing it's quite fuzzy in reality
west coast frog
Let me know if you want some style linting done at any point
Finished my taxes so I'm just gonna work on my shit otherwise
It's very irritating that track changes isn't enabled
yeah
When I edit papers I usually touch nearly every single sentence in some way
is there different software we can use
I guess I could get a subscription real quick so you can make edits without receiving psychic damage
I wonder if it would work if you paste a modified version over an old version, will it do a diff and generate the tracked changes?
Or will it just say the whole sentence was replaced
Nah don't get a subscription just for me
ah there's a free trial
Ok your choice
it will just say the whole thing got changed even if the contents are 99% the same
Darn
It's more to protect you from psychic damage than me, I can just edit it or comment out every sentence I edit to keep the old copy, it will just be annoying to go back and see what changed
Reading every sentence twice to catch the changes
fyi @vestal snow @wooden jolt @mystic lark I made a copy of Saky's copy of the article (lol) except I got a trial for the standard version, so it has track changes enabled
everyone got an invite and demongod is already in it
oh ok so does that mean we should write it in the new location, then copy over to GPU Zen when we're done?
I think the opposite probably
If you guys all have access to the real version, the other one is just for those of us who aren't official authors
actually it might be better to write in the new place because the official one doesn't even compile 
lmao
I'll start adding figures to the
o I was about to do that
well from the main article
I'm just copying the folder structure
oh ok cool
if you have more content to add then go ahead
will be nice to compile it and write feedback on them
I did but I realized one diagram I made might actually not make sense at all
so I think I need to redo it first
ok so I'm going to copy all the stuff from the main article into this one, then we continue in there
I renamed the article to reflect that 
I will review some stuff in the main article (there are a bunch of tracked changes and comments) then copy them over
I'm about to overrite everything
I'll preserve your 2 new figures
just gimme a sec (I'm doing this between turns in d&d
)
no problem lol
For the depth analysis section, the paragraph says something like "fragment is reprojected into the cascades uv coordinates" -> does the current impl still do uv wrapping like before
we'll have to wait for saky to wake up to answer that I guess
sounds good. I'll upload the diagrams and we can edit them when he comes back
hmm I want to do more work before I ask for your time
alright
I'm copying comments from the other document too
so our thoughts are in sync
hmm
ah I remember what I wanted to say
I feel like being liberal with pictures right now
This seems like a lot of work for something that is ostensibly due tonight lol sorry
it has a soft due date of tomorrow
it's fine to look now. the obviously crusty stuff are clearly marked by comments
Alright
Btw when you say tomorrow do you mean tomorrow evening
it's unclear
but I'm somewhat confident that nothing will be looked at by the editor until, say, monday morning
the guy editing our section was clear in email that our draft can be quite rough
yup that's perfectly fine
I'll just look at it when I wake up and you can see the results when you wake up lol
just got mega confused by how figures are not necessarily placed in the location in the text where you would expect
fortunately the solution is shrimple
https://tex.stackexchange.com/a/32605
Uh yeah, ! Usually works but the latex gods need to bless you
Sometimes it doesn't care
you suggested a glossary earlier but I'm not sure the ideal way to do it
there is a glossary package but the main project doesn't use it
I guess we can do a good old list
I wouldn't do a glossary
it usually is enough to just introduce the term first in text
alrighty
and then in brackets the abbreviation
seems like there are no comments in the official GPU zen doc
is it just me?
wdym
ah
yes
we are using a new doc
I moved the comments over manually
#1168692074447642664 message
I see, I misread when I woke up and thought we ought to still be using the old one
I got a trial account while you were gone so we could have track changes lol
hahaha okay smart smart
and we can actually compile the thing
can I get a clarification on how the clear pass works
I presume you generate a list of pages to clear, then to an indirect dispatch where one workgroup clears one page
that's what I do anyway
I just read the allocation requests
right as long as you have a list somewhere
yep, it's basically the indirect dispatch struct as for the allocate pages
ok I'll note that
first pass generates the allocation requests buffer - allocation pass tries to give all these a physical page - clear pass looks at the pages in the requests buffer, if they got allocated it clears, otherwise allocation failed so it ignores
I will note at the beginning that our implementation is gpu-driven and does not use sparse/tiled resources
that is an important detail imo
at the beginning of the implementation section?
ye
perfect, yeah good idea
the beginningn't 😄
I shuffled some of the parts that were out of place
I'll have breakfast and do a review pass rewording the senteces
I am not happy at all with the stuff I've written
ye fuel up
I'm rewording what needs to be reworded
what you gave is, at the very least, a great skeleton to work from
oh btw, before I go - hear me out
I know you vote for simplicity in the allocator, but I don't like that the allocator setup phase has two buffers - one with the set of visible pages and one with the set of free pages
whose, yours?
yep
we can cope
what I want to do eventually, is have them all be in the same buffer and sort them in ascending order based on index where: free pages get index - 1, not visible pages get index = clip level of the page
too complex for the article/fine as is for now or do I make that change?
how does it work when multiple visible pages are in the same level
it doesnt really matter
the idea is that you try to free the pages that are living in lower clips as these get cleared super often anyways and are super fast to draw (culling goes brr on these)
the only thing I want to maybe try hacking in before the code is submitted is support for dynamic objects
so you offscreen cache only the higher mips (if there is enough memory to do that)
okay
I quite like that idea but I don't think it's critical enough given our time constraints
I think supporting dynamic objects is the minimum we need for anyone to take it seriously 
oh yeah, we will need to make that stuff up and implement later
hehe
Well I have a pass that is not yet in, that runs as the first one in during the Setup phase
which clears the wrapped pages
wats a wrapped page
uh how do I explain
when you move one tile forward, one row of tiles gets out of the vsm frustum and the front most row of tiles wraps onto it
ah
I remember worrying that it would be difficult to support that case, but then my allocator being so simple that it doesn't care
this
yeah
I have that in
in the impl?
yeah
but not the article
but I was thinking we make the dynamic object tile invalidation part of this?
yes but most of that would be on the CPU I imagine
yeah exactly
I was thinking the CPU would generate a bit for each page saying whether an object moved in it
this pass already takes info from the cpu (this tile offset - prev tile offset = offset we need to clear in this pass)
for each object that moves, project its AABB into each clipmap and set the bit for every page spanned by it
yeah, not really GPU driven, but no time to figure that out
I think it would scale up fine tbh. we only worry about gpu-drivenness for things that would otherwise require readback
hmm true
some impls might already have this info on the GPU so doing it there would be a natural fit, but we do not
we could abuse the rasterizer to do this for us, rasterize at page table resolution so each pixel shader invoc would be one page
and then we'd atomic or the dirty bit
that's indeed what we're basically doing, except we'd need conservative raster
let's keep it simple and do it on the CPU
I guess it's fine to do it on the cpu for now
yeah our demo will have like 1 object moving at most, and the worst case is that it's a huge object covering every page of every clipmap
which is only like 32^2 * 16 (16k) pages to set a bit for
I was more worried about how it scales with many dynamic objects
- some people do animation and shingus on the GPU
but let's not worry about it that much
considering that the worst case is 16k tiny ops for a dynamic object, it's not too bad
UE5 solves this by just considering animated stuff as "always moving"
but there is a flag to override that if the movement is subtle enough
honestly we can handwave it a lil - "clear pass additionally takes in a mask of pages that got invalidated due to moving objects. This mask can be generated by projecting dynamic object bounding boxes into the pages and marking all affected pages as dirty. It can be implemented both on the CPU or the GPU. In our implementation, due to its simplicity, we chose the CPU path."
agreed
gives us a little leeway in the implementation
alright now go eat breakfast 
I'm going to change "paging table" to "page table" also
https://en.wikipedia.org/wiki/Page_table
hmm I didn't notice that there are two kinds of page tables in your impl 
as long as they are disambiguated every time they're mentioned then it's fine
Yeah there is the physical page table and virtual one
wait
We will call them ppt and vpt
is the physical page table just the physical memory?
It's like a header for the memory
I
are you adding a section of what stuff you have not considered/tried or think should be explored/or notat all further at the end of le article.. things you couldnt cram into the article because of time, but might inspire future frogs to pick up on that
yeah we will
Ie one physical page is represented by a pixel in physical page table
Which just holds some meta information
ok
good luck
(the pointer back into VPT and allocated/visited bit)
I suppose it's accurate to call it a page table then
A page table is a data structure used by a virtual memory system in a computer to store mappings between virtual addresses and physical addresses.
Hmmmm
Yeeeeah
It's like when you have a block of memory preceded by status block of that memory
But since my physical memory is an image not a buffer I didn't really have a spot to fit this header into
So I made it a separate image
I initially called it memory meta info
But then I shifted it to fit with the other naming scheme
if it acts like a page table then it's fine lol
just gotta make it clear that there are two distinct page table-like things
I'll add it to the implementation preamble
what are the dimensions of your cascades and pages
mine are 4096^2 and 128^2 texels
same as yours
although they are all defines and everything should work if I just change them
as long as the change is reasonable and not something like 2pixel pages
ye I note that it is flexible
I'm gonna use "virtual page table" and "physical page table" as previously suggested
hmm the physical page table stores redundant info, no?
I guess that's fine to prevent a dependent lookup, but I think we should omit that we store this info again because it might be confusing
it can just be a comment in the source code
might make it a bit harder to word around certain things but I think it will be fine
It is an implementation "detail" so I think that should be enough yeah
I'll just write something then let you evaluate 😄
I hope I'm not touching the text too close to you @sweet nimbus, I'm trying to avoid the parts you are currently working on
I'll hop down for a bit and have to leave in 15 minutes or so, so you'll have time to finish 😄
I also got writeful form my uni (something like grammarly, but aimed more at researchers, so it was trained on papers and such) So I'll do a full sweep once I return
okay I'll let you cook
I'll be back in an hour or two
the visual clatter OL produces though 
I need to take a 3-6 hour "nap" soon or I'll become stupid
my sleep schedule is wack so I'm just starting to become tired
anyways I just want to fix the intro before I sleep
if you manage to find the time for it, skim over (and accept or reject) the changes I did pls
realistically that will happen after i wake up 😄
I saw some of the changes already and they were good
My main fear is that I change one of your sentences/you one of mine, I don't like it so I change it back and we get into a cycle of us changing the sentence over and over
we should probably start a comment discussion if this happens hehe
yeah
hmm
I think we can delete the section header of "previous work" actually
then it won't seem so weird that we introduce VSM there
I'm copying what we have back into the main article in case they start looking at it today
I'm relatively happy with the intro, now just gotta finish up the end
after eep
I'll recover and add all missing parts into the implementation section
General comment, ideally figures should appear before they're mentioned
I know placing figures is a PITA in TeX and it will probably be changed later
Or if not before they're mentioned then at least on the same page
Also, for the final article the figures should have their font match the article text, ideally
The editor may have general comments about figure style to try to keep the articles consistent with each other
What’s the article font/size? I’ll switch the figures to use it
Don't worry about it yet
I'm not sure exactly what the font is, it's just the overleaf default
If there's any uncertainty someone could contact the editor and ask if the figures need to be finalized by today or if there will be feedback on style
The figures are quite good btw nice work
Based on the book I saw I'm guessing there's going to be a fair bit of layout and format work yet to actually turn this whitepaper-style text into book content
@acoustic bobcat are you editing the part you are on rn, or can I modify it? nvm
I'm commenting/making suggestions
I'm not sure what happens when I make suggestions over someone else's suggestions so I might just make comments in those places
suggestions? or do you mean changes?
Like if someone else has edited something and that edit exists as a "track changes", and then I edit that edited text, idk what happens
Seems like it could become a mess
I think it overwrites, but I wouldn't worry about it that much
I feel like the "track changes" just blow up and become very hard to read
although I try to read them still, it just become huge chore
especially when we need to work on it
Yeah idk what the best solution is
You guys shouldn't really be using them though
Suggest changes is for secondary editors, if you guys are the primary writers you should just modify it tbh
I'd say just edit the sentences when you see an obvious mistake - grammar or syntactic - when you are unsure make it a suggestion comment
I restructure whole sentences frequently though
It works well when there's only one person using them but for me to add a bunch on top of existing ones I'm not sure
Jaker should be awake soon maybe he can just apply all his
I've been applying Jakers 😅 I just leave mine if he wants to see them
Maybe we should just apply them
The version history is tracked anyways
Not like they're going to be rejected
whereas mine very well may be since I don't have all the context and shouldn't make direct edits without review
It was mainly meant to show to Jaker what I was working on while he was eeping, but as I said, it is just a soup now
so I'll just apply them all
as we have not really been arguing about anything - the corrections we make over each other are 99% fine (at least from my side that is)
Alright
don't apply mine though
What's the difference between light space matrix and frustum
If the light space matrix is a tighter fit does that mean the frustum is too
I'd say light space matrix defines the frustum
ugh well, light projection matrix does, light view decides the position of the frustum
btw @vestal snow I think it would be nice to have a diagram depicting coordinate wrapping when using stable addressing and caching
Ie the "Toroidal mapping" as NVidia calls it in GPU gems
something like this
Oh yeah that sounds like a good idea, I'll get started on it
in your impl do you also use the uv coord wrapping scheme?
I mentioned this in the comment but I think "bookkeeping" (recently added in the text by someone) is actually an even better name for the first stage
"allocation" is better than "setup" but "bookkeeping" is even more general and better captures what's going on
Bookkeeping, drawing, and sampling
it is a weird word to use in an article 😄 but it does fit well
I'll make it bookkeeping
Alright I just finished a pass through
I will wait for you guys to continue and can check back again later
Thank you
I'll address the comments before I go to bed, after I'm done writing a bit more
Feel free to discard or question any suggestions I made, they're just suggestions after all
I won't be offended and I don't have full context so sometimes I am guesing in my interpretation of the meaning
as well as the camera following the player at a page sized offsets to allow for page caching
I'm awoke
It's the proj*view of the light
I guess they're the same lol
is that an industry term so to say?
Yeah I think so
Like when you say that SDSMs are a tighter fit, is it the frustum that fits more tightly?
And the matrix is just describing that frustum
Yeah we should use the word frustum in that sentence
Alright
I changed it
I changed that whole sentence so I just changed that word
I was sort of agonizing over whether I could make that swap
Pretty much the whole of todays process is just rewording senteces
only like an hour ago I got to start on actually writing new stuff
Also sorry about the edit spam from the equations lol I should have modified the whole thing in one go rather than in pieces
The easiest way to review edits is to just click on them in the editor and let it take you to the associated comment
Yeah that's what I've been doing
I attempted to describe stable addressing and page wrapping
but it is very rough
for some reason I really struggle with explaining these concepts
Can you explain it verbosely here
okay
Stable addressing and page wrapping need to be introduced in order for caching to work
caching just means, that pages no longer get invalidated when not visible. They instead stay allocated until there are not enough free physical pages, at which point they get freed
What about wrapping
Caching also means not having to re-render a page if it's still in view and nothing in it changed
Yep
Yeah so, stable addressing makes the camera follow the player in a page sized increments
Working on caching right now for my foliage 
as opposed to following the play position exactly
additionally, you need to fix the camera position to only slide along the "near plane"
By doing this, when the player crosses a page boundary and the cascade light frustum snaps to a new page, you can still do the shadow test on pages that were drawn with the previous camera position
ie, you can preserve the cache and don't need to clear it
The issue can basically be summed up as "how can we permit the light camera to move without invalidating cached pages"
The issue that remains is, that when light matrix snaps one tile forward a new row/column of pages enters the frustum and a row/column of pages leaves it on the other side
Page wrapping is an addressing scheme, which maps the pages that enter the frustum onto the location where the pages leaving the frustum used to be
like so
That's a handwriting font right
my actual handwriting
That's a handwriting font right, nobody's handwriting is actually that neat
jk lol
May as well be compared to mine
Anyways I think I see the wrapping thing now
How is this related to invalidation though
this image sums it up well
The boundary needs to be invalidated/cleared
But in the article there's something about page invalidation being based on wrapping
ah ok
ah yeah that makes sense
I made a comment on that yeah, I started the section, but then realized there is a bunch more I need to explain before I can talk about that. That is why there was just a one random sentence...
After I eat this hotdog I'll be on
btw what is "pretty rough state" defined as, do we know?
like can parts of the article just be missing?
probably not right?
Let's try to get the first draft until the April deadline - it shouldn't be super polished, just let's have the first round of the comments then.
hmm so uhhh, that tells us not very much haha
Yeah I will aim to have a version of the missing parts by EoD
Exactly, but given how loose they've been with the other deadlines I guess nothing is set in stone
That's why I'm not stressing over the article being perfect today
I'm just asking if I should make another coffee, or if it will okay-ish to be missing a bit
Ah don't lose sleep over it if you don't want to or if you need to do other stuff tomorrow
we'll see how it goes
I'll see if I can recruit my irl friend to take a look at well
Irl friends 
right those exist
Anyways I can definitely give it another read over today
Write more stuff and I'll review it
And then you can go through all my remarks
what timezone and time is it due?
yes
: )
(nobody knows)

Today, in some timezone
Yeah like jaker said they probably just want it on their desk monday morning
raisinable
ah
they added some comments to our main doc a few hours ago 
actually just one
file missing
fixed it
we have a warning that OverallMapping.png is too large for the page
and the glsl language couldn't be found for a listing
are those limitations of overleaf?
we can make it cpp
the listings are borked anyways
( in the Shared version)
because we do not have their styling
ye
I made an attempt at making a diagram for it
yeah the font in the system overview needs to change eventually
I definitely need to edit it
and the squished arrows in the bidirectional mapping look kinda funny
perhaps use straight arrows to avoid that
unless you can figure out how to make them not squished 😄
oh crap
make the pics really high res if you can so they are at least 300 dpi
yeah I think I can
are they all a problem or just some?
Like should I reupload all
it looks fine tbh, don't worry about it
I don't know if any of them are a problem. I was just letting u know for if you edit them
also I crammed the wrap addressing diagram into the caching section
sounds good, I'll try to keep them all high res
What is an acceptable image resolution?
In general bigger is better. We encourage the authors to think about the resolution rather in terms of printing resolution, dots/inch (dpi). Our target recommended resolution is 300 dpi. This means that a 1080p image would be 1920/300=6.4 inches wide on the actual printed paper. If you need to make your image smaller, this is fine too, because it would lead to higher than 300 dpi. However, all images should have at least 300 dpi pixel density for printing.
The bookkeeping flowchart also needs to be remade to preferably fit the style of the other figures
I added "px" and "py" to the diagram so we can reference it in text and mention that they are both multiples of a page
I've also added a fifth stage, so the old figure is outdated now
btw is the official doc using the float and listings packages?
ok good
or well, from their style thingy
and I copied the syntax of the listings from the cyberpunk article
so it should be fine regardless
@sweet nimbus are you gonna go through Demongods suggestions or should I do it?
I'm going through them rn
okay I'll just spit out more text
sounds good
also I just realized a section describing our debug views would be helpful
but we can focus on the important stuff right now
well I think for anyone wanting to implement vsm, it would be nice to know
but yes it's kinda hard to fit into the existing structure, so let's ignore it for now
that is true yeah, it will be a single paragraph anyways so we can add it later if we decide to
maybe we could put it after the conclusion as some sort of "extra" section
idk how papers normally handle miscellany
ok I looked it up and that does seem helpful/like the way to do it
alright the portal arrows were replaced by a double ended straight arrow
if that diagram is too big I can squish it down
we will need to remember to re-upload all the pics in the main doc too if you edited any in this one
oh yeah they're pretty much all out of date in the main one
and they still all have to change at least 1 more time to fix the font
making green and yellow highlights disappear gives me a dopamine rush
it's the little things that keep us going
big blocks of green give me the good feels haha
track changes is so insanely useful damn
well, unless there are a lot of changes
this was worth paying $0 for the free trial
I hope you don't mind I accepted both of ours changes before you got to see them
and I just left Demongods suggestions
good good
man is the last cascade really 65x65 km
2^15, I checked it
isn't it 2^16 if the first one is 2x2 meters
that's kinda crazy
UE5:
By default, clipmap levels 6 through 22 are allocated virtual shadow map page tables. This means that the default settings have the most detailed clipmap covering 64 cm (2^6 cm) from the camera position, and the broadest clipmap covering about 40 kilometers (2^22 cm).
Unreal needs to be stopped lmao
someone rejected my metadata edit 😠
metadata edit?
I think metadata > meta-information
I'll un-overwrite it
metadata is an actual word though 😄
Perfect for my purposes 
you can trivially add more cascades to make the number even more absurd
You can barely even see 65km in the atmosphere unless the conditions are pristine lol
I know we do it for astrophotography, but I'm guessing the resolution of stuff on earth would be shite
Hmm to leak project images or not to leak project images
Nahh maybe later
It's not my project to leak
yeah don't do it lmao
It's not for work is more side project stuff
even though I'm guessing you have something epically relevant
Yea
I'll just imagine you sent the relevant pic and I replied with 
I'll post it when I can
For now enjoy my college personal project that is also relevant
My mom had the same when I came up
why is it so satisfying to watch the scan like update?
Do we have any assets that let us test the last cascade
wasn't there a landscape someone found or made a while ago
My time to shine
Ye Jaker had the terrain

I can put it on gdrive
Btw this ran on a single thread of my shitty laptop
Well, one tracing thread and one video thread
do you support ktx textures
or do you want unprocessed gltf
hmm I'm not sure where I put it
I have the processed one but that won't do
perhaps you could just load it without textures?
make it grayscale or smth
🇩🇪 pilled
well I do have the raw heightmap for the terrain if you want to turn that into a mesh in blender
I'm uploading the raw heightmap and the ktx compressed gltf asset to the shared gdrive
ok they're up
Thanks sounds good, that'll be nice to have
it's not too difficult to turn the heightmap into a mesh in blender. I looked up a tutorial on using a texture to influence vertex displacement, then applied it to a subdivided plane mesh
Plane mesh > subdivision (regular mode, not the one that rounds things) > displace modifier > image texture for displacement
you should also add a skirt to the mesh
That is also the truth
he forgot "worm" at the end of that sentence
btw I added listing and three paragraphs to the drawing section but my brain is officialy fried now
I just put garbage words into sentences now lmao
I'll add bibtex file and fill it with references and that will be it for me today
thank you brotha
and sampling
jaja
I love the color in all of these 
the depth analysis diagram is kinda goth though 😳 hehe
it's totally fine lol I was just commenting that it has less color than the others
I added all citations (except for the unreal one, I will need to add that one manually probably) but for some reason it is not linking these together, even though the syntax suggestions do give the correct ones
so I don't really know what I'm doing wrong
maybe we should ask the editors about this, it is really weird, as this always worked for me
I really need to eep now, I will be back tomorrow evening (in 15-16 hours or so)
alright
huh how do we actually use this bib file
do we need to include something in the main article
oh thats what I forgor hahaha
let me look at another article 🕵️
I just copied it
ah they just added a \bibliography thing at the end
I see
okay there we go
I made some of it show up
citing works now
oh did you change something too lol
yeah we need the \bibilographystyle
lmao the diagram randomly in the bibliography
inorder for them to work
hahaha yeah we will need to fix that
also we have too little references
we need to add more
if you want to add them you can follow my style/ask copilot to generate the structure for you and just fill in the data
alright
or you can just find the paper on google scholar, click cite and then select bibtex on the bottom of the popup window
and just copy that
btw [!htb] doesn't work for the figure 
yeah ! only works sometimes 
you can yell at it but it won't listen
I suggest fixing this when we copy the article over to the official OL
they might have additional style settings and such, breaking everything...
okay 🛌 now, gn
🇬🇳
I got the thing to work. I had to use [H] (not [h]) and move the \usepackage{float} thing before the article start so it wouldn't error
does every reference need an inline citation? that would be a strange requirement probably
What do you mean by "every reference"?
everything in the bibliography
Even the strongest enforcement of figure placement is at best a gentle suggestion lol
Everything in the bib should be inline cited at least once
yeah it looks like latex just removes them from the bib if they aren't referenced
sad
Well it makes sense 😅 we can't have shadow references
lol I want them 
We can include some of the clipmap papers, they also use the toroidal or 2D wrap mapping
We don't have to talk about clipmaps for thay
I can read the paper Wiemmer, I talked about it with him when I was at TU Wien so I'm actually pretty interested in it
alright
And then I'll add a reference to it in the introduction
I'll reference the UE5 thing too
You will probably need an @online or @misc reference
ye
We can also mention pcss and optimal bias papers in sampling
That's another like 2-3 references
aight, sleep tight
btw I put our names in alphabetical order
(not sure how else they are supposed to be put)
hmm is it fine to put two inline citations next to each other
I see it all the time on wikipedia
I'll try to do a full readthrough soon
what's the timeline like now? Like current/next steps
finish the draft today and get the main content in
it can be rough
then we keep refining it until the section editor takes a look
btw I literally cannot find ue5 docs for nanite
to cite
Ok makes sense
actually I can cite this perhaps
https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf
Maybe lvstri has the links
not sure the proper way to cite a siggraph presentation, but I'll give it a shot
idk if this is even relevant
https://www.siggraph.org/preparing-your-content/citing-siggraph-publications/
hmm just learned that d3d11 has tiled resources
so previously (on discord) I used stable page addressing to refer to what our article now calls wraparound addressing
the article also describes stable page addressing as how we move the light matrices, but that isn't describing an addressing scheme
I think we should just drop the "stable page addressing" term in the article
Stable page addressing was fully replaced by wraparound addressing right? term wise at least
well not in the article
stable page addressing is just introduced and never mentioned again lol
but what it describes is how the light matrix position is quantized basically
oh lol
handwaved
projectile aliasing lol
autocorrect in overleaf is pretty funny
I fixed one of the listings by simply removing the newline between \begin{lstlisting} and its parameters
I have question(s) about the selection heuristic
in the second one are we using depth buffer value directly as d?
also the article is coming along really nicely
I think we still unproject it to get the world space distance
tbh I think both methods could be simplified to ultimately not need any unprojection or funny math, but what we have now works 🤷
uhm I haven't implemented it myself
no problem
During the readthrough I think that was the main part where I realized I don't follow what it's saying
add a comment if you haven't
Oh and the stable page addressing part. I see what you mean where it's briefly mentioned then we forget about it lol
alright I'll add one
yeah it's just "btw we need to move our matrices in page-size increments or caching won't work". we don't need a special term for that
I think in papers, usually the first one is the main author followed by arbitrary order
It is yeah
good morning sleepyhead
Yeah you take the distance of the fragment from the camera
Halloo 
Author order is usually:
Most contribution, 2nd, 3rd, ...Nth, principal investigator
First author is the one who did the most work or was responsible for the project, last author is the "most important" by seniority and organized/funded the student, and in between is just by decreasing order of contribution
There's no PI here really so you can either order yourselves by contribution or just say fuckit and make it alphabetical or something
Merging them is also fine, I was really struggling with explaining that so I tried to split it into smaller parts
thanks
For the cascades are they all at the same origin or do they kind of float a bit since world page sizes differ?
They float a bit, like you said
Is there any particular good time for me to take another pass over the article
Otherwise I'll do it in 30 min or so before I go to bed
hmm maybe tomorrow if the section editor hasn't gotten to it first
when was the last time you looked?
This morning, you saw all my comments already I think
alright
I don't think the article has changed too drastically since you last looked. I think it will be worthy of review once the last couple sections are filled in
I wonder if they will notice if screenshots come from different renderers 
You don't get it, it's an advantage: proof this method works in multiple engines/implementations 
hmm I have a cursed problem where I get self-shadowing, but only on concave triangle edges 😩
those are not NaNs?
could be
btw jaker what do you mean by perspective aliasing
I know what projective aliasing is
camera goes close and you can see individual shadow texels
it certainly seems as though the black pixels are caused by the shadow
it should be explained I fink
it is
can you do the sampling section? my brain died
ye I saw the sampling section is very lonely
and/or review the big green section saky wrote just before that
while I take screenshots
fortunately fsr2 smooths over this 
yeah but since it's on triangle edges it becomes less noticeable
btw does this look like an interesting enough scene (bistro is in the center)
High Fov player showing off FPS scene in bistro
the plan is to somehow show that it works in far and near detail
this is super cool
perchance put a smol circle around bistor
for the actual blind people
here is bistor


