#Andromeda - Terrain/Landscape editor using Vulkan and Rust
1 messages · Page 6 of 1
we did do something kinda new, at least I havent found anything like it
assembly-like html
also as for the topic we got to pick our top choices from a list and then one was assigned
yeah thats the whole point i find strange
the original task was to write an efficient web browser for a low power embedded device
"universities" dont encourage you to conduct actual research to figure out new shit
i came up with this thing as a solution
im also still generally speaking not saying that the thesises you wrote suck or make no sense
Yeah I realize
It was said at the beginning of the course
that this was sort of like a thing to make you go through the steps of doing actual research
but not actually doing anything new
which is kinda lame imo
ive read so many papers of students who i interviewed over the years 😄
heh, nice of you to read them at least
outside of computer science its a little different for some weird reason
I have a friend who does biomedical stuff
For their thesis they just had to conduct some predefined set of experiments and write a report
yeah exactly
and compare it to existing shit or explain why this an that will be new or simply breathtaking
computer science people write a generic engine, lets say 70-80% of the ones i read so far
anyway, i have no right to judge them 🙂
yeah says the one who is writing a generic engine
Lol
for a bachelor's thesis in rendering, i wouldn't expect anything but generic
Yea I guess
i guess that was said
but like, idk how you can do anything relevantly new without understanding what exists first
at least with any efficient use of time
God damnti I missed a conservation that is extremely relevant to me
So I gotta guess for my Bachelor’s thesis I ain’t going do something groundbreaking
Which is obvious I’m confused on the “new” part of it
Cuz like some people said I’m gonna do stuff that has been done before?
Is that like through the same method or a different one but ends up essentially in the same spot
aren't you currently in hs
I don't think a bachelor's thesis is something you need to think about until maybe the last year or two of your degree
Yeah but I’m gonna graduate this year and go to uni 💀
And yeah I probably don’t. Considering the course that is for the thesis is 4th year
Yes, we even need to patent-search our crap
it has to be novel
thats why sometimes i get weirded out reading bachelor's papers of overseas students, why is it like 5 pages whereas ours is 60/70 already and counting
our bachelor's right now involves creating a novel device that will be deployed to the sea so for immersion, i have to go to a ship, go down, and check oceanographic conditions
fucking hell
Computer Engineering
well yeah i guess i brought this down to myself choosing this project
sounds really cool though
just not what I would initially expect from such a degree 😄
yep lol
anyway, other peoples bachelor's (published) involve having a device that sorts between good and bad produce using cv
having some app that reads money for the blind, etc
those are some nutty theses
indeed lol
Sounds cool but a lot of work lmao
it takes a whole year to finish
so your 4th year at uni is solely dedicated to that + Internship
Ah here it’s also an entire year except it’s stuffed between other classes
at my college we had year-long game team projects though
1st semester has some classes with the thesis too, because the 1st sem is dedicated to problem validation, writeups, patent search
but 2nd semester is full on just making the damn project
I see
The course here is 9 credits, where you usually take 60/year
(For comparison the master thesis is worth 24)
yeah actually i wonder if its worth to pursue masters here, because bachelor's is hard, but then you get to masters, it gets kind of red-tapey
masters is required to teach, so people who usually flock there are the ones not really working on the field (just want to teach instead of in the industry)
on one hand, I like teaching. on the other, I don't like teaching people who have zero interest in the topic
yes
master's students probably care more than undergrads though
oh wait but you wouldn't be teaching master level classes 
yes, you need phd 😄
honestly quite horrible
all this hard work on papers, and what happens to them? dusting on the shelves because our govt didnt bother having good scitech department
Anyway if it's not too bother here is me on the sea doing research
while totally not checking out the specgloss of the water
thats cool
Who doesn't do that
Pog I got the username change
i did literally nothing but classes
> check oceanographic conditions
yeah as if that ain't what I am doing the entire time 
I'm so confused by rust lifetimes man
@shadow trench Sorry for pinging but are you ever going to add terrain "details" into your engine/terrain?
Like trees, rocks, stuff like that
oh yeah i probably will
Awesome
Just came across this in a Reddit post
Shit has 500 upvotes somehow
Simplified API surface: No more 1000 LOC to draw a triangle (takes about 300-500).
ok to be fair
their definition of what a "line" is, is extremely encompassing
e.g.:
//This should start being self-explanatory.
render_graph_builder.add(Task {
resources: vec![
//Now we copy from this buffer.
Resource::Buffer(
Box::new(|render_info| render_info.staging_buffer),
BufferAccess::TransferWrite,
),
//To this buffer
Resource::Buffer(
Box::new(|render_info| render_info.time_buffer),
BufferAccess::TransferRead,
),
],
task: |render_info, commands| {
commands.copy_buffer_to_buffer(BufferCopy {
//Index of the buffer in the resource vector
from: 0,
//Index of the buffer in the resource vector
to: 1,
//Source (from parameter) buffer offset.
src: 0,
//Destination (to parameter) buffer offset.
dst: 0,
size: std::mem::size_of::<f32>(),
})
},
});
this is like 100 real SLOC
I don’t like the api 
what about it dont you like
i also dont think an api like that could ever be judged by looking at a triangle program alone\
no clue how extensive the rendergraph is for example
Resource::Image(
//This acquires the next image from the swapchain, essentially the image we can draw to
//and it is also the image which is drawn to the screen.
Box::new(|render_info| {
render_info
.device
.acquire_next_image(Acquire {
swapchain: render_info.swapchain,
semaphore: Some(render_info.acquire_semaphore),
})
.expect("failed to acquire next image")
}),
ImageAccess::ColorAttachment,
//This is the image aspect. It defaults to color images.
//If you are using a depth image, you will want `ImageAspect::DEPTH`
//and if you use the stencil buffer you will want to add `ImageAspect::STENCIL`
Default::default(),
),
tho the image3 attachment description is gigantic
i wouldnt want to write that
i guess it includes the aquite op but i would still want that to be a single line
Yeah a triangle program isn’t much to look at
It seems a bit verbose for something that claims to simplify vulkan
//By default, boson will inject `#define the_shader_type_in_lowercase`
//for example, the first shader will have `#define vertex` added to the top of the file before compilation
//and the second shader will have `#define fragment`
Yeah
This looks fishy too
i guess also the swapchain api is pretty big
i wouldnt care about that, id make that smaller as well
I don’t understand why you’re expected to create semaphores yourself and then pass them in unmodified
Kinda weird imo
yea
the rendergraph should do all sync
dont know why that is needed, its unnessecary
Though it’s interesting to see another approach to essentially what I’m doing
how old is this?
i think a few months
🤓 let me see phobos now
hmhmhm
immediately sussy on the gpu selector
can the requirements have a scale or rating? Or will it just pick the first in the list with all requirements set?
Picks the first right now
Im actually interested to see how the boson thing handles descriptor sets and resource lifetimes
Does it expect you to do that yourself
// Bind some physical resources to the render graph.
let mut bindings = PhysicalResourceBindings::new();
bindings.bind_image("swapchain", &ifc.swapchain_image.as_ref().unwrap());
let cmd = exec.on_domain::<domain::Graphics, DefaultAllocator>(None, None)?;
// Record render graph to our command buffer
graph.record(cmd, &bindings, &mut ifc, None, &mut ()).finish()
Do you have to set all bindings here?
every time you call the graph? Also record? Does it re record or just set the resources + validate and runs the graph?
like daxa im pretty sure
i helped her with that
first impression on phobos good. I like how short the readme program is

You have to set them all here, but you could keep these bindings around for next time
Right now reusing graphs is kinda not great
🫡 making rendergraphs is a lot of trial and error
i had this exact api in daxa before
Arc
nah tbf i spamm my own ref counted ptr in daxa for these things as they are not in high numbers or copied ever
automatic renderpass creation, does it merge nodes into single render passes?
🚨 BUFFER USES 🚨
insert nano quote on buffer uses beeing useless (except for descriptor buffer)
boofer
Not having to specify the usage flags, also unifying all the scratch allocators into one
Right now you get a scratch allocator for each "common" usage
uniform buffer, storage buffer, vertex and index
the biggest tradeoff i see so far with phobos is abstracting the window
but itd be nice if that was just one allocator for scratch mem
that is nice for getting going and some usability but it serve limits you in the end
hmm wdym
do you support any multi window?
yea i just have one pool
not atm no, its been somewhere on my radar but i havent investigated it enough
for all buffs
yeh thats a lot easier
that is a sad part tho because then you have to decide to have two apis for that, the current simple + an explicit for extra windows or only explicit for general code cimplicity
hmm yeah thats true
but you will definetly have higher adoption if you have a simple path
the simple path could probably be an abstraction over the explicit one
yea
i mean it doesnt really matter tho
the windowing
99% of cases you wont need it
just some randome thing i saw
accidental bikeshed induction is my greatest strength
it doesnt until i suddenly want multi window support in my own programs :P
👍
geneerallyi would only ever support things that is actually needed
otherwise you will impl things that wont be used
thats dummmm
yeah thats true
i mostly add features as I need them myself right now anyway
A lot of random vk commands are just not implemented because i havent used them yet
based
👹 i still need to implement rt pipelines in daxa i am putting that off for nearly a year now
rt pipelines are somewhat annoying because they are ever so slightly different from normal ones

but gl like bindings that phobos has a rea also super ez to use
so nothing against that
btw cods rendergraph team made a presentation rescently
oooh i should watch that
yeah, nothing stops you from doing bindless with phobos afaik tho
its just not the default
what about bindless bindful 
'
4 uints of pushconstant mapping into two bindsets (descriptor index and array offset) which map into up to 16 other descriptors (or inline parameters) is what I do
D3D12, so no BDA
think this is the closest thing to BDA you can get
that is just normal bindless
which map into up to 16 other descriptors (or inline parameters)
idk what that means
d3d12 ah, no clue about that
i thought you can just index the heap there
It's more like a restriction I made to make allocation free
we have better things than unbounded descriptor arrays lol
ah lol
You can just
cast descriptors essentially in hlsl sm6.6
directly indexing the descriptor heap
psuhconstant in dx12?
You have pushconstants
what are the 16 descriptor types
I use them to index into an indirection table which has 16 uints of size
they are freely chosen
templated
in vulkan i only need 4
wtf thats op
😔
template<typename T>
T load(uint index)
{
ByteAddressBuffer buffer = ResourceDescriptorHeap[NonUniformResourceIndex(handle.read_index())];
return buffer.Load<T>(index * sizeof(T));
}
and handle.read_index() is just returning the index (I have write index as well for RW access)
honestly hlsl is less usable then glsl
its buffers are unacceptable
when hlsl gets buffer pointer tho
uuuuuuuh that will be the day
I hope that is soon
but my answer to that some time last year was "they can't share anything about it" 
was devsh not working on something related to that
yes
how exactly do you mean that?
devsh hired someone from khronos to implement it in hlsl
well
you can use spv intrinsics in hlsl
so with enough abstraction or some macros you can get BDA-like interfaces
you cant do byteaddress_buffer[addres].field = d;
because you must load and store
so you have to do
byteaddressBuffer.Store<FieldT>(structaddr + fieldoffset, value);
in effect you must hardcode struct offsets
which is insane
i tried
it wont ever be nice to use
because hlsl doesnt have references yet
(that will come as well tho)
btw. in use it looks like this
Bindset bnd = read_bindset_uniform<Bindset>(pc.bindset_buffer, pc.bindset_index);
Ocean_Parameters pars = bnd.params.load_uniform<Ocean_Parameters>();
that looks quite nice
yeah although I did have to implement all the texture and buffer load/store/sample/gather functions 
reminds me of gltf
one must understand what falling into the depths must feel like before they rise like a pheonix
are you talking about playing valorant 

i dont get it either
yes 
now i felt the depths
now i can rise to rust
the vulkan -> vuk -> valorant -> phobos-rs pipeline is wild
join the pipeline
I will never give in 
One day
With how the foundation going implode might be right 
right with what? 
Yo penguin
Dont feel rushed but when is the drop of nightly rust?
like vaguest of in progress
you mean phobos without nightly?
i kinda have exams rn but i can try to push a fix today
you can probably skip an exam and still pass
its only software design how hard can be it
lol I was just standing and a spider dropped in front of my face while searching for the perfect gif

Live spider reaction
interesting looking spooder
It's floating like 15cm from my phone
🕷️

floor + door leak

Might be interesting to look at ngl:
https://hal.science/hal-01339224/document
"Terrain Generation Using Procedural Models Based on Hydrology"
ctrl+f time, see first result
The overall time necessary
to create the input slope maps was less than five minutes.
uh oh 😃
actually i'm not sure what that's referring to, the execution times seem shorter
I mean if it was the case then oof
I don't think they mentioned anything bout realtime
Pretty slow-ish though
The rivers in their system look pretty good though so it's alr
real timeisn't relevant
but artist tolerable is
Yea you right you right
I've been so into proc gen these past few years that I forgot that's how it usually is lol
my procgen stuff at work aims at roughly like under a second per square km, but that's completely arbitrary
seems to be a good requirement to hit
Mine is under 2ms for a volume of 64x64x64 (GPU compute)
And to think that I thought my old Unity terrain (which took 300ms per 32x32x32 chunk) was good
🥲 good times
Unfortunately most of the time is spent generating chunks that are empty anyways
So if I somehow figure out how to early exit for those it should significantly boost performance
That’s not too bad for editor stuff
@livid geode @potent quest without fsr2 phobos no longer requires nightly
use 0.9.2
yeah, thats the same
you should probably fix the commit though to make sure it doesnt break until youre ready to update
git = ..., rev = ...
terrain when 🙂
some time after exams ill do more work again
ah fair
but i also go on holiday for 2 weeks so i wont have access to my pc for a bit
i can definitely do shader graph stuff on my laptop though
the school cycle no longer exists to me now that i am not in it 🙂
(if i find my charger)
school ends on thursday
trust me ill ray trace then (i will proceed to procastinate on levels never seen before)

havent done anything lately 😔
trapped in factorio/satisfactory?
quite relatable
It's not even the difficulty, it's the sheer nerve of the professors to go on random trips, abandoning us to our fate
And letting us know exam dates the day before

wtf
The exam itself is in quantum superposition, we know the probability of it happening on each day of the month, we can't pinpoint it


cc @dusty marten
I also fixed the shader thing in the egui integration
It just ships the compiled ones now
i forgor
Alright aleok, I'll remind you about compile rex in 1 day. ID: 58288669
Successfully removed reminder.
Alright aleok, I'll remind you about compile rex editor in 13 hours, 33 minutes and 52 seconds. ID: 58288704
there
would have been funny if it was 13 hrs 13 mins and 13 secs
lol
If you ever will implement procedural gen
I found a nice height function that will create some dunes
Compute proc gen is sooo much fun
unfortunately the radar is obscured by exams 
Lol same
Hs exams though so much less important but still
that looks neat
Well yea that's the main part lol
Here I'll send full source code
float spikey = snoise(position.xz * 0.001) * 0.5 + 0.5;
spikey = clamp((spikey - 0.5) * 1 + 0.5, 0, 1);
biome1 = (1 - spikey) * snoise(position.xz * 0.001 + vec2(snoise(position.xz * 0.0002)) * vec2(1.3, 0.2)) * 60;
biome1 += (1 - spikey) * sin(dot(position.xz, vec2(1, 1)) * 0.01) * 60;
biome1 += (1 - spikey) * cos(dot(position.xz, vec2(0.2, 2)) * 0.001) * 45;
biome1 += spikey * abs(snoise(position.xz * vec2(2.1, 1.0) * 0.002)) * 60 * cellular(position.xz * 0.001).x;
biome1 += position.y;
The oriented sine waves really make it look interesting
I wrote the function under 20 mins so it wouldn't be surprising if it was implemented before lul
Lmao
good dunes are hard to do without simulation
For sure yea
imo you can take the -sin(coord.x) and do some domain distortion on it, but you need the max slope/erosion step as a post process
Right
I'm thinking of using a rotated -abs(snoise()) so it aligns with the "wind" dir
Cause atm all the ridges are uniform and they're going in all directions
Also there's a sphere at 0, 0
Probably due to unshifted cos / sin lol
Implemented terrain CSG operations without actually implementing them GG ez
Wait no I'm just extremely dumb and I forgor to remove debug sphere
rotating perlin will just rotate the artifacts
Wdym?
perlin is meant to be direction agnostic, it's not because of artifacts
but they're not a good thing to use because you don't have much control over them
Ohh sorry mb I didn't mean direction as in perlin direction
I just mean I literally take the input point and rotate it
Which makes the noise aligned with a specific angle
ah with the stretch
Yepp
that doesn't work sometimes because many noise inputs take a scale value, so to do that effect you'd have to rotate outside of the noise, and it'd end up being rotate->scale
but i guess it works if you can scale->rotate 🙂
Makes sense yea
Yes but the behind the scenes
Right
Check out descriptor/builder.rs and descriptor/cache.rs
Once I get on pc I can do some more in detail explaining
I just need to unbed myself
the ultimate prison
just look at an opengl driver
I am here
So I have a DescriptorBuilder
Which just stores bindings in a hashmap or something
When you call bind_xxx it just adds a binding to the list
On draw() or dispatch(), those bindings are flushed and you get back a struct with all bindings
I then have a fancy HashMap<DescriptorSetBinding, DescriptorSet> where thats looked up
if it doesnt exist, make a new set and update it immediately
If it does, use that one
I don't see how per frame descriptors are handled
How can you guarantee 2 equal descriptor bindings will result in different descriptor sets based on the frame index
Why should they have to
descriptor sets are never updated
Only recreated with new contents
🤔
Either they point to a different resource (for this frame), so they are different
Or they point to the same resource thats synchronized across frames
// assume the bindings are the exact same
frame 0 => no desc set: make new one
frame 1 => no desc set: make new one
frame 0 => desc set found, use that (??)```
bruh
In this case it would be
frame 0 => no set, make new one
frame 1 => use previous
frame 0 => use previous
Hmmmm
As long as you dont vkUpdateDescriptorSets and the resource is synchronized, this should be fine
Ah I see
yes
You hash VkWriteDescriptorBufferInfo as well right?
Or whatever the hell its called 
Yeah but its a custom struct because vk structs are not nice to work with
its translated into that though
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub(crate) struct DescriptorImageInfo {
pub sampler: vk::Sampler,
pub view: ImageView,
pub layout: vk::ImageLayout,
}
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub(crate) struct DescriptorBufferInfo {
pub buffer: BufferView,
}
VkBababooeyCreateInfo
One thing to note is that the set layout and pool used are hashed with the create info
Why?
I thought I could get away with
HashMap<layout, pool>
HashMap<Vec<bindings>, desc_set>```
The pool is kinda weird
This means I need one more layer of "hidden shit"
The cache holds one descriptor pool it allocates all descriptors from
And when it runs out it creates a new bigger one where all new descriptors will be created from
Also itll set the pool field of all requested descriptors to this new pool
So old descriptor sets wont be caught by the lookup anymore and will be "moved over" to the new pool
What does moved over mean exactly
recreated and oldies are pushed into the oblivion queue?
Because then you end up with potentially many pools
you only really need one pool though
as long as its big enough
so this approach just converges to the needed pool size over time
It degenerates if I allocate only storage buffers or only uniform buffers though
I mean
I will only allocate, realistically
2 descriptor sets
no because it only grows for the type it ran out of
maybe 3
Ah interesting
so suppose the current size is
UNIFORM_BUFFER, 1
STORAGE_BUFFER, 2
and you allocate 3 storage buffers, it grows to
UNIFORM_BUFFER, 1
STORAGE_BUFFER, 4
regarding cmd_buf.bind_uniform_buffer(0, 0, buffer)
Does this add an entry to the descriptor builder
yea
when do you build()
I don't see draw_mesh_tasks_ext, disappointed
what does "unflushed changes" mean 
no calls to bind_xxx since the last draw

many
let me check
could be worse
though there are a coupl instances of the last one (every "create if not exists" cache uses that)
mfw vulkan needs a relational database
vulkan backed by sql
create table if not exists DescriptorSet (
pool,
layout,
bindings,
foreign key (bindings)
)```
I took one SQL class and simultaneously passed while not knowing wtf I was doing
yeah i had one databases class last year
that was the moment I learned I was not destined to be anywhere near a web backend
well tbf, I barely passed my first graphics class and didn't know what I was doing in that either
"ok students today we will be learning OpenGL 1.1"
if you haven't done ray tracing yet, it should still be interesting
but if it touches on graphics APIs then I'm certain you'll be utterly bored
- intro to raytracing
- camera and perspective
- transformations and scene graph
- shading
- rendering equation
- shadowing and direct lighting
- acceleration structures
- advanced visual effects
- texture mapping
- production context (?)
u're gonna wreck that class fr

theres also computer graphics 2, which has
- advanced GI algorithms
- shape and shape analysis in computer graphics
- perception in computer graphics
- alternative evaluations of visibility calculations

the only thing i recognize is GI
lol
theres also a project class for actual implementation
the third one could be anything
looks like its focused on raytracing
might try to convince my professor to let me do it in vk 
you had your acceleration structures and ray trasversal functions to help you
I did my balls in GL
with only the power of god and anime on my side
look at my balls
where denoiser
No temporal accumulation because it broke
nice balls
oh
i member my temporal shadow accumulation painting my entire scene red
and making transparent shadows
somehow

you accidentally killed the gpu gnome


most annoying part of the masters programme is i have to pick some nonsense classes to take
do you have to do the master's program
I mean I can also just call it here I guess but eh
don't want to become a corporate wage slave just yet, huh
exactly
"history of computer science" seems easy enough
"AI ethics" too
adds up to the min amount of nonsense I have to take
AI ethics? just have them do whatever the law says dummy
Just watch some Robert Miles

Easy
we have 6 main options
distributed systems, safe software, AI, software engineering, human-computer interaction (big pog), computational cs
human-computer interaction is just permament bikeshed over how to handle glfw input
nice size, they seem pretty balanced, very round 9/10
mine only has a masters in computer science 💀
are you stuck in the us of a
why
good old EU
because I couldn't care less about AI
real
and the only masters here is AI
there you can learn how to do advanced uml
I went to a gamedev college so fortunately 90% of my classes were relevant to things I'm interested in
imagine having pre-specialized masters
ah that's nice
my cousin went to a gamedev college
btw the "I'm broke" problem is just cause moving costs money
University costs 0€ (actually 160€ but they give it back if you are an exellent student
)
i ended up not going to cs because i was kinda predicting it was all going to be terrible java and c
now hes working for some game studio in berlin
bsc or ba
Bsc
I specifically avoided the art and game design departments lol
Yeah
yeah just make a good game bro
Plus the one at my school overworks students to hell
think university of breda or some other dutch uni had a gametech degree
take voxels
there's also digipen ofc.
but both of those are private-ish or fully private unis
so they are expensive (for european standards) 
I went to a school that is notorious for overworking students, but fortunately through the power of friendship I passed
the power of copying each others work?
are there schools that do not overwork students?
Overwork how?
I have a team of 2 other boys, we share basically everything 
You know, like schedule 8 exams in 3 weeks
Like it's happening to me right now
i share a lot of stuff within my friend group but we also have large wikis with material from previous years
I would like to graduate in 3 years though
old exams, solutions, notes, etc
certain classes that assign an absurdly high workload (particularly our project classes, where we're expected to pump out 1-2 complete games a year)
where are you again?
who, me
In Europe finishing STEM degrees in "Regelstudienzeit" (3 years, 6 semesters) is a meme
That is correct
@nimble solar I meant
I think nobody ever finished the degree in 3 years + 1 semester
Even so I want to believe 
I know some people who did but they either had previous working experience or already had some other degree or they were "super intelligent" so to speak
none of those represented an average student
Algebra is fine
is it really
math is the best part by far
i only have to take real analysis luckily
From all courses I've taken, the math heavy ones are the ones that sticked the most
bold of you to assume I'm average
||I'm actually below average||
But yeah, whoever came up with "6 semesters is enough for CS" probably did not study CS 
I somehow managed to get 36 credits in one semester, I did Calc 1,2 and Real analysis
btw calc 1 also includes algebra, geometry & stuff
im taking 36 each semester too this year
44% of students graduated within 4 years at my skool
Even weirder, I passed with nearly full marks on each of them 
abstract algebra
ah
i also have a whole 6 credit geometry class but thats really fun
I thought the easy algebra
projective geometry is kinda cool
you are making electron suffer

Oops

text rendering is hard
is the easy algebra just traditional maths
inshallah Arabic script will be rendered properly
and linear algebra
easy algebra is linear algebra ye
yeah we had linalg and quite a bit of abstract algebra
I wish I got into graphics before taking (and nearly failing) my linear algebra class
how the fuck does it even work if they're in separate html containers lmao
I would have cared so much more about my math classes
Given an epimorphism phi: R->F, R being a ring and F being a field, prove or disprove that the existence of phi implies that R must also be a field
stuff like that 

yes
that could definitely be an exam question
its kinda cool but the exam was just words words words
I wish to retroactively waste less time and be better in school early and be better in uni early 
true
Youth is wasted on the young frfr
homeomorphisms, endomorphism, monomorphism
This is actually very similar to an exam question I've had
Don't forget ismisms
gonna spend my summer studying algebra
i just really want to pass this geometry class
from now on it's only downhill 
imagine being 21 
if I don't die first, I am expected to graduate next year
emphasis on the "if I don't die first"
Third year is going to be absolutely brutal
objective: survive
I mean at the very least you don't have to look for work whilst studying
I assume
fortunately
welp time to head to uni to study, i require ac
my room is on the 4th floor its a death trap in here
ye we bikeshedded too much, it's time to do the boring study
wdym it's only 36°C or so in the middle of my room as example, perfect to die slowly

one human, cooked medium rare
At the very least it doesn't contain the same deranged statements from topology

Like what do you mean the power of the real numbers to the real numbers in a cartesian product?
I'm glad I never progressed to abstract math of any sort
linear algebra was already pushing it 
Honestly
I wanted to take this course
I think topology is very interesting
but I don't think I would pass this course any time
Because just looking at the script/notes looks like you need a maths degree to understand it in the first place
What the
(it's a maths undergrad course to be fair and I'm doing SWE which is 90% CS
)
What does that even mean
EXACTLY
I think
it is supposed to be a topological space
but I am not sure 
oh
So apparently it's the topological space of real valued functions
actualy not a topological space but apparently the set of real valued functions
but probably with some special property?
idk, looking into those 1000+ page "notes" without being able to search for that definition is a bit tricky 
Ngl you can swap those for AHashMap or FxHashMap
Much faster compared to the default STD one as long as you don't mind not having DOS protection iirc
Yeah I’ll do that eventually probably
Don't you love it when activating shadowmaps increases your frame timings from 4ms to 8.5ms

Never heard of it. I presume it's a method to reduce tiling?
If that's the case then I will definitely implement it when my exams are over
Yes
Hex tiling then rotate the uvs
Sweet yea I'll implement it
Unfortunately my terrain frag shader isn't really modular atm (just one frag file) so it's a bit of a pain to implement custom materials and such
Terrain, to remove texture repetition
how does hex tiling remove texture repititions
Surface Gradient Bump Mapping Samples is a collection of interactive tutorial samples demonstrating the concepts and workflow of Surface Gradient Bump Mapping for Shader Graph and HDRP.
⬇️ Download the sample pack: https://on.unity.com/3BwITyg
📝 Documentation: https://on.unity.com/3FO401O
I didn't really implement it yet
But here it is
There is also schotastic texturing
Here it is on gtasa
can you not do this same exact thing with a square grid
https://eheitzresearch.wordpress.com/722-2/ always good to look at the original algorithm as well
i guess the borders aren't straight
but still it feels unfair to compare basic UV tiling with this when you're calling it hex tiling
ah nvm the heitz paper has more
I think you could do this with a square grid
but then you would require an additional sample?
ye
so the hex tiling gives you properties that make it easier to blend random sub-sections from your surface
I'm already at 27 texture samples worst case scenario and 9 in best case scenario, I should probably optimize that before implementing hex tiling and making it worse lol
Exactly
Classic
And with triplanar mapping (which samples it 3 times already)
I ditched triplanar for that reason
I really should too lol
I could use something like biplanar
Seems like it doesn't have that many artifacts
sir penguin
how exactly is self.deferred_pool_delete.push(new_pool); safe?
The pool has no way of knowing whether it still has descriptor sets allocated from it does it?
In my case it should work? I think?
Because the pool is ref-counted, so when I swap it out with the new one, only the descriptor sets previously allocated hold a reference to the pool
So eventually, after enough frames pass, the cache releases all descriptor sets with the old pool, deleting the thing safely
its safe because the lifetime of the descriptors in the deferred queue is shorter than that of the pool delete queue
so the descriptors get deleted first
I see
while is_open {
set = device.make_set() // this grows the pool, all previous sets are unreachable, TTL: N
// N frames pass, descriptor sets are freed
// N + 2 frames pass, the descriptor pool is freed
}```
makes sense I think
Something like that yeah
By the way
pub fn with_descriptor_set<F: FnOnce(&DescriptorSet) -> Result<()>>(
&self,
bindings: DescriptorSetBinding,
f: F,
) -> Result<()>```
There's no way this isn't a syntax error, is there?

This is harder to read than C++ wtf 
Oh wait, I got it
jeez, < and > were a mistake
Nope all good 
Oh yeah the reason that’s a thing at all is because you can’t return something that references a locked mutex owned by your struct
Even if you wanted you can’t make that safe sadly
You gotta love Type 0 languages, where Result<()>> somehow is a valid sequence 

What do you mean by you can't make it safe?
If you don’t return the lock it’s obviously not safe
If you return the lock + value referencing it you get a self referencing type which is a nightmare in rust and generally not possible
(You can’t move them)
(Which means you can’t return them either)
It is
The solution is to just pass a callback that does something with the value behind the lock
Yea unfortunately 😔
@young oar #wip message
fyi good materials are a large part of making terrains look especially good
i dont mean good assets even necessarily
just height + slope based with good noises
I am back with more questions
When does DescriptorSet::create fail?
VK_ERROR_OUT_OF_POOL_MEMORY?
it could yeah
i try to catch OOM before allocating though
but it could also fail due to device lost or other random bugs/errors
so I tend to propagate that result upwards
github search is garbage, I can't seem to find your OOM detection
just clone the repo at this point :P
much easier to navigate in intellij
I don't really understand how descriptor pools work tbh
in vulkan in general or in phobos
Allocating a descriptor set with a descriptor layout means reserving pool memory for all descriptors in the layout?
only for that set, not the whole layout
a descriptor set is just a blob of memory
descriptor pools are an abstraction for an allocator for that memory
So does vkUpdateDescriptorSet reserve memory
no
vkAllocateDescriptorSets takes memory from the descriptor pool
vkUpdateDescriptorSet just writes to it
Hm
The spec says this:
the allocation may fail due to lack of space if the call to vkAllocateDescriptorSets would cause the number of any given descriptor type to exceed the sum of all the descriptorCount members of each element of VkDescriptorPoolCreateInfo::pPoolSizes with a type equal to that type.
How does vkAllocateDescriptorSets know how many descriptors I'm going to be binding
you give it the set layout
the set layout describes how many descriptors can possibly be inside the descriptor set
Hm
Does this go boom?
Actually scratch that
I think this should work
auto set = device.allocate_set();
auto new_sizes = hash_map();
if !set { // OOM
for each binding in bindings {
for each size in device.pool().sizes() {
if binding.type == size.type {
new_sizes[size.type] = std::max(size.count * 2, size.count + binding.count);
}
}
}
}```?
thats pretty much what I do yeah
execpt I dont bother with max, I just multiply by 2 and retry if it fails again 
max would probably be smarter
i think thats pretty much grow_pool_size
yk you could also switch to rust and use phobos and not have to figure this out 
After I get tired of writing my own thing who knows
If this was in C++ you might've had a better chance
Yea right
I haven't implemented a "post-process" step for my voxel generator yet so it can't switch materials based on normals yet
I'll have to implement my CPU graph representation and an interpreter that will convert it to GLSL to be able to have custom voxel "passes"
Penguin
I was going through your C++ handles
How do you handle invalidating them?
Ohh none
ig you have it so it manages itself and you don't have a need for a HandleManager
Also within your phobos-rs code
I'm so confused
How are you able to create Result<Type> without specifying the Error type?
Ohh looks like pengiun is using a library anyhow which overrides Result
I'm confused what it does? ?
It looks like an equivalent of Box<dyn Error>
anyhow aliases result to Result<T, anyhow::Error>
Yeah thats a fancy Box<dyn Error>
Ill eventually phase it out for phobos::Error, Im just lazy

I use thiserror
Alright thank you
It helps so much for creating custom Error types
But why not use Box<dyn Error> instead?
anyhow has more fancy utilities
like anyhow!("Some formatted error {}", i);
or ensure!(x <= y, "fuck it we ball {}", x);
Ooh that is pretty convenient yea
Unfortunately when unwrapping Result<_, T> where T: Error implemented from thiserror it doesn't return the custom error message
Which sucks
Ohhh anyhow provides debug and traceback formatting
that makes sense
Me when lib.rs declares all the methods at a global level and I have no clue where they come from 
Its very unfortunate that both phobos::Window and winit::Window exist
imagine trying to have safe C++ code 
Safest C++ code
or am i gonna have to do a very dumb down implemenrtation
lmfao
of course not 
std:: expected
only jaker can write safe c++
No one implements std::expected, it's C++23
oh 
You can implement your own. That's the beauty of see pee pee
i see see
I mean
see sharp
Id argue a good standard library impl is better than dozens of result types from different libraries incompatible with each other 
Just use asserts and use out params + enum return type
real i'm trying to do both my c++ ray tracer and the rust ray tracer at the same time
One i feel pain and the other im confused
the easiest way
the confusion will fade
clarity of mind will be achieved
enlightenment is within reach now
Coping that i do attain it
and has a million problems

I agree, but do not have rust in C++
alr alr ill scrap my bare bones result class i had
time to rewrite it again 
I mean try it
I did write a couple std::expected's
I never enjoyed how it worked, because C++ is garbage
It's so good
You can't really do anything rust does with errors
The annoying part is you need some sort of language support to have rust's try operator (?)
ya i just want the bare bones of it
i literally just wanted a way to know if something worked or failed and some methods that could handle it nicely like .expect or .unwrap
Safety is 
oh yeah i did overengineer it
i mean just a struct with a template of a type and an error type
What is futures
ahh so many crates
hehe




