#Rosy

1 messages · Page 3 of 1

cloud rivet
#

I really have to go to bed lol

#

gn

astral hinge
#

🇬🇳

#

ye that's mega ub

#

unless you have multiple copies of the data in mapped memory and cycle through them

#

you could try putting vkDeviceWaitIdle at the end of the frame

#

or lowering fif to 1

brisk dagger
#

Nice choice of soundtrack, I approve

wraith urchin
#

glorious

cloud rivet
#

I will add the normal map support after I fix the ub

#

It also has transparent textures so I should make sure that is working

wraith urchin
#

We've all been waiting for sponza, glad to finally see it. You're waay ahead of lots of other people here lol

cloud rivet
#

I was so close to trying it out I couldn’t go to bed lol. That was a late bedtime for a worknight

wraith urchin
#

happens to me all the time lol

cloud rivet
#

So I think I will create a permanent staging buffer for buffers that update frequently and once per frame blit them bounded by a memory write read barrier

#

I bet that fixes this

#

Hrm

#

Yeah its the gpu side that needs to be fixed so don’t have to worry about a slow fence

#

And then just directly write to the staging buffers instead

dry apex
#

nice. i thought you had shadows tho

cloud rivet
dry apex
#

rip 💀

cloud rivet
#

I can add them back

dry apex
#

shadow mapping were a nightmare for me

cloud rivet
#

Yeah same

#

I will try and use local attachments this time

dry apex
#

what's that

cloud rivet
# dry apex what's that

It’s a newer KHR extension that gives dynamic rendering subpass like functionality that you get with a RenderPass, basically you get a way to create barriers during rendering is what I think it does

dry apex
#

interesting. thanks

cloud rivet
#

np, previously I had to stop rendering between shadowpass and render pass I think I won’t have to with this

cloud rivet
#

I want to add drag and drop for for my .rsy format files so I can just drag them in and it reloads the level

#

with that file's contents

true moon
#

Oh no

cloud rivet
#

should be easy?

#

it's just a hard coded string right now

#

I just detect the string on drag, via sdl?

#

and then load it?

#

just as I am now, I need to clean up the current level's stuff I don't think that's hard

true moon
#

Ah ok if you already have the rest working it's probably not that hard it just smelled like major bikeshed

cloud rivet
#

no no I already have all the rest of it working

#

this will make my dev loop fast too when I work on assets

#

just drag them in

#

maybe drag them in as new objects as part of the current scene vs reloading the whole scene

hushed creek
#

does sdl have drag & drop support?

cloud rivet
#

idk I hope so

#

rsy files are much smaller than gltf + bin

#

not even compressed yet

#

just a subset of gltf stuff though

hushed creek
#

it seems it does have drag & drop file support 😮

#

that's cool

brisk chasm
#

oh god, that yt username

cloud rivet
#

do you not like this youtuber

brisk chasm
#

nah, its not about them, its about a person who kept ignoring any advise/response when asking very trivial things in #opengl and they kept asking non opengl questions there as well : >

#

one of the 5 people on the ultimate black list

#

absolute help vampire

steady venture
#

On the subject of VS2022

#

Nice addition

#

Although not exactly rocket science so why wait until 2022 frog_think

brisk chasm
#

i hate parameter hints

steady venture
#

Intellisense is definitely faster but there are still some cases where it flat out refuses to work

#

Another reason to abandon templates in c++ I guess

steady venture
#

It (unsurprisingly) slows down the text editor when it is open

#

So I use it off and occasionally toggle it on/off

brisk chasm
#

ah thats new to me

#

good to know

astral hinge
#

I always accidentally enable the hints by double tapping ctrl while using other shortcuts

steady venture
#

Count on me to waste time in VS settings to get to know what's new instead of you know, actually coding

astral hinge
#

Kinda annoying that e.g. pressing the save shortcut twice will also enable inlay hints

steady venture
steady venture
#

It's really annoying to accidentally toggle it

astral hinge
#

Ah well I'm okay with the shortcut being ctrl, I'm just slightly annoyed that it can be accidentally toggled while using other shortcuts

steady venture
#

Just for reference for anyone searching for it

steady venture
#

Appearantly alt + f1 also works

#

Of course it is assigned to nvidia's overlay mumbo jumbo (it takes a screenshot)

#

Anyway enough mumbling sorry

cloud rivet
#

I don't like inlay either

#

it takes up so much space and makes selecting text harder

#

I haven't disabled it yet

steady venture
#

I've disabled nvidia screenshot shortcut (because why would I use Nvidia for this?)

#

alt f1 works nice

#

Time to uncheck that "press ctrl twice to toggle" checkbox

astral hinge
#

Yeah I should do the same

cloud rivet
#

alt f1 doesn't do anything for me

#

I think?

steady venture
#

It should toggle the inlay

cloud rivet
#

wait it opens up windows help in edge

steady venture
#

on/off

#

Whaaat

cloud rivet
#

I have resharper C++ installed it changed all my visual studio key board shortcuts

#

maybe that's windows key + f1

steady venture
#

Is resharper worth its cost?

cloud rivet
#

I am sure my project would be way worse without it

#

like much much worse

#

but I am new to C++

#

resharper has saved me from being ignorant

#

I also have warnings as errors and W4 enabled

astral hinge
#

I think there's a free trial

#

Yeah the linter is great

cloud rivet
#

yeah I just have max linter level and warnings enabled

astral hinge
#

I use the refactoring stuff too

cloud rivet
#

I don't have all warnings because it breaks all my dependencies

brisk chasm
#

you can hide that, by telling CMake to do some SYSTEM thing rather PUBLIC or PRIVATE iirc

cloud rivet
#

yeah, but also the stuff in all aren't really all that great tbh

brisk chasm
#

that just F1 btw, the help key

#

always has been since windows 1.0

steady venture
#

Unfortunately yeah

cloud rivet
#

never want that

#

idk who wants that

brisk chasm
#

why not

#

its the perfect key to ask for help

steady venture
#

get banned by deccer speedrun

cloud rivet
#

oh yes remap F1 to microsoft's chat gpt or whatever

#

nice

#

get the kind of help that will just make everything worse

steady venture
#

Still better than launching bing

cloud rivet
#

the only ai I am still using is coderabbitai PR reviews in github because it actually saves me from horrible dumb things I missed

#

I canceled my anthropic and all the other things

#

I disabled all the ai tools in editors first thing

#

it literally just points out that I used the wrong value for sizeof because I copy pasted

#

etc

#

I do not use it for anything that requires thinking about

steady venture
#

I use chatgpt as a quick google from time to time

#

Ask for sources on a topic etc.

cloud rivet
#

how's that working out for you

steady venture
#

It's a good "gatherer" I think

cloud rivet
#

I don't think it's good at anything personally

steady venture
#

But ask it a genuine question and you might as well ask the plant in your room

cloud rivet
#

anything I can ask chatgpt that it could help me with I can figure out without it and then I don't have to worry about it being a hallucination

steady venture
#

True

#

I tend to limit my questions to "what are some papers on blablabla"

cloud rivet
#

cpp reference and the vulkan spec froge_love

#

microsoft docs are also ok

steady venture
#

msdn is the best imo

cloud rivet
#

I don't think msdn is a thing anymore

#

I think it's been microsoft learn for like a decade now or so :D

#

idk maybe I am wrong

steady venture
#

Sounds about right

#

I last studied directx a decade ago

cloud rivet
#

2016 it looks like and finally fully shut down in 2020

#

I haven't heard or read "msdn" in forever, I was like woah

steady venture
#

Now I feel old 😅

wraith urchin
cloud rivet
#

no, I don't really like learning from videos

#

with video/graphics programming sometimes it's nice because the video format works for 3D stuff

#

I need to be able to skim text

#

I can't sit through someone talking about something

wraith urchin
#

I like the talks if there isn't a ton of code on screen, like short snippets work. But I absolutely can't stand videos where somebody is going over a ton of code, I need actual text for that

cloud rivet
#

there's a vulkan sync video I should watch everyone links to

#

been avoiding it

steady venture
cloud rivet
#

I feel like I mostly get vk sync at this point, the thing that's not clear to me 100% is when things don't have a dependency on a pipeline barrier they just act like it's not there is a bit of a headspin thing I don't fully get yet, like you put a barrier to split cmds into before and after but it's specific to specific stages and if I think your src stage is unrelated to the barrier it's just ignored

cloud rivet
#

I'm going to watch them all I guess

#

at some point

cloud rivet
#

I am not rendering the pots and plants at all I think

#

I think I am not pulling something out of the gltf that's causing that

#

that's another issue

#

oh wait I am pulling them out nm

#

looks great KEKW

#

ok ok I'm going to start with the sync issue

#

perfection chefkiss

#

yup yup, nailed it

#

I gotta get it looking more like it does in blender

#

alright alright sync issue

#

interesting there's no layer validation message for whatever I'm doing wrong

wraith urchin
#

in gltf

cloud rivet
#

oh I don't look at that, nice I will check for it thank you, was going to look at the spec about transparency/blending mode

#

I got 9 days before game play so let's see how many of these issues I can knock out, idk, I have more issues than days

wraith urchin
#

I think its set to "alphaMode":"MASK" for those bits

cloud rivet
#

I like looking at the plain gltf json in vs code

#

I will examine it also

wraith urchin
cloud rivet
#

yes, also the normal mapping

wraith urchin
#

Also what lighting model is this?

cloud rivet
#

in blender?

wraith urchin
#

looks like just ndotl?

#

no in Rosy

cloud rivet
#

oh mine?

#

it's like blinn phong without any diffuse/specular

#

I did pull that out of the PBR for gltf

#

just not using it yet

#

the shader has that info

wraith urchin
#

Ah yeah, you should try ggx or something like that, it will look more like blender

cloud rivet
#

ggx?

wraith urchin
#

also the gltf uses roughness instead of specular, which phong uses

cloud rivet
#

yes

wraith urchin
#

GGX uses roughness

cloud rivet
#

I have never heard of ggx

#

I will look into my books

#

I am sure they have it

wraith urchin
#

Its one of the more common BRDFs

cloud rivet
#

thank you

wraith urchin
#

I would show you my shader but its an absolute fucking mess

#
float ggx(float NdotH, float a2)
{
    float denom = (NdotH * NdotH * (a2 - 1.0) + 1.0);
    return a2 / (PI * denom * denom);
}

vec3 schlick(vec3 F0, float VdotH)
{
    return F0 + (vec3(1.0) - F0) * pow(1.0 - VdotH, 5.0);
}```

the important bit ![KEKW](https://cdn.discordapp.com/emojis/666849321462792234.webp?size=128 "KEKW")
#

actually is not that bad

vec3 lighting_ggx(vec3 l_color, vec3 F0, vec3 light, vec3 eye, vec3 normal, vec3 albedo, float metallic, float alpha, float alpha2, float k2, float attenuation)
{
    vec3 halfvec = normalize(light + eye);
    float LdotH = saturate(dot(light, halfvec));
    float NdotH = saturate(dot(normal, halfvec));
    float NdotL = saturate(dot(normal, light));

    float D = ggx(NdotH, alpha2);
    vec3 F = schlick(F0, LdotH);

    float V = 1.0 / (LdotH * LdotH * (1.0 - k2) + k2);

    vec3 specular = F * (NdotL * D * V);

    vec3 kd = (vec3(1.0) - F) * (1.0 - metallic);

    return (attenuation * NdotL) * l_color * (kd * albedo + specular);
}```
cloud rivet
#

oh thank you!

wraith urchin
#

and alpha, alpha2 and k2 are just

float alpha     = roughness * roughness;
float alpha2    = alpha * alpha;

float k = 0.5 * alpha;
float k2 = k * k;```
#

and vec3 F0 = mix(vec3(0.04), albedo, metal);

cloud rivet
cloud rivet
wraith urchin
#

haha alpha is not alpha lol

#

mathematicians like to reuse greek letters

astral hinge
#

it's just some greek letter that a nerd chose to use

#

friggin nerds

wraith urchin
#

I'm gonna guess glsl won't support unicode variable names α

cloud rivet
#

I don't want to use the wait idle, I want to try a staging buffer that I map to and then a blit in the rendering

#

the wait idle feels really jank moving around

cloud rivet
wraith urchin
#

what do you mean by feels jank?

wraith urchin
cloud rivet
#

it's like the opengl glFinish

#

probably not something to call every frame?

#

idk, I want to try the staging buffer idea

#

the scene buffer is really small

#

I feel like I can blit that fast like

#

I'm going to look at what frogfood does for camera actually lol

astral hinge
#

oh

cloud rivet
#

found it

#

Uniforms

astral hinge
#

what I linked is my New™️ way of doing it

cloud rivet
#

I am looking at ForwardRenderer

#

oh

astral hinge
#

the most important difference is that I don't use lookAt anymore hehe

cloud rivet
#

in the old way you're using a pipeline barrier, but then just doing what I am doing

#

directly memcpy

#

hrm

#

looking at your new stuff

astral hinge
#

oh I just remembered a simple thing you can do

#

vkCmdUpdateBuffer, then barrier

#

it works even without n-buffering since the data stays in the logical command buffer until the command executes

cloud rivet
#

right

#

that's what I was thinking

#

something to do as part of recording the command buffer

#

I didn't know if it was going to be blit or what

astral hinge
#

under the hood the driver probably has an arena that it allocates from when you call that function

cloud rivet
#

a pipelinebarrier is way better than a wait for device to be idle right

astral hinge
#

one syncs the device with itself and the other syncs the device and the host

cloud rivet
#

I was thinking a staging buffer would be nice because then the copy is all on the device

astral hinge
#

if the host and device overlap in execution (which it does if you're trying to maximize throughput like most apps) then vkDeviceWaitIdle will be bad for perf

cloud rivet
#

I think that's how staging works right, you copy to staging, staging goes to device, then staging copies to actual used buffer on device

#

but maybe that's too many steps

#

I'm going to look at vkCmdUpdateBuffer

#

I have only done image layout transition pipeline barriers so far, so this is new concepts for me

astral hinge
#

staging buffers are usually used as a "holding space" for data that can't immediately be copied to the device to prevent a data race, but they're also used for image updates because you can't upload pixels to an image directly from the host (unless you have that one new extension)

cloud rivet
#

dataSize must be less than or equal to 65536 bytes and the size must be a multiple of 4 for vkCmdUpdateBuffer hrmm

#

I think I'm way under

#

and of course it's a multiple of 4

astral hinge
#

yeah for your camera data you should be fine

#

validation will let you know otherwise

cloud rivet
#

I love VVL

#

although I wish it would have messaged me on the map stuff, but how would it know I guess

astral hinge
#

yeah

cloud rivet
#

it's like via vma

astral hinge
#

I think it is possible to intercept mapped writes though

#

somehow renderdoc can see them

cloud rivet
#

maybe they turn memcpy into a macro

#

well not renderdoc

#

but SDL turns things into macros, like the main function

astral hinge
#

it works with already compiled programs though

cloud rivet
#

yeah

#

I said a silly thing, was just thinking of how one could maybe do it, but obviously renderdoc isn't compiling my program heh

#

oh there's a vkCmdCopyBuffer2

#

that's a buffer to buffer update

#

I will just try vkCmdUpdateBuffer

#

which is totally different

#

I have a barrier right after I begin recording, I think if I update there I don't need another barrier? thinkeyes

#

I think this will work, trying it

#

if not maybe I learn something

#

that works!

#

had had a layer message saying I need to mark the usage as VK_BUFFER_USAGE_TRANSFER_DST_BIT

#

but that was easy

#

let's see the perf impact

#

there's a barrier right after

#

anyway idk why I am narrating, just fun to work on a sync issue

#

I guess I'll add CSM back next

astral hinge
#

then VSM

cloud rivet
#

yes then VSM

#

wow this review bot verified that I put the update before a barrier

#

it even verified the stage

#

this bot has saved me from so much heartache and saved me so much time by catching dumb bugs

#

it also makes my repo look super active KEKW

#

I'm going to play some ASO before I start on CSM tbh

cloud rivet
#

played some ASO

#

time for some CSM

cloud rivet
#

I did not have time for CSM as because past me was a real dummy and hard coded the swapchain image count I gave to imgui to 2 images in the past and then in the more recent past increased my swap chain image count to 3, didn't use imgui much and any interaction with imgui spewed error messages and lost the instance

#

I didn't interact with the ui at all while working on gltf so I didn't know it would do that, but I wanted to add ui for my csm and just everything blew up

#

git bisect helped me track it down

#

having only commits that build is so key

#

I literally had a commit where I only increased the swap chain count and that's how I figured it out

#

because I could not tell from the error that the swapchain frames imgui had were a different number than what my renderer had

#

and of course

#

I should never have hard coded those values facepalm

#

fixed now though

#

RIP 2 hours though

cloud rivet
#

I want to add plot lines for frametime and triangles drawn etc

#

the triangles drawn plotline should be interesting once I have culling

wraith urchin
#

CSM time?

cloud rivet
#

well I am building some UI so I can see the shadow maps in the UI to debug

#

I am already setting up the shadow app depth images to render into

#

so I need to use that new vk extension so I can do the CSM in one rendering

#

and add a memory barrier to change the attachements

#

and I need to write the code to create the light matrix

#

and my brain needs to see what the light sees

#

so some camera work so I can see from the position of the light using the ortho projection

#

and I need to write the code so the light stays in the game's camera frustum

cloud rivet
#

it's a lot and it's not easy for my brain

#

my brain hates ortho perspective matrices, it's a simple box, but it's still mind bending

#

the complexity is where the light is actually looking from being correct for where the user is looking, from the angle of the light

#

which is basically half a sphere

#

all the other stuff I feel good about, sampling, doing the actual depth pass, etc

#

it's just that dumb camera being in the right place at the right angle

hushed creek
#

you'll figure it out

#

copy paste some code from some tutorial when in doubt

cloud rivet
#

I don't think that works

#

the C4 engine's CSM is incredible and I wish I could build that but I cannot, not yet. I see the code, I have the book with the math, but I'm not there yet

#

everyone's math is different in some way, whether it's the coordinate system - left handed/right handed, which coordinate is up etc, the matrix math or storage, their perspective matrix set up (is the horizontal or vertical aspect ratio constrained, is it infinite depth, is it reverse z, etc) how is their light matrix configured, what kind of lighting, how are they rendrering it, is it multiview, is it multi pass, etc etc, it's just a complex subject and you can't copy and paste some tutorial unless you're doing everything exactly the same, and I bet even then there's complexity

#

basically you have to understand the math at a fundamental level

#

or at least I have to

#

the light matrix has to be looking at what the player is looking at while staying at the same angle, so if the light is shining from the west at sunset and the player turns around it's not like the shadow perspective is just a box that rotates the way the player rotates, the box's rotation is dictated by the light's view, but the player rotates so you have move that box without rotating it so that it is casting shadows on the viewers view. The cheap way is to just center on the player, and then there's all that wasted space behind them that they cannot see, the better way is rebuild that box from the user's view frustum, that's what the C4 engine does and the math is too complex for me to get right atm

#

I can't simply center the light on the center of my camera frustum because it's huge

#

anyway it is kind of simple, but somehow not very simple for me when I write the code

#

the LOGL CSM tutorial builds something from the view frustum but it is hand wavy and assums opengl coordinate systems and the actual code doesn't really match the tutorial iirc and I don't like how they do it anyway

#

the C4 CSM layers only overlap a tiny bit, the LOGL is just fully overlaps iirc

wraith urchin
#

Are we talking about a pure directional light?

#

The cascade matrix is often not aligned to game camera, as this would result in severe shimmering

#

In ASO the cascades are positioned along a line coming from the game camera

#

Have you looked at MJP's shadow sampler?

#

It's dx11 but all the math is the same

cloud rivet
#

Lengyel's math goes into a lot of detail for stable shadows

#

so it doesn't shimmer, it is built based on the camera and the light matrix

wraith urchin
#

My shadows didn't shimmer, then I introduced day/night cycles bleakekw

cloud rivet
#

how do yours cascade?

#

Like this?

#

^^ this is followed by 4 pages of math to make it stable

wraith urchin
#

I do 4 cascades, with a "stabilized" sphere fit

cloud rivet
#

does yours cascade by overlapping in that way from the picture?

wraith urchin
#

My cascades are perfectly stable under camera movement but under light movement they are not

wraith urchin
cloud rivet
#

I haven't made Lengyel's solution work for me yet

#

because I need to like do the math with pen or paper or something

#

to understand it

#

and haven't done that yet

#

his code is different from his book also, as in his code does extra stuff not explained in the book

wraith urchin
#

Then again my view distance is way further than yours will be, so it's possible you just won't have shimmer

#

Since you are doing top down ish

cloud rivet
#

yeah idk just trying to have anything atm

wraith urchin
#

You will have much less perspective aliasing

#

MJPs thing has a bunch of different algorithms implemented so you can try them all out and look at the code

wraith urchin
cloud rivet
#

It’s 2 books

#

Eventually 4

#

There’s no digital version

#

fwiw I already have a working CSM that I had last go around I can just plop in, I'm trying to do it a little better

#

I will look at MJP's stuff thank you

wraith urchin
#

MJP's thing is cool because it allows you to compare different techniques

#

also hes a fellow frog

cloud rivet
#

I'm starting to think that apis like SDL GPU will never replace OpenGL because OpenGL is implemented by the drivers and based on reading the vulkan proposals and reading about the history of OpenGL drivers the hardware vendors went out of their way for many years to build drivers such that their OpenGL implementation would do the very hard work of making sure AAA games performed well, probably by working directly with the studios themselves.

Things like SDL GPU may be bringing modern designed APIs but are they bringing in the same performance minded work? The idea of vulkan seems to be to free the hardware vendors from having to contort themselves from writing complex implementations that predict the best performance possible per game and give the tools for game developers to do that themselves because they best know what their game needs.

A library like SDL GPU may not be providing you with the optimizations that OpenGL drivers provided nor the tools to optimize your own application so it ends up being the worst of both options.

But for a hobby small game project probably fine though.

Idk just rambling thoughts

steady venture
cloud rivet
#

yes

#

absolutely

#

the book comes with a tiny bit of code, but the real code that Lengyel has actually written costs $100 to license https://c4engine.com/

#

I licensed it

#

it's great

#

and it it puts the work he put into the book to use

#

in fact in his engine he has comments pointing to chapters in his books

#

to explain the code

#

and the math

#

it is beautiful C++ imo

#

there's no cruft, no bullshit, it's like ivory tower C++

#

the man is from outer space or something

steady venture
#

I read "Mathematics for 3D Game Programming and Computer Graphics" a decade ago or something, alongside studying Direct3D11

#

It was a good book

cloud rivet
#

that book is also excellent

#

you can think of the foundation math book as an abridged version of that book

#

the 3DGPCG book refers to outdated graphics apis

#

like it assumes a -1 to 1 z depth and fixed functions

#

the rendering book adds lots of new things and goes into detail explaining things

#

I don't think anything replaces 3DGPCG

#

it's still the best reference to graphics math that I know of

#

the perspective/frustum math won't work anymore as written is all

true moon
#

How have I never heard of this

#

I wonder how usable the engine is for real commercial projects

#

As an alternative to Godot or whatever

#

The screenshots look neat

cloud rivet
#

it's kind of dated graphics technique

#

is the consensus on GP discord

true moon
#

In terms of renderer arch?

cloud rivet
#

but it is licensed by real studios

#

I am not really skilled enough to explain why it is dated, it is just what people have said

#

like that's cybereality's take he has also licensed the code

#

Lengyel is like the math consultant that studios hire when they have a math problem

#

so the math in that book and the engine is basically top tier

#

ok first step to CSM is adopting VK_KHR_dynamic_rendering_local_read

#

I'm going to do that before I add the shadow pass

#

This extension enables reads from attachments and resources written by previous fragment shaders within a dynamic render pass.

#

that's exactly what I want

#

If the dynamicRenderingLocalReads feature is enabled, pipeline barriers are now allowed within dynamic rendering if they include VK_DEPENDENCY_BY_REGION_BIT, and source and destination stages are all framebuffer-space stages.

#

nice

#

When such a pipeline barrier is provided, any resources specified (or all if a memory barrier is used) can be read by a subsequent fragment shader in the same render pass if they were written to by any overlapping fragment location (x,y,layer/view,sample)

#

These pipeline barriers cannot perform layout transitions or queue family transfers.

Reading data outside of values written by a previous fragment shader has undefined behavior.

#

hrm

#

Images used for this purpose must be in either the VK_IMAGE_LAYOUT_GENERAL layout, or a new dedicated layout: VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR

#

oh maybe slang doesn't support this

#

[[vk::input_attachment_index(i)]]
Same as input_attachment_index layout qualifier in Vulkan. It selects which subpass input is being read from. It is valid only when used on subpassInput type uniform variables.

#

hrmmmm

cloud rivet
#

DRLR additionally includes a mapping of attachments to InputAttachmentIndex decorations in the shader. For depth/stencil, the shader is no longer required to specify this decoration at all, in which case the corresponding API (VkRenderingInputAttachmentIndexInfoKHR) would also specify nullptr for the mapping.

#

ohhh

#

This extension enables reads from attachments and resources written by previous fragment shaders within a dynamic render pass.

#

This extension enables reads from attachments and resources written by previous fragment shaders within a dynamic render pass.

#

** by previous fragment shaders**

#

fml

#

womp womp

cloud rivet
#

I love debug group coloring in render doc

#

pretty cool in nsight too

#

well I got the csm images, samplers image views and descriptors all set up, I need to set up the perspective and change the actual camera to that so I can see what it looks like, and then once I feel good about that I can start a shadow pass, once I feel good about that I can sample the CSM

#

probably end of weekend I hope

#

I will be done with this

astral hinge
#

then the engine will finally be complete, inshallah

cloud rivet
#

I'm worried about the perf impact of drawing a sponza 4 times, once per cascade, once for render

#

I will probably need to start culling

#

honestly I don't think my game needs a CSM at the distance my camera will be at, just like one SM

steady venture
cloud rivet
cloud rivet
#

from the vulkan spec:

Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this Specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy and completeness, timeliness and reliability.

Khronos is emphasizing here that the Vulkan spec is neither reliable, useful, correct or accurate KEKW

brisk dagger
cloud rivet
#

This Specification contains substantially unmodified functionality from, and is a successor to, Khronos specifications including OpenGL, OpenGL ES and OpenCL.

The spec states it is OpenGL' s successor, heh

brisk chasm
#

reminds me of this funny thing #vulkan message

cloud rivet
#

that's such a weird thing

brisk chasm
#

hehe

#

to keep the vulkan community on their toes

cloud rivet
#

I just need like a way to manipulate my light before I can even work on CSM. More UI work

#

hrm

#

those should all bein tables

cloud rivet
#

ok my renderer can now write to modifiable level state, just a shared pointer that the renderer is allowed to write to via ui arguments

#

ok so next I need a light debug visualization

astral hinge
#

I can't see the difference even though it says light direction hehe

cloud rivet
#

oh

#

it's unused

#

what you can see is that it is able to maintain the state that's being modified

#

like my renderer couldn't previously change any state at all inside the application

#

but the ui obviously needs to be able to change state

#

so I am passing in a struct of data the ui can modify as a pointer

astral hinge
#

I pass a World& to my renderer and it can modify it to its hearts content froge_love

#

(that's the whole game state)

cloud rivet
#

what kind of stuff does the renderer change?

astral hinge
#

nothing lol, it just reads

cloud rivet
#

right

astral hinge
#

but the UI part of the renderer does change stuff

cloud rivet
#

yeah idk I am dumb and will cause horrible bugs if I do that

astral hinge
#

I think you're more principled

cloud rivet
#

I am traumatized is what I am

astral hinge
#

I'm only doing it my way because I'm relatively inexperienced and don't know of a better way

#

So big mutable state passing it is

#

It's a step above simple globals

cloud rivet
#

I don't really know what I'm doing myself

astral hinge
#

You'll find out in due time whether it was a good idea

cloud rivet
#

well if it was it will be a first

#

so my current light is actually super dumb right now. last go around changing my light was terrible. My plan this time around is to actually simulate an orbit around an origin. And so I'll have spherical coordinates around a unit sphere, but then also distance to control the CSM's light position

#

so the light is at origin + light position (after converting spherical coordinates + radius of the sphere)

#

so the light's direction should be origin - light position.xyz ?

#

I think that's right

astral hinge
#

It's up to you

cloud rivet
#

well I want to have something I can look at and go ok I know what's happening

astral hinge
#

I always have to flip a vector somewhere regardless of which direction the light is pointing

cloud rivet
#

same KEKW

astral hinge
#

Not because I don't know what's happening, but because that's just how it be

cloud rivet
#

I wish I were smart

astral hinge
#

If you make the light point at the earth, you gotta flip the direction before doing lighting calculations (otherwise the dot products will return <0)

cloud rivet
#

yah

astral hinge
cloud rivet
#

so there's the actual light, and then there' where that dumb CSM camera needs to be

astral hinge
#

yeah that sucks

cloud rivet
#

and so that's what I'm trying to solve

#

I'm gonna draw two debug circles to simulate the lights position

#

and that should be where that dumb camera I hate goes

#

and then once I have that visualization and it is behaving as I want

#

then I will add UI to toggle my camera to that dumb camera

#

and it will use an ortho projection

#

and I can see what the shadow pass will render

#

and then I can start using it to generate a shadow map

#

and then I can sample

astral hinge
#

In mine I drew some debug lines in world space to represent the frustums of the csm (actually vsm) cameras

cloud rivet
#

and all is well

#

of course when I say CSM I also mean VSM, I thought that was understood

#

jk

#

do you actually use a VSM?

#

I see your shadows they have such a nice PCF going on

astral hinge
#

not in my voxel thing

#

the lighting is pure rt in that

cloud rivet
#

how you debug in renderdoc thinkeyes

astral hinge
#

but in my model viewer (same repo) there is vsm

cloud rivet
#

oh nice, well you published an article on VSM so that makes sense

astral hinge
cloud rivet
#

looks nice

#

idk

#

mine don't look like that

astral hinge
#

yeah the shadows are "actually" perfectly sharp when you get up close to them or disable the denoiser hehe

cloud rivet
#

you use an AMD RT debugger?

#

how do you debug RT

astral hinge
#

I use RenderDoc

#

I'm not using Vulkan RT

#

Remember, it's a simple voxel DDA traversal in a compute shader

cloud rivet
#

oh I didn't know

astral hinge
#

Oh I must've told someone else

cloud rivet
#

so no opaque accelleration structure or whatever

astral hinge
#

Yeah, I'm using a custom acceleration structure of my own design

#

(it's a two-level grid of grids)

cloud rivet
#

I was reading the comments from people on the vk discord upset about RT debuggability and then devsh also went at it today in #vulkan

astral hinge
#

yeah

#

Nsight supports debugging rt

#

And it works with AMD

cloud rivet
#

nice

astral hinge
#

Only the profiler doesn't work

cloud rivet
#

I think there's a non-zero chance I'll have CSM by end of the weekend

#

since I already had it working once

astral hinge
#

I'll try not to lead you down any rabbit holes in the meantime

cloud rivet
#

:P

cloud rivet
#

I am weird

#

my debug lines got shredded by people last go around so I'm probably overthinking it as a reaction but I think I got something that works

astral hinge
#

why is it graphics?

cloud rivet
#

that's the file it's in

astral hinge
#

pretty sure even nasa doesn't use that many digits of pi lol

cloud rivet
#

it's just the width of the float

#

precision

#

width is a dumb word there

#

idk

#

I'll just call it pi wtf

#

alright this time my debug lines aren't just debug lines they are also circles and crosses, I am filling up a buffer with the vertices for one line, one cross, one circle with 100 segments, and then I have a vector of debug objects and I iterate over them in render time and the debug objects indicate what type they are, circle vs line, a transform, a color and the transform, color and bda go in a push constant for each draw, the bda is offset by the number of vertices for that debug types that precede it and then I am just doing non-instant draws with number of vertices for that debug type

#

I found to be sending literal worldspace line vertices last go around to be terrible

#

I'm not using instanced draws because I want to disable enable individual debug objects and I don't want to update a variable sized buffer storage

#

so I just manage that vector of debug objects per frame

#

I am excited to get debug circles working

#

I draw 1 line and 1 circle and I can go to bed

#

also that's the double not a float sized number

cloud rivet
#

ohh I got a VVL for using the wrong push constant size in my shader object 🤗

#

I love vulkan

cloud rivet
#

ok I got a line

#

now for the circle 😅

#

VVL really saving me man, how did I ever opengl

#

I gottem

#

trig 🤗

steady venture
cloud rivet
#

it's 4 am

#

lol

steady venture
#

Nice debug viz by the way

#

Enormous timesaver

cloud rivet
#

thanks!

#

so worth the day I spent on it

#

I can spam these

#

man also, it's so much nicer to be debugging stuff in sponza than it is floating around in an open sky with nothing but a bunch of wacky cubes

steady venture
#

That makes sense. And also since you kind of know the layout and look of the scene, it would be easier to notice artefacts/bugs etc. I presume. I haven't loaded sponza yet

true moon
#

The value that shows up in the popup is the precision it's rounded to for double

#

I should memorize those last 4 digits so that I know the full double value off the top of my head tbh that would be a cool and practical place to stop

#

Currently I just have it memorized rounded to 3.14159265359 since it's easy to remember

cloud rivet
cloud rivet
#

you know when I say OpenGL is deprecated that's totally misinfo There's actually a distinction between inactive and active standards and OpenGL is an active standard

#

I don't know if they have like more documentation about what the difference is between active and inactive, this is just a menu on a UI

#

but it must have a source

astral hinge
#

The gl spec receives bug fixes still

#

Pretty sure anyway

cloud rivet
#

it feels like maintenance mode

#

there's multiple press releases per year from Khronos about Vulkan and like 1 or 2 a year regarding OpenGL

#

hrm

#

if OpenGL ever does become abandoned I think it would be bad, but at the same time I could see hardware vendors not wanting support that stuff anymore

#

even just adding the debug draw stuff yesterday turned out to be much more work than I had anticipated because of all the stuff you have to write, which is not a big deal for a studio or a company, or even for an individual who knows what they're doing

#

but for someone just wanting to learn graphics programming for fun and has no idea what they're getting into it sure would be a slog I think

#

the SDL GPUs apis of the world I doubt are going to be able to take the place of OpenGL

#

I need to get over this, I don't care anymore, I'm just using vulkan

#

I'm not going to answer anymore questions along the line "which graphics api should I use" when people ask them, they just need to figure it out forthemselves

#

people can use whatever they want it doesn't affect me

brisk chasm
#

im sure they will update opengl as long as "web" supports opengles

#

and that will be forever

cloud rivet
#

ya

#

I am just happy I got something that is working for me and that's good enough for me and I don't need to justify my decision to anyone and nobody needs to justify their decision to me, we can all get along and I can just focus on working on my stuff, I don't know why I cared so much but I'm over it.

#

I do want to stop spreading misinformation so I will also just stop engaging in that kind of conversation

#

I also want to stop saying stuff like "how did I ever opengl" that's also not ok #1323084490997895198 message

brisk chasm
#

you didnt have to justify anything before switching to vulkan either 🙂

cloud rivet
#

I don't know, felt like it

brisk chasm
#

and how did i ever opengl is a valid question

cloud rivet
#

/me looks at the vulkan discussions in the foundations thread

brisk chasm
#

given how fucked it is and how sad its state of tooling is

#

until today they are still fighting about a proper gl.xml 🙂

cloud rivet
#

Software in the Public Interest announces Apple M1 and M2 as being OpenGL 4.6 Conformant

#

ok ok I'm done

#

CSM time

#

well baby step progress to CSM time

brisk chasm
#

take your time

cloud rivet
#

spherical coordinates are gonna work

#

for my sun

#

ρ θ φ

#

this is going to be so much better than the dumb stuff I was doing last go around

#

lessons learned

#

idk not worth it

brisk chasm
#

you need a wide char

cloud rivet
#

oh right

#

so spoiled by u8[] in zig

wraith urchin
#
jump_sound = sound_data(u8"Resources/Sounds/luís_jump.flac");```
cloud rivet
#

no in zig strings are not a thing and just are byte slices of u8[]

#

cool, does that work with all the apis that use strings for paths and stuff

wraith urchin
#

uh sorta

#

use std::filesystem::path

cloud rivet
#

so all this is just native in zig

#

filesystem::path is a wide string

#

it is not a u8

wraith urchin
#

implementation defined

cloud rivet
#

right

#

so it's all just byte slices in zig and every library every string is treated like just bytes

#

it's really nice

wraith urchin
#

string are byte arrays in c++ too

cloud rivet
#

they aren't, strings in C++ are a mess

#

you can't equate this

#

like

#

libktx

#

takes a char*

#

a const char*

wraith urchin
#

thats a libktx issue

#

is libktx a C library?

cloud rivet
#

yes

#

ok what's the difference between a std::string and std::wstring ?

wraith urchin
#

std::string is a vector of bytes basically

#

wstring is basically the same but wider

#

they say nothing about the encoding of those bytes

cloud rivet
#

I don't understand how that's useful, and how can a byte be wider

#

it's 8 bits

wraith urchin
#

its not a byte

astral hinge
#

std::u8string cutecatNE

wraith urchin
#

there is that

cloud rivet
#

isn't char a byte?

wraith urchin
#

not a wchar_t

#

its usually an int16_t I think, but thats implementation defined

cloud rivet
#

ok why do I have to specify a w when I drop a utf8 character into a string, otherwise I get a vs error?

wraith urchin
#

its a VS thing

#

about file encoding

cloud rivet
#

ok so in zig, it doesn't matter if I have "I like to eat a 🌮" that's just a u8

wraith urchin
#

strings can definetly contain utf8, but VS doesn't do string literals as utf8 unless you specify /utf8

cloud rivet
#

"I like to eat a 🌮" the len of that will be the number of bytes

#

I don't need to specify any encoding of any kind

#

there's no encoding

#

that's the difference

#

there's no wide, there's no encoding

#

it's just bytes

wraith urchin
#

there is encoding it just defaults to utf8

cloud rivet
#

that string just becomes the bytes and if you expected "🌮" to equal a length of 1 you will have bugs

wraith urchin
#

that what it soudns like

cloud rivet
#

there isn't any encoding

#

well

#

yes

#

utf8

#

sorry

wraith urchin
#

utf8 is an encoding

cloud rivet
#

right right

#

sorry

wraith urchin
#

the length of "🌮" is unlikely to be 1 in utf8

cloud rivet
#

it will not be

#

that's my point

#

it shouldn't be

#

it's more than one byte long

wraith urchin
#

yeah it will be

cloud rivet
#

is there some way to tell VS that everything is utf8 so I never have to worry about wide strings

wraith urchin
#

/utf8

cloud rivet
#

just give me std::string

cloud rivet
wraith urchin
#

for literals at least

#

yeah

#

but also ask yourself why you are typing an emoji taco into your source code

cloud rivet
#

because I can, that's a thing I can do with computers

#

use utf8 characters

cloud rivet
#

in my case it was φ

#

because φ made sense to be my imgui string

cloud rivet
wraith urchin
#

I do type 'í' into my source code in a few places

#

so with /utf-8 the expression "luís" is a const char [6]

#

clang should work without the flag I think

cloud rivet
cloud rivet
#

this is kind of dumb, I'm going to just switch to be a camera

cloud rivet
#

yeah

#

so much easier

#

ok

#

since it's just a camera it should be easy going forward

#

this visual studio nav menu froge_love

#

I love that thing

#

visual studio > visual studio code imo

brisk chasm
#

this is in vs since forever

cloud rivet
#

it's nice

brisk chasm
#

its kinda obsolete with fuzzy finder, but yeah, its underrated

cloud rivet
#

fuzzy in file finder?

brisk chasm
#

ctrl+q

cloud rivet
#

is that a thing?

brisk chasm
#

or ctrl+t depending on your keymap

#

i think its called "Find Everything"

cloud rivet
#

that's ok

#

it's not that great

brisk chasm
#

did you press the button multiple times?

cloud rivet
#

what button?

brisk chasm
#

resharper has 3 modes

#

that hotkey you used to invoke search everywhere

cloud rivet
#

it's just cntrl t

brisk chasm
#

press it once more and once more after that, and observe its title inbetween

cloud rivet
#

oh

#

is this visual studio or resharper

brisk chasm
#

resharper

cloud rivet
#

uh ok this is really cool

brisk chasm
#

vs' stolen variant is not as powerful (imho) it works, but they keep improving it with every version

#

another cool hotkey is alt+shift+. at least thats what i have it bound to (default in rider) - its a multi cursor tool which lets you select the next similar selection you have selected, enables multi cursor and when you let go you can just edit all the occurences at the same time - an alt+left mouse drag to draw a box-in-very-advanced

cloud rivet
#

maybe I need to use better names than "ui" KEKW and then this would be more useful

brisk chasm
#

😛

cloud rivet
#

actually this is pretty good I will use it more

#

I have been using visual studio for like 3 months now so still just learning it

brisk chasm
#

ah

#

i didnt know you are new to vs

cloud rivet
cloud rivet
#

nobody is writing go in visual studio

brisk chasm
#

indeed

cloud rivet
#

I use visual studio code for work

brisk chasm
#

i thought maybe you have before go was a thing : )

astral hinge
#

visual studio gode

cloud rivet
#

I was writing python before then

brisk chasm
#

hehe

cloud rivet
#

and node.js

brisk chasm
#

better than php : >

cloud rivet
#

I wrote that too

brisk chasm
cloud rivet
#

imgur was a php stack that transitioned to go

brisk chasm
#

idk how many hours imgur trapped me, clicking on next

cloud rivet
#

best job I ever had

brisk chasm
#

: )

cloud rivet
#

it was amazing

brisk chasm
#

i can imguring

#

thankfully i learned how to use adblockers very soon in my life

cloud rivet
#

my current job is all business, I can't listen to sales calls without my brain turning insideout man, it's like it's english but isn't

brisk chasm
#

i know what you mean 🙂

cloud rivet
#

I want to interrupt and say this is not how humans talk, but it would not go well I think

cloud rivet
#

this is going well

#

ok tomorrow I add a shadow pass then and write to csm image and then sample

#

I think starting next weekend I will iterate between gameplay and graphics tasks so I can keep working on making sponza look better. So I will start on game play as per feb 1st, but it will be like, one game play thing, then one graphics thing, for a bit

#

and so on

dry apex
#

i actually never stopped bikeshedding sponza. to the point that i thought: "why am i trying to make a 3d game anyway?" and then never continued

inner warren
#

Except we do have a string type which is different than u8[]

#

counted strings

#

No char type, but #char compiler directive for easy conversion

slender ember
cloud rivet
cloud rivet
#

Once I have character I will lock the light to its position in third person camera

#

Which means in the characters space origin

#

I think I will likely not have camera rotation

#

Hrm

#

I am not sure I will try it with rotation

cloud rivet
#

I turned on sync validation and best practices validation yesterday and realized I also had core engine work I need to revisit at some point, the ALL_COMMANDS have returned, and I have a write after write hazard still with my camera buffer, and I need to just use one giant buffer for all my meshes which should be simple, but

#

I am going to make progress on gameplay

#

also zero performance difference when went back to all commands

#

I just want to have a properly thought out sync and not to skip out on learning how that works so I will use the sync validation to fix my writes one at a time

#

I gotta focus on CSM, which I am not going to bikeshed and make perfect either

#

it's just making small bits of progress all over the place iteratively

#

I'm going to make github issues for all the memory barriers, and the meshes and the write after write hazard

dry apex
#

Also thinking of making a 2D game instead but I'm no artist

cloud rivet
#

I honestly don't have enough time either and I just sleep less and not do everything I am supposed to

#

it's fucked

dry apex
#

Rip

cloud rivet
#

I think I cannot be any otherway though, I don't want to not do this

brisk chasm
#

i dont mind silly hand drawn squiggle paint graphics

#

as placeholders until you find someone make nice art 🙂 but make the 2d game either way, ali

cloud rivet
#

so like the world can fall apart around me tbh, I need to be there for my family is all

dry apex
cloud rivet
#

I didn't know I could configure validation and was only validating core functionality, but while I am dismayed at how many VVL I saw once I turned that on, I am also happy to have a tool to let me get all this stuff right

#

It just goes on the backlock though, I made github issue labels and everything, super organized like

#

I'm gonna have a good engine I am proud of one day

cloud rivet
#

the big camera distance crutch will help

#

it's going to help cut a lot of corners

#

like on shadows, details, artistic fidelity etc

#

static geometry, small levels, big camera distance are my guard rails

#

the camera distance will help with keeping animations small too I don't have to have many bones and weights

#

and I think despite all that it will still be a fun game to work on

#

it's just being real with myself about where I am at skill wise and how much time things take

cloud rivet
dry apex
#

thinking of a general style and how my character should look like is another challenge

dry apex
cloud rivet
#

heh, doesn't feel that way, I think making some kind of eventual career move will help me focus more on what's more important to me in my life now

#

I guess I already have a nice scheme it's just not a lot of stuff prints colors

vagrant musk
#

Yeah windows terminal colors don’t really
get used
ever

cloud rivet
#

yeah all the various linux cli apps just emit colors and powershell just doesn't I guess do that much

brisk chasm
#

another raisin to switch to lunix fulltime

cloud rivet
#

I'm gonna pass on that

brisk chasm
#

you should be able to though, wsl2 in Windows Terminal with psh

#

and then there is oh my posh, oh my zshell clone for powershell

cloud rivet
#

I want zero linux in my personal life

#

it's fine for work

brisk chasm
#

but you fly wsl

cloud rivet
#

I don't want wsl and have not set it up

#

I don't want mingw, cygwin none of it

brisk chasm
#

Rosy better works on lunix too, ...

cloud rivet
#

well it uses SDL and I don't import Windows.h but it is all msbuild

#

so it might

#

idk

brisk chasm
#

hehe

#

we will see 🙂

cloud rivet
#

my digital ocean droplet runs linux of course, so that's the one thing where I have a linux thing

#

I never use it though

#

or do anything with it, just donating money to DO I guess

cloud rivet
true moon
#

Orthographic projections are only confusing from a visual standpoint

#

They are way more intuitive mathematically

cloud rivet
#

yes

#

unfortunately for me I don't have a well developed intuition for math

astral hinge
#

so an ortho projection is basically a scaling and translation matrix

#

the volume of the projection is scaled to the ndc box

cloud rivet
#

yes that makes sense, the cascade level is along the diagonal and scales the view

true moon
#

Say you have vector (x, y, z)

#

You can project the vector onto the XY plane by setting z = 0

cloud rivet
#

yes

#

I understand parallel projections

#

in terms of

#

the what happens to the vectors

true moon
#

lmao deccer

cloud rivet
#

why delete that

#

that was amazing

brisk chasm
#

you guys aer always so serious, i need to grow up 😛

true moon
#

He was anticipating my diagram drawing

astral hinge
true moon
cloud rivet
#

hehe

true moon
#

real depiction of vector projection (1894, colorized)

brisk chasm
#

that pic was the first reaction of my neuron network after seeing that hand drawing of demon

true moon
#

anyways the ortho projection is literally just like a columnar slice of the world with the dimensions of your box, that's why it's weird looking

cloud rivet
#

there's still a box that I need to visualize and what's in it, and the orientation and somehow the depth math doesn't work as I expect and I basically have to fuck with the parameters until it does what I want

#

which is sad

true moon
#

It should work normally

brisk chasm
true moon
#

The depth is literally the linear depth between the projection plane and the object

true moon
cloud rivet
#

I think I can just start on the shadow pass now

#

the camera seems solid

#

that's always been the hardest part

cloud rivet
#

that's a 8192 x 8192 shadow map

#

my fps dropped by half

#

I think intel sponza would require some kind of occlusion culling for shadow maps

#

I think fps gonna have to drop a bit more to avoid all this aliasing

#

idk

#

gonna sample next

#

with what I got

#

make it better later

cloud rivet
#

here's my in application debug viewer

#

the sun marker has a bug I need to fix I guess, it went astray for a second

#

pretty sure I am going to have shadows before I'm done today

#

they may look super terrible however

#

Maybe some kind of great PCF can help 🥹

wraith urchin
cloud rivet
#

we'll see, I have found the precision to help with aliasing

#

I don't want to do cascades tbh

#

with my camera distance

#

I need some kind of occlusion culling if I do cascading in a way that doesn't draw all the triangles

wraith urchin
#

You might be able to get away with it if you're camera angle is more or less top down

cloud rivet
#

that's why I was asking you about how much of your time budget is spent on CSM, because just 1 doubled my frame time

astral hinge
#

8k though?

wraith urchin
#

8k shadow maps would probably be a big hit lol

cloud rivet
#

it doesn't run a fragment shader

astral hinge
#

also if your renderer isn't doing much else, doubling the frame time isn't that bad

astral hinge
#

and there effectively is a generated fragment shader

cloud rivet
#

what problem should I notice with the size of this map? it's always on the GPU yes

wraith urchin
#

You're still writing 8x8k 32 bit floats

cloud rivet
#

I never bring it to host

astral hinge
wraith urchin
#

Yeah but gpus have memory bandwidth

cloud rivet
#

yes just curious though what sort of problem I would see because of its size

astral hinge
#

Worse perf lol

#

Use nsight graphics

cloud rivet
#

so if I shrunk it down to 1024^2 and cycle back and forth I should see some perf get better/worse

#

yeah I am curious is all

wraith urchin
#

Are you using PCF? that would probably make the aliasing alot better, without the oversized shadow map

astral hinge
cloud rivet
#

I plan on using PCF

wraith urchin
#

The default setting for ASO is 2k per cascade btw

cloud rivet
#

I can already tell it will not be great shadows

astral hinge
#

also sampling the shadow will be more expensive if the resolution is huge

cloud rivet
astral hinge
#

rendering to such a ginormous texture will probably also make you ROP bound

cloud rivet
#

how big is your VSM?

#

what is ROP?

astral hinge
#

4k for each cascade

wraith urchin
#

Raster Op?

cloud rivet
#

isn't VSM in one big buffer or something?

astral hinge
# cloud rivet what is ROP?

Raster output, the part of the hardware that makes sure fragment shader writes are atomic and ordered, does blending, srgb conversion, and probably more

astral hinge
#

it uses atomics and renders to virtual 4k textures

true moon
#

8k is a good size to use for your VSM memory backing store though smart

astral hinge
#

actually 4k is good for that too

#

because the ideal number of vsm texels will be equal to the number of screen pixels

true moon
#

ah cool

astral hinge
#

it's very memory efficient

astral hinge
wraith urchin
#

What gpu are you on @cloud rivet ?

#

Wasn't it some laptop thing?

cloud rivet
#

this is my PC

#

I have a laptop also

#

I just want to see how the shadows look at different resolutions

#

I thought I had 64GB memory, my laptop has more :/

#

I should get more

astral hinge
#

hmm do your monitors support refresh rates above 60hz?

#

Are 60hz VRR monitors a thing?

#

It's unrelated but windows doesn't automatically use the highest available refresh rate of monitors, which leads to many people not using them to their full potential

#

I think your VG27A supports a higher refresh rate (either 144hz or 165hz according to goog)

cloud rivet
#

I don't know anything about monitors :/

#

is something I configure with windows?

astral hinge
#

It's ok. Right click on the desktop and go to display settings

cloud rivet
astral hinge
#

Then it should be in the config for that specific monitor

astral hinge
cloud rivet
#

oh

#

the smaller monitor had a higher refresh rate

astral hinge
#

Yeah, it should be a lot smoother now

cloud rivet
#

I never run any games on that one

#

but I guess it's the better one?

#

hrm

astral hinge
#

Depends on whether you value resolution or refresh rate more

cloud rivet
#

I play dwarf fortress I'm not sure it matters KEKW

astral hinge
#

Try running your app on that monitor

cloud rivet
#

oh ok

#

I seem to have done fucked up

#
[2025-01-27 06:37:21.4777936] [WARN] [Validation] Validation Warning: [ BestPractices-Error-Result ] Object 0: handle = 0x2609ea4a8b0, name = rosy instance, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x53c1342f | vkDeviceWaitIdle(): Returned error VK_ERROR_DEVICE_LOST.
[2025-01-27 06:37:21.4804297] [ERROR] Failed to wait device to be idle: 252
[2025-01-27 06:37:21.5140472] [WARN] [Validation] Validation Warning: [ BestPractices-Error-Result ] Object 0: handle = 0x2609ea4a8b0, name = rosy instance, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x53c1342f | vkDeviceWaitIdle(): Returned error VK_ERROR_DEVICE_LOST.
[2025-01-27 06:37:21.5214061] [WARN] [Validation] Validation Warning: [ BestPractices-Error-Result ] Object 0: handle = 0x2609ea4a8b0, name = rosy instance, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x53c1342f | vkDeviceWaitIdle(): Returned error VK_ERROR_DEVICE_LOST.
[2025-01-27 06:37:21.5229262] [ERROR] [Validation] Validation Error: [ VUID-vkDestroyInstance-instance-00629 ] Object 0: handle = 0x2609ea4a8b0, name = rosy instance, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x8b3d8e18 | vkDestroyInstance(): VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT object VkDevice 0x2609ed19c70[rosy device] has not been destroyed.
The Vulkan spec states: All child objects created using instance must have been destroyed prior to destroying instance (https://vulkan.lunarg.com/doc/view/1.4.304.0/windows/1.4-extensions/vkspec.html#VUID-vkDestroyInstance-instance-00629)
#

it seems to be against best practices to lose your device

true moon
#

Where did it go

cloud rivet
#

I tried to sample from my shadow map

#

and the gpu didn't like that so I enabled full sync debug and am looking through it

#

[2025-01-27 06:37:21.2218852] [ERROR] Error waiting for in-flight fence: 2

#

hrm

#

maybe I didn't set the descriptors up correctly for the CSM

astral hinge
#

deploying fence gif

cloud rivet
#

oh no

vagrant musk
cloud rivet
#

so it was fine until I sampled hrm

astral hinge
#

device lost when sampling suggests to me your descriptor is fooked

true moon
#

Hey I just lost my device too

OpenGL error: Unknown internal debug message. The NVIDIA OpenGL driver has encountered
an out of memory error. This application might
behave inconsistently and fail.
OpenGL error: GL_OUT_OF_MEMORY error generated. Failed to allocate memory for buffer data.
OpenGL error: Unknown internal debug message. The NVIDIA OpenGL driver has encountered
an out of memory error. This application might
behave inconsistently and fail.
#

Bjorn and I are on the same journey

true moon
#

wait wtf somehow I crashed not only my game and driver but Visual Studio as well