#GrubStomper29's OpenGL Sandbox
1 messages ยท Page 7 of 1
that exists, right?
Technically yes
but its actively in flux
AMD is adding some kind of extension
Nvidia already has one
yeah i use nv hardware
you do yeah
i thought some amd cards support GL_NV_mesh_shader
I'm not sure
theres a few cards on here
wait
im not seeing rtx 3050 on there ๐
oh nvm
its supported
yeah it looks like most modern cards support it
and its not like ill be having a wide audience with this project
iโm hoping ill reach 10ms draw times with that optimization
i dont know if ill be able to get below that without lod, which i refuse to touch
screen space derivatives failing? check that red cloth thing I don't know the name of
The red thing is called an awning
Not sure about the derivatives
But you could really use some MSAA
its deferred, dont know if i could handle that
once i have pbr i wouldnt mind trying out super sampling
@kind sparrow you havent said much in here recently
Technically it's possible but theres a reason nobody does it
idealy id like to try TAA but it might be scope creep
Yeah I know but in this case it should beat the index buffer generation + rendering
Slap FSR on it and be done
i am violently against ai frame generation
You can use it as TAA
FSR 2&3 are not AI
oh ok
Dlss & fsr4 are
I lurk
I haven't done CSM before and I'm not that interested in Sponzas etc personally so I don't have much to say
It looks good though
I'll be implementing CSM eventually too, might be a little while though
I'm currently on the audio bikeshed
yeah
ja, sponza == boringue
hey, this is bistro
Same thing
both are also just hacked together, no sense of detail or craftmanship
They're interesting ish but after the Nth time they lose their charm
No doubt they're good test scenes from a utilitarian perspective
ye, after the nth time you see all the cracks
theyre simply the only good stress tests i know of available in gltf
id love to see more
you could ask vblanco for the godot test scene he mentioned
I have it somewhere too I think
alright I think I fixed shadow mapping matrix calc
there is some acne on the next cascade
i want to try dithering between cascades
I use interleaved gradient noise
how does the dithering work?
does the dither value decide what shadow map you sample?
I add the dither value to the distance before the cascade calculation
The dither value is between 0-1 so multiply it by the distance you want the transition to happen over
i see
What does your cascade selection look like in the shader?
Ah yeah so it's a flat cutoff
You can get a little more resolution if you use a spherical cutoff
yeah but im lazy and its working fine for now
the dithering works good
albiet i am using a random dither function i found on reddit
lets see if yours is better
whats the difference between mod and fmodf
type specificity?
anyways I just dropped in the code and replaced those calls with mod and it works just fine
I did and thats my guess
looks about 3% better than the reddit dither
i must say im pretty happy with that
I am still suffering with shadow acne at further cascades, so clearly I need to scale my bias accordingly
modf*(float val, float* intPart) separates the fractional and integer parts of a float,
cppreference doesnt mention that afaik
fmod*(float x, float y) performs a floating point division but returns the remainder left over from calculating a whole number quotient
they're two different things
I also got rid of the ugly transparent cubes bisecting the scene
oh it does
it's confusing but the variants of fmod are fmod, fmodf, fmodl, and the variants of modf are modf, modff, modfl
right lol
welp
shadow acnes gone
i guess im done?
if anyone has time I'd love for this to be tested on other machines: https://github.com/GrumStomper29/OpenGL-Sandbox/tree/shadow-mapping
I also finally have a thread thumbnail, even if it is very generic ๐
im jealous ๐
idk your picture is pretty dope
oh i see
you can see my github and vkguide for hzb stuff
my hzb generation is really brute force (1 compute dispatch per mip level) but its surprisingly fast
i could probably interleave the different hzb dispatches to reduce the impact of stalling for the next mip level write
uh oh
daxa is calling
nsight supports mesh shaders though
you can also ping BoyBayKiller in #opengl about them, if you need more info
0(3) : error C0203: extension GL_NV_mesh_shader not supported in profile gp5vp
not sure why this occurs
must I use a compatibility gl profile
update your gpu drivers
what gpu and what os?
windows 11, rtx 3050
hmm
you cant use GL_NV_mesh_shader as an extension in a fragment shader
mesh and task shaders are completely new stages
im using this and another blog
not sure why this happens
figured it out
I'd steal AMD's single pass downsampler
it's what I plan on doing next time I revisit this class ofp roblems
preferably but i dont think it works on opengl which is why i wrote my own
@night shoal if I were to creddit you for something, should I capitalize the D in your name?
or leave it how you wrote it
its all lowercase
looks like what I used before is still there
regardless, nothing is rendering
I got something!
here are the deccer cubes
obviously im suffering indexing errors of some sort
immediately found 1 ๐
looks like were only drawing 3 triangles per meshlet for some reason
YEAH BABY
bistro works too
for some reason visual studio is hiding my stop debugging button on some submenu
lol
i have materials and culling back
i still need blended objects and shadows
its still running real slow because mesh shader thread group size is 1, and im not yet doing anything to deduplicate vertex transforms
each cluster has a max of 64 verts but im transforming vertices per index, so really its closer to 372 vertex transforms per cluster 
easy fix though
still, very cool
we still never found an explanation for that threadgroup quirk i found several months ago
where dispatching an 4x4x4 local size compute was much slower than 64x1x1
at least for the cluster batching
i should talk about that in general
Don't do that, it's not conservative when it comes to downsampling depth
wdym? also how is it even remotely usable if it doesn't produce the minimum accurate results
and follow up question, can you easily remedy this by modifying it
It's usable for other things, just not hiz
The problem is for non power of 2 textures it will generate a hiz where the depth of a coarser mip is not the min/max of a finer mip
It can "miss" pixels
Supposedly granite renderer did, I never tested it though. I also don't have a link handy
hm, I might have to dig around granite next time I need a hiz
seems kinda dumb though because if you could tolerate missing pixels, wouldn't you just not bother generating mips to begin with
It's only for non power of 2 textures
Hiz isn't spd's intended use case unfortunately
Discord is breaking down it seems
oh i thought it couldve been related to the things ive been sending friends for years
well thats fine, im not working on anything visual
by some luck for the past few months I always seem to have just enough padding already in a gl struct to be able to add some more attributes
for example just now i need to add 2 uints to my cluster struct, and by chance there are two ints oh padding
mesh shaders are effectively fully implemented and im still getting 30ms frametimes
it seems like the only thing ive accomplished is moving 60% of the load from the meshlet batcher to the mesh shaders
What does nsight say is the bottleneck?
nsight profiler? not sure itll profile gl mesh shaders but ill give it a try
yeah it looks like gpu trace isnt going to work for now
here were stats on the heavy meshlet batcher before my mesh shader impl
right now its closer to 11ms meaning the mesh shaders are ~20ms
it probably doesnt help that my local workgroup size is 1
Yeah that seems catastrophic tbh
welp
ill need to somehow divide the count parameter of the indirect mesh draw buffer by 32
maybe I can use some modulus in the batcher
but that will potentially leave me 31 meshlets less than I need
maybe the first meshlet of each view will add 2 instead of 1 to the buffer
and this will ofc give me a 32x reduction in atomicAdds in the batcher ๐
you can just use subgroup ops to get that 32x reduction as well
lemme think
there's a subgroupAdd-something-or-other that's basically perfect for prefix sum operations
ill keep that in mind
i believe that will lock my mesh shaders and batcher to the same threadgroup size
and I still need to track the index for cluster writes
you still get the index, the subgroup op uses magick to make sure that each thread gets its own unique value of the sum, and then you can just elect one thread with the ballot to atomicAdd it
man compute really isnt fun
I like compute lol
Compute is type 2 fun
Sometimes type 3
But when you get everything working it's great
The main trick is that it's essential that you can contrive test cases that are manually readable
If you have 2,000,000 elements that are being shuffled around it's impossible to debug stuff
You want to have small test cases and you want to have the ability to dump and/or write any intermediate state of the buffers
Because any non determinism can't be debugged with a graphics debugger
what are the types of fun
Type 1 fun is fun as you're doing it, dopamine fun
Type 2 is not very fun in the moment but fun in retrospect, serotonin fun
Type 3 fun isn't fun at all even in retrospect lol
Basically it's mindless fun, tough and challenging but rewarding fun, and not actually fun as a humorous 3rd tier
oh lol
My foliage stuff ended up being borderline type 3 fun lmao because it literally took 6 months of banging my head on horrible nondeterministic issues and when I actually fixed it it was not really that satisfying lmao
Although it laid the groundwork for future work
is this ogl compatible
or am i rotting
I assume he's just talking about doing operations on group local memory
im not finding "subgroupAdd" anywhere
You just use a group shared variable and elect one thread to do all the global sync
subgroupInclusiveAdd
or Exclusive
this seems like a needless limitation
this doesnt seem to appear anywhere except for a khronos blog
im looking for the formal doc
yes you can do it in opengl
Are you just talking about doing shared memory stuff
Or something more exotic
I'm talking about subgroup operations, because it sounds like something vaguely involving a prefix sum
ignore that it's vulkan, GL has the same ext
particularly subgroupExclusiveAdd
You can find the doc by searching the ext names, or the links here
https://github.com/KhronosGroup/GLSL/blob/master/extensions/khr/GL_KHR_shader_subgroup.txt
but the formal definition is the text files on their github
so whenever i do go about making a real game, iโm going to be releasing it under my real name, which i dont really want associated with grubstomper29
to keep yall updated on development id have to make a private server
is that cool with yall?
specifically demon, deccer, lukasino, and jake
sure
Yeah sure, why not
i have no objections either
You can probably make a lot of progress on a prototype before you have anything recognizable enough to warrant hiding though imo
Depending on the project
i think to solve the batching issue ill try and stall thread 0 until all the atomic ops are done, then divide the var by 32
i wonder if there are in-shader barriers?
looks like there is a function with no parameter or return, seems easy enough
i wonder if dividing the var will be ub though
i can probably do some atomicExchange magic
if clusterId == 0
memoryBarrier()
fetch index
set index to index/32
seems easy enough
yeah, also how badly do you fear missing out on maybe a couple hundred, couple thousand dollars max? If I ever actually publish anything it'll probably be for free and anonymous
especially since I'm a big fan of copyright infringement among other things
itll be free but not anonymous
if you're not making money why pierce the veil
because itd be my lifes work and magnum opus so id prefer to take due credit
you can use subgroupElect() to just pick 1 thread in a subgroup to do an operation
if (subgroupElect()) {
// atomic add or something
}
i only need it once per dispatch though
but does this make sense
yeah, I've never thought about it that way lol
especially if it does become popular, i wouldnโt want someone else claiming credit
I think there's ways around that even still though, like the guy that made yume nikki
perhaps
Just a tip, try not to treat any one project like that
ASO isn't gonna be my opus hopefully
really if one person plays it and has fun iโll consider it a job well done
yeah I also try not to think about just how few games you can make in a human lifetime without help
i only really want to make one or two published games
i wonder if distributing a game without monetization would affect the price id have to pay for music licenses
ill cross that bridge when i get there
protip: if they can't find you, they can't sue you
iโm a lawful citizen
You don't need to pay for music if you make your own 
I know you have it in you
i think i can do this sometime tomorrow
in the following weeks im going to try to refurbish my Wii, Godwilling
general maintenance + a shelling replacement for the second time
the original shell was yellowed and eroded beyond repair so i bought a 3rd party replacement, which ended up being terrible and didnt even fit itself
so now ive bought a bricked wii to steal the shelling
now that i think about it, im really just migrating all the boards and disk drive from my wii to the bricked one
also replacing thermal pads and the clock battery
if i can repair the other wiiโs board/drive or whatever is broken, I might resell it, mod it, or do something with it
the Before These Crowded Streets album has the best drumming ive seen in a studio, both in skill and tone
good example here https://youtu.be/O1zYYIXUl8Q?si=YYR7Sse_hmEEzNhH
Provided to YouTube by RCA Records Label
Stay (Wasting Time) ยท Dave Matthews Band
Before These Crowded Streets
โ 1998 BMG Music
Released on: 1998-04-28
Composer, Lyricist: David J. Matthews
Bass Guitar, Composer: Stefan Lessard
Alto Saxophone, Baritone Saxophone, Bass Clarinet, Soprano Saxophone, Tenor Saxophone, Woodwinds, Compose...
aux percussion is also great here but is better in Crash by the same band
@echo token i believe it was you who recommended i ask vblanco for a test scene. He hasnโt responded. Do you have it?
uhhh let me dig
I definitely have it becaus I generally don't lose/delete this kind of stuff, the question is where
isnt it on vb's github somewhere, if not some linked google drive
vkguide should know where
if I could just remember what it was called...
unrelated wtf is E1M1
is this a system shock map?
why do I have this
I will tell you that I have like 4 different copies of bistro
its in the vkguide repo
structure.glb
should be a solid alpha blend showcase too
one thing I've been confused about is whether the mesh shader outputs are per invocation or per work group
i think ill assome the former and find out the hard way
from the nv example:
// the actual amount of primitives the workgroup outputs ( <= max_primitives)
out uint gl_PrimitiveCountNV;
looks like the output is per workgroup, but that output is still confined by max_primitives
which is pretty low
i dont think a workgroup would be able to output more than 2 meshlets
not sure what to do in this case
I could try to spread a single meshlet accross several threads
each thread transforms ~2 vertices and writes out ~4 indices
Most implementations output just one meshlet
I have seen invocations == max vertices in one meshlet or half of the max vertices. So each thread fetches 2 positions and transforms it. Later writes 6 micro indices
i need to write 12 indices per invocation
given thread size of 32 and meshlet triangle count of 124
Why don't you increase the size to 64 so you write only 6?
Nah it supports it
I would assume it's the same as compute the amount of threads per thread group
I use 64 threads in my engine
What kind of bullshit is that
3050 lol
yeah probably
i was gonna say gl_nv_mesh_shader sucks
anyways 32 seems to work well enough; this is so fast man
no lods or hw raster, yet i have bistro csm at 11ms (this is the most expensive camera angle I know of)
which equates to 90fps on my 3050
i can probably get more if I use subgroup atomic ops for the batcher and try interleaving hzb gen
i did not think mesh shaders would give me a 3x speed boost
Is this forward rendering?
interleaving hzb gen: I use 1 dispatch per mip level because it was real easy to write and is fast enough for my purposes. I generate each hzb sequentially which in theory could waste some time since later hzbs could be waiting on the semaphores of prior hzb dispatches
I could alleviate this by interleaving the dispatches, i.e. gen mip 1 for each hzb then proceed to mip 2 for each, etc.
in practice im not sure the time saved would matter given pcie bandwidth
deferred so pbr will be hopefully free or freeish
weird how there's gl_LocalInvocationIndex but not gl_GlobalInvocationIndex
so I have to manually ```uint clusterId =
gl_WorkGroupID.z * gl_NumWorkGroups.x * gl_NumWorkGroups.y +
gl_WorkGroupID.y * gl_NumWorkGroups.x +
gl_WorkGroupID.x;
clusterId = clusterId * 64 + gl_LocalInvocationIndex;```
i STILL need to fix alpha blend stuff though
the vkguide test scene draws pretty fast
cant say im a big fan of the scene; its not very colorful and indoor-ness prevents shadow mapping from doing anything cool
nah iโm good
also im doing an inverse + transpose in the vertex shader
I def could bake and store that
memory is your bottleneck much more frequently than calculations
I wouldn't be too worried about baking and storing relatively simple stuff like that
i see
thats why i dynamically calc tangents
idk why bevy tries to use screenspace derivatives when you can dynamically calc tangents in vertex shader
you could ask Jasmine ๐
how so?
ahhh i cant find the article
let me paste my code
nvm here it is @spring kelp http://www.thetenthplanet.de/archives/1180
theres probably other ways to do it
afaik you get better interpolation, but also feeding varyings from the vertex to the fragment shader is also a memory bottleneck
it's gotta get there somehow
also im doing this in the frag shader for some reason
This is basically what I do already, I just use a newer algorithm, no?
oh hold on
maybe?
i mean yeah its around 12 years old
whats the new algo look like
i wonder what the advantages of this over the previous method are
You can calculate normal matrix much much faster using transform matrix and doing 3 cross products
Also it doesn't introduce errors as inverse transpose
can you show code or send a link please
{
return 1.0 / vec3(dot(m[0], m[0]), dot(m[1], m[1]), dot(m[2], m[2]));
}```
you can then multiply the scale back into the matrix or simply apply it separately
so in my case mat3 rotation = mat3(local_transform); vec3 transformed_normal = rotation * (normal * extract_matrix_scale(rotation));
wouldn't you need to sqrt the columns?
I thought the scale was vec3(length(m[0]), length(m[1]), length(m[2]))
The trick is called adjoint/adjogute matrix. It's a special case where inverse transpose isn't needed. I hope I spell the other word correctly 
splendid
before
after?
trying out srgb
i think its fixed
I think it looks a lot nicer
but it could really use some hdr
I want good hdr but i dont want to go down a rabbit hole
opengl doesnt really have colorspaceisms, all you got is tonemappers
vulkan supports the former natively
thats fine
and i always thought you were on vulkan already
These two things are not compatible
You can have one or the other
i though so
ill probably just throw in the simple logl sample and add controls for that in the gui
you can probably stay away from the logl sample and throw in a mcmapperface in
Makes a huge difference though
yeah
as much as id love retina based solutions thats probably the deepest rabbithole
Retina?
empirical would be fine for my case
i just want the image to look somewhat like youre viewing it through an eyeball
which i suppose means absolutely nothing since you already do that with every image
I mean in principle you could have a completely physically based process that is designed to make the pixel the same color as whatever a spectrophotometer would report if you pointed it at that point
The problem is that your overall interpretation of the picture in real life is dependent on more than just one rod or cone
right
there is not only automatic gain adjustment via pupil reflex and rhodopsin depletion but also filtering of patterns to do localized contrast leveling
yeah
i wish more games explored that
i hate to see a first person game still try to look like a film camera
though id love to see a siggraph on this stuff its out of scope for this project
yeah all the colorimetry stuff is very unfun and annoying
||test||
||Someone discovered spoiler
||
So when are you writing a wii game?
right after releaseing the Bistro DLC for Metal Gear Liquid Solid
lol
ive had such a project in mind for over a year now
not a wii game but gc/wii accurate graphics
Here's reinhard extended tonemapping
using luma instead of color for calculation ๐
im also trying to find more accurate sunlight and sky colors but without using real world units, im not sure if its possible
The image above uses https://planetpixelemporium.com/tutorialpages/light.html, but I find it hard to believe the sun emits white light
you need to show some others side by side
otherwise i have no idea if reinhard is something cool or not ๐
its something simple 
it fits my needs: I just set a value to the max possible luminance and it maps the scenes colors accordingly
thanks brave
this ones pretty cool https://ancestralis.co/color-of-the-sun-throughout-the-day-in-amsterdam-and-how-it-relates-to-artificial-lighting-choices/
heres something
im not sure how color temperature relates to the strength of a light
wikipedia probably describes all those terms
luminance, magnitude, flux, etc
and their relationship, candela/lux/lumen
I like this for now. I'll probably use that paper when I impl pbr
It's comparing it to a black body emission spectrum which is parameterized by a single temperature
Otherwise you'd need some other description of arbitrary spectral content
Black body radiation just happens to be a convenient one
Since the sun and a variety of other light sources are approximate black bodies (any thermal light source basically, like an incandescent bulb)
i see
It's completely unrelated to strength
then i imagine id need some unit of strength for sunlight
radiance
This is a major rabbithole though
yikes
I imagine you haven't taken vector calculus yet
nope
And the units of radiometry are confusing as hell
You'd use physical units for all your values
that doesnโt sound very fun
Such and such watts per square meter, so many watts per steradian per sq meter etc
lol
really im looking for a ratio of sunlight radiance to sky radiance, the latter being used as ambient light
i think right now I have it at 4:1
According to wiki it's ~15%
Actually 20% when you remove the outscattered sunlight from the direct lighting
So 5:1 is a good estimate
where?
First paragraph of https://en.m.wikipedia.org/wiki/Diffuse_sky_radiation
Diffuse sky radiation is solar radiation reaching the Earth's surface after having been scattered from the direct solar beam by molecules or particulates in the atmosphere. It is also called sky radiation, the determinative process for changing the colors of the sky. Approximately 23% of direct incident radiation of total sunlight is removed fr...
and im assuming this depends on time of day? I think Iโm shooting for 3:00 pm on this scene
Yeah it does
im sure 3 is close enough to noon
There's a formula lower down for calculating it depending on incident angle it seems
ah yeah i wouldnt mind simple simulation
i think my shadow angle is probably too extreme for 3:00
im actually having a lot of trouble finding a ggx brdf impl
i might just use Cook-Torrance
man google and brave are being so useless right now im getting a headache
try filament or adobe's materialx
can you send a link for the latter
You just have to post the spicy memes in your project thread where the mods aren't looking
Did I miss a spicy meme?
just some screenshots of funny things I see on the roblox shop
im following this https://google.github.io/filament/Filament.html
I wonder why the lambertian is formatted this way? Why not just dot the surfacae and light normal
because it's meant to plug into the render equation
which has cos(w_i) baked into the definition
also because the render equation is defined as an integral over the surface area of a unit sphere it leaves you with a 4pi you need to divide off
which I just replace with dot(), right
can you elaborate the 4pi division
4ฯ steradians cover the whole sphere
Idk what the normalization is for in this specific case though
right now Im just using the brdf for direct light
it was my understanding you could just multiply the brdf output by the light-frag cosine and use that
Is there any reason to not use a GL_RG16F framebuffer attachment to store deferred metallic roughness data?
Do you need floats to describe that
0 to 1
so i suppose
why not use unorm for my color framebuffer too
are they ints? reading the spec rn
I dont think so. unorm looks like integers? GLTF spec says metal and roughness are floats
...or maybe I can. This is written pretty confusingly:
Unsigned normalized integers store floating-point values on the range [0, 1]
Unorm is what regular texture components are
Yeah that's not a correct description lol
so i probably should put my color framebuffers in that
That's what normal framebuffer formats are as well, regular GL_RGBA8 or whatever
Floating point values are for if you want your texture to store values like 3e-4 or 5.1e6 etc
Which is not usually, unless you're doing PBR lighting stuff with high dynamic range values like with physical units
yes you can see it to the right of the equation I sent
also I don't entirely know why lambertian is defined as C/pi when the total surface area is 4pi, I dunno where the 4 gets lost
either im reading materials wrong
or this bistro model doesnt have proper metallicroughness materials
You are getting in quite a Rabbit hole with PBR
https://litter.catbox.moe/tdv5a5.7z
here is what I think is the fixed bistro version pat made a while back, it uses compressed dds textures iirc
i forgot to tell yall that nsight is completely broken for this project right now
probably due to mesh shaders
nsight supports mesh shaders
not gl
nah
whenever i try to capture debug info, theres a message like โunsupported function detected: glDrawMeshTasksโ
why
I also love that its called "metallicRoughness" and they put roughness before metalness
very nice
it's also in the gb channels
so r and a can be used for... something else
I don't remember what exactly but if you dig around for what's speced to the r and a channels you might see what they expect as an "optimization"
this is more annoying
im just gonna flip it in shaders
looks like all my metallicRoughness vals are 1, 1
i think its an issue with the model
ill try the one yall posted above
7zip my beloved
@echo token mightve asked this already but do you have a project thread I can follow
it must be using something because both fastgltf and the khronos validator refuse to load this lol
you need to enable the extension which is required by that model, most likely some glossiness roughness thing
KHR_materials_pbrSpecularGlossiness perhaps
constexpr auto parserOptions =
fastgltf::Extensions::EXT_mesh_gpu_instancing |
fastgltf::Extensions::KHR_mesh_quantization |
fastgltf::Extensions::EXT_meshopt_compression |
fastgltf::Extensions::KHR_lights_punctual |
fastgltf::Extensions::EXT_texture_webp |
fastgltf::Extensions::KHR_texture_transform |
fastgltf::Extensions::KHR_texture_basisu |
fastgltf::Extensions::MSFT_texture_dds |
fastgltf::Extensions::KHR_materials_pbrSpecularGlossiness |
fastgltf::Extensions::KHR_materials_specular |
fastgltf::Extensions::KHR_materials_ior |
fastgltf::Extensions::KHR_materials_iridescence |
fastgltf::Extensions::KHR_materials_volume |
fastgltf::Extensions::KHR_materials_transmission |
fastgltf::Extensions::KHR_materials_clearcoat |
fastgltf::Extensions::KHR_materials_emissive_strength |
fastgltf::Extensions::KHR_materials_sheen |
fastgltf::Extensions::KHR_draco_mesh_compression |
fastgltf::Extensions::KHR_materials_unlit;
fastgltf::Parser parser(parserOptions);
fastgltf should also tell you why it wasnt able to load
yeah something about extensions
domeboy mentioned texture compression
just look at the error in loadresult
I don't write about my actual personal project anywhere other than discussing aspects of it in other people's threads when it's relevant, primarily because it's not actually that novel or interesting
https://discord.com/channels/318590007881236480/1149482437601153064
but I do have one for my text lib
though I had a feeling you might be interested since what I do when I feel like working on it is usually copying roblox features
yeah it is boring by most metrics, my engine UI is just basically roblox UI so that lib is basically what I needed to drive feature compliance with all their various things
i see
i think i might go back to sponza rendering for now. Iโm sure those materials work
better yet, i should probably use a pbr test model for this
there's the gltf one from "this mesh will also crash your engine"
it's a grid of spheres
I don't remember where that thread was though, much less how to necro it
glad so much of my long term memory is reserved for where I acquired GP test models from
DMB - Charlottesville, VA. - 9/22/06
i wonder what level of hearing loss this would induce
i sure hope he had ear pro on
especially around 2:39
There are two types of musicians, ones that protect their hearing and ones that are halfway deaf lol
I always wore earpro while playing and I still have mild hearing loss on the right side from the china cymbal
It's not noticeable or anything since my hearing is very good but it's just "merely" normal on that side vs. the left where I have a few dB higher sensitivity than average, and I have mild tinnitus on the right
i see lol
alright so this is really hard to see but im writing the roughness and metallic as R and G here
and as you can see, it doesn't look right
that looks familiar ๐
yeah but i wish it worked
i have no clue whats wrong with the metallic roughness textures
if they're uniform, maybe it depends on the values in the material definition in the glTF file?
that doesnt seem right
thats the only material and its over the entire model
and I may be wrong, but this looks a lot like a metal roughness texture
must be an issue with my loader
yeah
are you checking for the PBR sub-struct in the material
I believe so
let me check
if (asset->materials[i].pbrData.metallicRoughnessTexture)
{
hasMetallicRoughnessTexture = true;
metallicRoughnessTexture =
asset->materials[i].pbrData.metallicRoughnessTexture.value().textureIndex;
metallicRoughnessTexture = mTextures[metallicRoughnessTexture].bindlessHandle;
}```
oh wow
it looks like i just skip those in the final struct init
thanks old me
this is a lot more like it
this helmet doesnt store AO in the .r channel, so that should literally just be blue and green
there should not be a red
im doing some weird deferred junk, dw ab it
ah
also
since you use bindless textures, you dont need separate hasXXX flags
you can just check if the address is 0 or not
is 0 reserved or something
for what?
bindless handles?
just removes unnecessary code
I have my 0th bindless texture as my default black texture to be safe
this is new
I have handles 0, 1, and 2 reserved for black, white, and normal (0.5, 0.5, 1) respectively
very handy
if it's negative it sounds like an initialization issue
opengl handles being 0 results in black by default ๐
also make sure to respect the optionals in fastgltf
put a break point in your debug callback, when the message type is error
already on that
ah
ah yeah i have no alpha blend geometry so the engine tries to make a buffer to store all zero alpha blend indices
this is clearly outline in the README as a feature
anyways this is a bit less nice
yeah idk ab this one
ive been using uvec to read/write the unorm g buffer but it seems to be the cause of this
ill just use vec
vec is float, uvec is uint
is srgb on?
removing the specular denominator seems to get me closer for some reason
the filament paper doesnt seem to have it either
are you loading albedo/metal/roughness as srgb too?
just albedo
ah pic just loaded in
i had metalness and roughness swappen in between somewhere before, make sure you didnt do the same mistake
the fresnel part shouldnt be visible when you look straight on to the object
it manifests at grazing angelos
im not sure what im missing
render out the individual things as color
heres the brdf ```
vec3 brdf(vec3 v, vec3 l, vec3 n, vec3 f0, vec3 baseColor, float metallic, float perceptualRoughness)
{
vec3 diffuseColor = (1.0f - metallic) * baseColor;
vec3 h = normalize(v + l);
float NoV = abs(dot(n, v)) + 1e-5;
float NoL = clamp(dot(n, l), 0.0, 1.0);
float NoH = clamp(dot(n, h), 0.0, 1.0);
float LoH = clamp(dot(l, h), 0.0, 1.0);
// perceptually linear roughness to roughness (see parameterization)
float roughness = perceptualRoughness * perceptualRoughness;
float D = D_GGX(NoH, roughness);
vec3 F = F_Schlick(LoH, f0);
float V = V_SmithGGXCorrelated(NoV, NoL, roughness);
// specular BRDF
vec3 Fr = ((D * V) * F);
Fr /= (4.0f * max(dot(n, v), 0.0f) * max(dot(n, l), 0.0f) + 0.00001f) ;
// diffuse BRDF
vec3 Fd = diffuseColor * Fd_Lambert();
return Fr + Fd;
}```
albedo only, metal only, roughness only, diffuse only, specular only etc
its def the specular calc
NoV and max(dot(n, v), 0) looks like a duplicate
true
NoL too
yeah
something about that seemed to do it
besides the aliasing it looks perfectly fine to me
now onto bistro
again, idk if the materials are correct but im pretty sure brick walls dont have much fresnel specular
i had very shiny surfaces too before
because i fucked up metalness and roughness
double check that, just in case
yeah I think its an engine issue if even sponza has this problem
it always is a PEBKAC
whats that mean

thatd be the dream huh
I have the makings of what could be basically nanite specialized for plants
but it's like multiple man-years away from being that mature
I would need to literally hire a professional team
the other issue is that a lot of the complexity you see comes from the infinite variability of the plants, in a game you need to reuse assets or the plants in this picture would be like gigs of data
but you could probably get close with the right pipeline
id love to know how it works
It's basically just a graph representation of the plants that could be used for dynamically generated LODs while allowing arbitrarily complicated plants
but the actual infrastructure required to scale it to the level of generality and performance necessary to render a scene like yours is immense
also it would require my plant simulator to get way more advanced to be able to generate that scene in the first place
If someone gave me half a million dollars to quit my job and hire a few collaborators for a year or two I probably could
lol
What if I gave you no money to add the plant tech for ASO2 
if only
i think the foliage would just be so hard to cull
too many โholesโ in a plant to offer good occlusion of plants behind it
hzb culling would probably do something but not enough
i also imagine a need for imposters, but like demon said, keeping imposters for each unique plant sounds like a huge memory hog
then theres lod popping
problems exist to be solved ๐ฏ
Yeah foliage pretty much guarantees overdraw
putting dense foliage on procedural terrain sounds fun
iโll add that to the long list of potential projects
as a plus, so much light is scattered from the canopy and fog of the Appalachians that shadows dont seem to be much of a thing
plant generation doesnt sound too fun though
@kind sparrow can you confirm or deny this
it's !fun!
There isn't
there are probably some people's various experiments but idk if there's anything up to the task of real general-purpose plant simulation
Part of the problem is that modeling plant growth habits is real hard
it's very difficult to match observation to a model
for me anyways
I spent 6 months straight studying algorithmic botany and didn't get to the point where I could look at a plant and figure out its growth patterns
I started messing with fern models but part of the problem is that kind of plant's morphology is heavily governed by physics
with trees you can sort of get away with treating them as perfectly rigid
im not terribly worried with trees atm
but a fern needs to bend under the weight of its leaves
trees are the easy part though
everything else is hard because it's flexible
yeah
and its growth patterns are in some ways even more context-sensitive
iโm looking at the various ivies and leaves
so you end up needing structural dynamics models and sensory processes and approximations of the behaviors plants use to decide which direction to grow
i wonder if cutting corners to make a rudimentary approximation is practical, hoping the density of the scene would mask the cracks
or would it be much like using broken bricks to build a castle
I spent 6 months studying books and doing field observation and then it took another 6 months just to get my basic GPU culling/instancing stuff working so I just shelved it as-is as soon as it worked and haven't gone back
it's probably well poised to make more improvements quickly but I don't have the interest atm
maybe later
for sure
this would be my second forest project though
so maybe i do it for the heritage
https://developer.unigine.com/en/docs/future/content/tutorials/vegetation/clutter_vegetation.gif
source:
https://developer.unigine.com/docs/future/content/tutorials/vegetation/
if oyu hire me, ill make sure no bat will attack you during that time
unfortunately in order to afford the salary we had to diversify into guano collection
This is a fantastic link. Thank you for sharing 
also this is quite nice for clutter plants:
https://www.fab.com/sellers/Quixel?listing_types=3d-model&categories=nature-plants--plants
@kind sparrow i was watching a movie and a character in it held his pistol weird, with his non dominant elbow above the slide like so
is this hollywood shenanigans or something esoteric
it seems like a weird hollywood interpretation of when you usually see guys stabilize their gun with their elbow below (also usually that's when they're also holding a flashlight, so it naturally faces forward)
that would indeed fit into the context of the scene
the gunman in question was apprehending someone
that being said its Michael Bay so you never know
usually your best defense against someone grabbing your gun while you're aiming it is to pull the trigger
idk if i told yall but a few years ago i showed my friends a color interpolated square i made in vulkan
like the hello triangle but a rectangle
and I told them it took me two weeks to make so its been referred to as the 2 Week Box since
one of my friends made it his wallpaper too lol
best friend!
back to my program, you can see strong specular reflection on rough surfaces at grazing angles
Filament article says
so maybe its correct
try this
@gilded shell
I already clamp such vals
maybe it looks wrong because I dont have ibl or gi?
well this certainly isnt a grazing angle so its probably not correct lol
๐
odd how filament uses vec3 as fresnel return
its because of the metals
yeah my mistake
I wish they included the specular denominator
anyways I dropped in the opengl functions as quick replacements for the filament ones
now it looks a little lame lol
it makes me think filament is doing something different for the specular denominator
which is a shame since there's no code example for it. It might be buried in the explanations somewhere.
@night shoal would you know anything about this
Why is float NoV = abs(dot(n, v)) + 1e-5; when the other dot calcs clamp and omit the addition?
and yeah for some reason I can't find the denominator anywhere in the code
I wonder if theyre just omitting it
or they've replaced it with "pixel.energyCompensation"
idk what gives but dropping it seems to give correct results
i have no clue why the aliasing is like that one the edges of the model, thats really weird
many solutions to the same problem
now im really curious about this
the filament cook-torrence impl doesnt have the specular denominator
im still really confused why the outside edges are way more pixely than other geometric edges
i dont have any aa
if you are referring to this one, it just looks like you are rendering into a low resolution render target perchance
wdym
wdym wdym
it looks like this is rendered into a 256x256 or something texture
rather than a 1080p one
I'm still getting used to android
I just switched from ios
idk what to put on my homescreen so i just have nothing
(the wallpaper is a picture i took)
if you guys have tips for smoother android usage or helpful settings id love to hear it
Idk you don't have to do much
Keep it in your pocket, it can do less mental damage to you that way
Well now that i have android i can play cave story on my phone
I replaced most of the google apps with othet stuff
but theres no replacing google maps
and for some reason my investing app needs google play installed and enabled
That's for security reasons
Most apps use google services for security reasons
Graphene OS had some beef with companies about this bs
This is how mine looks quite simple
transcribed part of a song by ear
it sounds a bit off, probably beacuse im not trying hard enough to stay on key
@plain mantle
its crazy how much better I am at the drum composition than anything else lol
Cool! what song is it btw?
Provided to YouTube by RCA Records Label
Tripping Billies ยท Dave Matthews Band
Crash
โ 1996 BMG Music
Released on: 1996-04-30
Composer, Lyricist: David J. Matthews
Producer: Steve Lillywhite
Engineer: John Siket
Assistant Engineer: Chris Laidlaw
Assistant Engineer: Scott Gormley
Assistant Engineer: Paul Higgins
Mixing Engineer: Tom Lord-...
at 0:40
I shoulda guessed it was DMB
but hes not playing the same note for 16ths
he dances around a bit
regardless, its too late; trial FL wont let me open the file again so this is what we have lol
but yeah I wonder if doing little transcriptions like these will be beneficial
Yeah its good to train your ear
what about creativity for composition
Best way to get better at composing is to compose
You will inevitably make some stuff that doesn't sound great, but eventually you will have something that sounds good. And you can choose to only show us the good stuff ๐
im proud of this lol
I forgot to tell you all; I got a 5 (best possible score) on the ap calculus exam
Congratulations!
i think i wanna hold off on vk forest scene 2
and instead make a basic game first, mostly to learn better engine structure
frog platformer or smth like that
you know me so well
Like mario sunshine type stuff?
Same
I just loop through everything with a mesh component and draw it
Highly recommend EnTT btw
Yeah and I just have a specific component and system to handle parent/child spatial relationships
I see
Why this as opposed to my own?
It just makes it easy
Your own would basically do the same thing
If your game is going to be simple you can roll your own easily entt is just convenient
yeah its not worth rolling your own tbh
I did and eventually just switched back to entt because maintaining a lesser featureset just wasn't worth it
demons nih rolled one is also sufficient enough, but i also stick with entt
If your game has a known finite scope you can just use flat static arrays of size MAX_ENTS which is easy
That's my NIH one
But if your requirements are basically any bit more complex it's worth just using entt
yeah
perhaps if you have hundreds or thousands of entities then entt's group-thing might be a better choice
i also dont want macro-isms ๐
Deccer you need to learn to become based and macropilled
Macros are great when used judiciously
Who are you PQCraft?
macros are for when you have a pattern that would result in copy/pasted code that's either not worth abstracting or not possible to (e.g. in the case of declaring named static arrays)
It's rare to need them but when they are the right tool they are super useful as long as you don't abuse them
yeah
i definitely havent rewritten the same functionality multiple times across different glsl files
stb_include is your friend on that front
does anyone know good resources on shoreline water rendering
as shown in this fine chap's video
ive been had
I'm seeing instagram ads based on some research i did earlier today
likely because some of it was on youtube
i havent found a good one for android
are you referring to dns, vpn, or something else
No just the browser plugin
Ads that are embedded into sites usually contain trackers
So that when you go to another site that also serves ads.
It remembers you
Of course this won't stop the instagram app from tracking you
ofc but im not quite willing to give it up just yet
I hate instagram. But unfortunately I need it
do you get a significant follower base from instagram
Not at all
Nah I need it for music stuff. All musicians use insta so when you meet them after a show or whatever they always ask for your insta
i just use it for acceletating my dementia and communicating with friends
Well you are gen Z so the brainrot is unfortunately terminal
it has booted into gui mode for me
well i dont outsource thinking
nor do i post anything anywhere but github
Very good
You are basically gen Z too
We just got called millennials growing up because nobody knew what gen Z was yet
I very importantly came in just under the cutoff 
Haha
yeah I am very glad to not be a millenial
I am very glad to be one
you were born <81?
No lol
then DR is a millenial too ๐