#Iris - A Journey through OpenGL and beyond to learn Graphics

1 messages Β· Page 18 of 1

wispy spear
#

deccer cubes should be present in there too when vsm is going

wispy spear
#

did you push the latest tbb fix? πŸ˜›

wicked notch
wispy spear
#

[cmake] Cannot find source file:
[cmake]
[cmake] /home/deccer/Code/External/Retina/Dependencies/cgltf/Implementation.c

#

smh : ) elias mentioned it earlier

wicked notch
#

what in tarnation

#

I swear I fixed that

wispy spear
wicked notch
#

incredible

wispy spear
#

let me reclone this mf

wicked notch
#

I pushed the fix another time

#

just in case

#

I deleted and recreated the dir

frank sail
#

I think the issue is caused by not using fastgltf

wicked notch
#

fastgltf issue

wispy spear
#

indeed, why are you not using fastgltf already

pale horizon
#

Git is goofy ah when changing case sensitivity on Windows

wispy spear
#

it do be, indeed

wicked notch
#

maybe I should wipe my windows drive

wispy spear
#

you have to rewrite history to fix it

#

ill check later i gtg dodo

#

πŸ‡¬πŸ‡³

wicked notch
#

πŸ‡¬πŸ‡³

wheat haven
#

yeah windows tends to have trouble when you tell it to rename a file with only case differences

wispy spear
#

you need to remove CGLTF completely and add cgltf again

#

otherwise theres a git config for casing but i wouldnt fiddle with it

frank sail
#

@wicked notch how do you abstract vkCmdPushConstants?

wicked notch
#

with the byte array thingy

#
template <typename... Args>
auto CCommandBuffer::PushConstants(Args&&... args) noexcept -> CCommandBuffer& {
  RETINA_PROFILE_SCOPED();
  return PushConstants(0_u32, std::span<const uint8>(Core::MakeByteArray(std::forward<Args>(args)...)));
}
auto CCommandBuffer::PushConstants(uint32 offset, std::span<const uint8> values) noexcept -> CCommandBuffer& {
  RETINA_PROFILE_SCOPED();
  const auto& currentPipeline = *_currentState.Pipeline;
  const auto& layout = currentPipeline.GetLayout();
  vkCmdPushConstants(_handle, layout.Handle, AsEnumCounterpart(layout.PushConstant.Stages), offset, values.size_bytes(), values.data());
  return *this;
}```
frank sail
#

damn I need a current pipeline thingy

#

actually I don't

#

actually I do for the stage flags

#

unless

#

oh man, I'm based
.stageFlags = VK_SHADER_STAGE_ALL,

wicked notch
#

valid strategy

frank sail
#

I have that in my global pipeline layout

#

honestly quite incredible

#

btw I have this handy thing

  class TriviallyCopyableByteSpan : public std::span<const std::byte>
  {
  public:
    template<typename T>
      requires std::is_trivially_copyable_v<T>
    TriviallyCopyableByteSpan(const T& t) : std::span<const std::byte>(std::as_bytes(std::span{&t, static_cast<size_t>(1)}))
    {
    }

    template<typename T>
      requires std::is_trivially_copyable_v<T>
    TriviallyCopyableByteSpan(std::span<const T> t) : std::span<const std::byte>(std::as_bytes(t))
    {
    }

    template<typename T>
      requires std::is_trivially_copyable_v<T>
    TriviallyCopyableByteSpan(std::span<T> t) : std::span<const std::byte>(std::as_bytes(t))
    {
    }
  };
wispy spear
#

AsEnumCounterpart : )

#

had too much calzone?

frank sail
#

lvstrium

frank sail
#

@wicked notch would you be interested in collaborating on a d3d12 renderer when you have time?

#

for d3d12 learning

#

since you mentioned an interest

wicked notch
#

damn you want to go to the dark side

wispy spear
#

maybe i should too : >

#

im currently pissed about lunix

#

its ok if you just want to go with lvstri : )

frank sail
#

Just a possible future thing, no pressure

wispy spear
#

so D3D13 then

frank sail
#

I have no goals except to learn d3d12 gooder so I'd be willing to work on any part of it and let you do what you want

#

@wispy spear you could join the fun too

delicate rain
#

I smell collaboration in the air

#

Or perhaps a competition

frank sail
#

daxa competition

#

jk

delicate rain
#

Unless πŸ‘€

frank sail
#

timberdoodle and $unnamed-thingy will actually be bf and gf

wispy spear
#

mor like grumpy-aunt and alcoholic-uncle

frank sail
#

(babafroggy and gooeyfroggy)

delicate rain
#

The future is bright froge_love

wispy spear
#

hehe maybe we pick a new pet

wicked notch
#

nothing like some awesome shadows froge_love

#

there is nothing wrong in this image btw

#

it's just your imagination

pale horizon
#

Just add some bias, lmao, ez fix, bro

wispy spear
#

and tell Mr Moiree to piss off

wicked notch
#

I just realized that log scaling in PSSM is really just whatever we were doing with VSM at the beginning

#

which is POT scaling

frank sail
#

budget vsm

#

more like Walmart vsm

wicked notch
#

real

#

but I still have faith in SD(S?)VSM

#

the thing where you reduce your depth buffer and do magic

frank sail
#

I don't see how but perhaps

primal shadow
#

I switched from an actual index buffer to a buffer of triangle IDs for meshlets. No perf improvement, but 1/3 memory usage per triangle, and it opens up the possibility of bigger meshlet sizes.

wheat haven
#

how does that work? doesn't that remove your vertex cache?

wicked notch
#

you already give up your vertex cache if you do SW meshlets innit

wheat haven
#

I didn't

#

you still get vertex cache if you generate an index buffer

primal shadow
#

I wansn't using a real vertex buffer

#

But I'm not really familiar with the hardware vertex cache stuff so idk

wheat haven
#

I'm not using a real vertex buffer either, but I'm still using a real index buffer

wicked notch
#

regardless of that the perf implications are minimal

primal shadow
#

Regardless, didn't seem to be much of any perf difference on an RTX 3080 on windows

wicked notch
#

potrick already tested

primal shadow
#

Yeah

wheat haven
#

seriously? that's surprising to me

primal shadow
#

Β―_(ツ)_/Β―

wicked notch
wheat haven
#

so you just do

uint triangleId = gl_VertexID / 3;
uint vertexId = gl_VertexID % 3;
#

?

primal shadow
#

Anyways roadmap is currently:

  • Finish LODs
  • Software raster
  • Experiment with meshlet sizing
  • Single pass depth pyramid generation (overhead/barriers between passes is sloooow)
wicked notch
#

the opposite innit

#

but yeah

wheat haven
#

it wouldn't be the opposite because % 3 can only ever be 0 1 2

wicked notch
#

uhh

primal shadow
#
    let packed_ids = draw_index_buffer[vertex_index / 3u];
    let cluster_id = packed_ids >> 8u;
    let triangle_id = extractBits(packed_ids, 0u, 8u);
    let index_id = (triangle_id * 3u) + (vertex_index % 3u);
wheat haven
#

huh, maybe I'll give that a try

primal shadow
#

I'm still allocating worst case triangle buffer size though

#

After everything else is finished, I want to experiment with dynamically allocating it based on some heuristics and maybe buffer readback, and probbaly just spill over into software raster if I run out of room

wicked notch
#

I was just about to say

#

the solution to that is fixed budget + readback from gpu

#

dynamic size is not practical

primal shadow
#

Yeah. I want to do LODs + software raster first, since that'll greatly change how much I actually need

#

Also I'm limited to 2gb max, which is uhh

wicked notch
#

storage buffer moment

primal shadow
#

4 bytes per triangle

wicked notch
#

imagine πŸ…±οΈointers

primal shadow
#

2e+9/4 triangles

#

~500 million triangles (I forget if GPUs use GB or GiB)

wicked notch
#

city sample is 35 billion

primal shadow
#

LODs and software raster means I should never hit that limit idt, that feels like more than enough now

wicked notch
#

gotta crank those numbers up

primal shadow
wicked notch
#

raw scene

#

also that's the "small" version

primal shadow
#

ok yeah, the 2gb limit just affects the actual amount I can render at once

wicked notch
#

I can't export the big version :(

primal shadow
#

Well technically, in each of the two passes

wheat haven
#

35 billion triangles...ah yes, a classic 391GB index buffer

wicked notch
#

@delicate rain where's daxa's imgui port

delicate rain
#

behold cope

wicked notch
#

how much cope we talkin

delicate rain
#

It's fine actually

#

I was just memin

#

also how are you already futher along in porting VSMs than me??

wicked notch
#

are the layout colors already fixed for sRGB brain damage

delicate rain
#

oh there I do some cope

wicked notch
#

cope is all we can do

delicate rain
#

I precompile two shaders, one for sRGB and one for UNORM, so one does manual gamma correction and one does not

#

I then decide on these based on the swapchain format iirc

glass sphinx
#

like 4080

#

and you still get a little perf from index buffer but remember i calculated in the index buffer generation

#

the draw is still faster but on 4080 just unindexed was nearly the same

#

1080ti was a much bugger siff

wicked notch
#

I just realized the ImageCount refers to frames in flights in imgui

#

actually insane

primal shadow
#

Alright, time to sit down and figure out why my LOD builder is not working

primal shadow
#

Assertion failed: v < vertex_count, file vendor/src/simplifier.cpp, line 63 wuh

#

oh wait

#

hmmmmm

primal shadow
#

I built an entire seperate vertex buffer, and it's still not working???

#

wtf

wispy spear
#

fetchcontent is unable to fetch fmtlib : (

wicked notch
#

I have no idea why bleakekw

wispy spear
#

ye because you tag random commits

#

which dont exist anymore

wicked notch
#

can commit history change at random

wispy spear
#

yes

#

when you rewrite history because you are a rebase elitist for instance

wicked notch
#

so commit hashes that are valid are rendered invalid by a rebase?

wispy spear
#

if possible find actually tagged commits

#

it depends

#

some can also just disappear

#

because orphaned

wicked notch
wispy spear
#

yes

#

well

#

its 2 things

#

a release happens on a tag

#

tags can exist without having a release hehe

#

but yeah

#

and CGLTF is also still there, but i guess i have to reclone

wicked notch
#

I made sure CGLTF is now upper case everywhere

#

ok you can reclone now

#

I fixed fmtlib's commit hashes

#

I'll fix the other's as well

wispy spear
#

also cgltf needs replacement

#

or else i will tell sean

wicked notch
wispy spear
#

hehe i also just found some weird function

#

unrelated to Regtina

wicked notch
#

which func

#

also I fixed the tags now

wispy spear
#

glMultiDrawArraysIndirectBindlessCountNV

wicked notch
#

what is that.meme

wispy spear
#

yeah

#

from 2015

#

anywho

#

fails to configure

#

bunch of macro/templateism

#

(freshly cloned)

wicked notch
#

ahh yeah

#

missing include

#

typical

wispy spear
#

and with clang

wicked notch
#

bruh

wispy spear
#

no rush : )

wicked notch
#

one of these days I'll consider other langs

#

C++ makes me cry

primal shadow
#

So uhh yeah these are 4 clusters that metis chose to group ???

wicked notch
#

remember

#

metis has no spatial info

#

it only has topology info

#

you must set weights yourself

primal shadow
#

Right, I was thinking that's the problem

#

But like what do I do? Multiply the shared edge count weight by the spatial distance?

wicked notch
#

whatever you want

#

you can compute a centroid for each meshlet

#

and multiply that by the greatest of the edges

#

you can do what you said as well

#

just find a good function, maybe with the help of desmos

#

I didn't care about maximum number of shared edges

#

I just used distance

primal shadow
#

ughh ok, thanks

#

Ok turns out none of my meshlets have shared edges

#

So uhhh yeah

#

@wicked notch you use the u8 meshlet index/vertex things to identify shared edges yes?

wicked notch
#

I use the full index

#

meshletIndices[offset + meshletPrimitives[offset + id]]

#

I think

#

let me check

#

yes the full index

primal shadow
#

ok yes so I'm doing that

#

but then nothing has any shared edges

#

wtf??

primal shadow
#

Also not working, wtf

#
let meshopt_meshlet = meshlets.meshlets[meshlet_id];
for triangle_id in 0..meshopt_meshlet.triangle_count {
    let index_id1 = meshopt_meshlet.triangle_offset + (triangle_id * 3);
    let index_id2 = index_id1 + 1;
    let index_id3 = index_id2 + 1;
    let index1 = meshlets.triangles[index_id1 as usize] as u32;
    let index2 = meshlets.triangles[index_id2 as usize] as u32;
    let index3 = meshlets.triangles[index_id3 as usize] as u32;
    let vertex_id1 = meshopt_meshlet.vertex_offset + index1;
    let vertex_id2 = meshopt_meshlet.vertex_offset + index2;
    let vertex_id3 = meshopt_meshlet.vertex_offset + index3;
    let v0 = meshlets.vertices[vertex_id1 as usize];
    let v1 = meshlets.vertices[vertex_id2 as usize];
    let v2 = meshlets.vertices[vertex_id3 as usize];
    meshlet_triangle_edges.insert((v0.min(v1), v0.max(v1)));
    meshlet_triangle_edges.insert((v0.min(v2), v0.max(v2)));
    meshlet_triangle_edges.insert((v1.min(v2), v1.max(v2)));
}
wicked notch
#

these are vertices tho innit

#

oh wait nvm

wicked notch
# wispy spear and with clang

regarding this btw, it appears gcc has had a bug about C++'s grammar for a decade and that clang doesn't support expected on linux yet with libstdc++

#

actually incredible

wispy spear
#

fuck me

wicked notch
#

no

#

fuck c++ :)

wispy spear
#

: D

wicked notch
#

it's actually my fault, if I weren't using c++23 this wouldn't have happened probably

wispy spear
#

do they not have unit tests or something?

#

i use c++23 too

#

: (

wheat haven
wispy spear
#

yeah

wheat haven
#

even if you're rebasing to merge a PR it shouldn't affect history though

#

so wtf are they doing

wispy spear
#

squash should also kill commits

wheat haven
#

yeah that's a rebase

#

but you wouldn't put a PR's commit hash into fetchcontent

#

you can't, unless you clone the PR author's repo instead

wispy spear
#

yeh whatever that commit is or was

#

in case of fetchcontent it should be a tag

wicked notch
#

gpus are scary sometimes

#

I was wondering why my loading times were very slow and it turns out I was processing and generating meshlets for every gltf primitive 4 times over

#

but then I realized the rendering took basically the same time (100us difference in pure raster)

wispy spear
#

oopsi

primal shadow
#

Ok I think the suzanne head is just dumb and has unique vertices for every single triangle

#

Progress, kinda works

#

Some meshlets have those really teeny triangles in weird formations that can't be simplified though

#

LOD 0 meshlets without any adjacent meshlets

primal shadow
#

@wicked notch when you're back online: Blender seems to be weird and when you export meshes with tangents it duplicates vertices and seperates the mesh into parts, which ruins the LOD generation code. How are you dealing with this? Are you somehow deduplicating/hashing vertices?

#

You know what I'll go figure out how to calculate tangents during the visbuffer resolve in the shader

wicked notch
#

always reoptimize your meshlets, METIS breaks down hard if you don't optimize

wicked notch
#

in short, it does not care about whether a meshlet is fully spatially connected or not

#

that's why using meshoptimizer to generate meshlets doesn't work

wicked notch
#

I wonder, why imgui decides to reupload buffers instead of just using device_local | host_visible memory

wispy spear
#

the peeps might lack the knowledge of how one should do shit efficiently according to x, which might not have been ideal n months ago

wicked notch
#

I realized it's just for backwards compat

#

we didn't have device_local | host_visible mem until recently kekkedsadge

wispy spear
#

my talking out of my ass was correct lol

wicked notch
#
void main() {
  const SVertexFormat vertex = g_VertexBuffer.Data[gl_VertexIndex];
  const vec4 linearColor = vec4(RetinaToLinearFromNonLinear(vertex.Color.rgb), vertex.Color.a);
  o_Uv = vertex.Uv;
  o_Color = linearColor;
  gl_Position = vec4(vertex.Position * u_Scale + u_Translate, 0.0, 1.0);
}
``` epic cope
wispy spear
#

4 naming schemes : >

#

is this the pixelshader for imgui? πŸ™‚

wicked notch
#

vert ye

wispy spear
#

oops lol

#

i dont know why i dont do the srgbisms there too

#

i have a convoluted logic in my code which schwitzes FRAMEBUFFER_SRGB on or off

#

lustri you are a genius

wicked notch
#

no this is just imgui brain damage, there's nothing genius about this but copium KEKW

wispy spear
#

shut up and take the compliment πŸ˜„

wicked notch
#

blending dies you know

wispy spear
#

man i hate it when github just picks a random commit for this stuff

pale horizon
#

I copied permalink specifically πŸ˜…

wispy spear
#

ye default is the same

#

and not whatever branch you were looking on

wicked notch
#

also if you display textures in imgui they'll look wrong

pale horizon
pale horizon
wicked notch
#

you're interpolating non linear colors

#

and blending nonlinearly too

#

you can't just ignore srgb and hope it works lol

#

we've had this discussion already a few days ago in #questions

#

#questions message

pale horizon
#

Fuk kekkedsadge

pale horizon
wispy spear
wicked notch
pale horizon
#

But yeah, displaying textures might reveal the badness of this method and I’ll resort to cope bleakekw

pale horizon
#

it's joever

wicked notch
#

time to write custom imgui backend

pale horizon
#

I guess you could pass RGB8 image view to it too, but you need VK_IMAGE_CREATE_MUTABLE_FORMAT and this is becoming giga-copium and might be slow

#

Actually custom ImGui backend doesn't sound like that bad of a deal

#

Especially if you don't need multiple viewport/window support

wicked notch
pale horizon
#

But also you can do bindless textures there and no AddTexture copium

#

Because calling ImGui_ImplVulkan_AddTexture beforehand sure sounds like extra work, when you can just
ImGui::Image(bindlessId);

wicked notch
#

real

#

this is partly why I did custom backend

#

behold

#
#include <Retina/Retina.glsl>
#include <Retina/Utility.glsl>

layout (location = 0) in vec4 i_Color;
layout (location = 1) in vec2 i_Uv;

layout (location = 0) out vec4 o_Pixel;

RetinaDeclarePushConstant() {
  uint u_VertexBufferId;
  uint u_SamplerId;
  uint u_TextureId;
  vec2 u_Scale;
  vec2 u_Translate;
};

#define g_Texture RetinaGetSampledImage(Texture2D, u_TextureId)
#define g_Sampler RetinaGetSampler(u_SamplerId)

void main() {
  if (RetinaIsHandleValid(u_TextureId)) {
    o_Pixel = i_Color * texture(sampler2D(g_Texture, g_Sampler), i_Uv);
  } else {
    o_Pixel = i_Color;
  }
}
pale horizon
#

Bindlets can't even comprehend our power KEKW

wicked notch
#

btw you don't need to do this lol

#

you can go the copium way and convert all your style colors to linear

#

this is lossy but it werks and you don't need to write a backend

pale horizon
wicked notch
#

ye that's why it's copium

#

but tbh it's copium whatever you do because imgui sucks kekkedsadge

pale horizon
#

Just write your own ImGui(tm)

wicked notch
#

I was wondering why my texture upload wasn't working, turns out I'm a dumbass and I didn't have the alpha channel on in renderdoc

pale horizon
#

Using RGBA8 for that... cringe...

#

(I know it's ImGui)

wispy spear
#

custom backend is bae

faint crane
#

CopiumGUI

wheat haven
wicked notch
#

Retina.GUI's first ever test run is complete

#

I promise the text isn't fucked like it is in the image KEKW

#

idk why it is fucked up

wispy spear
#

stock imgui do be looking like that

#

why is that not intel zpoonza?

wicked notch
#

because this is faster to load kekkedsadge

wispy spear
#

: >

wicked notch
#

I still have to integrate all the naniteisms

#

Retina.Mesh coming soonℒ️

wispy spear
#

shame that the floor is just a quad in oldsponza

#

would look much cooler with the usa states pattern

wicked notch
#

now I have to hook up the events

#

and the WSI

wheat haven
#

now make imgui purple and you're set

wispy spear
#

i second that

wicked notch
#

give theme

pale horizon
#

Make tlottes theme plz

wispy spear
#

is that that one white one?

wheat haven
wicked notch
#

good

#

just like ocornut intended

wheat haven
#

or wait is it the other way around

#

what are imgui's default colors

wicked notch
#

srgb

#

sadly

wispy spear
#

CIE1337

wheat haven
#

then these are linear

wicked notch
#

shit

wheat haven
#

because I output imgui onto srgb

wicked notch
#

it's joever

wispy spear
#

banned

wheat haven
#

I decided to properly convert all the colors instead of just coping with unorm target πŸ˜„

wicked notch
#

I went for converting into vertex shader

wheat haven
#

also fair

#

I just ran a quick script to convert and re-output a C++ array KEKW

#

especially when you consider color pickers, converting in the shader won't always work

wicked notch
#

I will just make my own color picker

primal shadow
wicked notch
#

it's not that bad

wicked notch
#

man

#

it feels so incredibly good to just write ImGui::Image(handle)

#
_imGuiContext->Render(*_tonemap.MainImage, commandBuffer, [&] noexcept {
  ImGui::Begin("Hello, world!");
  ImGui::Image(GUI::AsTextureHandle(_visbuffer.DepthImage.GetHandle()), { 1280, 720 });
  ImGui::End();
});```
#

look at this

#

it's glorious

pale horizon
#

I’m gonna still your backend
Nothing personnel, kid

wicked notch
#

absolutely magnificent

#

it's all yours

pale horizon
#

Mine will probably be 10x longer because I don’t have so many magic abstractions kekkedsadge

wicked notch
#

nah

#

the rendering is barely 100 lines

wispy spear
#

imgooey backend is rather trivial methinks

#

its just populating vbo/ebo and providing two simple shaders

wicked notch
#

it do be

#

I made it extra shrimple by not worrying about resizing buffers KEKW

wispy spear
#

populating by iterating over imgooeys cmdists and thats all

#

hehe i support resizing πŸ˜‰

#

but thats just another 3 lines or so

wicked notch
#

ye I just allocated 1 million vertices and indices and that's it

pale horizon
wispy spear
#

yeah that should last for a while

wicked notch
#

if GUI has to draw more than 1 million vertices it's joever for other reasons

pale horizon
#

Simplest bikeshed editor

wicked notch
#

I won't have an editor btw

#

Retina is C++ only (maybe C# in the future)

wispy spear
#

i think i have 64k default size

pale horizon
#

Plz no C#, sorry, deccer KEKW

#

(It’s another bikeshed hell, adding β€œscripting”)

wicked notch
#

scripting is rather necessary though innit

pale horizon
#

Depends. You can do a lot with just C++

wispy spear
#

c# is the only sane choice for an editor, the tooling is world class, unironically

wicked notch
#

lua is another choice as well

#

factorio uses it

pale horizon
#

I linked spelunky psp in my thread, it has some good and sane C++ gameplay code

#

Lua is not bad, but no typing is awful. Not sure how good luau’s typing is

faint crane
#

What if we made another language, use some Rust mannerisms, and remove operator precedence? Call it WGSL or something.

wispy spear
#

and call it Rust (with a capital R)

pale horizon
#

But basically you can get very far with just C++ and then start moving stuff to scripts

#

It’s not like you’ll have a team of people who need to iterate quickly and suck at C++

wicked notch
#

what if I suck at C++

wispy spear
#

you dont

#

1:21:21.212

pale horizon
#

But yeah, I was a fan of Lua, but doing more gameplay programming in Go, I understand how much typing helps and how your APIs became less copium

wispy spear
#

yeah we will support luigi either way

wheat haven
wicked notch
#

I don't even have the rg yet froge_bleak

wicked notch
#

anyone with windows, clang and time to waste want to try this? KEKW

#

linux is broken until gcc can figure shit out

wheat haven
#

eh why not

wicked notch
#

I kinda hate the fact that I basically require the latest bleeding edge shit to compile my stuff lol

wheat haven
#

what working dir

wicked notch
#

src/Retina/Entry

wheat haven
wicked notch
#

ignore the linker warns

#

lunarg can't figure out absolute paths

wheat haven
#

the asserts tho

wicked notch
#

oh wait shit

#

wait the working dir is wrong

#

my bad

#

working dir is wherever the exe is at

wheat haven
#

I don't think it likes the separate build dir

wicked notch
#

hm

#

wait did you change the model path

#

I load bistro on startup iirc

#

in this commit

wheat haven
#

I didn't do nothin

wicked notch
#

ye, you should probably put something inside the Models folder

wheat haven
#
cmake -S . -B Build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build Build --parallel 8
wicked notch
#

it's i src/Retina/Sandbox/Assets

#

but I didn't upload a default model, silly me

#

also change the path to the model in src/Retina/Sandbox/SandboxApplication.cpp

#

skill issue on my part indeed

wheat haven
#

imgui beeg

wicked notch
#

I should figure out a way of making font size scale with resolution

#

but idk how

wheat haven
#

tons of hazards tho

wicked notch
#

it's actually the same two hazards if you limit duplicated messages

#

but they are fake

#

it's just syncval being unable to cope with bindless resources being bound at the same time, even when never dynamically used

pale horizon
wispy spear
faint crane
wispy spear
#

@wicked notch where did you just post that gtc talk?

#

i cant find it anymore ;C

wicked notch
#

which one?

wispy spear
#

that work graph thing

#

or was that potrick who posted it

#

was a red name : >

#

#general message

#

found it

primal shadow
#

@wicked notch what the heck is the error metric meshopt ismplify gives you? I can't find any documentation on it

wicked notch
#

just quadric innit

primal shadow
#

wdym?

#

Like I have no clue what the value actually means

wicked notch
#

it's the average of the quadric error metric for all vertices after simplification iirc

primal shadow
#

Hmm, so how do you select what LOD to use? Is there some formula for calculating the acceptable amount of error at a given distance/

wicked notch
#

there isn't, it's up to you

#

you can project the error to the sphere bounds and get a screen size estimate of the error

#

then pick LOD based on that estimate

#

you can also do it super naively and scale the error by the distance

#

as long as your error function is monotonic it's no problem

primal shadow
#

Like take the meshlet bounding sphere, and scale the radius by the error?

wicked notch
#

no

#

project sphere, scale error by the area of the circle*

primal shadow
#

So you have your screen-space AABB you use for culling

#

So area of that, or use the sphere exactly?

#

And then i guess your heuristic is < 1 pixel worth of error

wicked notch
primal shadow
#

awesome, ty

#

Also more questions but you don' have to ansrwer these yet: How do I size the dispatches for persistent threads? 1 single workgroup of 64x1x1? Somthing else/

#

And is 1 thread per node, or 1 wg or?

wicked notch
#

that I have no idea kekkedsadge

#

I was planning to do LOD selection on the CPU

#

as a temporary cope

#

then maybe I'll just do the naive BVH trasversal thing in compute

#

or use an octree or something, idk

#

but I don't think I'll be doing persistent threads

primal shadow
#

Nanite does some kind of angle-based error projection, but dosen't explain it 😦

#

Also @wicked notch I will continue to annoy you with questions (let me know if you mind). Do you have any tips for forcing the error to be monotic over node depth? Maybe walk the tree backwards and make bounding sphere size * error be the max of child,parent for each node?

wicked notch
#

I mean you can shrimply do that when building the dag

dull oyster
# primal shadow Hmm, so how do you select what LOD to use? Is there some formula for calculating...

From what I remember, meshoptimizer outputs an error which represents the error in terms of relative mesh extents

That is, from what I understand, if the error is 0.01,then it represents a displacement of 1% of the mesh size.

What I chose to do is to project a sphere of radius error*mesh scale and another of radius parentError * mesh scale, compute the projected radius and use those projected radiuses for determining whether a given cluster is visible.
I can link to the code if you want.

wicked notch
#

I do realize just now yesterday night I linked just a comment

#

incredible

wicked notch
pale horizon
#

Now compare MSAA and TAA plz KEKW

glass sphinx
wicked notch
pale horizon
#

Forward made a comeback, you fool KEKW

#

(looks good, though, I'm not a TAA hater, I'm just lazy KEKW )

primal shadow
#

Which I don't quite understand, but they said it works better than the projected aabb size

dull oyster
#

Not sure I understand what longest_view_axis_in_pixels is supposed to represent, is it the distance (in screen/view space) between the two furthest visible points of the mesh?

Just in case : Small note about meshoptimizer, the returned simplification error is already the square root of the error computed by meshoptimizer's simplification.

primal shadow
#

It's max of your texture dimensions of your viewport

#

So like 1920x1080 it's 1920.0

#

So you form a line of length 1920.0 * 0.5 * error, and then find the depth where it's less than a pixel

#

And then compare the meshlet bounding sphere depth

wheat haven
#

is that to determine which lod to load?

dull oyster
#

Sounds more efficient than what I do

wispy spear
#

oh god

#

i read "i have to remove the manual squirt" pensibe

wheat haven
#

anyone who doesn't instinctively read sqrt as "squirt" is lying

primal shadow
#

I'm starting on LODs

#

I have to go write a dag traversal shader :p

wicked notch
#

did you fix your meshlet generation problems yet

#

traversing a dag isn't really key to lod selection btw

#

you can use any datastructure you want, even a simple list of clusters (with parent id)

#

all you need to select a lod is the current error and the parent's error

primal shadow
primal shadow
wicked notch
#

you should still optimize your meshes with meshopt anyways

primal shadow
primal shadow
#

I'm not convinced about the single dag cut

#

Like dosent it depends not just on the error, but also the bounding spheres of each meshlet?

#

And the perspective you view it at etc

wicked notch
#

you make the parent use a very conservative bounding sphere

#

and you also make its error strictly greater than all of its children

#

you can probably account for perspective distorsion by doing some projective magic

#

but to be honest, it should be good enough if you're very conservative with the error

#

although that might result in higher lods than necessary but our gpus are big and strong

faint crane
#

I think my single brain cell is strong enough to try my hand at this now that everyone else has figured out and explained the hard parts.

wicked notch
#

I should rename this thread to nanite HQ

primal shadow
#

Ok @wicked notch let's say you have 4 nodes a, b, c, d

#

D is a child of C is a child of b is a child of a

#

If you evaluate the meshlets as a flat list to render

#

D has low enough error to render

#

And so does C

#

But A and B does not

#

Hmmm ok I see nvm

#

Only d would render

wicked notch
#

each node should have a parent id as well

#

otherwise you can't do the checking properly

primal shadow
#

Yes but

#

Hmmm

#

Ok yeah I understand

#

If A has too high error, but b, c, and d have low enough

#

Than a wouldn't render

#

B would render

#

C wouldn't not render because it's parent error is too low

#

And same for d

#

Right? So you end up with only 1 cluster, B

#

Which is the cheapest to render

wicked notch
#

in that case yes

primal shadow
#

While still maintaining little enough error

#

Ok I understand how this works to ensure a single cut then

#

I've internalized it

#

Before I didn't trust it

#

Also @wicked notch I had a thought

#

Rn I'm doing 1 thread per wg to cull cluster, then a separate dispatch to write the triangle buffer at 1 workgroup per cluster (1 thread per triangle)

#

Doing 1 thread per cluster to cull and then write all 64 triangles was too expensive

#

But what if I did 1 workgroup per cluster, but combined both the culling and triangle id writing passes into 1.

wicked notch
#

you had this before didn't you

#

this is (probably, though extensively tested) not going to be faster because only one thread will be doing the culling, stalling the other threads in the workgroup

primal shadow
#

It gets annoying with two pass and lods

primal shadow
#

@dull oyster oh hey, just realized you're the one writing the nanite blog, thanks! It was a useful reference at several points for me

#

Wait a minute I;m getting confused. Which nodes are the parents? The original meshlets, or the simplified versions?

#

should be the simplified versions

#

But then how do oyu have 1 parent for each node?

#

Lets say you have 4 clusters, you merge them, and split into 2.

#

Nodes have more than 1 parent

#

Is the parent you store for LOD selection supposed to be the parent with the highest error?

primal shadow
#

Ok, I think I need to use meshopt_computeClusterBounds() to make a new bounding sphere for the whole group
which is used for LOD, seperate from the meshlet bounding spheres

Lod 0 (bottom of the DAG):
self_error = 0
self_bounds = computed from meshlets
parent_error = error of simplified group this meshlet is in when building lod 1
parent_bounds = computed simplified group when building lod 1

Lod 1 (parent of lod 0):
self_error = computed when simplifying groups of lod 0 meshlets
self_bounds = computed from meshlets from simplified group
parent_error = error of simplified group this meshlet is in when building lod 2
parent_bounds = computed simplified group when building lod 2
and so on

#

so the error in each group feeds to the next one

#

but the bounds for self are always claculated on the exact meshlet, while the parent bounds are calculated on the group as a whole

primal shadow
wicked notch
#

you select either the parent(s) or the children

#

you can't just select one parent and one child

#

you must choose between either the parent(s) or the children

primal shadow
#

For each cluster, you only render it if the parent error is too high, and the self error is low enough

#

But which parent, if you have multiple?

wicked notch
#

the error is one

#

the parents are multiple

wicked notch
#

in the split step you simply copy the error over

primal shadow
#

Yes, but you also need a bounding sphere for the parent

#

So, which parent's bounding sphere?

wicked notch
#

again, there is only one bounding sphere

#

the one you calculate in the merge & simplify step

primal shadow
#

a bounding sphere over the entire simplified group, before splitting, yes?

wicked notch
#

yep

primal shadow
#

Yeah that's what I figured out last night lol, ok good

#

Each meshlet has a bounding sphere, but you also make a seperate bounding sphere for the gropu before splitting, which is what gets used as the parent bounds

wicked notch
#

I believe you should make a bounding sphere for the child group as well

#

but I'm not sure on that one

wicked notch
#

suppose the dag on the right is your whole mesh

#

there are no more parents or children

#

at draw time, you either choose to draw the two parent clusters or the four child clusters

#

there are no more valid states

primal shadow
#

ok agreed so far

wicked notch
#

therefore, isn't it more practical to treat the whole dag as a tree with two nodes?

#

you either have the parent "group" or the "child" group

primal shadow
#

hmm, I'm not sure that scales to a whole DAG though

wicked notch
#

I'm not sure either tbh

#

just an idea floating in my mind

primal shadow
#

yeah, it's an interesting idea

primal shadow
#

Ok, done with adding the parent info to the LOD system

#

Next is rip out my culling shader and make it choose LODs

#

Going to rip out the 2pass culling for now

primal shadow
#

@wicked notch turns out I've not been accounting for perspective warping when projecting the bounding sphere for the meshlet to do culling

#

regardless of LODs

#

welp

wicked notch
#

rip

primal shadow
#

Doing the local->world->view space conversions on the center point, and then adding the radius is not correct πŸ˜…

faint crane
#

I think I have a similar problem.

#

And I've mostly been taking note from your struggle. brianna_pls

wicked notch
#

things would be so easy if y'all just used bounding boxes instead of spheres KEKW

faint crane
#

We need some Deccer Spheres.

#

For when I move onto physics.

primal shadow
#

Vkguide lied to me

#

I took my occlusion culling code mostly from them, and they didn't account for the warped perspective:P

wispy spear
#

re fisiks

#

@faint crane can you coerce someone into taking intel spoonza and turn it into some stylized "wood block" model

#

where you can pull out the columns and then the shit starts to collapse

#

or you throw your stick into the wall et al

#

something like sis

faint crane
#

Definitely stealing that idea.

wispy spear
#

mayhaps in 2 or 3 versions, one with bigger blocks, smoller ones and even smoller ones or something like that

loud crag
#

how dare you

wheat haven
wispy spear
#

luigi?

#

is that you?

#

trying to pretend to be a calzone, when you really are a blob of cheddar

#

(it made me smile when i saw the link to gibhut in the video description, i know its not you :D)

wicked notch
#

his cat is exactly like mine

#

wtf

primal shadow
wispy spear
#

success?!?

primal shadow
#

I think so!

wispy spear
wicked notch
#

me rn:

#

I'm jealous

faint crane
#

This guy must have more than one brain cell.

glass sphinx
#

nice

primal shadow
wicked notch
#

for certain definitions of further kekkedsadge

#

I still didn't finish the vertex welder

buoyant summit
#

how do we motivate you lustri

wicked notch
#

I'll go to a pond tomorrow

#

and see frogs

#

that'll me my fuel

primal shadow
faint crane
#

Deccer Cubes actually crashed my engine as per #926896734284689428.

wheat haven
#

well you were warned πŸ˜„

primal shadow
#

Oh ok nvm it was a dumb mistake

#

There's some subtle flickering now though, might need TAA

#

oh wait no, I was dumjb again ahh

primal shadow
#

how the heck do I debug this πŸ€”

frank sail
primal shadow
#

Not sure that's what it is though

#

I have no idea why no clusters are rendering

#

I guess there's no possible cluster where error < 1 is possible

frank sail
#

shouldn't the vertices be welded or something

#

so the lods are continuous

primal shadow
frank sail
#

idk what I'm talking about btw

primal shadow
#

lod 0 has error = 0

primal shadow
frank sail
#

what I mean is that it doesn't seem right for there to be tiny subpixel error that causes pixel-wide holes or whatever

primal shadow
#

ignroe the flickering

#

that was a bugged thing

#

the real issue is that it's sometimes rendering nothing

#

which, shouldn't ever be possible??

#

LOD 0 should always be able to render

#

The only time it chooses not to, is if LOD 1 has < 1 pixel of error

frank sail
#

I can't answer that

primal shadow
#

in which case LOD 1+ would render instead...

primal shadow
#

it seems to happen right at the transition between LODs

primal shadow
#

Ok I did some debugging

#

This is right during the transition between two nodes, where it glitches out and renders nothing:

For parent cluster:
lod_is_ok = false
parent_lod_is_ok = false
For child cluster:
lod_is_ok = true
parent_lod_is_ok = true

#

it renders if lod_is_ok && !parent_lod_is_ok

#

this is confusing af though

#

child_parent_lod = parent_lod

#

so how is it false for one, but true for the other

#

@wicked notch ok I'm stuck, help please πŸ˜… . Have you seen anything where no clusters render for a chunk at all, right on the boundary where if you move slightly further or closer it renders either the child or parent? Like right at the boundary between LOD changes, sometimes it renders nothing if you can get the distance just right.

primal shadow
#

ok so parent and child errors are not the same, ???

#

parent error in the child shader is 0.00013

#

self error in the parent shader is 0.00039

#

...suspicioully 1/3 as much? πŸ€”

primal shadow
#

man this sucks, I have no idea why they're different -_-

#

Ok other question, do you use the same bounding sphere that you use for culling as you use for determining whether the current cluster is at the right lod?

#

I feel like I'm messing up somewhere here

primal shadow
#

Did you use meshopt_simplifyScale at all?

#

Also I think I should be adding the error across LODs...

dull oyster
# primal shadow ok so parent and child errors are _not_ the same, ???

How do you calculate them?
You must ensure that the error is always increasing.

After simplifying a group, I take the max of the parents' errors, and add it to the current error, to make sure I don't have multiple lod with the same error. I'm not entirely sure it doesn't accumulate too much error, but it looks fine.

And finally I set the parents' parentError to the value I just computed

dull oyster
wicked notch
primal shadow
#

Tbh the error seems so nebulous

#

Idk how to check if the error is subpixel, when it's a made up value -_-

primal shadow
#

#graphics-techniques message

primal shadow
#

@wicked notch my cluster builder is not ever able to get to 1 cluster. It seems to get stuck somewhere around 1000 left. Do I need to start welding vertices? Or remap the vertices and optimize them?

#

Or should I be able to get to 1 cluster even without them?

primal shadow
#

I need both?

#

Sadge

wicked notch
#

optimizing vertices is really a necessity for metis to work properly

#

you need zero duplicated vertices

#

it's really easy

#

vertex welding tho... KEKW

primal shadow
# wicked notch it's really easy

Which functions did you use again? Like the reorder for vertex cache or overdraw or whatever ones probably don't make sense right, because that's not applicable

wicked notch
#

yeah you just remap and hash the vertices

#

no need for reordering them

primal shadow
#

Hash?

wicked notch
#

you need only that

#

super shrimple

primal shadow
#

Gotcha. Will try when I'm home.

dull oyster
# primal shadow https://github.com/JMS55/bevy/blob/meshlet-lods/crates/bevy_pbr/src/meshlet/from...

https://github.com/JMS55/bevy/blob/meshlet-lods/crates/bevy_pbr/src/meshlet/from_mesh.rs#L73-L75
You take the max of the simplified group and the child errors here.
If a parent is not simplified much, its error will be small, therefore its error will be <= child errors, so the resulting error for the parent will be equal to the child errors. And clusters with parentError == selfError will never be rendered.

Also, simplification is done iteratively, so the error of the parent is relative to the children. The error stored inside the meshlets must be somewhat "global", ie the error of a parent must no longer depend from the child.

To solve this issue, I personally add the child errors to the parent's error to make it increase. Not sure if that's the correct way to do it, but works fine for me.
https://github.com/jglrxavpok/Carrot/blob/a9319a15a195d6e24eafe657e15da486a47e7e45/asset_tools/fertilizer/models/ModelProcessing.cpp#L842-L852

primal shadow
#

And it's unclear how the fuck to even project the error

#

Like theoretically, it should be add all error along the subtree so you get the total error, which is what you do

#

In world space

#

And then divide by the original mesh's diameter? Or something?

#

Not even sure if that makes sense

dull oyster
primal shadow
#

Yes, I was thinking of emailing Brian Karis and asking for advice lol

dull oyster
#

I use only the position of the bounding sphere, not its size.
But! I multiply the error returned by meshoptimizer with the result of meshopt_simplifyScale on the vertices of the meshlet group.

#

To select the LOD, for each cluster I project two spheres:
XYZ of bounding sphere and Radius of meshlet error
XYZ of parent bounding sphere and Radius of parentError

I compute the projected radius in pixels, and check them against my threshold (max 1 pixel of error)

primal shadow
#

Why does error become radius? What's the logic behind that?

dull oyster
#

It comes from the way I understand the error returned by meshoptimizer, which to me must match the interpretation of target_error:
target_error represents the error relative to mesh extents that can be tolerated, e.g. 0.01 = 1% deformation; value range [0..1]

I understand it as how much the shape of the mesh has been modified, as in how much smaller/bigger the mesh got in terms of its size. Of course not all parts of the mesh may shrink/grow that much so the actual bounding sphere may not change, but some parts may have "shrinked" by at most error%

wispy spear
#

lustri when he finished exams

wicked notch
#

I ate a pizza yesterday

#

it was good

frank sail
#

Same

wispy spear
#

hmm now i want some pizza too : >

primal shadow
#

I think it makes sense not to use the bounding sphere of the meshlet to do lod selection

#

But use a new bounding sphere based on the group

#

In addition to the parent bounding sphere also being from a group

loud crag
primal shadow
#

After spending more time looking at LOD selection/error, I'm even more confused

#

I've scoured several github projects and nothing makes sense anymore -_-

primal shadow
#

I'm convinced there's no actual way to calculate the amount of error introduced by simplification in screenspace to determine the LOD

#

in any consistent way

primal shadow
#

Actually I think my impl is mostly right, but I made two mistakes:
Error needs to be converted to be monotonic with respect to object size, and the easiest way to do that is precalculate lod_error = (object_space_simplification_error) / (bounding_sphere_diameter) (I think this makes sense...?)
For calculating LOD, I always need to use the group bounding spheres, and never the per-meshlet tighter culling spheres. So each meshlet actually needs 3 bounding spheres: self culling, self lod, and parent lod

dull oyster
#

Meshlets of a same group need to make the same LOD decision, so you indeed need to use the group bounding sphere for LOD selection.

delicate rain
#

@wicked notch Mister LVSTRI how do you compress bistro with gltf pack/ do you have compressed version that you could share? I suspect the normal textures are compressed wrong, could that be the case? Do they need any specific treatment?

wicked notch
#

you're in luck, if you wait about 10 minutes you'll have a proper version of gltfpack

#

I was just working on that lol

#

there you go

delicate rain
#

What did you change, if you don't mind me being curious?

delicate rain
#

Oh lmao

#

Nice, thank you

#

Is this also the version that doesn't destroy the scene hierarchy?

wicked notch
#

you can just use the -kn flag for that I think

#

the version I had that made gltfpack leave the hierarchy untouched was kinda dumb because it was a time where I didn't use meshletisms

#

I can add it easily tho

delicate rain
#

Aha I see, well the flag worked well enough the last time, I think it should be fine for now

delicate rain
#

What do I set MESHOPT_BASISU_PATH to? πŸ‘€ found it

loud crag
#

i just looked at the dlss commit on retina for fun and saw you're adding RETINA_INLINE on a templated constexpr function... why?

wicked notch
#

gcc doesn't inline some functions when they're not called from a constexpr context

#

idk why, I dumped the inlining heuristic cost and it looked like they should've been inlined

loud crag
#

oh is inline gnu::always_inline? nvm then

glass sphinx
#

can someone explain ktx ? its still all fuzzy to me

loud crag
#

@wicked notch unrelated but btw ImGui::Combo is the "old" api and the code for the quality preset is making me feel weird with those lambdas

wicked notch
#

BC5 expects one channel in the R component and another in the A component

glass sphinx
#

do you mean RG?

#

RA?

wicked notch
#

yes RA

glass sphinx
#

oh lol weird

wicked notch
#

indeed

loud crag
glass sphinx
glass sphinx
loud crag
#

not really

loud crag
#

yeah thats the gltf extension which allows ktx textures

#

to use them you need the library i linked

glass sphinx
#

ah so basis u is used by ktx and gltf has an extension that allows for ktx/basis u textures

loud crag
#

ye

#

and its meant as a thing that can be run everywhere

#

whereas if you'd only use DDS with a BC7 image for example that will only run on desktop hardware

#

and this is like a middle ground

wicked notch
#

ktx supports basisu for compressed textures which you then transcode at runtime to BCn

primal shadow
#

Big W, got proper LOD selection working!!

#

Lod selection changing is slightly noticeable, it's not completely imperceptible sadly. But it's fairly good.

#

And no more glitches!

wispy spear
primal shadow
wispy spear
primal shadow
wicked notch
#

but does it work with disconnected meshes :p

primal shadow
#

I have a bunch of stuff to improve on the LOD builder

wicked notch
#

ye that's the truly cancerous part

primal shadow
#

I can't actually get to 1 node, I just stop after 10 levels atm

wicked notch
#

building a graph of meshlets was hard enough

#

but making it work on all sorts of meshes is truly horrible

wicked notch
primal shadow
#

Mhmm I'll work on it in the future

#

I'm actually going to have to take a 3 week break I've just realized, I'm going to be traveling and won't have my desktop

wicked notch
#

rip

#

I'll replace you then, time to work on my own version

primal shadow
#

I probably need a break anyways

#

I'm just happy I got LODs working

wicked notch
#

ye that's epic

primal shadow
#

and tm the initial meshlet stuff (everything before LODs) will be merged into bevy main finally πŸ™‚

primal shadow
wicked notch
#

I actually want to try suslik's method

#

but who knows

primal shadow
#

Theortically, there's more than just position error

#

It's not just a matter of pixels rendered

#

There's also things like BSDF error etc

wicked notch
#

yeah

#

but that's hard to account for

faint crane
#

Couldn’t do anything on my Mac.

wispy spear
#

so you bought a pc? πŸ™‚

faint crane
#

My PC has been waiting to render some Suzannes and Sponzas. Mac crashed on Deccer Cubes.

primal shadow
wispy spear
#

make sure to credit all the frogs, jasmine

primal shadow
frank sail
#

the ones living in your head

primal shadow
#

@dull oyster I'm not sure projecting the error and checking < 1% even makes any sense

#

The error is relative to the previous meshlet, theoretically

#

So it's not even a function of deformation from the original mesh

dull oyster
primal shadow
#

Mhm I was thinking about that. But then you would want to scale it by the original mesh's bounding sphere, probably.

#

To get deformity from the original mesh

#

then use that percentage to scale the projected size of the LOD bounding sphere

#

so if a higher LOD group is 10% deformed from the original mesh (after dividing by the original LOD 0 bounding sphere diameter)

#

Then you project the higher LOD's bounding sphere to the screen, and multipky by 0.1

#

I haven't thought over if that makes sense or not, but something along those lines, probably?

dull oyster
dull oyster
primal shadow
#

But idk not convinced about anything

wicked notch
#

A nice side effect of TAA is that shadows get automagically nicer even without filtering

#

anyways, the framework for nanite is complete

#

now it's time to work on the graph algorithms

#

first: imma make my own graph partitioner, I've found all sorts of bugs (read: segfaults bleakekw) when specifying edge weights in METIS, the docs don't say anything specific about edge weights valid values but even if I limit the range in the [0, 2^16-1] range or [1, 2^16-1] ranges it sometimes crashes

#

second: it follows from the first that I need a half edge structure, this is actually good because I can start doing some preprocessing and mesh validation here already

#

I'll make my own data structures as well just to minimize the amount of obscure, abandoned libraries I need

#

also I gotta figure out a good format to store my DAG in gltf (and not break the existing data)

buoyant summit
#

write graph partitioner in rust :frog_crab:

primal shadow
#

@wicked notch do you have a collection of meshes to test LOD building edge cases?

#

Also I'm curious, what do you set as your target_error to meshoptimizer's simplify

wicked notch
#

#1090390868449558618 message

#

once you can simplify this to one cluster, you're good to go KEKW

wicked notch
primal shadow
#

And what should it end up looking like, a flat plane?

wicked notch
primal shadow
#

There's no way I'll manage then πŸ˜›

wicked notch
#

the thing the model tests is how well you can weld vertices

#

because if you try to simplify that model with meshopt_simplify, you'll never get anywhere

primal shadow
#

Hmm ok, thanks

wicked notch
#

plus you need to watch out for UV error

primal shadow
#

Yeah I don't have any way of dealing with UV seams

wicked notch
frank sail
#

@wicked notch if you're still awake, I have a question for u (related to what I posted in #vulkan)

#

does your renderer run under renderdoc?

wicked notch
#

if I remove DLSS yes

#

one sec

frank sail
#

have you been able to use edit-and-continue on your original source code (by emitting debug info)

wicked notch
#

lemme checc

#

I need a toggle to easily delete DLSS

#

huh

#

if I edit it dumps every include in one single file

#

I can still debug just fine tho

delicate rain
#

LVSTRI do you cull VSMs?

#

you do right?

wicked notch
#

as of right now I don't

#

I removed the thing to test something else

#

but I'll integrate it back tomorrow

frank sail
#

hmm renderdoc is happy to show me the source if there are no includes

#

maybe my glslang includer is fooked

wicked notch
#

mfw tomorrow I'll have to sing the national hymn and I don't remember it bleakekw

#

why does our hymn last for 4 fucking minutes

frank sail
#

wu

#

t

pale horizon
#

New LVSTRI character arc dropped

frank sail
#

tbf Americans have to recite our "pledge of allegiance" every morning in grade 1-12 bleakekw

#

it's technically optional but socially you're pressured to do it anyways

frank sail
wicked notch
#

GLSL is now dead

#

I am at peace

primal shadow
#

wgsl πŸ¦€

wicked notch
#

if you add bindless I will stop considering webgpu a meme

#

even opegl has bindless cmon KEKW

primal shadow
#

We have it, but it's not very good

#

But you can use wgsl with vulkan if you want

#

It's a nice shader language regardless

wicked notch
#

do you have pointers/templates

#

can you alias descriptors/buffers

primal shadow
#

We have limited forms of pointers, idk what you mean by templates or descriptor aliasung

frank sail
#

pointers = buffer pointers (not logical pointers)
templates = generics
descriptor aliasing = reinterpret memory through different descriptor declarations on the same binding

primal shadow
#

nope to all 3, I think

buoyant summit
wicked notch
#

-force-glsl-scalar-layout -fvk-use-entrypoint-name -emit-spirv-directly -matrix-layout-column-major -O0 -lang slang

glass sphinx
#

yes

#

this is the magic spell

wicked notch
#

I am going insane

#

this dogshit IR thinks SV_PrimitiveID is a global param which is good

#

except it doesn't store any references to any parent type

#

so

struct PerPrimitive {
  uint PrimitiveID : SV_PrimitiveID;
};``` the struct is lost in translation
#

incredible

#

so I literally have to check whether the current stage is mesh shader

frank sail
#

hey @wicked notch what's that cope technique for splitting cascades called again

#

the intel one

#

where you analyze the depth buffer

wicked notch
#

SDSM

frank sail
#

that's right, thanks

wicked notch
#

ah yes

#

good codeℒ️

#

very good to work with

wicked notch
#

I eep

severe dome
#

hello im necroposting bc I've not looked at this thread in a while and i like feeling useful 😌

pale horizon
severe dome
#

hell yea

wispy spear
# severe dome thats me :)

you can do that, just keep the actual textureid around, which you need anyway for getting the handle in the firstplace

severe dome
#

I was replying to the srgb stuff and my mention 😌

wispy spear
#

ah, i blame elias for not properly separating messages then : >

loud crag
#

and for me Image::Image(imageView) works perfectly without needing to change anything

pale horizon
pale horizon
wicked notch
#

it does

frank sail
pale horizon
#

Requires mutable format for all textures though. Kinda cringe

frank sail
#

Is it though

wicked notch
#

yes

#

by the power given to me by John Khronos himself, I hereby declare you cringe

frank sail
primal shadow
wispy spear
primal shadow
frank sail
#

He has a github with the same name

wispy spear
#

or a simple mention πŸ™‚

#

as he figured all out for you

primal shadow
#

Ah sure, I'll add him (and others) in a bit to a credits section. The references is intended to help reviewers, I wasn't thinking about credit yet.

#

There will also be a blog post when bevy 0.14 releases in a few months, and I'll credit people more.throroughly at that point

wicked notch
#

(it's fine you don't have to add me, I did nothing in particular lol)

primal shadow
#

Nah you helped a lot! You answered my many questions lol. I do want to give people credit

frank sail
#

Lvstri unknowingly improving the rust ecosystem

wispy spear
#

lustri you raised your voice at the right time in the right levels πŸ™‚

frank sail
#

Luigi was always my favorite of the bros

#

(don't tell Mario I said that)

wicked notch
#

das a lot of todos

#

me: hmm this PerPrimitiveEXT decoration is missing

#

literally every possible tool in the Graphics Programming stack breaks

#

NV Driver: broken
spirv-val: broken
slang: would you believe it, broken

wispy spear
#

why not come back to the holy land of (G)ood (L)uck

wicked notch
wispy spear
#

heh i tried

wicked notch
#

I'll fix this broken ecosystem, together with Potrick

#

and make GP great once again

wispy spear
#

potti mentioned that the slang ppl fix shit in a timely fashion

glass sphinx
#

cause they can ping the driver peeps