#Fwog and co.

1 messages Β· Page 19 of 1

long robin
#

an early version of Fwog had only static create methods until I decided to embrace constructors and exceptions

dapper gorge
#

By the way

#

I recently started using gltf-transform because instancing

#

You can ask it to deduplicate, prune and flatten the scene tree, making nodes reference the same mesh, without duplicating vertex data

#

It's pretty great, gltfpack and gltf-transform are a good combo

long robin
#

can you linkie

#

all I found was some js thing

dapper gorge
#

Yeah the thing is in JS, but there is a cli interface

long robin
#

npm 😩

tired sandal
long robin
#

oh god oh fr*ck

fiery sorrel
#

the moment I mentioned JavaScript in your DMs

#

he shows up

long robin
#

I'm tapping into the power of the one ring for the greater good of man

#
PS C:\Users\jakek> npm install --global @gltf-transform/cli

added 251 packages in 9s

is this the power of webdev

#

time to audit 251 packages to ensure I'm not susceptible to a supply chain attack

fiery sorrel
#

left-pad

golden schooner
#

this is so wrong

long robin
#
28 packages are looking for funding

is this also the power of webdev

#

ads in my terminal

golden schooner
#

installing npm just to install some other binary baked from js

long robin
#

I was only following orders

golden schooner
#

: (

long robin
#

violating the geneva conventions for gltf gains

golden schooner
fiery sorrel
#

whatever hell Jaker and Deccer are entering

#

I am so glad I am just watching on the sidelines

long robin
#

btw found a funny line in ARB_bindless_texture

    (1) Could this have been specified as simply making the maximum number of
        texture image units and image units arbitrarily large and then
        indexing into an array of samplers or images?

      RESOLVED: Perhaps, but this approach doesn't involve any arbitrarily
      limits. Allowing the implementation to choose the GPU handle can avoid
      the need for some kind of unit->address translation. It's also
      beneficial for the GPU handles to be static.
golden schooner
#

lol

#

reminds me of your max_image_unit of 8 thingy in the fsr adventure

long robin
#

yeup

golden schooner
#

RESOLVED: Perhaps, ... πŸ˜„

heavy cipher
#

RESOLVED: :bleakkekw:

golden schooner
#

hmm need to figure out again how you add content from marketplace heh

#

its been a while

rugged notch
#

tharrr she boots

long robin
#

it feels like school just got out or something, judging by recent posts in gp

dapper gorge
#

Maybe it's the southern hemisphere kids

fiery sorrel
long robin
#

you mustn't've seen't the crap in the other channels tonight

fiery sorrel
#

Yea I muted all the other channels as they can be distracting (altho today i got plenty of distracted)

#

I just live in community-content and #questions

fiery sorrel
#

There's like a whole dance party going on downstairs so i cant focus on shot anyways

rugged notch
#

goblins will see you casting teleport and say "he can't afford a steed"
GP will see you redirect a question and say "there's too many channels"

fiery sorrel
#

alright im going in

fiery sorrel
#

i dunno if i am much better than these clowns tbh

golden schooner
#

hmm looks like i have to clone ue's source to build the bloody launcher

fiery sorrel
#

I belong in the circus too

rugged notch
#

you can be the juggler

#

or the sad clown

#

a fan favorite

fiery sorrel
#

If a clown knows he's in the circus, is he really less of a clown than the others?

#

or does that make them even more of a clown for not stealing the tiny car to escape

rugged notch
#

maybe stealing the tiny car to escape would make the circusgoers laugh even more, like the truman show

#

you are never really free

heavy cipher
rugged notch
#

good stuff

fiery sorrel
#

me after i get jaker to write 95% of my engine (I need help you see): cheers!

rugged notch
#

Al-Hamdiyah will help... for a price

fiery sorrel
#

i may be a clown but at least im not a help vampire

dapper gorge
#

I am a help vampire

#

I need someone to do cluster area classification right now

#

Or I will implode and take GP down with me

heavy cipher
#

practice some buddhism and learn to separate your needs from your wants

#

only then will you be truly free

fiery sorrel
#

you gotta decouple them to achieve performance in life

golden schooner
#

buddah woulda coulda

fiery sorrel
#

Buddha vs Cuda who'd win

golden schooner
#

ROCm

long robin
#

bruh my brain is fried. I nearly tried putting the milk cap on a bag of cereal (this is fwog related I swear)

rugged notch
#

you've got bwain fwog

long robin
rugged notch
#

bro making a rendering api, doesn't even know the fwog is coming πŸ˜‚

dapper gorge
#

Jakerino

#

how many triangles is that scene you were exporting from UE

#

I need bigger scenes goddamnit

long robin
#

idk tbh

#

hundreds, maybe even thousands

dapper gorge
#

do you know of any humongous scenes

long robin
#

Moana Island

dapper gorge
#

If only I could fit that in memory

long robin
#

or like render a bunch of instances of sponza

heavy cipher
#

its not about how a big a scene is, its how you use it

golden schooner
#

quite the clusterfuck that is wine/wine64/"prefix"/winetricks esync and fs hacks

final cove
#

also did you ever figure out how to forward args to vsnprintf?

void log(OtherArgsAndWhatnot, const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    vfprintf(stderr, fmt, args);
    va_end(args);
}

this is what works for me

heavy cipher
#

if only msvc would've implemented format-checked user functions

long robin
final cove
#
parm_n    -    the named parameter preceding the first variable parameter
long robin
#

dafuq

#

My comprehension of the docs failed

final cove
#

yeah its a weird one tbf

long robin
#

Yup

#

All the examples I saw used a "count" arg which confused me

heavy cipher
#

@long robin do you have the vertexbufferless quad vertex shader?

long robin
#

yus

#
#version 460 core

layout(location = 0) out vec2 v_uv;

void main()
{
  vec2 pos = vec2(gl_VertexID == 0, gl_VertexID == 2);
  v_uv = pos.xy * 2.0;
  gl_Position = vec4(pos * 4.0 - 1.0, 0.0, 1.0);
}

swap the magic numbers in the first line of main to make it ccw instead of cw

heavy cipher
#

i think i was thinking of the cube πŸ˜„ i probably could've derived this one meself

long robin
#

oh I have that juan too

#
#version 460 core
#extension GL_GOOGLE_include_directive : enable

#include "Common.h"

layout(location = 0) out uint v_drawID;

// 14-vertex CCW triangle strip
vec3 CreateCube(in uint vertexID)
{
  uint b = 1 << vertexID;
  return vec3((0x287a & b) != 0, (0x02af & b) != 0, (0x31e3 & b) != 0);
}

void main()
{
  uint i = objectIndices.array[gl_BaseInstance + gl_InstanceID];
  v_drawID = gl_BaseInstance + gl_InstanceID;
  vec3 a_pos = CreateCube(gl_VertexID) - .5; // gl_VertexIndex for Vulkan
  ObjectUniforms obj = objects[i];
  a_pos *= boundingBoxes[i].halfExtent * 2.0 + 1e-1;
  a_pos += boundingBoxes[i].offset;
  vec3 position = (obj.model * vec4(a_pos, 1.0)).xyz;
  gl_Position = globalUniforms.viewProj * vec4(position, 1.0);
}
#

uh

#

ignore all the non-important stuff (determining that is up to the reader)

heavy cipher
#

ah yeh them numbers

#

thats what i had in the ol' cobweb

long robin
#

you want the CreateCube line from main

long robin
#

oh I think that comment is wrong btw bleakekw

#

it's actually a 14-vertex strip

#

I render it like this
Fwog::Cmd::Draw(14, scene.meshes.size(), 0, 0);

dapper gorge
#

Are you sure

long robin
#

yes I'm sure I render it like that

dapper gorge
#

I've been using 24 for old iris and it worked fine

#

Lucky case of UB I guess bleakekw

long robin
#

I renderdoc'd it and everything to ensure it's actually outputting a cube with 14 verts

#

I only noticed that 24 was too much when I noticed some weird artifacts when I was drawing the cubes as partially transparent

dapper gorge
#

Jaker by the way

long robin
#

that being said, you only need an 8-vertex strip to draw the three faces that the camera can see

dapper gorge
#

could you cook up a LOD example

#

kthxbye

long robin
#

how do you want it

dapper gorge
#

shrimple LOD

#

Use meshopt if you can

long robin
#

hmm like switching between lods at different distances

dapper gorge
#

Like, gltfviewer v4

long robin
#

at this point, I just need to make a whole new renderer instead of cramming a million features into the gltf """"example"""

#

it was already getting out of hand when I added reflective shadow maps to it

dapper gorge
#

This gltfviewer has cough pulls list a lotta features

long robin
#

well it doesn't really have that many features, but definitely more than what's needed for a fwog usage example lol

dapper gorge
#

I'll be sleepy for now

#

I expect a fully functional nanite-style lod reimplementation when I wake up

#

Good luck soldier

long robin
#

gn

golden schooner
#

with hypr-rx on πŸ˜‰

final cove
#
void main() {
    float x = float((gl_VertexIndex & 1) << 2) - 1.0;
    float y = float((gl_VertexIndex & 2) << 1) - 1.0;

    gl_Position = vec4(x, y, 0.0, 1.0);
}

FST I have saved, got it somewhere here a while ago

daring surge
#

marttys example is just mini_renderer.cpp

long robin
#

should'v've called it shrimple_renderer.cpp

daring surge
#

mini renderer lets you go very far in complexity KEKW

final cove
#

CreateCube is indexed however and I don't think you can be indexed without a buffer

long robin
#

clamplicated_renderer.cpp

long robin
final cove
#

actually wait it says it right there it's a triangle strip not a triangle list

long robin
#

I updated it to remove the misinfo about being 24 vertices

final cove
#

12*

#

wait is it 12?

long robin
#

huh

#

idk lemme try

final cove
#

I count 16? before it stops

#

15 actually

#

assuming you count the last FFF

#

I never use triangle strip so I don't intuitively know how many you need

long robin
#

12 isn't enough

#

14 seems just right

#

lol 14 is how many non-false lines there are in your pic

final cove
#

makes sense

#

I printed 36 since thats how many I initially expected

#

I totally don't have a debug cube shader with 36 vec3 constants in an array 😳

long robin
#

hmm do any of the parallel standard algorithms in C++ have guaranteed ordering, like if I do std::transform(std::execution::par, ...) into a container, I need the order to remain so the glTF indices don't become invalid

#

ok surely parallel execution policy won't change this

std::transform applies the given function to a range and stores the result in another range, keeping the original elements order and beginning at d_first.

final cove
#

I don't think std::transform even affects the order, it works in place per element

long robin
#

you can have it output to any iterator range

#

the exshrimples on cppreference just transform in-place though

heavy cipher
long robin
#

my raster occlusion culling vertex shader

#

oh that's my triangle

#

is it not working?

heavy cipher
#

its not a quad πŸ˜„

long robin
#

oh fuk

#

I gave you my tri bleakekw

heavy cipher
#

yeee

long robin
#

worry not, I have a quad shader elsewhere

#
// vertices in [0, 1]
vec2 CreateQuad(in uint vertexID) // triangle fan
{
  uint b = 1 << vertexID;
  return vec2((0x3 & b) != 0, (0x9 & b) != 0);
}
#
  vTexCoord = CreateQuad(gl_VertexID);
  vec2 aPos = vTexCoord - 0.5;
#

I should've put the other code in a function called CreateTri to make it obvious that I gave you the wrong thing smart

heavy cipher
#

void misinfo(

long robin
#

btw I can't remember if this quad is ccw or cw, so you may have to swap the magic numbers

heavy cipher
#

i may just not cull

heavy cipher
#

wow that is like the worst grid ever concieved

long robin
#

martty hit the griddy

heavy cipher
#

but thanks, quad be quaddin

dapper gorge
#

I have awoke

#

Jaker where is my example

fiery sorrel
#

Need a name for a Fwog renderer library... Pownd? Swamp? Tadpowle?

rugged notch
#

Bababoowey

brazen glacier
#

use the power of unicode to call it 🐸

final cove
#

codename \U+1F438

golden schooner
#

u wot m8?

long robin
#

huh

golden schooner
#

too much ext perhaps i tried to send

long robin
#

maybe your message contains a banned word by accident

golden schooner
#

no filters have been triggered and as an admin i am immune

#

clang also reports on the no overloads for emplace

#

upper one is gcc

wind trout
#

Wow these ue environments have been getting so good

signal widget
#

The lighting does all the work here, because the asset quality is awful

#

Also looks like a cheap copy of Control's offices

valid oriole
#

wanted to say

#

this really really looks like Control

signal widget
#

from wish

valid oriole
#

orange pipes with the concrete walls and random stuff thrown on the floor

#

but with bad reflections

signal widget
valid oriole
#

yeah I see what you mean

#

wait a sec, even the direction signs and the railings are literally the exact same as you see in control

#

someone got a little too inspired bleakekw

golden schooner
#

this is from this month's free ue assets : )

signal widget
#

I was going to add "not worth the money" :p

golden schooner
#

yeah

#

hehe

dapper gorge
#

Jaker, I am awaiting

long robin
#

I am weak habibi

dapper gorge
#

we are brothers in weakness and strength

#

mashallah the LOD system shall be done

long robin
#

wtf, this ain't c#

long robin
#

nice, new fastgltf loader works

thorn hill
#

naughty

long robin
#

my asserts aren't triggering breakpoints bleakekw

#

ah, it's because the asserts were triggering on other threads due to using a parallel algorithm

thorn hill
#

Yeah, assumed it was something like that considering there is more than one message box. πŸ˜‚

long robin
#

yeah look how dark the outline is in the middle lol

thorn hill
#

I still hate it that Discord doesn't have a "scroll to top/beginning" option for forum posts.

#

I have no idea what the original topic of this post was, I remember it being some engine project.

long robin
#

#1019779751600205955 message

golden schooner
#

#1019740157798273024 message

dapper gorge
#

Whatever it was, it has morphed into everyone else's project, with Jaker mentoring us

golden schooner
#

JMentor

thorn hill
long robin
#

I just searched "fwog" and sorted by oldest

thorn hill
#

Cheats unlocked.

thorn hill
long robin
#

I posted it long ago

#

My PC is already slep, I plan to fix the texture loading crash tomorrow

thorn hill
#

Haha, nice.

golden schooner
thorn hill
long robin
#

the issue I had was kinda funky

#

but now it worky

#

let's see if the deccy cubies still workie

heavy cipher
#

what was the boog?

long robin
#

I don't think these are the right ones

long robin
heavy cipher
#

the goblin processing unit was unhappy with the working conditions and tried to unionize

long robin
#

basically I had a bufferView with mimeType=ktx2, but the buffer got its data from a fastgltf::Vector (I guess because I used the flags to load buffers and images into vectors), which itself had a mimeType of GLBbuffer, and that caused my logic to fail to see that I was loading a ktx2 image

#

I discovered the fix by hovering stuff in the debugger until I saw something with the ktx2 mimetype bleakekw

dapper gorge
long robin
#

tl;dr idk what a mimetype is

#

what a terrible name for it tbh

#

Multipurpose Internet Mail Extensions (MIME)

dapper gorge
#

Jakerone

#

suppose I have 100k meshlets and no debugger

#

how do I pick a very specific one

long robin
#

wdym "pick"

dapper gorge
#

based solely on a pixel color

long robin
#

uh

#

well for one, the answer is indirection

dapper gorge
#

Let me explain, so I have this dumb group of meshlet right here

heavy cipher
dapper gorge
#

Which is red, it should not be red

#

I want to look at its AABB but there are too many meshlets bleakekw

heavy cipher
#

you could render fewer meshlets

long robin
#

why are they blue

dapper gorge
#

They are colored based on their screen space area

long robin
#

and how does the classic assign-everything-a-color-and-readback strategy not work

dapper gorge
#

It does work, it's just painful to setup, so I was hoping for a sort of "third eye" you might've had and told me "this is meshlet #58328"

long robin
#

uh

#

well you could hack some thing up in imgui which lets you select a range of meshlets to draw

#

then you can perform manual binary search by just fiddling with widgets, rather than having to implement an actual picking system

heavy cipher
#

its not painful if you use renderdoc

dapper gorge
#

I have never wished to use RenderDoc so hard in my life

long robin
#

are you using an unsupported ext

dapper gorge
#

yes 😭

long robin
#

I think you already said that and I just have dementia

heavy cipher
#

cring

long robin
#

kwite annoying how gltfpack will use texture transform if you don't put -noq

#

like bruh, that significantly changes how I need to handle stuff, much more so than mesh quantization

#

da cubicles are looking good still

golden schooner
#

that looks neat

long robin
#

switching from tinygltf to fastgltf be loike

golden schooner
#

noice

long robin
#

and no more nasty hacks to load ktx

golden schooner
#

rsm looks neat too

#

this little scene looks super neat as is

#

with sunlight and shadows et al

#

im jealous πŸ™‚

long robin
#

no pbrisms though

#

but

#

fastgltf makes it straightforward to support all the pbrisms

golden schooner
#

the cubes dont habe any pbrisms anyway 😐

long robin
#

you have iblisms too

golden schooner
#

indeed

long robin
#

what you are seeing here is advanced autoformatting

golden schooner
#

that doesnt even look bad at all

#

its just weird to see "greyed out" identifiers, that means to me they can be removed πŸ˜›

#

asset, image, view and vector

long robin
#

ah I just realized that formatting actually makes sense

golden schooner
#

color scheme should be adjusted for resharper c++isms

long robin
#

it just looks funny with buffer.data in a void by itself

brazen glacier
#

why does it randomly switch to two spaces though :(

golden schooner
#

hehe

golden schooner
#

ah the 2 space indent is ugly indeed

dapper gorge
brazen glacier
#

like what's going on here

golden schooner
#

jaker swallowed the glsl formatting pill

long robin
dapper gorge
#

lambda galore

long robin
#

the editor just didn't add the lines in some places for some reason

golden schooner
#

can you properly step through with a debugger in this lambda hekk?

long robin
#

ye

dapper gorge
#

I count 7 lambdas KEKW

long robin
#

there's another lambda a few lines above the code in the pic too frog_sweat

dapper gorge
#

I don't like how it looks tbh, too C++y

#

It hurts (physically) to read bleakekw

long robin
#

well that's just what it's like to use std::variant

#

I guess I could use get_if instead of a visitor

#

but tbqh the skeleton of this (3000 lambdas of allah) is copied from the fastgltf readme

dapper gorge
#

I prefer to switch

#

Only visit in a template context

#

E.g:

template <typename... Ts>
struct ir::akl::hash<std::variant<Ts...>> {
    using is_avalanching = void;
    using is_transparent = void;
    IR_NODISCARD constexpr auto operator ()(const std::variant<Ts...>& value) const noexcept -> std::size_t {
        return std::visit([]<typename T>(const T& value) {
            return ir::akl::hash<T>()(value);
        }, value);
    }
};
#

this visit is clean (sort of)

long robin
#

so you just switch on variant::index?

dapper gorge
#

Either variant::index or my own tag

#

for example descriptor_type

#

I have variant<buffer_info, image_info, texel_buffer_info> but I also know the descriptor_type

#

So I can shrimply use that

#

Perhaps switch appeases the lack of match in C++ KEKW

long robin
#

the thing I don't like about switching on the index is that it's not obvious what your cases are

#

why not use std::get_if or std::get

#

just chain some if statements

snow sun
golden schooner
#

even i approve of it πŸ™‚

#

as a non c++ person

snow sun
#

i also prefer the if vhain with grt_if a lot

golden schooner
#

i also like that fastgltf is fastgltf:: and not fg:: like sometimes seen in sean's code

long robin
#

yeah it do be more readable without all the visit bs

#

I still had to help myself to a little lambda, as a treat

golden schooner
#

: )

#

but how come you indent with 2 spaces now

long robin
#

wdym now

golden schooner
#

i believe it was only glsl

#

not c++

long robin
#

no

golden schooner
#

hmm ok

long robin
#

maybe you don't notice when I post code snippets on discord

#

or when I link my gh

golden schooner
#

i have fwog open here

#

and its 2 there too heh

golden schooner
#

i take it πŸ˜„

#

2 is still strange πŸ˜›

long robin
#

yeah

#

it's nice when heavily nested code doesn't turn half your screen into whitespace though

golden schooner
#

while having a >30" widescreen monitor

long robin
#

I have multiple panes of code open simultaneously

#

usually .cpp on the left, .h on the right

golden schooner
#

i cant find that picture of that one of our frogs upgrading his desk thing

#

where i pointed that white space out already πŸ˜„

long robin
#

bikeshedding whitespace choices smh

#

a second schlapping is due

golden schooner
robust bough
long robin
#

I was gonna write some code today, but I got carried away by hours of color mismanagement in #off-topic-🐸 frog_bath

#

today was a terrible day to have trichromatic vision

dapper gorge
#

Was the code you were going to write for my LOD system

long robin
#

I was thinking of doin some pbrisms in da gltf viewer

#

I think I should just make a separate project for a renderer tbh, then I can go ham on random features without worrying if it's a fit for fwog examples

#

then deccer's bewanted clustered light culling may finally make it in

dapper gorge
#

do you hate LODs or sumthin

long robin
#

tbh I dunno where to start for automated lods without diving into a massive rabbit hole

#

is meshopt good at generating simplified meshes

#

I guess gltfpack has an option to decimate the mesh

dapper gorge
final cove
#

yeah I've heard meshopt is pretty good at it

#

imo auto-LODing is a preprocessing helper tool for artists at best, you're gonna want them premade and given a manual look-over anyway

long robin
#

yeah my impression was that auto lod isn't good enough to not involve artists at all

#

too bad I'm not an artist

dapper gorge
#

Nanite begs to differ KEKW

long robin
#

nanite is built different fr

dapper gorge
#

Just use ridiculously high poly count meshes and shrimplify clusters

#

ez

final cove
#

yeah just build nanite tbh its simpler

dapper gorge
#

I am

final cove
#

100 hours writing code beats 1 hour in blender after all

dapper gorge
#

yes

long robin
#

the lod strat of the base lod being way too high smart

dapper gorge
long robin
#

I'm mainly interested in pbr and colorimetry atm

final cove
#

I have an even secreter weapon

dapper gorge
#

But it's a 100 page long PhD thesis

final cove
#

I will wait for you to finish and look over your results

dapper gorge
#

Progress has been steady tbh, I think I have reached the "state of the art triangle rendererℒ️" that Unreal is describing in their slides

#

state of the art being: meshlet and 64-bit visbuffer driven

#

hybrid hardware/software raster is coming soonℒ️

#

The utterly ridiculous part is LODs KEKW

golden schooner
#

lustri my man

#

i wonder if its possible to slide into UE-people's DMs and exchange actual "nanite"esque work

#

either by sending them messages proactively somehow, or perchance by writing about it and spreading the link across the niverses

dapper gorge
#

Ah there is no need, I have secret access to their whole thing

golden schooner
#

dont we all

dapper gorge
#

And by secret access I mean: I linked my github to epic games KEKW

golden schooner
#

you should write about your findings πŸ™‚

fiery sorrel
golden schooner
#

wouldnt surprise me that this could be the foot into many doors

fiery sorrel
#

Cunningham's Law moments.

dapper gorge
#

Nanite doesn't actually rasterize triangles guys, they are deceiving you

#

They implemented Euclideon's unlimited detail in secret without telling anyone, justice for Euclideon

fiery sorrel
long robin
fiery sorrel
#

the gpu cannt do 2d graphics

dapper gorge
#

When you make your own shading language and end up with a worse HLSL

long robin
#

.ush is ΒΎ of kush, which they were probably smoking when they made that

heavy cipher
rugged notch
#

stri stands for "sestertii"

wind trout
#

What tools do you use to manage fwog docs?

long robin
#

sphinx and breathe

#

and doxygen

wind trout
#

Hey thanks

#

Time to breathe in the doxygen

golden schooner
#

schwinxs

daring surge
#

even when the type is inferible, i think it's just easier to read left to right, like here, i'd prefer

- auto descPos = Fwog::VertexInputBindingDescription{
+ Fwog::VertexInputBindingDescription descPos = {
    .location = 0,
    .binding = 0,
    .format = Fwog::Format::R32G32_FLOAT,
    .offset = 0,
  };```
long robin
#

I think the latter is just more familiar to most C and C++ devs

daring surge
#

yes

long robin
#

I prefer the former since it makes it easier to read variable names

daring surge
#

i was going to say that

long robin
#

huehue

daring surge
#

but the thing is

#

people don't know your code, they don't even know if your variable names will be descriptive

long robin
#

the type is on the same line still frogstare

daring surge
#

yeah it's a dumb bikeshed pet peeve thing

long robin
#

you don't even have to scan horizontally to read the variable names froge_love

daring surge
#

same thing as me complaining about not using z-up so that i can't truncate my vec3's in one of the many cases that i work in only top down sadge

long robin
#

that's my biggest annoyance with Y-up ngl

#

but I still use it lmao

daring surge
#

the shader variable names are useful to me, but the rest aren't

long robin
#

the "issue" is that the type names are really long, but yeah feel free to bikeshed

  auto descPos = Fwog::VertexInputBindingDescription{
    .location = 0,
    .binding = 0,
    .format = Fwog::Format::R32G32_FLOAT,
    .offset = 0,
  };
daring surge
#

sometimes i wonder about using niche but relatively useful things in intro examples

#

cause it's genuinely a good way to expose it

long robin
#

maybe positionInputDesc is more descriptive

daring surge
#

like this auto inputDescs = {descPos, descColor};

#

i did not realize you could auto here

long robin
#

initializer lists are lit

#

a magically blessed std:: type that has special integration with the language

#

I'm only disappointed that std::span has no initializer list constructor, so you cannot do SomeFuncThatExpectsASpan({1, 2, 3});

daring surge
#

what is it called when you return a type as a reference so you can chain member calls on it?

long robin
#

builder pattern

daring surge
#

it's interesting how similar that looks to named initializers sometimes

#
auto descPos = Fwog::VertexInputBindingDescription{
    .location = 0,
    .binding = 0,
    .format = Fwog::Format::R32G32_FLOAT,
    .offset = 0,
  };
auto descPos = Fwog::VertexInputBindingDescription()
    .location(0),
    .binding(0),
    .format(Fwog::Format::R32G32_FLOAT),
    .offset(0);```
long robin
#

yeah they have subtle tradeoffs

#

like being able to put them in any order for a builder

daring surge
#

having to implement the methods is the main downside for it imo πŸ’€

#

i'd imagine perf might be a minor consideration? or can that be entirely optimized

long robin
#

yeah it should be trivially optimizable

#

but also you probably won't be making enough of these structs for it to be a perf concern

daring surge
#

ye but that's the sort of thing that should stay consistent across a whole project imo

long robin
#

I mean with either one of these ways

#

so don't base your decision off of perf

daring surge
#

i might consider preferring the builders if i could do actual preprocessing

#

i.e. jai (assuming i understand what that language lets you do correctly)

long robin
#

idk jai except that it has nice compile time programming

daring surge
#

jai lets you do preprocessing AFAIK

#

so you could add some tag to a type like HasBuilderFuncs

#

and you could write a little mini program that would implement builder functions, maybe for your public members

#

i do not know the exact details, considering i have not heard a word about the man or language since i left my last job where i got weekly updates from my manager πŸ’€

long robin
#

was your manager a jblow fanatic or something lmao

daring surge
#

yes lol

#

i sleep Bedge

long robin
#

gn my frog prince

daring surge
wind trout
#

Are you starting a new fwog project for that pbr viewer you mentioned?

golden schooner
#

you need to keep jaker on his toes, J

wind trout
#

Yeah gotta keep checking on PBFwog

golden schooner
#

hehe

long robin
#

maybe I will do it after all

long robin
golden schooner
#

2nd empty repo my man

#

was das?

#

hyperrealistic space adventure made wif fwog

long robin
#

huh

dapper gorge
#

If it doesn't use my rendering engine (which I totally did not copy from Unreal Engine) I'm not playing

golden schooner
#

jakek said like dogfooding

long robin
#

what could it mean

golden schooner
#

that you make something with fwog πŸ™‚

long robin
#

guess I have no choice but to do that

dapper gorge
#

Amazing

wind trout
#

What could this possibly be??

daring surge
#

do a galaga clone

#

(with multiplayer)

golden schooner
#

aka dogalaga

long robin
#

the graphics aren't advanced enough for that

daring surge
#

ok then you have two choices

dapper gorge
#

sad

daring surge
#

either put an AR in a first person perspective

long robin
#

I'll revisit that when I feel like doing more networking bs

daring surge
#

or do a minecraft clone

#

actually 3

#

sorrry

golden schooner
#

jaker made 2 already πŸ˜„

daring surge
#

3rd choice is doing something with a large terrain

#

welcome to gp

long robin
#

nah I'm just gonna make sponchza rendererer #12345

golden schooner
#

heh

long robin
#

except it will specialize in decker cubes and balls

golden schooner
#

M... Ruin C renderereererer #1

dapper gorge
#

Well the overlord of all is Jaker

#

I would like to contribute, so I'll submit to your orders my lord

daring surge
#

start a new GP meta

long robin
#

the jeepee meta is already bindlessisms+visbufferisms

#

I might consider visbuffer at least, but for now I'll start with basic deferred (by copying 03_gltf_viewer)

daring surge
#

no i mean content, not the rendering side

golden schooner
#

with pbr and ibl

daring surge
#

i haven't seen any teapots in a while

dapper gorge
#

deferred = cring

long robin
#

visbuffer is just deferred

#

but for hipsters

golden schooner
#

clustered volume thingy, if viz biz is no option

long robin
#

can do bof

golden schooner
#

man this fucking unreal marketplace thing

#

you dont find shit there

#

and no indicator of stuff you own already

daring surge
#

its too bad that baked lighting is the sketchfab meta

long robin
#

all those crappy webgl renderers don't have le epic gi like my thingy will

golden schooner
#

modular ruins c rendererer #1

wind trout
#

Wait so this is the pbfwog project? That’s awesome

daring surge
#

the above image is not

#

that is ue

#

unless?

dapper gorge
#

Yeah, one day

long robin
golden schooner
#

pssht

long robin
#

deccer can you pin that image so I have something to look forward to in a few years

golden schooner
#

needs a better name than frogfood though

golden schooner
dapper gorge
#

interesting

long robin
daring surge
#

i dont think that model needs nanite

#

pretty sure it's ~1m tris

long robin
dapper gorge
daring surge
#

Tri Count: Assets range from 536 to 4826 Tris.
LODs: No
Number of Meshes: 46

golden schooner
#

DivDivide

long robin
#

holy crap 5000 tris frog_sweat

daring surge
#

does that actually matter for modern stuff

dapper gorge
#

150k triangles?

daring surge
#

no, instanced vs non, ignoring memory usage

dapper gorge
#

Ah perhaps

#

I did run into some memory limitations

golden schooner
#

thats when you upgraded to 128gb ram, and the Pro W7900

dapper gorge
#

But that was because I was importing 1 billion (instanced) triangle scenes bleakekw

daring surge
golden schooner
#

that looks neat indeed, kinda like the style of your game, in a future preset

daring surge
#

this would also be a fun minimal test scene

dapper gorge
#

@long robin when is the project starting I am impatient

long robin
#

I'm making the cmakelists rn

daring surge
#

yeah can we get a commit already

#

geeze

dapper gorge
#

I want at least 300wpm

#

That keyboard needs to fly

golden schooner
#

also make a new post for the new thing πŸ™‚

#

and tmorrow we make fwog build on loonix again

wind trout
daring surge
#

sketchfab

fiery sorrel
#

git refrog

long robin
#

wow it looks just like 03_gltf_viewer

heavy cipher
#

majestic

#

i'd like to see a slider for FSR that goes between 0 1 and 2

long robin
#

what would the numbers mean

#

resolution scale?

#

I think I need to unfuck the UI first and foremost

daring surge
#

i believe the suggestion was made in jest

#

in reference to the version numbers, not the quality

long robin
#

oh lmao

#

thank you peter for explaining the joke

daring surge
long robin
#

honestly not a bad suggestion though

#

it just needs less a troll-y UI element

golden schooner
#

and more of a troll-x UI element?

long robin
#

@golden schooner how difficult is it to use imgui docking

daring surge
#

its not

long robin
#

cool

daring surge
#

well, it depends on what you mean

#

rendering to a window can be kind of annoying actually

long robin
#

I'm already rendering to a texture

daring surge
#

yeah you'll probably be fine

long robin
#

fsr2 forces me to have decoupled rendering

#

inshallah

daring surge
#

fortunately it's one of those things that once you plug in, you'll (probably) never have to touch again

#

i have no memory of what my root dockspace looks like, but i'm checking

heavy cipher
#

ye, its quite alright

daring surge
#

oh but you also need decent input code if you have like

#

first person cameras or whatever

long robin
#

hmm

daring surge
#

forces you to convert mouse coordinates to the viewport space

#

which can be easy

heavy cipher
daring surge
#

or it can force you to make a bunch of code less shit, if it happens to be

golden schooner
daring surge
#

really just this

    ImGuiViewport* viewport = ImGui::GetMainViewport();
    ImGui::SetNextWindowPos(viewport->Pos);
    ImGui::SetNextWindowSize(viewport->Size);
    ImGui::SetNextWindowViewport(viewport->ID);
    ImGui::SetNextWindowBgAlpha(0.0f);

    ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
    window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove;
    window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;

    ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
    ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
    ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
    ImGui::Begin("DockSpace Demo", nullptr, window_flags);
    ImGui::PopStyleVar(3);

    ImGuiID            dockspace_id    = ImGui::GetID("Dockspace");
    ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_PassthruCentralNode;
    ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
    ImGui::End();```
then do all your windows
golden schooner
#

id for dockspace is not required, when you have just one

long robin
#

do I need all those PushStyleVar

daring surge
#

yes

golden schooner
#

i dont use styles for the root window

daring surge
#

i'm fairly certain i yoinked this from omar

#

this places a full-sized window at 0,0 and disables all of the stuff

#

so it's essentially invisible

long robin
#

I'm a wee confuzzled. When do I need to create actual OS windows?

daring surge
#

just do this after ImGui::NewFrame

long robin
#

or does imgui do that for me via callbacks

golden schooner
#
        ImGui.NewFrame();
        ImGui.DockSpaceOverViewport(null, ImGuiDockNodeFlags.PassthruCentralNode);
...
heavy cipher
#

thats not docking

daring surge
#

oh you're saying for viewports

heavy cipher
#

thats a different thing

long robin
#

ah

golden schooner
#

thats what i needed to enable docking though, inside the window, no external windows

daring surge
#

i have viewports disabled since i don't find them very useful, so i'm not sure

long robin
#

for some reason I recall the docking exshrimples having separate windows (like, the docky bits are outside of the main window)

daring surge
golden schooner
#

do you want to support external windows?

long robin
#

no, that sounds hard

daring surge
#

there's a flag

#

so don't enable it πŸ™‚

long robin
#

a lil bias innit

daring surge
#

but at the same time, i have a coworker who uses like 3 monitors

long robin
daring surge
#

and pulls windows out of our editor into all 3

#

i do not get it

long robin
#

well at least in unreal it could be useful

#

level editor on one window, blueprint/code on another

heavy cipher
#

dis your coworker?

daring surge
#

i would say it's that, but it's usually random windows

#

like a material library or an info panel, i think he just prefers windows over tabs lmao

#

i guess there are some people like that. i'm glad to not be one of them, though

long robin
#

there's spaces, tabs, and then this

golden schooner
#

separate windows is sometimes useful, generally speaking

daring surge
long robin
#

hmm

#

I hope deccer doesn't mind me calling him Biggus Deccus

golden schooner
#

i dont πŸ™‚

long robin
#

what do you think mister deccus

golden schooner
#

neat

#

colorscheme is shit, but thats not your fault

dapper gorge
#

You have achieved sponza renderer #4629896

golden schooner
#

to hide that ugly dropdown-chevron-downarrowthingies-next-to-the-tab there is another flag to be set

long robin
#

this layout is more better imo

long robin
golden schooner
#

ye i wasnt able to decipher from my code which one it was

#

the name doesnt say what it is iirc

long robin
#

oh this is a different one

golden schooner
#

nocollapse means you cant collapse altogether

#

are you also going to render to a texture and show the world in an imgui window? or just in fb0

long robin
#

hmm the demo doesn't have the flag

long robin
#

but to put it in a window would be more betterer

golden schooner
#

sorry for conchfusing it with a flag, its a style

long robin
#

what's the var called

golden schooner
#

style.WindowMenuButtonPosition = ImGuiDir.None;

long robin
#

it wurked nice

golden schooner
#

looks muhc better without that thing, neh?

long robin
#

ye

#

it was kwite useless

golden schooner
#

do you also want to add icons?

long robin
#

now I gotta get me one of them fancy fonts with all the icons

golden schooner
#

haha

long robin
#

shared brain cell moment

#

also nice name froge_love

golden schooner
#

curtesy of the wallpaper and spooder man

#

i have materialdesignicons going

long robin
#

can you post a pic of your thingy so I can rember

golden schooner
long robin
#

btw stuff is pushed to new repo

#

running it would require removing the line where I hardcoded the absolute path of a model to load though

#

plus I'm not doing anything interesting yet

golden schooner
#

fwog wont build here anyway atm

#

something about optional is fooked

dapper gorge
long robin
#

I'm afraid I won't be doing any bindlessisms since I like being able to use renderdoc

dapper gorge
#

not epic

long robin
#

which means gpu-drivenisms are also epically nerfed 😦

dapper gorge
#

Damn

golden schooner
#

its not toally nerfed

#

just bin textures into arrays

dapper gorge
#

so I'm essentially useless in this project bleakekw

long robin
golden schooner
#

yeah

dapper gorge
#

But le readback 😦

long robin
#

I'd have a bunch of MDIC calls instead

golden schooner
#

pushed to main branch still?

long robin
#

but texture arrays is an option. I'd just have to massage all incoming textures somehow

golden schooner
#

i was able to do it earlier, so you should be too πŸ˜›

long robin
golden schooner
#

you said you pushed the changes

long robin
#

ah

golden schooner
#

oh

#

im an idiot

#

to new repo :>

long robin
golden schooner
#

anyway let me show you othe fwog errors

#

with gcc 13.1.1

long robin
#

is that the latest commit

golden schooner
#

yes

#

and clang 15.0.7

long robin
#

it passes CI froge_sad

#

the gl.h thing is real though. for some reason msvc doesn't detect it

golden schooner
#

hmm

#

c++23alreadyisms?

long robin
#

just c++20

golden schooner
#

ah gcc10 and 11 on ci

#

mayhaps a gcc13thing

long robin
#

try replacing the for and two ifs in FrameBufferCache with these

    for (const auto& colorAttachment : renderInfo.colorAttachments)
    {
      attachments.colorAttachments.emplace_back(TextureProxy{
        colorAttachment.texture.get().GetCreateInfo(),
        detail::GetHandle(colorAttachment.texture),
      });
    }
    if (renderInfo.depthAttachment)
    {
      attachments.depthAttachment.emplace(TextureProxy{
        renderInfo.depthAttachment->texture.get().GetCreateInfo(),
        detail::GetHandle(renderInfo.depthAttachment->texture),
      });
    }
    if (renderInfo.stencilAttachment)
    {
      attachments.stencilAttachment.emplace(TextureProxy{
        renderInfo.stencilAttachment->texture.get().GetCreateInfo(),
        detail::GetHandle(renderInfo.stencilAttachment->texture),
      });
    }
golden schooner
#

trying to build with gcc12 first

long robin
#

should I add CI for newer GCC

golden schooner
#

perhaps

golden schooner
#

otherwise with gcc12 same problem

long robin
#

schtrange

golden schooner
#

and that gl.h stuff is also still present which is weird

#

nowhere do you include gl.h yourself

long robin
#

it's the order of glad and glfw includes

golden schooner
#

yeah

#

weird that this error popped into existence

long robin
#

I'll add CI for GCC 13 I guess

golden schooner
#

didnt we have clang there too?

long robin
#

just gcc10 and 11 it seems

golden schooner
#

mayhaps we got rid of it again for some reason

long robin
#

but I mean clang is basically the same as gcc :^)

golden schooner
#

im not asking you to add it

long robin
#

ok I schlep now, πŸ‡¬πŸ‡³

golden schooner
#

frogfood built btw

long robin
#

are you using gcc11

golden schooner
#

13 for frogfood

long robin
#

πŸ‡ΉπŸ‡«

#

it's using the busted version of fwog

#

oh well, it won't matter once I update it

#

πŸ‡¬πŸ‡³ once again

golden schooner
#

perhaps frogfood doesnt build the fwog examples ;p

long robin
golden schooner
#

hmm also true

#

anywho we deal with it later

long robin
#

C++ moment

golden schooner
#

rest my wallpaper man

signal widget
golden schooner
daring surge
# signal widget That reminds me something, is that a public scene ?
golden schooner
#

cute little scene

long robin
#

It came to me in a dream that I could render the scene bindlessless style (but still gpu driven) if I did deferred texturing or visbuffer

#

@dapper gorge consider your employment offer unreneged

dapper gorge
#

absolutely epic

long robin
#

duccus made this for me: #1128020727380054046

golden schooner
#

fwog compiles again btw

#

and we have to conditionally link tbb somehow

#

did we not address that already?

long robin
#

I thought you added a thingy for that in the cmake already

golden schooner
#

yeah

#

thought so too

long robin
#

examples/cmakelists.txt

golden schooner
#

ah

#

its not in there

#

its also absent from frogwood then

daring surge
#

frogwood sounds like a place

final cove
#

Frogwood Place sounds expensive

golden schooner
#

it better be

long robin
#

it's after boardwalk and park place on the monopoly board, in a secret location

golden schooner
#

how do you call these white pavillon-esque wooden constructs you seein parks sometimes?

long robin
#

gazebo?

golden schooner
#

hmm, could be

#

oui

long robin
#

I like all the names we have for little outdoor structures

golden schooner
#

the fancy one is exactly what i had in mind

final cove
#

like a bikeshed

wind trout
#

Off topic but on phone I just realized if you tap the top of the screen it jumps to the first post

#

My problems are finally solved

golden schooner
#

oh do you mind linking the top post from here and over in enginekit?

#

then i can pin them

wind trout
#

#1019779751600205955 message

golden schooner
#

kewl, merci

daring surge
#

@long robin (sidenote, i just typed @fwog without thinking about it) about the multiplayer galaga, but unironically, how did that go?

#

thinking about tinkering around a bit with something with networking on the side

daring surge
#

oh, that thread is still alive and actually provided the answer relatively recently

long robin
#

Yeah it's kinda in limbo

daring surge
#

any thoughts on the fun/learning aspects of it? worth it for you or not?

long robin
#

I didn't get very far, but it was kind of fun while I was doing it

#

And definitely very informative

#

It's satisfying watching a second copy of the game correctly receive inputs from the first, much like rendering hello triangle is

#

I will say it's been very hard to make an architecture that supports networking. Perhaps that's a krill issue though

daring surge
#

was the networking side just win32/std interacting?

long robin
#

I used enet because I didn't want to deal with socket bs

#

Just sending messages and whatnot

daring surge
#

kk, ty

dire badge
#

Sockets are not that hard. I have the basic building blocks ready but I have too many other things to do froge_sad

daring surge
#

with the engine or with life? :P

dire badge
#

I have time allocated for both.

#

Engine is more of a mess. Life is mostly simple enough.

daring surge
#

i usually have like 5-10 hours a week to work on personal projects PepeHands

dire badge
#

Yeah that time is limited

#

I am currently on vacation, but that time is mostly for "life"

#

I managed to make one 36kloc commit to erhe though nervous

daring surge
#

monkaW that's like my entire project size

#

if even

dire badge
#

That was just refactoring

#

Correcting past mistakes

daring surge
#

ye i have 26k sloc lol

dire badge
#

I deleted 20k+ lines, added 15k+ lines, according to git. A lot of search and replace

long robin
#

net -5k lines froge_love

long robin
#

#1019965526434394173 message
meanwhile, fwog has 0 tests

golden schooner
#

but asserts

dapper gorge
#

our library has the power of the froge

#

It cannot possibly be wrong

long robin
golden schooner
#

unit tests do make more sense for fastgltf

long robin
#

there are a few testable things in fwog

#

like CopyImageToBuffer and vice versa

#

could also test rendering in various ways, like making sure attachments are correctly written to in the right places, etc

#

could also make sure certain invalid behavior is caught by the asserts

golden schooner
#

yeah all the things where createXXXInfo is involved

#

and begin/endrenderin makes sense with graphics/compute isms

#

without any glXXX nonsense

oak garden
#

it is pretty hard to test this stuff

golden schooner
#

not really

#

it only requires all akchual glCalls to be refactored out into an interface of sorts

#

then you can mock those functions during test (ie not invoke them at all, because they have been overrrrrridden by empty funcs)

#

but you can test your logic around them

long robin
#

I was thinking about testing actual functionality rather than API usage

#

which requires a driver of some sort

golden schooner
#

ah

#

perhaps one could implement something in mesa

#

where glXXX is just logging to some stringbuffer

#

which you can assert on

#

ah no you just said, actual funktschionality

long robin
#

ye like making sure CopyImageToBuffer doesn't fook up the format or something

golden schooner
#

id not test that

long robin
#

y not

golden schooner
#

id add validations as part of the program logic

#

and unit test those

#

image and buffer descriptor have all the info needed

#

and you made assumptions around those when implementing CopyImageToBuffer

long robin
#

why can't I unit test individual functions

oak garden
#

i think the problem is the amount of setup required for a lot of test scenarios involving graphics

golden schooner
#

if that involves glGetImage/glGetBuffer then this could be done prohabs

oak garden
#

creating a pipeline, resources, etc

daring surge
#

out of curiosity, do you look back on any problem in recent past with the thought that unit tests would've helped with?

golden schooner
#

it just requires a bit more glue

golden schooner
#

its not about whether unit tests are useful or not

long robin
#

but I've had a lot of bugs, so they'd've probably helped at some point

golden schooner
#

especially for everything else, which isnt pure api calls

#

just like sean's thing earlier, where someone tried to load a model, but didnt provide a proper option, which lead to some nuh uh

long robin
#

I suffer from edge cases causing issues, and idk if unit tests could help with that

#

there are a lot of edges

hollow crystal
#

you should use voxels then KEKW

long robin
#

erroring because there isn't a newline after a line directive is lame

#

redundant fbo is meh

digital lion
#

passing 0 for the size in glBindBufferRange also gives a debug message on my rx 5700 xt

long robin
#

hmm how should I "unbind" buffers then

#

hecc

GL_INVALID_VALUE is generated if size is less than or equal to zero, or if offset + size is greater than the value of GL_BUFFER_SIZE.

#

I guess I can make a dummy buffer with 1 byte of data in it

digital lion
#

or maybe this
glBindBufferRange(GL_SHADER_STORAGE_BUFFER, index, 0, 0, 1);

long robin
#

I think it'll still error

[...] or if offset + size is greater than the value of GL_BUFFER_SIZE.

digital lion
#

oh ok

#

it didnt throw a debug message for me

long robin
#

I'm going to presume intel is anal about this and will still error

golden schooner
#

perhaps @dire badge could try that kwikly, he has an intel xe at hand

digital lion
#

other idea:
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, 0);

long robin
#

hmm perchance

long robin
#

need someone on intel to test these

#

I think I'll be safe just binding a dummy buffer and no one has to test

golden schooner
#

basil also has one

long robin
#

the gl one does format conversions and shit which is meh

#

it's also really easy to use it wrong

#

ok I'm convinced

golden schooner
#

which did you pick?

long robin
#

oppa vulkan style

heavy cipher
#

pick the gl one, but limit extent of clear based on draw state and scissor (liberal interpretation of coordinates allowed)

golden schooner
#

its been a second since i looked at fwog, does Buffer know its format?

long robin
#

non't

golden schooner
#

hmm

long robin
#

basically no

golden schooner
#

i got it

long robin
#

but there is a TypedBuffer template which simplifies a couple things

golden schooner
#

then one could do xxxClear(buffer, offset, extent)

#

and format is inferred/taken from buffer->desc->format

long robin
#

you can't really set a struct layout and clear to that unfortunately

#

in gl, your largest "clear element" is basically vec4

golden schooner
#

hmm that explains why i fill vec4s too

long robin
#

in vulkan, the buffer is treated as being filled with uint32, and you set one value to clear to

golden schooner
#

we are in gl space though

long robin
#

yeah but the gl way is annoying with having different format sizes

#

simplifying it to this is nice

  struct BufferClearInfo
  {
    uint64_t offset = 0;
    uint64_t size = WHOLE_BUFFER;
    uint32_t data = 0;
  };
golden schooner
#

i was about to ask, whether you usually clear the whole buffer or rects in a buffer

long robin
#

rects frogstare

#

talking about buffer buffers btw, not texture buffers (in the sense that opengl calls framebuffer attachments "buffers") πŸ˜„

golden schooner
#

fair, offset/size then

#

unrolled rects πŸ˜„

#

perchance provide 2 ways then

#

one clear clears the whole thing, the other provides an unrolled rect way

long robin
#

if you specify no parameters with {}, then it will clear the whole thing to 0

golden schooner
#

that sounds like idiomatic c++

long robin
#

the GL way of having "internal format" and "upload format/type" and type conversions is kinda icky

#

vulkan way is shrimple and easy to use correctly, which I likey

golden schooner
#

ill withdraw my commentary

long robin
# golden schooner that sounds like idiomatic c++

here's an example of real usage

  // Clear all the indirect draw fields to zero, then set the instance count to one (this way should be more efficient than a CPU-side buffer update)
  meshletIndirectCommand->FillData({});
  meshletIndirectCommand->FillData({
    .offset = offsetof(Fwog::DrawIndexedIndirectCommand, instanceCount),
    .size = sizeof(uint32_t),
    .data = 1,
  });
golden schooner
#

ok the part after the comma is a horse conch

long robin
#

heh

golden schooner
#

you googled it

#

: >

long robin
#

nein

#

fill commands are cheap because they actually happen on the device and don't require any sync/shadow copies with the host

golden schooner
#

i am ok with fill/clear calls, no questions asked

long robin
#

downside is that you are limited in how much data you can upload (4 bytes in vulkan, 16 bytes in gl), kinda like push constants

golden schooner
#

the {} is conchfusing, or is that how c++ frogs would make that interface

long robin
#

I'm using a parameter struct just for consistency, but yeah that's how you would default initialize one with maximum ease

golden schooner
#

WHOLE_BUFFER is 0 then

long robin
#

it's actually UINT_MAX or something like that

#

but it doesn't matter to the user

golden schooner
#

ah i get it

long robin
#

the field will be initialized to whatever I put in the struct definition

golden schooner
#

ignore what i said

#

yeah

#

i shouldnvttnve

long robin
#

I'm also not saying this is necessarily the most idiomatic way, but it does seem decent as far as C++ ways go

#

I think default being "clear whole buffer to 0" is reasonable

golden schooner
#

ah i probably worded it weirdly

#

i didnt mean that you did some c++thing which makes no sense

#

i was wondering if thats how c++ frogs would akchually do/design such a thing (pass {} like that)

#

ill go back into my corner of the cave πŸ™‚

long robin
#

I just changed the function to have a default param so you can actually pass "nothing" πŸ˜„

golden schooner
#

: )

long robin
#

because ({}) is kinda weird

golden schooner
#

it do be looking funny

long robin
#

{} is a normal way to default init structs in other contexts, but yeah it do be kinda odd for params

#

lol

golden schooner
#

yeah, i am aware of that

long robin
#

I'm sure the idiomatic C# way would require 10x less bikeshedding to figure out

#

or maybe I'm underestimating the average C#acean's ability to 'shed

golden schooner
#

portfoilo πŸ™‚ heart_bounce

#

"The creator of Fwog is active and easy to collaborate with on a community that I am involved in" πŸ™‚

#

are you referring to "...easy to collaborate with..."?

#

hehe

long robin
#

that is clem's site btw

golden schooner
#

i know

#

i like the darker theme muh more than the one before

#

in c# alot of people would also just provide params

long robin
#

but then you end up with 3000 parameters of allah

golden schooner
#

not necessarily

#

and thats outrageous as well

#

either some nonsense like Create/Upload-isms

#

for the update unrolled rect way, or a complete different method for clearing the whole as is, without any param, other than the buffer

#

clear might just be part of the buffer construct as well, and not of context

#

eh, i like your way better

heavy cipher
#

remember the buffer of theseus

long robin
#

my buffer API be looking like that fr