#GrubStomper29's OpenGL Sandbox

1 messages · Page 3 of 1

gilded shell
#

depends on how that would go on a resume

night shoal
#

doesnt matter

#

2d is 3d

#

the important bits are that you can explain how the graphics pipeline works

#

api doesnt matter

#

or how you would implement certain things to achieve certain things, like effects or techniques

kind sparrow
#

nobody really cares about the contents of your personal projects unless they are directly pertinent to the job duties

#

Otherwise it's just another software engineering project

#

which is still looked at favorably, it's just not going to give them a "wow this is precisely what we need" response

gilded shell
#

I see

west trail
#

btw, you may want to pack every has****Texturefrom your MaterialUbo into single uint to reduce size a bit

west trail
kind sparrow
#

Personal preference

#

I don't abstract that stuff much

#

I have a

struct Mesh
{
    std::vector<Vertex> m_vertices;
    std::vector<uint32_t> m_indices;
};

and a

struct GPUMesh
{
    GLuint m_vao;
    GLuint m_vbo;
    GLuint m_ebo;
};

and that's it

west trail
#

talking about this stuff

kind sparrow
#

What about it

#

If that's in a function and not copy/pasted then it's fine, I do the same

#

I have a function that just takes in a Mesh, does all that stuff, and spits out a GPUMesh

west trail
#

in main, multiple times creating and filling buffers by hand, I abstract that stuff into single line

kind sparrow
#

It's fine

#

He can clean it up later semantic-compression style

gilded shell
#

exactly

west trail
#

I know, but as of now -its raw to me

kind sparrow
#

I find it preferable to start with everything out in the open and create abstractions around emergent patterns

gilded shell
#

the effort to make some sort of abstraction is higher than just copy and pasting and changing what i need

#

if it gets to the point where it does obstruct and cause confusion then ofc its bad

west trail
gilded shell
#

yeah

#

you do have a valid point to an extent

#

i hate making it seem like “im right and smart and youre wrong and stupid”

#

just different coding styles

gilded shell
#

i have one variable named vertOffset and another named vertexOffset bleakekw

night shoal
#

i hope you pick the right one after that incident

gilded shell
#

it didn't matter because I just needed to add both together

#

i believe vertOffset the amount of vertices already in the buffer

night shoal
#

vertexOffset just says something abuot some vertex Offset

#

the amount of verticles should be vertexCount

gilded shell
#

and vertexOffset is a parameter to add to each index, used for the amount of vertices already in the scene aside from just the model

#

so its more like local and scene offsets

night shoal
#

it do be conchfusing this way

gilded shell
#

indeed

#

ill fix it later™️

#

just switched to 8bit indices and im saving ~120mb with bistro, now its time to do this

gilded shell
#

I hate trying to name things

#

maybe just mPrimitiveUniforms and mBlendPrimitiveUniforms

junior sparrow
#

how about mTransparentUniforms

gilded shell
#

transparent is too vague, especially since alpha masked primitives can go in the opaque pipeline but blended primitives can't

junior sparrow
#

how so? It makes sense transparent means that you can see through it

gilded shell
#

you can also see through alpha masked triangles but not in the same way

junior sparrow
#

I mean yeah but it's not like a glass

gilded shell
#

i'm wasting development time bikeshedding names 😭

junior sparrow
#

I would separate masked from opaque and have own shader for masked. Discard is not cheap

#

In this area you are head of me. I treat every primitive as opaque kekkedsadge

gilded shell
gilded shell
#
std::vector<PrimitiveUniforms> mPrimitiveUniforms{};
std::vector<PrimitiveUniforms> mBlendedPrimitiveUniforms{};

settling with this

junior sparrow
#

Does OIT need separate framebuffer?

#

I have never came around to implement it

gilded shell
junior sparrow
#

that sucks, but there isnt any other way

gilded shell
#

I hated every second of what i just did

gilded shell
#

still searching for gi solutions

#

scene voxelation is unacceptable imo

#

unless i can do it dynamically somehow

night shoal
#

RSM

junior sparrow
junior sparrow
#

Light Propagation Volumes is much nicer

gilded shell
#

okay

#

@oak moat quick question. The result of these culling shaders is not only the new index buffers but also an array of parameters for the MDI?

oak moat
#

no it's just one mdi parameter

gilded shell
#

wouldn't that make it just di then

oak moat
#

yes

gilded shell
#

then I lose my draw_ID 🤔

#

gl_draw_id or wtv

oak moat
#

and you gain meshletID

gilded shell
#

uhhh

#

is that stored per triangle?

oak moat
#

per vertex

gilded shell
#

oh wow

#

actually

#

its probably not that big of a mem impact

oak moat
#
void main() {
  const uint meshletId = gl_VertexIndex >> 8;
  const uint primitiveId = gl_VertexIndex & 7;
}```
gilded shell
#

oh ig you could pull it that way

#

but i think meshopt doesn't consistently deliver meshlets with X amounnt of vertices

#

ig i could store padding vertices

oak moat
#

it doesn't matter

#

no it doesn't matter

gilded shell
#

huh?

oak moat
#

if you do that preprocessing step it doesn't matter

#

the data is packed

gilded shell
#

im trying to follow

#

gl_VertexIndex is defined by ogl, no?

oak moat
#

yes

night shoal
#

no

#

its gl_VertexID

#

gl_VertexIndex is bulkan

gilded shell
#

oh well same thing

oak moat
#

vulkan brainrot

night shoal
#

but yeah same thing, but ze compiler will not know it

gilded shell
#

let me think

oak moat
#

if you bind an index buffer, gl_VertexID is whatever the contents of the index buffer are

#

otherwise it's just counting the vertex index

gilded shell
#

I see

#

is there a paper on this I can read so im not constantly annoying you

oak moat
#

you can read Jasmine's blogpost on meshlets

gilded shell
#

zeux?

oak moat
#

I could also just write up a quick example in GL

night shoal
#

i need to learn this too at some point

gilded shell
oak moat
#

I've done this a trillion times so it would be weirder if I couldn't KEKW

#

legit it's muscle memory at this point

#

my dreams are haunted by meshlets

night shoal
#

-meshlets +metis

gilded shell
#

let me see if this blog is enough first

#

i see, subcommands scale badly

#

bevy has a nice naming scheme

#

better than gltf's "primitives"

#

ohhh I forgot im decoding the indices

#

so I can just put whatever in there anyways

#

I get it now

#

So in conclusion I need to use compute to build a single indirect draw parameter buffer and a large index buffer that is later used to decode meshlet/material IDs an whatnot as well as the actual vertices

#

now I just need to implement this yikes

gilded shell
junior sparrow
#

voxelizing scene is rendering scene from 3 axis and writing color to 3d texture and thats it

oak moat
#

you can also just build the sdf itself offline and then just combine them in a global sdf at runtime

junior sparrow
#

also a option

gilded shell
#

i see

gilded shell
oak moat
#

perhaps

gilded shell
#

perhaps is scary

#

maybe i can mix BVHs?

#

sdf for static and something else for skinned

gilded shell
#

there is also this option

#

i imagine that would fail catastrophically and cause lag if the user just spun around really fast though

gilded shell
#

as some of you saw, I am now pulling vertices from an SSBO

#

I am getting this warning now though API, PERFORMANCE, MEDIUM, 131218: Program/shader state performance warning: Vertex shader in program 12 is being recompiled based on GL state.

#

I believe it started once I took the VBO out of the VAO

kind sparrow
#

It's probably fine

#

It doesn't sound like it's saying there is a performance issue, just that it is specializing your compiled shader for performance reasons and that this message is of medium-grade importance

#

It's probably medium because it's recompiling it on the fly which could cause hitches if it's happening at random points during gameplay or something

west trail
#

What are the advantages of pulling vertices from ssbo instead of vbo?

gilded shell
oak moat
#

hard to manage vertex types

west trail
#

How many vertex types do you need? At this point I have like 2 and cant imagine how you can overcomplicate that

oak moat
#

I mean even 2 is too much

#

do you suballocate buffers?

#

if you don't then you have no issues of course

west trail
#

Suballocate buffers for additional data?

west trail
kind sparrow
#

lvstri is a terminal bikeshedder he doesn't do animation

west trail
#

Ah

#

But i still dont get what he meant by "suballocate buffers"

kind sparrow
#

Perhaps he was referring to vertex buffers themselves rather than pipeline layouts

#

You can still have all your vertex data in one VBO even if you have multiple layouts

west trail
#

I am doing that, vertex type is getting automatically desided based on number of available animations in gltf and then my model structure receives that one vbo

#

(the code is a mess and anims still dont work)

kind sparrow
#

I mean allocating one VBO for the whole application and allocating chunks of data out of that pool

gilded shell
#

Im really only doing it to put some extra data in the bits of the indices

oak moat
#

the code is a mess
yes exactly KEKW

west trail
gilded shell
west trail
oak moat
#

I could give more concrete examples, but once you get to buffer suballocation then you'll get what I mean

gilded shell
#

im trying to break this draw batching into smaller steps since i dont have the time to write it all in one session

#

i think the next step could be to get the compute shaders up and establish their inputs

#

i think it’s two compute passes—meshlet culling then triangle culling

gilded shell
#

I think first the triangle cull pass

#

it would probably be easier to build off of that

#

@oak moat I need advice

#

are the meshlet cull and triangle cull in two different compute passes?

oak moat
#

you can forget about tri culling

#

get this thing to work

gilded shell
#

regardless I need to build the trangle buffer anyways

oak moat
#

no it's harder

#

like I said

#

get this to work first

#

no culling

gilded shell
#

well yeah I plan to skip the cull step for now

#

but still, don't I need to batch all the index buffers together into one big one so I can do the single renderpass?

oak moat
#

yes

#

but forget about culling

#

you will think about it later

gilded shell
#

then

oak moat
#

no thinking now

gilded shell
#

right right right

#

however

#

building the trangle buffer needs a compute pass

#

do you recommend one thread or whatever the right vocabulary is per triangle?

oak moat
#

yes

gilded shell
#

i see

#

thank you very much for your help

#

alright i wrote 5 lines of code im done for the day time to relax

night shoal
#

XD

gilded shell
#

all in on black

night shoal
#

good luck

gilded shell
#

i lost 😢

night shoal
#

back to coding then

gilded shell
#

nah im on minecraft now

#

ive been productive all day, its time to sit down

night shoal
gilded shell
#

i think

#

one invocation per triangle, as many invocations per work group as possible?

#

ill need to research

#

“After reading these section quite a few times over I find the ‘best’ solution is to maximize local invocation size and minimize number of work groups because you then tell the driver to omit the requirement of invocation sets being independent. Fewer requirements mean fewer rules for the platform when it parses your intent into an execution, which universially yield better (or the same) result.”

gilded shell
#

@oak moat Why don't I use a thread per meshlet and loop through all triangles from there? that sounds far easier and looks like what bevy does

#

sorry if my constant questions are annoying

oak moat
#

it's slower

#

as far as I've tested

gilded shell
#

i see

#

im not sure how to go about organizing workgroups and invocations

#

i might be able to do workgroup per meshlet, but since each meshlet doens't consistently have X triangles, could it waste occupancy?

oak moat
#

sure you could have idle threads

gilded shell
#

what do you do?

oak moat
#

having idle threads does suck yes

#

does it suck more than having N * 3 memory ops per thread?

#

as far as I know no, but you can test both approaches

oak moat
gilded shell
#

I mean

#

I would definitely have to look and see how often meshopt gets close to 124 tris per meshlet

oak moat
#

just go with the easier approach for you currently and profile

#

nah

#

you can simply define a lower bound and use that as workgroup size

#

i.e 64

#

and process MAX / 64 + MAX mod 64 triangles per thread if threadId < MAX mod 64

gilded shell
#

I see

#

effectively splitting the large meshlets over 2 groups?

oak moat
#

which is the correct approach and the fastest one, but as you said it's harder to think about

#

so just go with one thread per meshlet and big loop

oak moat
gilded shell
#

alright

oak moat
#

it's just some threads will do 2 tringles and some will do 1

gilded shell
#

and im sure my gpu wont have much trouble rendering bistro

#

Oh!

gilded shell
oak moat
#

no

#

at best you'll probably do worse than what the driver can optimize for you because they're tricky

#

plus there's only one usage for them in what you're trying to do

#

which is atomic scalarization (done automagically by drivers usually)

gilded shell
#

I see

#

if it wasnt obvious, Ive never used compute shaders before

gilded shell
#

GLSL doesn't have fixed width ints?!?

#

thats gonna be really finicky

junior sparrow
#

what do you mean?

kind sparrow
#

There are extensions for them I think

#

uint is always 32 bit

gilded shell
#

right

kind sparrow
#

You can pack into those or use an ext

gilded shell
#

im looking for uint8

#

ill have to see if the extension works with opengl

junior sparrow
#

vulkan has one 😉

kind sparrow
#

I assume this is implemented and not just a proposal

gilded shell
#

this looks like exactly what im looking for

gilded shell
#

now I have to figure out what exactly I'm writing to

#

bevy mentions "reserving space" and never elaborates, and I'm pretty sure dynamic allocation is impossible here

#

maybe they have a large index buffer able to fit every scene triangle, but that seems wasteful

junior sparrow
#

for a hobby project its fine

gilded shell
#

I thought so

#

im bikeshedding too hard rn

#

but I want a comprehensive plan before implementing anything

#
At load time:
Have transforms (per primitive) and materials on GPU
Need array of all clusters

Generate empty index buffer large enough to store every single triangle in scene
Generate empty indirect draw buffer

At run:
Upload per primitive array that notes what clusters need rendered

Loop through each cluster and add all its triangles into a large index buffer, each index being encoded with material/transform data
Update indirect draw buffer
gilded shell
#

i am still alive btw

gilded shell
#

base 128

gilded shell
#

I need a new way to organize my desktops

#

I just have one for the main task and the other for internet browsing, discord, and music

#

and a lot of times the main task becomes this:

night shoal
#

i have downgraded from 3 to 1 screen

#

i dont mind many windows alt+tab works well for me

#

since it can toggle windows back and forth i always know which window was last or know how many tipes i have to press alt+tab (or shift alt tab)

#

but yeah 🙂 nvidia nsight doesnt make this better

gilded shell
#

Whenever I get this project in a good enough state, I want to remake my vulkan forest scene on here

#
  1. It will hopefully look much better with pbr and csm or vsm, and hopefully will have some gi approximation or at the very least ibl
#
  1. it should be a solid testament to optimization techniques mattering much more than choice of api, since the original had no frustum/occlusion culling or gpu driven rendering
gilded shell
#

we have triangles

gilded shell
#

closer

#

I'm messing up on reading the cluster id from the indices

#
uint index = (clusterId << 6u) | indices[clusters[clusterId].firstIndex + i];
writeIndices[bufferStart + i] = index;
#

thats the encoding

#

this is the reading:

uint clusterId = bitfieldExtract(gl_VertexID, 0, 26);
Vertex vertex = vertices[bitfieldExtract(gl_VertexID, 26, 6) + clusters[clusterId].vertexOffset];
#

@oak moat does this look right?

#

oh

#

ig bits are read right to left, not left to right

#

look at this

#

before and after optimization

#

~6 times faster

#

i still need to get it working with oit but this is very cool

#

next is culling

gilded shell
#

@night shoal @oak moat how cursed would it be if i kept ogl but integrated vulkan just for hw rt

night shoal
#

no idea

oak moat
#

bad

#

don't do it

gilded shell
#

👍

oak moat
#

just stay with raster

gilded shell
#

i was looking at radiance cascades

#

which i dont think benefits from hardware rt in most implementations

#

ill need to dig deeper

oak moat
#

you're doing meshlets tho

#

are you willing to throw all of that away for RT

gilded shell
#

will meshlets not work with rt?

oak moat
#

they are kind of incompatible yes

#

not without huge amounts of extra work

gilded shell
#

darn

#

a user in this server

#

i dont remember who, he had fox in his username and was german

#

iirc he recommended radiance cascades with sdfs, reusing sdfs from the last frame

#

what are you doing for a gi approximation?

oak moat
#

ddgi KEKW

#

jaker and I will probably move onto more clamplicated methods later

gilded shell
#

ddgi might be a good place to start

oak moat
#

it's nice and shrimple

gilded shell
#

indeed

#

but doesnt it still need rays lol

oak moat
#

it does

gilded shell
#

i see

gilded shell
gilded shell
#

I should probably upload a picture to this thread thumbnail somehow

#

@night shoal Do you know how I could achieve this

night shoal
#

if you modify the first message

kind sparrow
#

I think if you just edit the first message to contain a link to a picture it'll work

night shoal
#

yeah or even ctrl+p should do the trick

#

looks like we never pinned the first message

#

let me fix that too

#

you can also fix the first post by uploading a "social preview" image to your repo

#

(updating might take a while) and you need to remove the link from the first post and put it back once the social preview is updated

gilded shell
#

i see thank you

#

any suggestions for what picture i should take with my engine?

#

i can load most gltf models, but the lightings kinda bad

night shoal
#

i have no idea

#

a sandpit perhaps 😛

#

with a big opengl logo shoved half way in

gilded shell
#

Yeah but “GrubStomper” is in there too

#

maybe i make a scene of a foot stepping on grubs

kind sparrow
#

What do you have against grubs anyways

gilded shell
gilded shell
#

the real reason

#

I play a little unknown survival game called “rust”

#

while foraging you can get grubs, which are useless

#

so me and my friends hate on grubs now

gilded shell
#

yall wanna help me find agartha

kind sparrow
#

What's that

gilded shell
#

funny conspiracy hollow earth city place

gilded shell
#

6 bits was not enough for vertex indexing, which is very odd

#

6 bits gives the number range 0-63 iirc; and the max vertices in a meshlet are 64, so there should be no problem

#

yet when rendering with 6 bits there were evident off-by-n errors that were only fixed by upgrading to 7 bits

gilded shell
#
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, scene.ibo);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, scene.indirectDrawBuffer);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, scene.clustersSsbo);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3, scene.writeIbo);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 4, scene.indirectBlendDrawBuffer);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 5, scene.writeBlendIbo);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 6, scene.materialsSsbo);

Code like this makes me glad I'm using ogl

#

I always remember making any data usable to shaders was a huge headache in vulkan

west trail
#

everything is a huge headache if you use raw vulkan,thats why wrappers exist)

oak moat
#
.PushConstants(
  _sceneInfo.MeshletBuffer.GetHandle(),
  _sceneInfo.MeshletInstanceBuffer.GetHandle(),
  _sceneInfo.TransformBuffer.GetHandle(),
  _sceneInfo.PositionBuffer.GetHandle(),
  _sceneInfo.IndexBuffer.GetHandle(),
  _sceneInfo.PrimitiveBuffer.GetHandle(),
  _virtualShadowPass.VisibleMeshletBuffer.GetHandle(),
  virtualShadowClipmapInfoBuffer.GetHandle(),
  _virtualShadowPass.VirtualPageTableImage.GetHandle(),
  _virtualShadowPass.PhysicalMemoryImage.GetHandle(),
  static_cast<uint32>(_sceneInfo.MeshletBuffer->GetSize())
)
.DrawMeshTasks(
  DivideRoundUp<uint32>(_sceneInfo.MeshletInstanceBuffer->GetSize(), 32),
  VIRTUAL_SHADOW_CLIPMAP_COUNT
)
gilded shell
#

There is an error in the way im getting material indices

gilded shell
#

oit works again

night shoal
#

noite

gilded shell
#

now i need to lock in sync and overall cleanup my code

#

after the compute batch, i use glFinish for sync 💀

gilded shell
#

ah it seems ogl is doing all the sync for me

#

not sure why I thought it wouldnt

gilded shell
#

for some reason mapping my indirect draw buffers for reading adds 32ms to my frame time bleakekw

kind sparrow
#

Yeah feedback is no bueno although 32ms seems excessive

#

Unless that's how long it takes to flush the pipeline

#

Maybe you need to double buffer the readback

#

What are you reading back anyway

gilded shell
#

just the amount of triangles being drawn

#

maybe im doing it in a really bad place?

kind sparrow
#

Is it a persistently mapped buffer

gilded shell
#

no

#

maybe i should try that

#

only problem is

#

there are thousands of atomic operations done on this exact buffer from compute

#

im scared persistant mapping could ruin that

kind sparrow
#

You don't want to be reading back GPU-local buffers afaik you should make a separate host-visible one

#

On Vulkan you wouldn't even be allowed to attempt to read back a buffer like that unless you explicitly set it up to be

gilded shell
#

so

#

I want to copy the GPU buffer to a CPU buffer?

#

each frame

kind sparrow
#

You want to make a second GPU buffer for the small info that the CPU wants to read back

#

And hope the driver puts it somewhere that's faster to access

#

Or create it as immutable storage with the host visible flag

#

If you want to avoid flushing you can make it a ring buffer of two or three slots and only read back last frame's value not the current one

gilded shell
#

this is a lot of effort to see how many triangles im drawing lol

#

uhhh

kind sparrow
#

It's basically what you'd do for everything in Vulkan

gilded shell
#

that was why i avoided vulkan 😭

kind sparrow
#

Just don't read back then

#

Have a compute-powered debug text output and print it to screen from the GPU KEKW

#

Or just try making a second small SSBO for the readback value and do everything else the same as what you're doing now

#

That alone should make it a lot better

#

Although reading back the same frame will still require flushing

gilded shell
#

i can defnitely read back the last frame

junior sparrow
gilded shell
#

yeah I do that

#

its just for debug info

#

but honestly this is a lot of effort when I can just use nsight

junior sparrow
#

yeah

#

or draw imgui from gpu

gilded shell
#

sounds bad, no thanks

junior sparrow
gilded shell
#

welp, meshlets are complete

#

I just need to clean code and then I can move to culling

#

thanks for your help @oak moat

oak moat
#

good job chief

gilded shell
#

Should I count a gpu dispatch as a drawcall in the performance counter?

oak moat
#

is it a drawcall

kind sparrow
#

The significance of draw calls kind of goes away when you're doing MDI

#

You can shit out tens of thousands of indirect draw calls just like you can with Vulkan regular draw calls

gilded shell
gilded shell
#

especially since theres no hidden extra indirect multi draws

#

its just 4 drawcalls

oak moat
#

I would just stop using drawcalls and dispatch count as meaningful metrics

#

and instead use actual timings counters for each pass to show the frame's breakdown

night shoal
#

yeah, rendering 1000 tringles or 10000000000000 doesnt matter

#

important is that you stay within your frametime budget

gilded shell
#

indeed

gilded shell
#

all this time spent and im not even half way through the plans/todo list

kind sparrow
#

This project is like 3 months old lol

west trail
#

Remove "clean code", not gonna happenfrekw

gilded shell
gilded shell
#

its closer to 4 😔

#

i think i want to use csm for now

#

vsm seems time consuming

kind sparrow
#

My project is 3 years old lol

gilded shell
#

yeah but yours is very complex

#

mine is a glorified gltf renderer

gilded shell
#

it is time to do some work

#

coding in mornings > coding at night

#

biggest todo: cleanup my resources

#

i have a habbit of creating them and then not deleting them at program close

gilded shell
#

i have baked

night shoal
#

looks much better than gobi's sad breads 🙂

gilded shell
kind sparrow
#

Gob posted a picture of two baguette ends on a toaster tray that looked a little well done lol

gilded shell
#

lol

#

i need to clarify that these loaves are very large

#

a little under a foot and a half each

night shoal
#

yeah perfect for a decent sandwich 😛

gilded shell
night shoal
#

relatable

night shoal
# gilded shell

#off-topic-🐸 message is that what you were trying to make? 🙂

gilded shell
#

if i could get some seasoned chicken breast with bacon and ranch

gilded shell
#

dynamic voxelization of skinned meshes

gilded shell
#

very busy, have not touched project in a while

gilded shell
#

I seek advice

#

My friend learned Roblox Lua and via networking (career networking, not software networking) managed to make very good money

night shoal
#

dont look at what others do

#

find something you enjoy and pursue it

gilded shell
#

I know I know

#

sorry i got busy before i could finish

#

i should probably stop breaking up my points over multiple messages 💀

night shoal
#

no need for excuses 🙂

gilded shell
#

so im wondering

#

would i be able to try the same thing with C++/GP?

night shoal
#

nobody can answer that for you

#

but you seem to be able to implement a renderer with some fancyisms, which isnt really a typical borgir flipper skill, gp isnt trivial

gilded shell
#

right

night shoal
#

work on some portfolio

gilded shell
#

but i lack a degree, adulthood, and knowledge in build systems and git

night shoal
#

that doesnt matter

#

most men never grow up anyway

#

git and build systems knowledge comes from using it

gilded shell
#

alright

night shoal
#

the degree could be important to companies, but when you make cool shit then it matters less

gilded shell
#

i see

#

obviously the goal is to be a graphics programmer

night shoal
#

important is that you show interest in gp and are able to explain a few things

gilded shell
#

before college

night shoal
#

and also more importantly be able to read code, as you wont be writing a new engine from scratch, you most likely will use existing code

#

and fix shit in it, or implement a new technique with it

night shoal
gilded shell
#

oh are all my repos private

night shoal
#

show off the shit you do when it comes to GP so that you have something to talk about in an interview

gilded shell
#

okay

#

should I start writing a blog or something lol

night shoal
#

you dont have to

gilded shell
#

just publish my repos?

night shoal
#

and make them look presentable 🙂

#

and not just "This is a renderer"

#

make them work also, so that people dont have to manually install or move shit around. clone, and F5 should just work out of the box

#

shows that you care and some sort of "professionalism"

gilded shell
#

alright, thats the first step

gilded shell
gilded shell
#

alright

#

i have

#

vulkan forest

#

and iklob

#

and this

#

another problem arises

kind sparrow
#

C++ jobs are much less likely to come by happenstance like the kinds of jobs you get from learning lua though

night shoal
#

im sure its even more impressive when you can see how you progressed in the GP journey as well

night shoal
#

know at least one programming language somewhat well, doesnt matter really which one it is

gilded shell
#

i dont think im even going to be able to find anything part-time

kind sparrow
#

But with your C++ knowledge you could get a non-C++ job

night shoal
#

yeah

gilded shell
#

right

#

which was another option i was considering

night shoal
#

while you cant find anything, improve on your shit, exercise (not leetcode nonsense), make stuff

kind sparrow
#

There aren't part time software jobs there are gig jobs and full time jobs

gilded shell
#

He freelances and writes Roblox scripts

night shoal
#

if you are just after the money, you could do the same, question is if you will enjoy it for longer

junior sparrow
night shoal
#

i personally find roblox absolutely boring and horrid. and the audience is a fucking nightmare

gilded shell
#

for sure

junior sparrow
gilded shell
#

But the alternative is working in retail at minimum wage

night shoal
#

nah

gilded shell
#

which is both mind numbing and terrible for money

night shoal
#

the roblox "sidequest" could also be an entry into actual roblox engine work, if the company picks you up because you made something cool with it

junior sparrow
night shoal
#

factorio modders got hired by wube, minecraft modders same

#

and same shit happened elsewhere

#

you just need to keep showing interest in that stuff, and when you have enough to show for, apply at where you want to work at

gilded shell
#

right

night shoal
#

in the meantime understand how git is used, commits/branching/rebase/perhaps exercise a bisect once or twice if possible so that you heard it once at least

#

same for your code, make it readable, make it runnable out of the box

junior sparrow
#

yeah check how you do merge conflicts

night shoal
#

yeah

#

also kind of important is "team" work

junior sparrow
#

you will encounter this when you start working at company but never in personal projects if you dont do different branches

junior sparrow
kind sparrow
#

Yes although imo I wouldn't worry about it too much

night shoal
#

yeah

#

depends on the work in the end, but i wouldnt want a singleplayer in my team whom you never talk to, hear from, or see at all

kind sparrow
#

External motivations for projects like making something profitable or that targets specific experience can take away from the interest in the project

night shoal
#

external motivations are a big factor indeed

kind sparrow
#

I just do whatever tf I feel like without specific reason lol

junior sparrow
#

yeah, you are unlikely to create something profitable as how bad it sounds. I wouldnt worry about it. making it as goal or your source of motivation is stupid

gilded shell
#

I see

kind sparrow
#

I tried numerous times in school to get my friends to do projects, but they could never stop getting hung up on the desire to make something useful

night shoal
kind sparrow
#

They always came up with technically boring ideas that would be like a startup idea

#

Rather than something useless and interesting like they should

kind sparrow
night shoal
#

oh

kind sparrow
#

If you do those then the rest follows

night shoal
#

heh, thought you mean at work, my b

kind sparrow
#

At work I also do whatever tf I feel like lmao but that's because I sort of have my pick of projects to work on

night shoal
#

in my real life circle of people there is also nobody who is interested in anything gp or related

kind sparrow
#

But even not GP like one of my friends was into basketball and I tried to get him to make some little CLI basketball team manager simulator

night shoal
#

i also mean computerwise in general

kind sparrow
#

But he never did

#

Yeah

#

Well these were my CS study mates

#

So they were already experienced programmers

#

But still no personal projects

night shoal
#

i know some who have some personal projects like football betting thingy

kind sparrow
#

Programming?

night shoal
#

yeah

kind sparrow
#

Ah

#

Yeah that's the kind of thing I tried to get them to do

night shoal
#

some crude web stuff which they started when they were teens

#

maintained and updated per season

#

but i have 0 interest in football, or any other sport really

kind sparrow
#

Me neither but if it interests them

#

One has to find projects that suit your own interest

#

It's hard to recommend projects for others

night shoal
#

one of my friends is running some sort of newegg kind of thing

gilded shell
#

alright thank you all for your help

#

ig its back to cashiering

night shoal
#

hehe

junior sparrow
# kind sparrow But still no personal projects

at my school we had "company day" basically companies came to our school and had presentations, recruiters and bunch other stuff. They were saying to students the personal projects are really important and also internships(we have those mandatory)

night shoal
#

yeah internships usually suck though

#

ive seen it in various companies too how they dragged these poor sods through the departments for a week or two or a month

junior sparrow
#

companies pick students from our school and everybody said that they had great experience

night shoal
#

most companies or teams where they end up sitting are not even interested in having interns/trainees, because it means work and effort and nobody got time for that

kind sparrow
night shoal
#

you might find a future sugar mommy, who knows 😄 (jk)

junior sparrow
night shoal
#

man i think im growing a corn in my left eye

#

its teasing me for the whole day already

junior sparrow
#

never heard that

night shoal
#

eye barley its called in engrish i think

junior sparrow
gilded shell
gilded shell
#

but yeah i am taking a break from programming as of right now because this first semester + marching band has me extremely busy

#

maybe i can please you all with this piano solo i found https://youtu.be/rzEaHmggVGE?si=LUSJVqWL9R0OcF9S&t=854

Provided to YouTube by Bama Rags Recordings, LLC

Seek Up (Live at MGM Grand Garden Arena, Las Vegas, NV 03.23-03.24.07) · Dave Matthews Band

Live Trax Vol. 9: MGM Grand Garden Arena

℗ 2007 Bama Rags Recordings

Released on: 2007-06-05

Main Artist: Dave Matthews Band

Auto-generated by YouTube.

▶ Play video
junior sparrow
gilded shell
#

nah

#

on my senior year oh hs

junior sparrow
#

so last year of hs?

#

hopefully you dont have same painful school leaving exam as me

gilded shell
#

probably not

junior sparrow
#

Be glad. In my country we have it mandatory and it's painful

#

Standard is your native language 2 essay, grammar exam and read 20 books and they will ask you questions about everything even authors. Then English or Math, English is an easy essay and grammar and oral. Math is self explanatory. But I am in computer science high school so I have additional programming, databases, networking, hardware and some stuff about boolean algebra, processors, etc... and then also high school thesis(basically bacholar)

gilded shell
#

yeah

#

this hs is not very challenging at all

#

i maintain a 3.9 gpa without trying very hard

kind sparrow
#

The American education system is much more relaxed than other countries, you don't specialize until adulthood and you can basically take whatever courses you like as long as you eventually satisfy your degree requirements

#

It's great tbh

#

You can enter the tertiary education system at any age too

junior sparrow
#

Kind of jealous but specializing in adulthood is kind of stupid tbh

#

You should be able to do it early

kind sparrow
#

Idk I didn't know what I wanted to do until I was like 20

#

I mean you can choose electives all the way through school so you have some choice starting at age 12 or 13 but everyone takes the same core classes until university

#

I switched majors 3 times in university

junior sparrow
#

In my country after 9 years of elementary school you have to choose what specialization you want

#

There are some specializations that are universal but majority aren't

kind sparrow
#

I also did another half a degree just for fun on the way to my main degree

#

Since I had the credits

gilded shell
gilded shell
kind sparrow
#

Nah $0

#

I still finished in 4 years

#

I mean it still cost money but was paid out of pocket

gilded shell
#

how in the world do you pay for college out of pocket

kind sparrow
#

2 years community college and then transfer for a university for the last 2 years

#
  • familial education savings fund
#

It probably cost about $70k altogether or something

gilded shell
#

ah okay

#

this server should give scholarships

kind sparrow
#

With whose money lol

gilded shell
#

yours

#

give me your money

kind sparrow
#

Lmao

gilded shell
#

maybe we can pool money

#

if everyone in the server gives $20 well have at least $80

oak moat
#

how about you move somewhere where university is free for all froge

oak moat
#

anywhere in 🇪🇺 except ireland

gilded shell
#

sounds like a risky move

#

like it might cost more than staying in the US

#

besides—you couldnt pay me to live in the UK, and idk if any other countries would have all english speaking professors

oak moat
#

idk I paid 136 euros total for my 3 years in university KEKW

oak moat
#

so anywhere in the EU except ireland is still true

gilded shell
#

is housing and food also free?

#

and still the language issue

oak moat
gilded shell
#

which would be a 24k yearly cost

#

doesnt seem like i would be saving much money

oak moat
#

it's ok because we have scolarships

#

where housing and food are free

#

but you need to find unis that have those services

gilded shell
#

i see

gilded shell
oak moat
#

just learn the lang they're all either germanic langs like english or romance langs like latin KEKW

junior sparrow
#

in collages/universities

gilded shell
#

okay

#

while were on the topic, i need to write my college essay and id like to make it about this project

gilded shell
#

@kind sparrow thoughts and opinions

kind sparrow
#

I forget what I wrote in my essays

#

Don't they give you specific prompts

gilded shell
gilded shell
#

“For the past X months, I have worked towards writing a 3D renderer.”

kind sparrow
#

I would focus on the why's not the what's

#

Of all the things you could be doing with your time, why do you specifically choose to spend it on graphics programming, or playing the drums, or whatever it is

#

What do those pursuits reveal about you as a person

west trail
#

"because reasons"smart

gilded shell
#

because i just like doing it lol

#

because uhhh

#

its a very intellectually challenging hobby

#

its very productive and applicable to the real world

#

and the results are beautiful and very visible

#

at least other people’s results are kekkedsadge

#

i’m sure this can be made into an essay

#

“why I GP”

gilded shell
#

I should use this project thread to preach sermons

gilded shell
#

Alright, time for peer review

#

@kind sparrow what do you think?

#

I do want to expand upon the end a bit more

kind sparrow
#

My ancient mobile discord won't let me view that but I can read later if I get a chance

#

Idk if I'll have service but we'll see

gilded shell
#

okay

gilded shell
#

@kind sparrow are you an EST pleb? now might be the time

kind sparrow
#

No I'm in PST I'm just on a road trip and going to stay somewhere without electricity tonight

gilded shell
#

Maybe I could put this up in resume-review

junior sparrow
# gilded shell

I suck at essays but avoid repeating yourself and generally forcing stuff on paper. I would make it a story. They would expect something like this

gilded shell
#

I see

junior sparrow
#

This came from chatgpt and make it your template and sometimes consult chatgpt along the lines try to improve it, rewrite it, rephrase, etc...

gilded shell
#

Alright thank yoyu

gilded shell
#

You too @kind sparrow whenever you get the chance

gilded shell
#

nvm demon im rewriting it again tmrw

#

lukasino is making me rewrite it 😞

junior sparrow
gilded shell
#

(except I always get a full 7-8 hours of sleep)

gilded shell
junior sparrow
gilded shell
#

I don't have a hook

#

oh no

kind sparrow
#

Hook comes last

gilded shell
#

do I really need one

junior sparrow
#

yeah

gilded shell
#

@junior sparrow you cant leave me like this 😢

junior sparrow
gilded shell
#

oh okay

gilded shell
#

man it sucks seeing everyone elses thread be active while mine is dormant

#

i wish i had time to work on this

night shoal
#

no reason to feel bad my frog

#

the project isnt running away 🙂

kind sparrow
#

Consider that I never even started coding until university

gilded shell
#

yeah but the reason i dont have timr is marching band

#

and our band is a joke

#

im the drum captain this year and

#
  1. half of my drummers cant play at a fifth grade level
#
  1. the other half of my drummers cant play at an 8th grade level
#

@kind sparrow one of them couldn’t plays 8ths even with a metronome

kind sparrow
#

damn

#

Even our freshmen band in HS was pretty great

gilded shell
#

yeah

#

i’m not really having fun

kind sparrow
#

Have them record themselves playing to a metronome and then listen back to it

#

Noobs typically can't hear their own timing in real time

#

but in a recording they'll be like "wow I suck"

gilded shell
#

“playing” is generous, most of them cant read music either

#

none of them fully know the first part of the field show despite having the music for months now

#

and i dont even mean memorized, i mean know

#

its very bad

#

my only objective is to survive the season because its so unsalvageable

kind sparrow
#

linked right before the cadence for maximum drums

gilded shell
gilded shell
#

no worried though; thats what i did in my freshman year 💀

night shoal
gilded shell
#

ive got nothing to do this afternoon, i think ill try and figure out how to record my e drums and show yall

gilded shell
#

ah i need a special cord

#

maybe later guys

night shoal
#

Drum Simulator 2025

gilded shell
#

For whatever project I make next, I want to have better source control on git

#

i’ll get real fancy and have a test branch

gilded shell
#

I am sad to announce that I am making a Scratch project

kind sparrow
#

A terminal illness it seems

gilded shell
#

indeed

gilded shell
#

at least its beneficial to my brain

#

im implementing tipsify sort and LoD trees

gilded shell
#

#showcase message

kind sparrow
#

Crazy lol

gilded shell
#

My old original algorithm took 3 minutes for that same model

#

500ms is a big upgrade

kind sparrow
#

Why not just program in assembly it's basically just as obtuse of a tool but actually powerful

#

Handwritten AVX

gilded shell
#

I have a following on Scratch for some reason

kind sparrow
#

Ah

gilded shell
#

people actually make 3D games with Scratch for some reason

#

they need Nanite too methinks

gilded shell
#

im going to make a separate thread for this

night shoal
#

Grubbi is the Jasmine of the Scratch world

gilded shell
night shoal
#

#1090390868449558618 message

gilded shell
#

oh yeah him

gilded shell
#

no followers in my other thread 😦

kind sparrow
#

It takes time for them to build a following

gilded shell
#

yeah

gilded shell
#

😔

#

soon guys

night shoal
#

dont you worry, we will wait for your return

gilded shell
gilded shell
#

man I barely recognize my own code anymore

#

what in the world is going on

night shoal
#

when in doubt, rewrite

gilded shell
#

i really need better var names

#

THREE CONVENTIONS

#

no prefix, global prefix, and scene prefix 😭

#

im too lazy to rewrite the miniscule 500ish lines of code, so im just going to rename everything and clean the code

#

the code itself isn't terrible

west trail
night shoal
#

when in doubt - get rid of primitive type obsession

night shoal
#

int, int, int you never know what is what

#

parameter names can be deceiving

gilded shell
#

dw, ive upgraded it to GLint KEKW

night shoal
#

VertexOffset_T vertexOffset, GlobalOffset_T globalOffset, MaterialOffset_T materialOffset 😄

#

(its an actual thing, primitive type obsession, but im just pulling your leg here)

gilded shell
#

alright lol

#

might describe me though

gilded shell
#

i really wish discord would stop automatically unfollowing this thread

kind sparrow
#

Post in it more 🙂

#

It's the only way

gilded shell
#

the project remains untouched

kind sparrow
#

Then why shouldn't the thread fall off the list lol

gilded shell
#

bc i dont want it to 😦

gilded shell
#

samplers, textures, texture handles, need dealloc

#

already done

#

nice job, past me

#

The model class is finally cleaned

#

now theres a ton of resources in main.cpp to dealloc

#

i dont want to touch main.cpp

#

@junior sparrow you have a point, this file sucks

kind sparrow
spring kelp
gilded shell
#

i think that project may interest you, consider following the thread

gilded shell
#

Bulletin is such a nice word

#

i need to find a way to use it in my project

night shoal
#

put it on the bulletin board of todo items : >

gilded shell
#

Maybe instead of a “render graph,” I use a “bulletin board”

gilded shell
#

i will certainly need a scene class

kind sparrow
#

Do you?

#

I don't have one

gilded shell
#

Well

#

need is a exaggeration

#

But I think it would greatly simplify things

gilded shell
#

transparent objects have dissapeared lol

gilded shell
#

I dont like these numbers

#

I don't theres 1.1 billion indices for blended models

#

especially given that the only blended model is 6 cubes

night shoal
#

smells like uninitialized variables

gilded shell
#

well see

#

now its 1.6 bil

#

then 2.5

gilded shell
#

this is a very bad sign 😭

junior sparrow
#

always initialise or assign value immediately

gilded shell
gilded shell
#

yeah index count for the opaque indirect draw is absurdly high too

#

either im messing up when mapping it for reading, or im somehow feeding the compute shader rediculously high numbers

#

i should most certainly be using nsight rn

#

Alright, the drawindirect params do have correct values as far as I can tell

#

its most likely bad vertex/index offsets

#

?!?!?!?!?

#

all of a sudden the project refuses to compile because intellisense thinks my shader files are C

night shoal
gilded shell
#

@kind sparrow do you think lab internships have the same value as workplace internships?

#

does this question make sense

kind sparrow
#

No but they are still valuable

#

I'd say they're like 80% as good overall, and in some ways better, in others worse

#

I worked in a lab after graduation for 18 months since the internship I had lined up was cancelled when covid lockdowns hit

#

And my current employer found that experience to be a positive

gilded shell
#

i see

gilded shell
#

time

#

perhaps the bug has to do with the order im doing things in

gilded shell
#

i know i change my mind a lot about the lighting plans for this project, but right now baking seems like the smartest idea

#

spherical harmonics for diffuse gi

gilded shell
#

relationship between scene and model is interesting

#

in my engine at least, a model must belong to a scene so the indices are appropriately offset

#

it would make sense for each model to store a pointer to its scene object

#

@kind sparrow @night shoal I’ve never used pointers in this manner, so I’m going to consult the wise

night shoal
#

im already thinking how to reply before you pung me 🙂

gilded shell
#

i was think weak_ptr?

night shoal
#

i dont think thats necessary

gilded shell
#

I see

night shoal
#

a "scene" is just a "group" of entities/gameobjects/actors idk how you want to call it

#

and entities/gameobjects/actors - let me stick to entitity

#

are just a "container" of "components"

#

where a component will describe what the entitty is made out of, a name perhaps, some sort mesh, a material, and a transform, perhaps a collider shape for fisiks later, perhaps a healthcomponent and more

gilded shell
night shoal
#

the offsets are stored elsewhere

#

the renderer will take care of all that

#

lets assume a scene

#

a tree and the deccercubes

#

and your camera is looking at the 2, but slides to either side and that will make the tree go out of sight

#

then the main loop, will collect all visible things from the scene, in this case the cubes

#

that means you go through the scene, and compare each enttity's - lets use the fisiks collider here, as it most likely will be an AABB box pretty much -

#

so it grabs that component and does a camera frustum vs aabb test to cull objects

#

the tree doesnt survive that test, but the cubes are, that means the cubes go in a silly list

#

which the renderer iterates over

gilded shell
#

woah woah woah hold on

night shoal
#

there are 100 different ways how you can do that or in what detail you can do that

#

holding on

gilded shell
night shoal
#

yeah

#

the scene doesnt care about mesh offsets or whatever

#

the scene is just a high level descriptor of what objects live in your world

#

and what behavioouir is attached to them (potentially scripts in form of script components)

gilded shell
#

i see

night shoal
#

scene doesnt know nor doesnt care about how it is rendered to screen

#

that way you could use those "scene"graphs on a server too where you have no render capabitlitlitlies

#

lets keep it naive for now... now as you iterate the scene - we could even leave the culling part away for now - its just a minor optimization anyway

#

so you feed the scene to the renderer ... void Render(RenderContext& renderContext, Scene& scene); perhaps

#

rendercontext contains timinginfo, camera stuff perhaps, and other things which may be relevant for rendering something, window size or so ... anyway

#

the renderer walks through the scene, plucking mesh/material/transform information from the entities

#

and then it checks, did i see that mesh before? yes or no

#

if no, then grab the name from the mesh, look it up on disk, load it, then create an intermediate structure, inside the renderer, lets lets call it gpumesh, which has vao, vbo, ebo

#

you load that mesh into your usual vbo/ebo and you create a vao according to what you need, and assign it all to that gpumesh, then you throw that into a list

#

no offset required

#

you do the same for material

#

and you do the same for transforms

#

if we keep it super super naive, you could even store the material and the transform information in that gpu mesh too

#

lets do that for now

#

material means here you load diffuse and normals perhaps, so you load the textures as usual too, stbi et al

#

and then you keep the texture ids as attributes on the mesh, and the transform is a shrimple mat4

#

lets ignore hierarchies too for a second

#

the renderer then just loops through that list of gpu meshes, and does

#

bindvao(mesh.vao);
bindvbo(mesh.vbo);
bindebo(mesh.ebo);
bindubo(globaluniforms); // usually camera information, proj/view/inversedthisandthant/windowsize/deltatime/...

programuniform(mesh.transform);
bindtextureunit(mesh.diffuse, 0);
bindtextureunit(mesh.normal, 1);
drawelements(...)

#

if you add hierarchies... like parent and children, you simply brute force the parent's transform before feeding it to the gpumesh, like gpumesh.transform = parent != null ? parent.transform * transform : transform;

gilded shell
#

interesting

night shoal
#

from there you can optimize further if you want/need to

#

if you want to go with mega buffers for mesh/material/instance data, you can just stuff all the data into one buffer per domain, and store the offsets on gpumesh

gilded shell
#

just to confirm my understanding—your example goes scene->entity->mesh->gpu buffers?

night shoal
#

scene contains "strings" for mesh/material and 3 vectors for your transform, pos,rot,scale (in form of those components, meshcomponent, materialcomponent, transformcomponent, perhaps a namecomponent too that never hurts)

gilded shell
#

oh i see

night shoal
#

those strings are turned into the actual model and that model is deconstructed into mesh buffers (vbo/ebo) inside the renderer

gilded shell
#

the renderer is storing all the gpu stuff and the scene is the high level overview

night shoal
#

yeah

gilded shell
#

thats hot

night shoal
#

thats the demongod way, which keeps shit simple

gilded shell
#

yeah

night shoal
#

might not be the most advanced or most reasonable way, but its a good start, its the most reasonable way to begin such a thing

#

when you load a model, and its meshes, you can also either calculate it yourself or read it from the model already if present, is its bounding box, you could also store that on the gpu mesh

gilded shell
#

right

night shoal
#

and since you have camera information in your renderer too, you can combine the too for a cheap cpu culling mekanism already

gilded shell
#

problematically, if I want this structure in my project I’ll have to do a ton of rewriting

night shoal
#

or you start from scratch with a version 2 of your thing

gilded shell
night shoal
#

make sure to use version control 🙂

gilded shell
#

well my point is that this is a rendering only application

#

so i dont think the rewrite would be worth it

#

i can probably continue my project with the structure it has

night shoal
#

are you facing any problem right now?

night shoal
#

you can also preload all your meshes

#

stuff them in a dictionary by name, and that name is the one on your components

#

then when the renderere goes through the scene, it just grabs the mesh/material from those

gilded shell
night shoal
#

thats the string used in mesh pretty much

#

or model if you want it modelcomponent

gilded shell
#

how would that let me reference the scene from within my models?

night shoal
#

you dont

#

why would you need that?

junior sparrow
#

☝️

gilded shell
#

okay

#

nevermind

#

thanks for your help wise one

night shoal
#

nah say it 🙂

#

maybe theres a reason you want it

gilded shell
#

i should be storing the offsets elsewhere

night shoal
#

ah

kind sparrow
#

I see deccer evangelized you so my assistance is unneeded : )

#

But yeah the relationship between model and scene is: model lives in a map/array somewhere, scene object stores a name or array index of the model it uses, and that's it

#

I do have models in the engine side since I need to access it for physics but the actual GPU mesh with the vertex buffer offsets or vao or whatever is a separate array/map stored in the renderer

gilded shell
#

the demon method

gilded shell
#

this shouldn't cause memory leaks

if (!shaderProgram.computePath.empty())
{
    auto computeShader{ compileShader(shaderProgram.computePath, GL_COMPUTE_SHADER) };
    glAttachShader(shaderProgram.program, computeShader);
    glDeleteShader(computeShader);
}

glLinkProgram(shaderProgram.program);

GLint success{};
glGetProgramiv(shaderProgram.program, GL_LINK_STATUS, &success);
if (!success) {
    GLchar infoLog[512]{};
    glGetProgramInfoLog(shaderProgram.program, 512, nullptr, infoLog);
    std::cerr << infoLog << '\n';
}```
#

the glDeleteShader before glLinkProgram flags the shader for deletion, which hopefully happens after glLinkProgram

west trail
gilded shell
#

probably but it doesnt matter

night shoal
#

you delete the shader after linking

gilded shell
#

idk why visual studio formats like this

#

anyways, the major code cleanup is complete : )

#

onto meshlet culling

night shoal
#

you ackchually dont need all of that 🙂

#
auto OnOpenGLDebugMessage(
    [[maybe_unused]] uint32_t source,
    uint32_t type,
    [[maybe_unused]] uint32_t id,
    [[maybe_unused]] uint32_t severity,
    [[maybe_unused]] int32_t length,
    const char* message,
    [[maybe_unused]] const void* userParam) -> void {

    if (type == GL_DEBUG_TYPE_ERROR) {
        spdlog::error(message);
        debug_break();
    }
}
kind sparrow
#

I think it's important to point out that while this may be the by the book "idiomatic" way of writing C++ nobody in real life actually writes it this way with all the attribute spam and stuff

night shoal
#

i didnt mean to flex those, they just calmed the static code analyzer, the important bit here was that you only really need the error type

kind sparrow
#

Ah yeah

night shoal
#

and i dont write idiomatic c++, but idiotic c++ 😛

kind sparrow
#

Same

#

Just a different flavor

night shoal
#

hehe

junior sparrow
gilded shell
#

yes

gilded shell
#

I have developed an IMMACULATE piece of art that perfectly encapsulates the image of the Grub Stomper. I will permanently, if it is the Lord’s will, use it as my profile picture as soon as I can obtain a high quality photograph of it.

west trail
#

proceeds to not show it

gilded shell
#

well it’s a work in progress

#

i dont want to spoil the surprise

gilded shell
#

If the hype is too much to handle, I can reveal the art style first

gilded shell
#

It is finished

night shoal
kind sparrow
#

what do you have against grubs anyways

gilded shell
gilded shell
gilded shell
#

the one day I want to write code

night shoal
gilded shell
#

this unfortunately lacks the frustum culling chapter