#Rosy
1 messages ยท Page 2 of 1
I don't have any vertex buffers
the space limitation is on the push constant
I can stick only so many buffer addresses in 128kb
Yeah the jpgs are annoying because they're gonna be recompressed
you can always split your draws you dont have to force yourself to stuff everything into 1
just import -> export it in blender
i suppose there would be some addon to do the jpeg->ktx2 transition as well
gltfpack ;p
jaker and i cobbled together some functionality which is in blender's gltf export plugin (4.1+), not blender itself
you go to the gltf export plugin options and set the path to your gltfpack, that enables an option to export to ktx2
you can provide another path there it will put the ktx2 files into that folder, while keeping the originals
its pretty crude
wow neat
i should probably talk to don mccurdy to have this jank removed again and properly replaced
Honestly though it should be illegal to distribute a texture as a jpg
the big modelling tools should just export ktx2/dds
your raw artist stuff can be whatever you want
ah speaking of that, you can select webp there as well when you export, thats where we should have hooked our shit in, and extend the dropdown list with ktx2, now that i think about that
Unfortunately gpu compression is hardware dependent, so png is kinda the only sensible option
Or exr
ktx2/dds are very portable still
But they use compression no?
Yeah I thought it was always compressed?
its all in the ktx-software sdk, which could just be part of the tooling
Maybe not
I just use png then the engine creates optimized formats on import
i want that too, im also not happy how i do it in HowToScript atm
im iterating images, then samplers, then textures, then materials, then meshes... but that is somewhat weird, because in order to know what target format for transcoding an image later, i need to know for what material channel that image will be
that means i need to do that in a diffeernt order or do it in 2 passes of sorts
I also create an optimized mesh format, so I don't even look at the gltfs after import
yeah that would be next after getting that material shit right ๐
vulkan supports a bunch of the ktx/dds compression algorithms as I understand the spec
so that's not an issue for my project
Its optional tho afaik
I want that though
it depends on the hardware
hrm
yeah I don't worry about mobile I guess
if amd and nvidia support it :/
based on what others have said about tiling gpus you write engines differently for mobile games anyway? I don't know anything about mobile, and little about anything else
Yeah thats fine I just don't think models should be distributed with compressed textures
like if its in the game compress the shit out of that
yes give me the full 8k thing
unfortunately polyhaven usually ships the albedo as a jpg
although it is an 8k jpeg
I am going to try and create all of my own visual assets ๐
no off the shelf stuff
idk how animations will go
I usually lanczos those 8k things down to 2k
good luck
it will probably not look very good but with time I hope to get better
Honestly I'm trying to use less of my own art but I keep failing at it
and making my own shit
I want to make all that stuff
I want to get good at blender, houdini and marmoset, which is like a cheaper substance painter
I just do everthing in blender
a dedicated materials painter seems really worthwhile
probably
and houdini automates a lot of slick looking geometry for buildings and stuff
I don't like switching between apps if possible though
marmoset would be where I bake
it would be the last link in the asset toolchain before I process the output
it has comprehensive baking config and a python API to hook into it
cool
I finally have a good workflow for baking in blender, but it was a pain to figure it out
I am just getting started with all this and don't know much about it all yet
One of these days I will write an article on baking in blender, for the frog blog
that would be awesome
Just start making shitty stuff in blender
Once you've developed your workflow you can start making it look prettier
But trying to get the pipeline down to make high quality assets from the start will take forever
Yeah figure out how to model first I would say
Yeah it will not look great at first
don't recommend shit + blender, unless you put on the lid
lid?
What do those words mean?
not blender as in 3D modelling software, but blender as the thingy you make smoothies in
Ok I get it lol
or...no camera, no models no chance of fuck up 
the amount I've genuinely seen people follow this thought path is scary
so just adding imgui didn't meaningfully impact frame time
just want to keep tracking as I add things
frame & build time
ok on to loading models
that was kind of easy
I'm going to just draw a triangle from this file and then try and load a gltf parsed with fastgltf and then sponza
Nice, good luck on sponza 
also I feel like I'm obligated to tell you the the plural of index is indices
^^ I am writing my own binary format there with just vertices and normals atm
Are you familiar with lz4?
no
Extremely fast decompression & compression
I will use lz4
I use it for most of my custom formats
thank you
also
Rosy\src on ๎ bt/starting_packager [!?]
โฏ git status
On branch bt/starting_packager
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Engine/Graphics.cpp
modified: Packager/Asset.h
modified: Packager/Main.cpp
modified: libs/imgui/imgui.cpp
modified: libs/imgui/imgui_draw.cpp
modified: libs/imgui/imgui_internal.h
modified: libs/imgui/imgui_widgets.cpp
modified: libs/imgui/imstb_truetype.h
looks like some of imgui calls it indexes 
they call it indices too though
I should create a PR
jk
Oof being inconsistent is worse than being wrong 
Although I'm frequently iconsistent on the use of Color vs Colour
but thats mostly a Canadianism we all struggle with
At work you gotta Ctrl + F for both
:<
are you flying an AZERTY kb too @wraith urchin ? ๐ and fr_GB locale? ๐
Do you compress each file separately or just bundle them together and compress as a package?
I was thinking about bundling all, because I'd have just 1 LZ4 stream per bundle
Also was thinking about compressing my entire virtual texture atlases with LZ4, will see how it works
textures are usually already compressed, no?
Yeah, but other files like meshes aren't
GPT told me BC5/BC7 textures in my VT could be compressed with LZ4 and it would gain me 5-10%
Will see in the future 
Azerty isn't used here, not even in French Canada
I do each one individually. And yes I double compress BCn inside LZ4
Performance wise one LZ4 stream would be better rather than single stream per asset
I'll try bundling mine and check how it goes
Potentially but I load each asset on its own thread, so this would not be ideal
Yeah, if you keep all textures non-virtualized and concurrent, then yes
I went with VT all the way, now my VT files weigh 2GB/3GB after compression, storing hundreds of 1K/2K/4K PBR textures
What is your game?
A 3D shooter, currently not wanting to disclose it due to company policy 
They don't want you doing side projects?
Honestly that would make me quit
Nah it's a game we're working on at the company, where I implemented the VT system, I have also 2 other side projects, one being an ERP system
Ah
please tell me you mean enterprise resource planning
Yesss
man all these threads with gameplay, I am real close, I'm really excited to start
Are you gonna have physics?
yes
thinking jolt
I don't know anything at all about physics, I rolled my own ray marching for Blockens
physx5 with new car fisiks
How are your controls gonna work? Do you control the character directly or is it sorta point & click
you want cars in your game jedimasterhandmove
honestly I think I want to get a gamepad
and make the game work with a gamepad
wasd though
The perspective made me think it was point & click
Like bg3 for example
i loved these (and still do) point and click adventure games (where you also click on commands like open/close/use/speak etc) indiana jones/monkey island/sherlock holmes/zak mckraken โค๏ธ
Ah yes I was making one of those before ASO
I saw that
There was a really short demo I put out but I never finished the thing 
Can it have tracks?
I'm basically imagining the robot looking like wall-e
But it's your robot you can do whatever you want
Ooh, what if you could customize the robot? 
Like maybe different parts can give you different abilities...
I hadn't considered customizing the robot
I kind of wanted to do a good job with the character's model
not sure yet
I have an idea of a story based game
a big narrative component
Stories are hard 
I am full of stories
Are you full of stories or ideas for stories?
well they're all in my head, I have written some down
but I keep developing them in my head
I'm not very good at the details
I have to know both the beginning and the end of the story
before I can work on the details
so once I have an idea I work towards understanding how it ends
and then the details help carry the story from beginning to its end
and bring more meaning to that end
And games have their own little wrinkle of player agency
Yeah I'm mostly just complaining. I find stories one of the harder parts
In order of decreasing frustration for me: story, 3d modelling, gameplay code, engine code, music
you might want to read an issue of the New York Review of Books, maybe canadian libraries have one, I would buy an issue if possible. the online is pay walled
it is very inspiring
it's not just book reviews
they are articles about books and stories
another one is the Paris Review
Yeah Toronto Public Library has a bunch of stuff like that, I'll take a look
I love those two publications, they are just amazing
they also write about music and film
usally in the context of a book review about the topic
I guess I am recommending it because you get to get into the heads of authors who write stories
and you learn about how they think about stories, the reviewers are all writers themselves
I removed all my ALL_COMMANDS full pipeline barriers, and now have a proper sync that doesn't stall the GPU on every layout transition
because I have been reading the sync links every day and am slowly getting it
I think the local reads extension where I can do subpasses with dynamic rendering will also help, I think my frame rate should stay lower than it was in my previous version where I was stopping rendering to write pipeline barriers between CSM and rendering
basically I believe I was using multiple end to end graphics pipeline passes to render each frame unnecessarily
I think my memory masks need tweaking too though, I have left those unchanged from vkguide
Is ALL_COMMANDS basically what GL does?
based on what I read, and this could be
, GL optimizes for you based on what it thinks you are doing
which is why I think that GL will probably be more performant than VK for someone who doesn't know what they're doing
when you write gl, you produce a render graph for the driver
it can issue granular barriers and reorder passes
the Vulkan Shader Objects proposal goes into a little bit of detail detail on pre-vulkan driver mechanics I found interesting https://github.com/KhronosGroup/Vulkan-Docs/blob/main/proposals/VK_EXT_shader_object.adoc
so no I don't think what GL does is like ALL_COMMANDS
ALL_COMMANDS is basically worst case behavior
the vulkan sync examples page not to ever use it, and I was only using it because that's what was in vkguide and I was too lazy to update it
but then Matty shamed me
and I have fixed it
I use gigabarriers hehe
you use ALL_COMMANDS?
I profiled them to not be an issue at all
void Context::Barrier() const
{
ZoneScoped;
vkCmdPipelineBarrier2(commandBuffer_, Address(VkDependencyInfo{
.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
.memoryBarrierCount = 1,
.pMemoryBarriers = Address(VkMemoryBarrier2{
.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER_2,
.srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
.srcAccessMask = VK_ACCESS_2_MEMORY_READ_BIT | VK_ACCESS_2_MEMORY_WRITE_BIT,
.dstStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
.dstAccessMask = VK_ACCESS_2_MEMORY_READ_BIT | VK_ACCESS_2_MEMORY_WRITE_BIT,
}),
}));
}
it's not hard to avoid them?
well being able to safely sync anything with a one-liner is nice
my change is still in a PR but you can see what I did here https://github.com/btipling/Rosy/pull/23/files#diff-6e03010a754993700920e95596272aacef881877804e2098e68071e06c13ab53L1926
render graph enjoyers would say it's better to have a zero-liner but meh
basically I make sure my images are in a correct state before fragment shader to be written into
and then after I have a barrier for presentation
and for CSM I'll barrier it in the depth test stage
and that's it? no big deal?
idk
a lot of times, especially with compute, there's no hope of having overlap at all, so a gigabarrier is as ideal as it'll get
what I'm saying is that if a dispatch B depends on dispatch A, you're absolutely not going to overlap them
right
yeah if they are doing unrelated work they could theoretically overlap, but the opportunities for that are comparatively limited
can you barrier B and A so they don't overlap with vkCmdPipelineBarrier(srcStageMask = COMPUTE, dstStageMask = COMPUTE)
?
that's what the yet another sync blog led me to think
yes
but the effect is the same as a gigabarrier
I guess my point is that it's easy to focus on making theoretically perfectly granular barriers when in reality is doesn't matter a lot of the time
hmm I dunno what you mean
are you referring to the source or destination stage mask?
if if you have a queue with commands on it, ALL_COMMANDS flushes the queue of all work
the barrier defines two scopes to synchronize
where as with COMPUTE you're only affecting those that care about that stage
hrm
oh
I think I see what you mean
I was thinking of when both source and destination are compute
vkCmdDispatch
vkCmdDispatch
vkCmdSetEvent(event, srcStageMask = COMPUTE)
vkCmdDispatch
vkCmdWaitEvent(event, dstStageMask = COMPUTE)
vkCmdDispatch
vkCmdDispatch
as from the yet another sync blog post
I could be wrong, but I believe this doesn't create dependencies for unrelated commands
if you draw your frame out on paper with all the passes and their dependencies, I think it'll be more obvious where overlap is and isn't possible
I'm not saying my gigabarriers don't create unnecessary dependencies. I'm saying that the perf difference is probably nil since there was no overlap to be had anyway
yeah the perf was tiny for me too
I have profiled my app before which is why I say that
I did too
#1147711082702589973 message
but then that happened
I gotta work on my GP creds
you already have yours
then I can go back and use ALL_COMMANDS
it was wounded pride 
maybe he was confused. your name isn't even Andy smh
I think he was using alliteration
I was saying vulkan was awesome and easy to understand and then he pointed out I was taking a major shortcut with the hard part of vk
but I had measured it
it's a shortcut, but I'd argue it isn't major in most cases 
render graph when
the way I think about it is that the src/dst flags are just fine tuning, if you focus on the fact that you're barriering between commands you'll be more than fine
and yeah events are extra
well, if you're writing an epically cpu-driven renderer with lots of passes then it could hurt more
I suspect whenever Matty sees a comment I leave in #vulkan I just assume he closes discord in disgust
basically, "cmd A depends on cmd B" -> "A barrier B", then you fine tune based on what actual stages between them are dependent
you don't really need to think about more
yes that's what I have come to understand too but I'm still figuring it out
Martty is mocking you at multiple levels of irony at once to maximize his effort to amusement ratio, all whilst not actually caring that you're doing the thing he's teasing you about
I appreciate that
he's maximizing his damage:effort ratio 
as long as you keep sync val on you'll be alright
I tend to say what I think I know, which I understand may have inaccuracies, because often someone will correct me and I learn from that
until the false positives start rolling in and it's not as useful
but on this server saying what you know with inaccuracies is considered
here and not seen as benign as in other places
I only get false positives for my bindlessisms at least
so I have been trying to be more explicit that I don't know by hedging everything I say with "I am new to this also.." etc
yeah I think most people only get annoyed when people are confidently wrong
it was bait
always has been
btw this might be one reason to try out writing a frame graph, in essence your frame graph's frontend API lets you specify commands' relationships to the resources they touch in the way you'd think about them when preparing the barriers manually, but then you can shovel all that thinking away into some arbitrary backend that unrolls all that information into a flat list of commands, somehow
and that can be as simple or as complex as you like, over time
I like that idea, right now I have a zero abstraction rendering function that explicitly creates all the structs for each phase of the frame
I think as I get to understanding things better and my render function increases in complexity maybe I'll get an idea for how to do that
I have so far regretted every attempt to write any type of abstraction for anything ever when it comes to GPU APIs but I saw an example of the fwog api and I was kind of wow'ed by it
maybe I can eventually get a big brain idea of how abstract things
I don't think I am quite there yet
thanks! how have you been?
my entire current vulkan code is entirely abstraction free and in an anonymous namespace, no code outside of Graphics.cpp knows I am using vulkan, not even Graphics.h, I would like to keep it that way tbh
I'm doing fine, although I was away for a little while against my wishes but now I'm back.
I see you've been busy, I'll be sure to keep an eye here ๐
Don't want to interfere with your discussion here though ๐
https://www.khronos.org/spir/visualizer/ is useful
I encountered my first slang bug
I can't give slang function names to the SO create info
they just have to be "main"
even though they're actually "fragmentMain" and "vertexMain"
I actually do see those names in the spirv visualizer though
[31]โ OpName %78 "entryPointParam_fragmentMain.color"
[32]โ OpName %65 "fragmentMain"
aha
[7]โ OpEntryPoint Vertex %2 "main" %22 %58 %62 %15
[8]โ OpEntryPoint Fragment %65 "main" %78 %73
look at that bullshit
import data;
[[vk::push_constant]] BasicPushConstant BasicPushConstants;
[shader("vertex")]
BasicVertexStageOutput vertexMain(uint uiVertexId: SV_VertexID)
{
BasicInputVertex v = *(BasicPushConstants.v + uiVertexId);
float4 posWorld = float4(v.position, 1.0);
BasicVertexStageOutput output;
output.basicVertex.normal = v.normal;
output.sv_position = float4(v.position, 1.f);
return output;
}
[shader("fragment")]
Fragment fragmentMain(BasicVertex basicVertex: BasicVertex) : SV_Target
{
Fragment output;
output.color = float4(basicVertex.normal, 1.0);
return output;
}
Where is there a "main" in this
@inner warren pls fix slang ^^ it needs another PR
we are so back
this is using my custom binary format, actual no full pipeline barrier sync, zero abstraction init and zero abstraction rendering
the rendering and & asset stuff near doubled my build time from 2 seconds to nearly 3.5
3,006 loc triangle 
still slang, still bda, still bindless, still dynamic rendering, still shader objects, no gigabuffers
anyway
I gotta work on gltf
I got a 4 day weekend maybe I get done by monday evening
-fvk_use_names or smth like that
-fvk-use-entrypoint-name
โฏ Write-Host $env:VULKAN_SDK
C:\VulkanSDK\1.4.304.0
updated to latest, everything just works, love it
still on 1.3 since I don't want to use a beta driver
ok gltf'ing time
first I'm going to just gltf export the demo cube with a color
then I'm going to make deccer cubes again
then crytek sponza
then intel sponza
then game play
I got exactly 2 weeks before I have to start gameplay I think I can do it, I got 3.5 days of no work left so maybe I can get all the way to deccer by end of weekend
lt se ga au = lets go ๐
I could tell ๐
thought you might needed a minute because you didnt updoot those
there ๐
I dont know why -fvk-use-entrypoint-names isn't the default behavior, probably for the glsl codegen
it's fine I'll just "main"
once I statically linked fastgltf the full build jumped from 3 seconds to 12, but that's just if I clean it and fastgltf isn't going to update often.
that's the first time I statically linked a C++ library, I had previously dynamically linked via vcpkg but I don't like vcpkg
it does make my build really painful for anyone else because there's a lot of manual git clone and building you have to do build the project right now, but I am documenting it all in my README but I doubt anyone but me will build it anyway and really the instructions are just for me to build it on my laptop or if I have to idk get a new computer or something
I should add a cmake file just for pulling in third party deps so it doesn't have to be so manual at some point
I should use how fastgltf pulls in simdjson as an example I guess
I'm not going to worry about it until I need to I guess
I wish vcpkg wasn't terrible
why not use a submodule?
Oh because I hadnโt thought of that, thanks!
No worries
oh yea where did u get/how did u make the skybox texture?
I found it on sketchfab, I don't use it anymore after I figured out it was AI generated ๐
well
I did some work in blender to make it work for me
I got my demo cube gltf import working, but I need a camera to see it properly
all I can see right now is 
It's 2:33 am I think I will do it tomorrow, I will have to upload a scene buffer with all the matrices and directional light etc
this binary format stuff is so clean though
I haven't applied compression yet I still need to do that
I will before sponza I guess
my binary format extension is .rsy 
renderdoc does not support any KHR maintenance extensions
https://github.com/baldurk/renderdoc/blob/v1.x/renderdoc/driver/vulkan/extension_support.md
I need to conditionally import them to support renderdoc I guess fml
or just not use them
I think not worth using them tbh
I bet if I do some tweaking in my own rendering thing I could create something similar and better for the skybox in the thumbnail
you can dynamically link any of your libs too
i believe a set(BUILD_SHARED ... at fastgltf conf time should do too
read "heresy" ๐
the h is silent
Fastgltfโs cmakeโs VS project doesnโt produce a dll by default fwiw and anyway not important to me all that much but that probably is an alternative
I donโt think that dynamically linking it is common
since fastgltf is not explicitly stating SHARED or STATIC, this BUILD_SHARED_LIBS thing could do the trick
My engine doesnโt need fastgltf, my asset packager does, I added an import method to my Asset.cpp file which does the loading via fastgltf, My engine uses Asset.cpp to load the asset from disk. Instead of doing all this I will pull the gltf loading out of Asset.cpp and create a new Gltf.cpp and give it an Asset and now Engine will build in 3 seconds again
is the "asset packager" an external tool?
ah yeah, if its just some external tool then whatever (link fastgltf as header only)
Are you gonna have a separate editor?
Itโs a separate vs project inside Rosy that builds a console application that converts gltf files to my tsy format
I like to be able to just drag a gltf into the editor and have it pop up
I like having separate tools like @slender ember I am inspired by that approach
What kind of editor do you mean?
Like how do you make "levels"?
You will have to extend gltf too
because you will want more than just geometry data in your level
gltf is designed to be extended
Also your plugins will probably break during the next blender update though ๐
As long as you are ok with maintaining them, or keeping an old version of blender (like @silver slate does iirc)
AniCator does editing in blender, he might have some good advice for you
Hi
How does your blender editing setup work?
I've got a bunch of custom properties set up for objects to configure them. My scenes use old school entities, no ECS. I define the types in a document that is loaded by my addon, it creates all the properties for every entity type and that is set up on objects based on their set type.
I was inspired by AniCator to do the custom format and use imhex also so I need to set up imhex to be able to parse my format like you have it
Yeah if you're gonna be doing custom blender scripts maybe skip glTF altogether
Makes sense
Wow
It uses some dark magic to swap out the properties.
The addon serves as a batch exporter of model files and scene data.
Amazing stuff
{
"name": "CityCube.038",
"uuid": "b5504f0e-32e4-4cf4-ae2b-52a22e22e041",
"type": "mesh",
"mesh": "cube",
"shader": "DefaultTextured",
"texture": "bigarchsurface",
"position": "-41.124340 -400.000000 22.457418",
"rotation": "-0.000000 0.000000 0.000000",
"scale": "45.475323 0.480214 4.567022",
"color": "1.000000 1.000000 1.000000",
"visible": "1",
"collision": "1",
"collisiontype": "aabb",
"static": "1",
"stationary": "0",
"damping": "1.0",
"friction": "0.5",
"restitution": "1.0",
"drag": "1.0"
},
{
"name": "TriggerPortDistrict",
"uuid": "25813374-e0de-4441-b584-13f4d407b431",
"type": "trigger_box",
"position": "-50.030743 -127.692970 27.359901",
"rotation": "-0.000000 0.000000 0.000000",
"scale": "109.927025 135.856430 30.226276",
"frequency": "0",
"filter": "player",
"bounds": "-109.927025 -135.856430 -30.226276,109.927025 135.856430 30.226276"
},
{
"name": "Stands.001",
"uuid": "3b953355-e1aa-46dd-957f-f1238748a5ea",
"type": "mesh",
"mesh": "stands",
"material": "plaster_trim2",
"position": "65.000000 38.000000 8.000000",
"rotation": "-0.000000 0.000000 0.000000",
"scale": "1.000000 1.000000 1.000000",
"color": "1.000000 1.000000 1.000000",
"visible": "1",
"collision": "1",
"collisiontype": "aabb",
"static": "1",
"stationary": "0",
"damping": "1.0",
"friction": "0.5",
"restitution": "1.0",
"drag": "1.0"
},``` here's some of the output of the scene/level side
This has definitely been the case for me, but not sure it's necessarily more work than maintaining a custom editor.
My main reason for having an editor is to have the same renderer as the game, making it more of a WYSIWYG kinda deal
My editor is part of the game executable, thats actually my preferred way of doing it, but there are certainly tradeoffs with any method
I haven't had my addons break on me yet, just haven't switched to Blender 4.1 and up yet for other reasons. (quadratic loading time bug)
Yeah, mine as well. The editor app just wraps the game and starts it in a special editor mode.
Like basically you pause the game and edit in situ
Ah, I see. I keep the editor flow separate from the game flow. But yeah there are benefits to doing that.
Yeah, I have inspection tools available in-game, although no editor. Of course you know this, but just saying it here for the others. :p
I love how seamless that experience always is when you switch from game to editing in your videos
Another cool thing I can do is make a component in the game code and have it run custom logic in the editor.
Eg. my grass system, along with the editor for painting it, is completely game-side code.
Kinda like how you can make scripts that run in the editor, in Unity.
I saw all those grass markers and icons you have in the level viewer itโs really cool
Ah ๐ Those things are there just so that you can select the object in the scene, rather than having to go through the hierarchy.
I did something like this with the Source engine once, as it was more straightforward than modifying the external editor.
Since it would be annoying if the editor selected the grass if the user clicked anywhere on the ground.
Indeed. I have an editor which opens the levels of several games actually, and it's really handy to be able to have custom data editors in the game code for each one. The editor app binary is the same for both games.
I have this exact problem lol, if you wanna edit the terrain, you have to manually search for the terrain entity
The icons Bjorn mentioned are just a component with a material on them. They vaporize during the export, of course.
Generally I use them on object types that are "invisible" but still have a transform. That also allows me to move things around by dragging the icon around. Eg. triggers.
Then I have an "extended selection mode" which you use by holding down Alt. It allows you to select things that would normally be ignored. Eg. you can just click the ground to select the terrain, or select locked objects if no other unlocked objects were hit by the raycast etc...
I like how the line around an area on the ground animates a fade in and out effect
Like all of the everything in that
It's just a sine wave.
Well, it's a game side thing so it's supposed to be flashy 
I just havent bothered to "stop the time" that's fed to the shaders in the editor.
Which also means that my wind animation keeps running when the game is paused, been bugging me for a long time...
I canโt wait until I have wind animation bugs.
Hrm space station vents 
New level idea
It's just a shader ๐ You can have it today.
Feed the time to your shader, offset your vertices in the VS by a mix of overlaid sin/cos waves or sample some noise. Bob's your uncle.
Nice!
Thank you
Also my game idea just changed
Based on this conversation
So still an obsolete robot escape room game
But as you escape from one level to another you slowly gain more control over the space station and its automated systems
Which you then use to solve the next puzzles
And also changes the narrative of the story
And thereโs like an economy of resources you have to manage to control the station that progresses in complexity as you gain more access
But youโre just trying to escape
But your decisions impact others who arenโt after you who live on the station too
I dunno how you got from VS sine waves to space stations, but whatever floats your boat ๐
Wind animations
Steam vents, obstacles
I have been thinking in my head about the puzzles
Idk how it connected either
Space station was just a preexisting idea
Because no wind on a station
But I could add vents
Which could be hot or push or something
Well, be the first game with windy spacestations, I duuno....
HVAC on a massive pace station that keeps thousands of non-robot inhabitants alive is an interesting concept to think about
I just figured out so much
I gotta write all this down when I get home
So you can basically sacrifice the lives of others to save your self but you will be warned and you will start to see the consequences and it will make later problems worse/different
A good 2D UI is going to be critical
Point and click movement
If you get near something you can control it will appear on screen hud
Going with the point + click? gonna need some pathfinding then
Yeah
Allow me to shill recast/detour
Is there any other option? ๐
Other than rolling your own of course
vblanco has entered the chat 
Oh boy, what did I do? ๐ฑ
lol, hes got a whole recast rant
Oh, I have recast rants to spare.
But at the same time, it's saved me so much time.
same
In fact I also use NanoVG. I feel like I should buy Mikko Mononen a beer at least.
I gotta look into these thanks
So controllable systems, garbage systems, hvac, lights, alarm systemsโฆ.
Ramps and doors
Being able to open a door will be the intro puzzle that introduces you to the system
Your game idea has some LEGO Junkbot vibes ๐
https://www.youtube.com/watch?v=nYOlQcOTji4
Hrmm yeah
Thereโs this line of dialogue in The Professional where Leon explains that distance is a measure of skill, as you become more proficient in his craft you can close the distance to your target
Thatโs kinda how I will use camera distance
This game has a big distance
next game maybe I an get a little bit closer
Hopefully I will have improved my model and animation and render skills as well as my engine
I donโt think I will need any blending for geometry
Camera moves 2 dimensions in gameplay
Just a lot problems I wonโt have
Itโs a 3D game though
alright done walking rosy time for work
today's soundtrack https://www.youtube.com/watch?v=JUNmn3nFVCU
Industrial Elegy - Dark Dystopian Ambient - Apocalypse Ambient Music 2025
My name is Dystrosonic and I aim to provide you with the best dark ambient soundscapes to relax to. Put your usual thoughts aside and let my music take you on a new journey, away from real life.
Welcome to my channel, dedicated to exploring the darker and more dystopian ...
I quarantined fastgltf to the Packager project and now the Engine build time is back down to ~3s, was 12s 
my camera I think I will go with:
struct camera
{
double g; // projection plane distance
double s; // aspect ratio
double n; // near plane
double f; // far plane
double fov; // field of view
std::array<float, 16> p; // projection
std::array<float, 16> v; // view
std::array<float, 16> vp; // view projection
std::array<float, 16> r; // camera orientation
result process_sdl_event(SDL_Event event);
};
I will internally in cpp use glm, but between TUs it will just be arrays
the rendering engine will not know I use glm
it will not do any math
on the bits talking to vk on the cpu side anyway
using arrays instead of proper math types is kinda gross
you'll have to convert it to another type to do anything with it though
the point of types is to be that view
otherwise everything would just be void*
yeah it's more typed than void* but less typed than it could be
I'd assume you're doing this for compile perf reasons but using an stl type for that would be counterproductive
in my bikeshed I don't want things that don't need to know about math to not know about it and to those things that can do math to convert data that can be mathed to their math types I guess
I don't really get it but I won't stop you
I guess it's just a reminder to myself to not do math stuff where it doesn't belong
like hopefully the temptation to avoid doing quick fixes with some * -0.5 on some glm vec3 prior to putting things in a buffer/push constant at the last moment is averted ? idk, I feel like my math has been all over the place
idk maybe it is bad and I will change it
please write things out
g s n et al
using longer variable names wont increase compile times : )
So I guess I understand everything but the rationale for this
What is the renderer doing if not math? Is this just a loophole in your "no graphics api abstraction" rule?
If you feel compelled to put a hack somewhere it'll be a hack regardless of where it is
Anyways I'll stop
Trying to separate things so strongly is basically a form of abstraction itself tbh
When I say I use no abstraction what I mean is the renderer is basically just game code
I just happen to have a barrier in between them for organizational reasons
But that barrier is literally just a render(scene) function call that passes the game state to the renderer
If you try to write the renderer to be completely ignorant of the game, you're going to end up doing extra work on the game side to interface with it
You have game code, and you have API calls, and somewhere in between there you need code that implements the game graphics using the API calls
If you try to make the renderer not do any of that work, you're going to have to do it outside of the renderer
And unless you just put GL calls in game systems, that means you're creating abstractions that are basically just unnecessary work
Vk calls in this case
this and all this other stuff is all Lengyel influence lol
there's no rendering math in his C4 renderer either, there's some allocation math
he doesn't use glm at all
Who calculates the view matrix
the camera
that's what vkguide does too
and my other book also does that
essential game math
That's still basically putting renderer logic into the game, which is something that can be avoided
yes I think constructing the view frustum is rendering
that's why I think I qualified after with vk bits, I think more I am keeping it out of the RHI, even though I don't call it RHI anymore
the whole thing is still a rendering engine and the camera is part of it
I think what would be Ok at that layer though is the NDC conversion
since it's Y down in vk
the only game information about camera is position and its orientation plus fov if its used for perspectiveisms
the camera is used for so much
and perhaps for after effects certain lense attributes for dof/and thingy, i forgot the name, that eye adaptation thing
the frustum defines the viewable area, it's used for culling, it's used for knowing where to position the CSM camera, it's used for a lot more than just fov and perspective and position
it's a vital piece of information for lots of things
the renderer can calculate the frustum out of perspective and view matricles
the viewable area is basically where the game is taking place
All of these things you're describing seem like renderer tasks
the camera could carry csm attroibutes for how many splits you want and at what offset, although those are most likely renderer settings
right and the camera is part of the rendering engine
ok I see so there is a second layer of separation between the API and the renderer?
right
the camera in openspace will just be a shrimple component with 1 fov attribute
auto& materials = m_materials[static_cast<uint16_t>(materialSet)];
// 1. Near pass (cockpit view)
if (cockpitView)
{
BEGIN_LABEL(intlMark);
begin_pass(frame, Pass::InteriorOpaque, nullptr);
proj = m_game.computeProj(camObj, 0.05f, 50.0f);
BEGIN_LABEL(opqMark);
VTechnique& mat = m_materials[(int)TargetExtent::Native][(int)MaterialSteps::OpaqueInternal];
bind_opaque(frame, proj, viewIndex, mat);
// Draw
for (auto const& tgt : cockpitOpaque)
{
draw_opaque(frame, tgt.entity, tgt.index, mat);
}
END_LABEL();
BEGIN_LABEL(transpMark);
for (auto const& tgt : cockpitTransparent)
{
draw_HUD_glass(frame, proj, tgt.entity, viewIndex, tgt.index, MaterialSteps::HUDPrepass);
}
END_LABEL();
end_pass(cmd);
END_LABEL();
}
if (cockpitView)
{
// 2. Distant opaque (continue after internal view)
BEGIN_LABEL(farMark);
begin_pass(frame, Pass::FarPass, targetFB);
}
else
{
// 2. Distant opaque (clear all attachments if there was no internal draw)
BEGIN_LABEL(farMark);
begin_pass(frame, Pass::FarPassClear, targetFB);
}
proj = m_game.computeProj(camObj, 500.0f, 1.425e5f);
BEGIN_LABEL(opqMark);
VTechnique& opqMat = materials[(int)MaterialSteps::OpaqueExternal];
bind_opaque(frame, proj, viewIndex, opqMat);
for (auto const& tgt : farOpaque)
{
draw_opaque(frame, tgt.entity, tgt.index, opqMat);
}
END_LABEL();
BEGIN_LABEL(terrainMark);
viewProj = proj * view;
draw_terrain(frame, terrain, viewProj, eyePos, false, materialSet, farTerrainChunks);
END_LABEL();
glm::mat4 orientProj = proj * viewOrient;
VTechnique& skyMat = materials[(int)MaterialSteps::Sky];
draw_sky(frame, sky, skyMat, orientProj);
flightsimposting
Example of one of those steps
void Renderer::draw_sky(FrameData& frame, Entity sky, VTechnique& mat, glm::mat4 viewOrientProj)
{
auto& comps = m_game.comps;
VkCommandBuffer cmd = frame.resources->m_commandBuffer;
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, mat.pipeline);
auto& obj = comps.renderables[sky];
auto* mesh = get_mesh(obj.meshName);
// Push constants
struct
{
glm::mat4 mvp;
} constants;
constants.mvp = viewOrientProj;
vkCmdPushConstants(cmd, mat.pipelineLayout,
VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(glm::mat4), &constants);
// Bind VBO/EBO
VkDeviceSize vertOffset = 0;
vkCmdBindVertexBuffers(cmd, 0, 1, &mesh->m_vertexBuffer.m_buffer, &vertOffset);
// Draw object
vkCmdDraw(cmd, mesh->m_vertices.size(), 1, 0, 0);
}
cool stuff
This is what I describe as low-abstraction in my projects since the renderer is basically just game code that does raw API calls
so something like calculating view matrices would just be thrown into that bucket too
At the start of the render() function there's a step that builds up std::vectors of data associated with the draw commands
Moreso for drawing opaque objects since they need to draw on ssbos of transform data etc. unlike this sky pass
๐
And then you have maths
and then you have helper functions to call the maths functions for you
why is cameraTransform a special type
bad decisions made early on
this camera stuff is taking a bit of work to put together
camera done โ
about same frame time
four second builds now, long ways away from 79 seconds though
3743 loc now
my frame time before was like 3-4ms, I think CSM was like 1ms of that
my frames are like 10x faster atm then what they were before
I don't think deccer cubes are going drop me down by 10x but will see
I just need to pull materials out of the demo cube and then I can move to deccer cubes, which involve adding texture/sampler support back into the engine, and then I can do cryotek sponza
I am really over generative ai in a big way, and have cancelled all my ai plans, except coderabbit, it does have problems, but they did a really good job with it, I like this diagram it gave me
I think adopting VK_KHR_dynamic_rendering_local_read means I can't use renderdoc anymore
hrm
I think I may have to use it anyway to get subpasses with dynamic rendering
renderdoc documentation says they don't support any KHR extensions
that would be a massive workaround to support just renderdoc, even worse than what I had to do to get bindless & support renderdoc
just been working on my powershell scripts that watch for slang shader changes and rebuild them
working mostly nicely although I don't know much about .NET stuff
got color and directional lighting in though
ok will really need to start on materials now
my shader compiler is doing great though
it runs in the background and just builds everything whenever I edit the files
that was so much work
it's not even correct yet, I just hard code the first mesh and surface in the renderer right now, I am getting it all out though
I'm going to do deccer cubes tomorrow, then I will have to fix all that
and that will probably take a couple of days maybe because of the textures
and all the scene graph stuff
How shit is VS2022 compared to 2019 in your opinion? I'm contemplating switching
<unknown> shit is starting to piss me off. Intellisense is hooked to a rand % 2 or something I swear
It's less shit than it used to be but still has a few annoyances
But you'll get used to it, it's not that different
I should at least try and see for myself then ๐
Suddenly, VS hate outta nowhere ๐
I like vs2019 a lot that's what I still use at home
I use VS 2022 but my project is on the old 2015 compiler.
VS 2022 + C# + AOT = 60GB RAM eaten up 
Itโs mostly good but sometimes it decides something is a warning that it didnโt used to and used to build fine. Sometimes iI just have to restart it because it thinks everything is suddenly an error.
I have warnings configured as build errors
I didnโt use vs2019 much
I mostly like it. Itโs much better than visual studio code
the worst ones were 2002, 2003, 2005, 2008, 2013
I was using vim during those years
although c++ compiled almost as quick in 2008 as in vc6
(i added ntlm auth into TortoiseSVN back when, which also borked my whole c# dev environment then, had to have it renewed, was a company pc :D)
What, 2012 was infinitely worse than 2013 ๐
THAT WAS THE ONE THAT SCREAMED AT YOU IN ALL CAPS ALL THE TIME OHMYGAWD
right i wanst sure if it was called 2012 hehe but internal version was 11 iirc hehe
Yeah vc11 was 2012
that was indeed a horrible version as well
2013 was released just one year after and was actually quite decent, but wasn't supported by any Xbox XDKs, so no-one at our studio used it, except me who had to hack some msbuild files to get our stuff to compile ๐
: )
was it 2013 already or 2015 where they gave you an option of how you wanted your FILE MENU IN CAPS OR STANDARD AS USUAL
it felt like it took them ages
It was 2013. It was ALL CAPS OHMYGAWD by default, but they allowed you to toggle it off
I started my engine on 2008 and it's been through almost every single version since then except 2017, and now sits on 2019.
2022 is actually a bit faster in my experience than 2019 with really big projects.
i was just about to say
Probably because they finally ported it to x64
I remember the days before dark themes.
I think 2010 was the last one without a dark theme.
Yep, so it was.
I increased my max swap chain images from 2 to 3 (and had to fix some bugs) no effect on performance when you're drawing a cube of course and just 52 events per frame
also
its time you throw nanite 3.0 and vsm 2.0 at it
most of my frame is just the individual commands that you configure on a pipeline renderpass
that big white bar
it's just configuring the pipeline one item at a time
I can't actually see how long it takes the ms is blank
btw, it sounded like you like ambient music too - there was some playing in your earlier recording
SCP: Research Center, Part 2 โ 3 Hour Ambient with Rain Sounds
Track: Zerofuturism - Sparkles (2022)
Inspired by Etherium Ambient:@EtheriumAmbient
Monolith - Dystopian Ambient: https://youtu.be/35yYuDNPhtY
Bandcamp: https://zerofuturism.bandcamp.com/album/obsidian
If you want to tip me: https://ko-fi.com/zerofuturism
Join YouTube Membership t...
because all those things literally take no time i would imagine
this is exactly the stuff I listen to while coding 
yeah I guess graphical representation on screen does not represent time spent on a timeline view
tons of ai-sloppified channels are coming out of nowhere for some reason, but they have some nice ambientisms going
gpu didnt even blink
I just assume it's ai generated music at this point idk
thats why measuring frametimes and performance when you render absolutely 0 is meaningless
very likely
so 0 gpu time 
fastest renderer on the planet hehe
yeah so recording those pipeline cmds takes zero time
@astral hinge that thing I said about SO cmd recording taking a long time was previously
because I didn't know how to use nsight ๐
it's all just fence time and resetting the command buffer wait time
man resetting the command buffer takes longer than waiting for a fence hrm, command buffers aren't cheap I guess
nsight is great
my favorite thing about it is just works with the extensions I already request
I do appreciate all the hard work people are putting into renderdoc for a thing I dont' have to pay anything for, so I am not complaining
let me put in the ALL_COMMANDS and see if that explains my frame time being 300 microseconds instead 3ms
I don't know why my frametime is so much shorter now
I must have been doing something really dumb before
10 extra microsecond difference between ALL_COMMANDS and actually using proper stages
I guess I am just not drawing/dispatching enough for any of this to make a difference
alright, time to build a scene graph and load them deccer cubes
I think I was just doing something really dumb in my previous engine
deth added an animated version an hour ago or so ๐
oh
that might have beena left over from my dinglefartaroundisms
yep
hehe
and potentially for StarFoxe3
I guess I have learned that at this point performance checks are mostly a did I massively mess something up somewhere check, because there's basically nothing
I wonder what I was doing before that took up all my frame time I never properly instrumented the zones because the build time was just so bad that took priority
anyway I just need to start writing scene graph code now and then start on game code
I bet it was probably heap allocation somewhere each frame, maybe when rebuilding the scene graph
I think the first game play thing I will do is add recast and just figure out click and point pathing, have a scene with just a floor and move a demo cube around with click and point
in yesterday's stream unvestigate explained his use of recast and navmesh in great detail and it was really helpful
Might wanna get sponza running first 
then you can pathfind around sponza
I don't think sponza will look like any of my levels
well I got the scene graph stuff working
I need to do textures next
I don't want to reboot ever again 
build time is now 4.89 s and frame time finally dropped a little bit, about down to 2K FPS from 2.5K, frame time increased to about 400microseconds from 300ish
still all way better than any of this was before the reboot
I wouldn't stare at the microseconds too much at this stage. It's fully possible that GPU driver simply behaves differently with so little to do.
No offense of course ๐ I just meant compared to a full game scene
oh right I understand. I guess I'm monitoring it because before I restarted my project I got into trouble with build time (79 seconds, and much slower frames for the same amount of geometry). I am new to Vulkan and C++ and I got myself into a pickle and have just been climbing out of it
Yep, it's your project so you are free to optimize however you want. Just know that your hotspots in the whole pipeline are gonna be different with a few objects vs a few hundred/thousand objects.
yes that makes a lot of sense, thank you
Also, keep in mind that GPUs generally don't really like rendering at thousands of frames per second.
I mean the hardware isn't really setup to do that.
Or so I've heard, not really sure if it actually hurts the hardware or not. But I would probably cap it at like 500fps or something anyway.
yes I will target 60
flecs has a way to cap frames I used to use in the past
I may use that or just write my own thing
Right
There is something called "coil whine" which may occur with very high frame rates, but a quick googling seems to suggest it's not gonna be harmful to the hardware.
It's annoying though ๐
But yeah, vsync is probably still the "right" way to limit framerates, but in today's world with 17 different ways of doing vsync or whatever, it's handy to have a software based limiter as well if you need it.
coil whine doesn't sound good at all heh
It's not and it can vary between GPUs. Some have it, some don't.
I actually have no idea how to do vsync with vulkan, with opengl and glfw I could change the swap interval, now I just rely on the present mode swapchain interval when my fence is released it tells me another swapchain image is ready I draw another frame
It's set through the VkPresentModeKHR IIRC (it's been years since I have done raw vulkan)
Anyway, I don't blame you if you get confused by vsync. I am too ๐
Just when you think you have it covered nvidia releases something like g-sync, and then you have to figure that out.
Or FreeSync
Or adaptive vsync
In OpenGL FreeSync/G-Sync "just work" for me (as long as vsync is enabled), do you have to do anything to enable them in Bulkan?
I don't know actually. It's my understanding that there are some "best practices" when it comes to settings if you want to get the best out of G-Sync, but I don't know if the graphics API matters.
Stuff like this: https://www.reddit.com/r/pcgaming/comments/agsulk/proper_g_sync_settings_recommended_by_blurbusters/
I should add that I don't have a G-Sync or FreeSync monitor, so I don't know if the above tips are worthwhile.
I don't really understand the purpose of gsync with vsync off. It's kinda weird that it's even an option tbh
The tip I have seen in multiple places is to specificaly have it off in the game's settings, but then forced on in nvidia's control panel.
Ah I see, I wish we could get some developer docs from AMD/Nvidia
The reddit crowd tends to be susceptible to magical thinking ๐
Aint that the truth.
The original "BlurBusters" article is something I have seen linked in several places though, so it might be worth looking into.
G-SYNC Module The G-SYNC module is a small chip that replaces the display's standard internal scaler, and contains enough onboard memory to hold and process a single frame at a time. The module exploits the vertical blanking interval (the span between the previous and next frame scan) to manipulate the displayโs internal timings; performing G2G
That thing.
Anyway, I am gonna stop polluting Bjorn's project with G-Sync now ๐
I donโt mind! Thanks for the knowledge sharing. I went quiet because it was 4am and I needed sleep 
I just need to add textures and then on to sponza
Yeah the west coast just woke up 
I am typing on on my phone from bed lol
It'll be sleepy time in Finland soon.
There's always someone awake on this server
Well, someone's gotta post those frogs
Free thread advertising.
When I said I didnโt understand vsync with vk I more meant as a means to get a nice frametime cap. The mailbox present mode with 3 swapchain images setup I have prevent any screen tearing as with my fence I donโt draw until presentation is done. Thatโs why I suggested I would use a software solution
Thereโs not any way I know off to cap via SDL and vk like I would with OpenGL
I just get another image and I start a frame
Maybe there's some kinda thing you can wait on?
Yeah flecs has a thing
I remember back when I did DOS programming vertical retrace was just a register you read from. You had to poll it and make sure you present during that window
Low-tech solution:
double dt = mTimer.getTimeSinceLastUpdate();
if(RenderOptions::getBool(RenderOptions::OPTION_FRAMERATE_CAP) &&
!RenderOptions::getBool(RenderOptions::OPTION_ENABLE_VSYNC) &&
mMaxFramerate > 0)
{
BASIS_PROFILE("Wait for target delta time");
double minDeltaTime = 1.0 / (double)mMaxFramerate;
while(dt < minDeltaTime)
{
mTimer.update();
dt += mTimer.getTimeSinceLastUpdate();
}
}
set_target_fps https://www.flecs.dev/flecs/group__world__frame.html#ga112fad901867482f02cec9f530224076
Seems odd to have that functionality in an ecs
Yeah, why does the ECS care about "frames" at all?
Shouldn't you in theory be able to create an ECS in local space, fill it with stuff, query it a few times and then throw it away?
Though I guess these days flecs might be some kind of framework covering more than just an ECS?
What made you choose flecs over EnTT?
*Local scope, not local space
Oh right bjorn doesn't like templates is probably why ๐
Well, who does? ๐
slowly steps backwards
I bet @thin oxide has a written about why flecs has this api somewhere. The guideline docs discuss integrating flecs pipeline in the context of frames
flecs amazing I really like it, I have not spent much time with entt, just start using flecs and it waa magic
Joking aside, more power to you. Templates was one of the main reasons I started moving towards zig.
I actually added a small template function. I donโt mind them sparingly. I just donโt want massive meta programming
Most of my algorithms are templated
Also I am sure flecs C++ uses templates
Oh sure, I use templates. Doesn't mean I like them
render_meshes is a template in my engine 
Well templates are a way to write generic functions, and data types, and I don't have a problem with that. A LOT of my zig is using comptime generics, which is the same thing, just differently presented.
Yeah generics are handy itโs just horrible in C++ compared to other implementations with bad errors, random stuff unrelated stuff breaking when you get things wrong,the lack of editor support while editing and the mix of templates and macros in fastgltf and vk bootstrap just make the code require a lot of reading to figure out basic stuff if you donโt have prior context
zig comptime is lovely
Have you guys tried C++ concepts? It fixes many of the issues with older style templates
I am not familiar with that
It's available in C++20, which I think most of us are on now
If a template is written with constraints and concepts it both looks more readable and gives better error messages when it fails
Alot of libraries still support 17 so don't use them, but you can use them
I think it is like the worst when you get RAII errors because of a template bug. Because something somewhere got lost in some scope and you get an error about referencing a deleted type you arenโt using and the error line points to a macro
Yeah macros are mostly bad IMO
A holdover from C
If you've even seen all the enable_if crap, that's all gone with constraints & concepts
From what I've seen it seems like flecs has more engine inside it than just a plain ECS database system
You got your basic entities which are just integer handlers, then you got components and tags where tags are components without args, and you can create relationships between entities, relationships are I think just entities themselves, then you have systems that run code on queries,there other ways to run them. It all is scoped to worlds, which is like a namespace. The ecs state progresses through pipeline stages which you can configure to represent frame stages important to you
Thatโs my basic understanding of how flecs works, I simplified it a bit and I havenโt used v4 and I may have said something incorrect
I donโt know if thereโs more engine like features. The frame rate thing seems like a utility
I suspect for my game nearly most of my gamecode will be in a system
Thatโs how I wrote blockens
I added a Level.cpp which translates all the gameplay objects to graphics objects and then Graphics.cpp just runs the graphics objects through the render pipeline
I have a graphics objects storage buffer and each surface gets a pointer to whatever graphics object it belongs to in the shader
Level.cpp also knows where things are in the world and knows about all the geometry, it just doesnโt know about how stuff gets rendered just what state is needed for rendering
I am set up nicely for game play I think
Weโll see
I am sticking with it, I am done bike shedding
If this makes for a bad game I will make the next game differently
I am not revisiting any of this low level stuff right now
Once I have textures and add CSM back I am basically done with vk code. I will just be adding pbr images to gltf and change matrials and transforms in Level.cpp
No plans to use compute atm
Oh maybe I want decals
At some point
My experience has been the exact opposite; it got worse over time imo. I started with 2008, then 12, 13 15 17 and 19. Specifically, intellisense got more shit. I also used more and more features of c++, especially templates. But still, it is nowhere near fast as it should be.
Although, I installed 2022 and so far, intellisense is not bad at all. It's responsive at least, ctrl + shift + space consistently gives me the function signatures. And it knew what ctre types were instantly, unlike 2019 which treated it as some foreign entity.
Oh and particles
Seems so from my limited experience so far. Hopefully it stays that way ๐ค
Yeah I was shocked 7-8 years ago when my brand new gtx 1080 was purring while studying graphics, with 3000+ fps on simple scenes. And then I learnt what coil whine is ๐
I think it's a cool phenomenon, but I'd be annoyed if it did this on 60+ fps instead of thousands-ish fps.
my 4070 whines when i play X4 locked at 75Hz ๐
Damn that's annoying
god knows why, other games dont
Iirc, each coil whine case may be due to a different part of the chipset making this noise. Although I doubt that X4 stresses the part of the chip no other game does
Weird
Coils vibrate it's just physics, there's not much you can do about it
but after a few mins i dont hear it anymore
i could try to play with nvidias control panel perhaps, but i cba
I used to have my case on my desk back when I had a huge L desk and being 40-50 cm to the left of the case I could hear everything
Now I have it under the desk and I don't hear anything
Flecs, bevy, DOTS, others have utilities to schedule & run systems. So a "frame" for the ECS is basically just run all systems for one tick
Not related to graphics stuff
@cloud rivet You probably stated this before but I missed it; What are your goals for A) specifically Rosy and B) studying graphics in general?
IIRC, graphics is a hobby for you. I understand you have a game to develop after you develop Rosy? Are there any commercial/finanical expectations for your game? Or is it a passion thing?
I want to make a game now and use the code I have to do it. I plan on continuing to read and learn, but more focused on making an actual game now
Itโs still just a hobby
I donโt plan like on releasing anything
Gotcha ๐ Looking forward to your upgrades, so far you have a good pace it seems
If people want to try and build my repo I wonโt stop them, it wonโt have any assets though
I love vulkan, it just has zero mystery
Itโs a lot of stuff to do to render is all
Vulkan makes shader life easier, because of bindless access to textures and data, and because I donโt have to worry about gpu glsl bugs.
if you're already comfortable with opengl and you want to learn graphics programming I think it will be a bit of a time sink and while I prefer vulkan it did take 3 months of my time to transition
well I also was learning C++ at the same time and well 1 month was gltf and CSM stuff
so probably would not take you as much time
Also if you don't restart midway through ๐
this is just a little bit of house keeping so I can move fast after
I will have crytek sponza at least loading by end of the week I think
I now have a much faster build time, faster frames, a whole bunch of bugs fixed and a custom asset format, and an idea for how to build a game ontop of all this
well, today I got to the part where I export all of the base color image and sampler info from a gltf to my asset format and ktx2 images I converted from the gltf are getting uploaded to the gpu, but I still have to create the image view & sampled image sampler descripter sets and then I have to put all that into the material buffer and then update the shader to write from it, nearly there, was hoping to have deccer cubes done by the end of the weekend, I keep underestimating how complex gltf formats are and how many objects you have to create & manage with vk
hope to finish it up tomorrow, but it's a workday not a lot of time for all this stuff on workdays
I don't like leaving branches unmerged for the next day either :| can't merge this yet though, even though it builds and is fine, it just isn't complete https://github.com/btipling/Rosy/pull/33
Currently manually converting all the images too with the nvidia texture app
Would like to automate but I need to just keep my eyes on getting to gameplay
So taking some shortcuts
That tool is awesome though, converts to ktx2 and generates mipmaps and can view them
Gotta stay the course until it's done. :')
The code I rebooted was like a โmy first ever C++ projectโ kinda mess you can imagine it deserved to be rm -rf and it got what deserved.
I got some extra rm -rf laying around if you want one
this is fake news now, SDL3 is released
Yesterday I was stuck for about a full hour on just figuring out what I would call what is now Level.cpp. Just frozen, couldnโt make progress on code because of a naming issue
I still donโt like the name
Game.cpp : >
But I couldnโt not write code, but it was like a real problem for me and it didnโt feel good and I donโt remember having that happen before
idk just ask yourself what that thing is supposed to contain
I tried that
Anyway it was like writers block or so
yeah ๐
I have PTSD from previous version names and had to avoid them so no rhi or scene
I looked through C4, Frogfood etc for guidance
https://github.com/deccer/OpenSpace/tree/main/src here have some more inspiration : >
game.cpp is what I called my first one
Now I call it something_test.cpp
physicstest.cpp, geodesytest.cpp, networktest.cpp, etc
Contemplating making ASO open source just to traumatize you guys with the horrors inside of it
Same
But I don't think even that would convince deccer so idk if it's worth it
I already made a small demo game in the exact style of srs just so I could show him
Here's the one place I use runtime polymorphism in my project
Global vector of structs of function pointers
You basically just wrote your own vtable lmao
Yep
At that point I'd just use inheritance
do_downscale_shitty_lanczos3 
At some point I might remove the shitty part
i am convinced that your stuff makes sense demon (unironically)
that's the trouble, removing the shitty parts
When it gets good
the shitty parts will reveal themselves the more experience with the language and using it you get
I should call it Shitty.cpp
RosyDemo.cpp
maybe I'll eventually have a Rosy Game Studio and Rosy's silhouette as the logo
the Rosy silhouette from my pfp
I love Vulkan, and I am glad I switched, but I'm never recommending Vulkan to anyone ever again
This adding images back from gltf has been so much work to do again lol. Even with bindless. I think maybe I had not fully evaluated how much work I had put into this before.
you know but once you do it you did it and you never have to do it again, or until the next reboot 
hehe
cool, my lighting is broken, I will fix tomorrow but
texture images โ
https://github.com/btipling/Rosy/pull/33/files 23 commits and 722 lines to pull textures out of gltf and render
fixed my lighting
Wait I thought Tracy showed its own fps
so the frametimes are incorrect?
let me check
ah it's showing your app's frametime
I got confused because the tracy client also has a setting for the render rate
nvidia shows the same thing in the overlay but I can't take a screenshot of it for some reason
idk
this is crytek not intel
nvm I'm double confused, tracy's setting is for the profiled app
I'm I don't have any normal mapping or any of that yet
what you're seeing is your app's perf
is that good or bad perf?
is 500 fps bad?
the curtains have issues when I move, also I don't have any transparency or blending support yet
idk I have lots to do
probably aliasing. do you have mipmaps?
yes
it's in the bid