#Rosy

1 messages Β· Page 14 of 1

cloud rivet
#

right now I just need a UI

#

so I'm going back to work on that

slim oak
cloud rivet
#

I was thinking more like

#

might not get a very high frame time though

echo crystal
#

yes!

#

jake made one

cloud rivet
#

which jake

echo crystal
#

captain jake

cloud rivet
#

I don't want to make an OS thinkeyes

echo crystal
#

fair

cloud rivet
#

I just want to look at a thing and say I made that, and not feel like I need to apply an asterisk to it

echo crystal
#

i think you can be proud you "made" something even if u didn't do 100%

#

part of what makes frogs great is that we build up on each others works across generations

cloud rivet
#

there's a braod spectrum of where people feel like that is fair to say

#

I think most people on this server would not accept AI, many would not accept using an engine, very few in handmade would accept even using SDL or glfw

#

it's just a spectrum and it's up to the dev to figure out where they're on it

#

I might get bored and have a second side project where I just use zig and SDL, including SDL GPU to make a silly game and switch between that and this project

#

anyway back to UI

echo crystal
#

maybe even a 2d game so you don't have to learn all of 3d art stuff

cloud rivet
#

I think a small snake sized game in zig and pure SDL I could do in a weekend

#

I already think I am pretty good with 3D art stuff though

#

basic PBR I think I can get working pretty quickly

#

my limits are GI and screen space stuff, which I haven't ever done yet

cloud rivet
#

this is ok

#

hrm

#

let me fix that 2

#

it's a bit okey

#

also the 5

brisk chasm
#

the 0 should be round too πŸ™‚

#

or at least 2 opposite corners, then it could go with the sharp 2 and 5

cloud rivet
#

true

#

I don't hate it

#

now for the rest of the owl

brisk chasm
#

the diagonal thing in the 0 is a neat touch

cloud rivet
#

oh the 0 has to go first

#

it is first, my index in my c is off by one

echo crystal
#

beautiful

brisk chasm
cloud rivet
#

I fucking love update modals suddenly sprining up in the middle of me trying to concentrate on something

#

and I also love installation wizards that need 5 confirmations to just install the update

#

oh and then reboot the machine

astral hinge
brisk chasm
#

my focusrite works on linux btw πŸ™‚

echo crystal
#

what's focusrite?

brisk chasm
#

audio hardware

echo crystal
#

i see

cloud rivet
#

sorry about the negativity

brisk chasm
#

no need to be sorry

#

venting is important πŸ™‚

cloud rivet
#

something I'm doing on my cpu rasterizer is really slow

astral hinge
#

πŸ…±οΈrofile?

cloud rivet
#

I have to write a profiler

#

I'm just commenting out code to find the slow stuff

astral hinge
#

huh

astral hinge
#

are you nihmaxxing

cloud rivet
#

I think so

astral hinge
#

alright

#

I had to nih a sampling profiler for a class in college

cloud rivet
#

I am creating my own font right now lol

astral hinge
cloud rivet
#

nice

astral hinge
#

there's a win32 function you can call to capture the stack pointer of any thread

#

and another function you can call to get the stack trace

#

you can do a lot with just those

cloud rivet
#

found the slow thing

#
// p_mix2 - input should be a value from 0 to 1
float4 p_mix2(float4 colors[2], float input) {
  float4 linear = srgb_to_linear(colors[0]) * input + srgb_to_linear(colors[1]) * (1 - input);
  return linear_to_srgb(linear);
}

internal f32 to_linear(f32 r) {
  if (r <= 0.0405f)
    return r / 12.92f;
  return powf((r + 0.055f) / 1.055f, 2.4f);
}

internal f32 to_srgb(f32 r) {
  if (r <= 0.0031308f)
    return r * 12.92f;
  return (1.055f) * powf(r, inv_gamma) - 0.055f;
}

this p_mix2 function

#

I guess I shouldn't be doing this conversion for each operation XD

#

I'll fix it later

#

it's really slow

#

everything should just be linear

#

I blit everything to a swapchain image that's srgb

#

so I don't even need to do this

#

and just use linear color space

#

I wrote this code before I was blitting to the swapchain

#

I guess I'm cheating a little on my cpu software rasterizer by doing that, idk

brisk chasm
#

why the weird array

#

and not just 2 parameters instead

cloud rivet
#

it's just a one off function for testing right now, I don't want to keep it

#

wasn't sure how I was going to use it when I wrote it

#

and I don't like it

#

I mean it does the job

#

I think I maybe wanted to make it be able to mix n number of colors? idk

brisk chasm
#

i was just curious, perhaps it was a muratoriism

cloud rivet
#

muratori writes Cish C++

#

I write C

brisk chasm
#

mixing n numbers will most likely turn into various overloads with n parameters, where n is most likely not going bigger than 2 or 3

cloud rivet
#

there's no overloading in C

brisk chasm
#

then its mix2, mix3, mix4 etc

cloud rivet
#

yeah

#

what I can do

#

is pass an arg with a size

#

and use *pointer

#

and then I wouldn't need the mixN

brisk chasm
#

well write it when you need it, otherwise keep the code readable πŸ™‚

cloud rivet
#

I'm a short sleeper also, but on the weekend I usually manage to get in 8

#

I think maybe I'm putting myself at risk in my old age by getting so little sleep

#

I sleep like 4-5 hours :/

brisk chasm
#

i did

#

but it was a rather short schleep

astral hinge
cloud rivet
#

converted my colors from srgb to linear at definition time and removed all the conversion at op time and fixed my perf

brisk chasm
#

how? by initializing everything as static? or has c constexpr now?

cloud rivet
#

c does not have constexpr

brisk chasm
#

c11 does i thought

astral hinge
#

I think it's only for variables though

cloud rivet
#

oh, I don't want to use any of that

brisk chasm
#

then you should also use c89 and declare all variables at the top of the function/scope please πŸ™‚

cloud rivet
#

I want to write C in such a way I could write my own C compiler for it

cloud rivet
#

hrm

#

I wonder if there's a measurable difference in perf for using srgb draw images that get blitted to an srgb swapchain image vs using linear draw images, I'm using a linear drawimage

#

the draw back is that it looks like shit in renderdoc as it draws, and it doesn't look correct until the swapchain blit

brisk chasm
#

your bro filer should be able to tell

cloud rivet
#

well this would all be on the gpu

#

so I'd have to measure with nsight

brisk chasm
#

yeah

cloud rivet
#

I don't want to, just wondering

#

seems like it would?

cloud rivet
#

since maybe it has to convert a huge image to linear and back to srgb any time you do anything with it? idk

#

maybe it's not a big deal

#

probably hardware support for it or something

brisk chasm
#

since its all magic number constants i could imagine its all trivial and the compiler gets rid of them somehow

#

but i dont know

cloud rivet
#

it was really slow on the cpu, but I was doing it in a dumb way

#

multiple levels of dumb

brisk chasm
#

there are also various optimization levels a compiler can do/use?

cloud rivet
#

oh yeah also I am building with debug output

broken fog
cloud rivet
#

no

broken fog
cloud rivet
#

I'm actually rendering things

#

why you gotta say that fuck lol

broken fog
#

heh dw just having fun

brisk chasm
#

bs is just jealous

broken fog
#

you're explicitly doing this for learning

#

not like

#

delusions of actually shipping a thing KEKW

cloud rivet
#

oh right

#

hahah

broken fog
cloud rivet
#

your thread came back alive was really nice to see

astral hinge
#

just quit your job

cloud rivet
#

your intel sponza is amazing

astral hinge
#

or do what I did and get laid off

cloud rivet
#

how do you live jaker, it's not my business, but if there's some secret to it lemme know oks

#

also we're hiring

#

it's not gfx

#

but it's good pay :/

broken fog
#

so that's nice

astral hinge
#

the second is to have a tech job for a few years

#

I don't think you're in a situation where you could have zero expenses

cloud rivet
#

probably not

#

maybe I can win the lotto

#

can't win if you don't play! can't win if you do play, but definitely can't win if you don't play

brisk chasm
#

cant play if you dont pay

cloud rivet
#

I don't play

#

it's a rip off

#

like numerically impossible by 1000x

#

might as well set your money on fire

slim oak
#

actually it's possible to win, my neighbor won ~4 million PLN (~1 mil USD) a couple of years ago frogstare

cloud rivet
#

wow

slim oak
#

now they sit around their house and drive their car around the neighborhood all day long, doing nothing

cloud rivet
#

I would not do that

#

I would be writing even more code than I do now

#

since I don't write code at work I make the ai do it

#

ok

#

it's not the full thing

#

it's good enough for now

#

I am now a font designer hatguy

brisk chasm
#

germans are raging πŸ˜„

cloud rivet
#

I know I need all the other characters

#

but this took a long time lol

#

and I won't use them yet

brisk chasm
#

i am just teasing

cloud rivet
#

I want these

brisk chasm
#

Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. These characters are characterized by being designed to be connected horizontally and/or vertically with adjacent characters, which requires proper alignment. Box-drawing charac...

cloud rivet
#

huh

#

why is my text red

brisk chasm
#
β”Œβ”€β”¬β”  ╔═╦╗  ╓─β•₯β•–  ╒═╀╕
β”‚ β”‚β”‚  β•‘ β•‘β•‘  β•‘ β•‘β•‘  β”‚ β”‚β”‚
β”œβ”€β”Όβ”€  ╠═╬╣  β•Ÿβ”€β•«β•’  β•žβ•β•ͺβ•‘
β””β”€β”΄β”˜  β•šβ•β•©β•  β•™β”€β•¨β•œ  β•˜β•β•§β•›
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ╔═══╗ Some Text  β”‚β–’
β”‚  β•šβ•β•¦β•β• in the box β”‚β–’
β•žβ•β•€β•β•β•©β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•‘β–’
β”‚ β”œβ”€β”€β”¬β”€β”€β”€           β”‚β–’
β”‚ β””β”€β”€β”΄β”€β”€β”˜           β”‚β–’
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β–’
 β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’
cloud rivet
#

my text is red?

brisk chasm
#

it didnt send the message

cloud rivet
#

oh

brisk chasm
#

right click -> "try again"

cloud rivet
#

oh resend message

#

my square brackets are totally wrong I just realized

brisk chasm
#

yeah that, sorry

astral hinge
#

lol it's a random option in the middle

cloud rivet
#

I have never seen that before

brisk chasm
#

i get that once or twice a year

cloud rivet
#

that looks better

#

ok

#

I think I need to create something like an IR for my UI

#

I wonder if the AI will give me shit over this font

#

idk I don't care, I like it

#

it could have easily generated this, I did it manually, because I want to write my own code

#

I'm gonna look at that movie Jaker recommended

#

tomorrow start on the real UI

brisk chasm
#

which one? the hunt for the right font?

cloud rivet
#

The Lighthouse

brisk chasm
#

ah

cloud rivet
#

I haven't watched a movie in forever

#

I mostly just watch scary/horror movies and really old movies

#

oh yeah

#

Sinners!

#

that was the last movie I saw

#

that movie was fucking amazing

#

classics and scary movies and a couple of things julia and I watch together

astral hinge
#

nice

broken fog
#

uppercase k maybe a little top heavy, uppercase p loop could extend one pixel lower

#

other than that it's looking great

cloud rivet
#

yeah the k was hard, the ampersand too

#

I tried a bunch of things, idk it's not enough dimensions to make it look any good

#

I fixed the lower case b,d, f, t, k, i and l

#

there's still something going on that's slow

#

it's not as slow as it was but it's still too slow

#

who needs tracy when you can just comment out the code until it stops being slow KEKW

#

I should do proper profiling though sometime soon

#

this ain't no way to build a software rasterizer

#

idk

cloud rivet
#

scaling, window position, and bg & fg color

#

let me get rid of those lines

#

hrm

#

something is not quite right

#

characters are getting stomped a bit on the left

#

ok I can't do anything else until I have proper representation of window contents

broken fog
#

actually hol up

#

why does your x height increase one pixel for ijkmno

#

and i think the lower row ones as well

#

you should either increase it for abcdefg or decrease it for those

#

but your x height should match

#

make the stem on the t a pixel shorter as well, it's not a full ascender

brisk chasm
#

/rename Rosy Fontshed

broken fog
#

hey i did take type design classes in uni

#

gotta put that to use somehow

cloud rivet
#

oh

#

I gotta fix e, g and h thx

#

and d

#

and b

#

hrmmm

#

I think mn and o are wrong

#

nah

#

I think those are the correct ones

#

let me set one of them up to be a ful line

#

yeah a through are wrong

#

good eye, thanks!

cloud rivet
#

I want to work in a Lighthouse tbh

#

I won't hurt any seagulls

astral hinge
#

that was actually an albatross πŸ€“ (but I thought it was a seagull at first too)

cloud rivet
#

oh, yeah they were huge

#

and really hungry

bronze socket
#

an albatross also makes more sense thematically

#

because it's a strong maritime tradition that they're bad luck to kill

cloud rivet
#

"lighthouse jobs near me" 0 results froge_sad

bronze socket
#

I don't think they're manned anymore

echo crystal
cloud rivet
#

gps stole all the jobs

bronze socket
#

and reliable electric lighting

#

apparently most active lighthouses are serviced by the coast guard

cloud rivet
#

yeah

#

I almost joined the coast guard

#

hrm

bronze socket
#

you can probably get in if you score top of the class on their entrance test/training thing

cloud rivet
#

I'm too old now

#

have to be younger than 35 for most federal jobs like that

bronze socket
#

I bet you can get a waiver since you have prior service if you really wanted it badly

#

not like the coast guard is the most physically demanding branch unless you're a rescue diver or something

cloud rivet
#

I turn 50 in like 1.25 years

#

I don't think I could get a waiver lol

bronze socket
#

rip, there are probably 50 year olds in the coast guard though, although they got in from the bottom

#

I've heard some hilarious things about the physical condition of older navy guys from one of my friends who was in sealift

cloud rivet
#

a lot of similar duties for states don't have such an age limit

#

like the State of California might have similar jobs for example, I don't know why the federal government has age limits

#

I should actually talk to a professional career councelor to find out what's next for me

#

I don't think I want to keep doing this shit with AI

#

I wish I had a business idea

bronze socket
#

you could always go for the merchant marines, I don't think they have an age limit so long as you can pass a USCG physical, which is easy as hell

cloud rivet
#

I think there's huge gaps in the game dev tools industry, but I don't know what someone would actually pay for

#

maybe MJP knows

#

merchant marines is a really hard life

#

also, not very good internet

bronze socket
#

torrent what you wanna watch for the next 6 months, leave your family

#

that about covers it

cloud rivet
#

I will just download the vk/spirv spec and latest clang compiler bring my laptop, some ebooks and come back with a full single player game

#

not having had to bikeshed anything on this server, maybe 2 games

bronze socket
cloud rivet
#

no

#

it's really hard to not fuck up in my position

echo crystal
#

sounds stressful

bronze socket
#

do they understand the concept of the swiss cheese model of failure

cloud rivet
#

yes, it was specifically brought up

broken fog
cloud rivet
#

honestly I actually feel very supported right now

#

but I still personally feel bad about it

bronze socket
#

I have definitely been one hole away from getting cheesed before

#

almost lost a month of production data the day before audits started

#

luckily it was a quick backup to restore, but it was a few layers down in the "where tf do we restore this data from" search

cloud rivet
#

I can feel that level of in the moment panic in my bones reading this

echo crystal
cloud rivet
#

I'm going to make a tagged union for my UI window contents

#

it's what I should also do for my render graph

#
typedef struct UIWindowComponentText {
  const char *text;
  u32 size;
} UIWindowComponentText;

typedef enum UIWindowComponentType {
  ui_window_component_type_text,
} UIWindowComponentType;

typedef union UIWindowComponent {
  UIWindowComponentText text;
} UIWindowComponent;

typedef struct UIWindowContent {
  UIWindowComponentType content_type;
  UIWindowComponent content;
} UIWindowContent;

struct UIWindow {
  // ...
  UIWindowContent *contents;
  u32 num_contents;
};
#

lemme see if this works

cloud rivet
#

with a tagged union is the size of the thing the size of the largest type in the union and it does type punning or the size of all of the types? I will investigate, just because I am curious

#

oh, it's not the size of all the union members combined, but greater than the largest member

#

interesting

#

much smaller though than the size of all the individual member types combined though

#

so this better than a fat struct

bronze tendon
#

Tagged unions and similar constructs are one of my favorite things

cloud rivet
#

yeah they're nice

#

in zig they are really well supported in zig and I used them then all the time

#

I was a little spoiled by that and avoided using them in C++ since there's std::variant

#

but now that I am writing C I shall use them

bronze tendon
#

I went on the obligatory functional programming bender some years back and I think the main takeaway I got was "wow ocaml sure got it right with these things"

cloud rivet
#

I never wrote ocaml but I wrote some haskell once

#

yeah I really got into functional programming also for like a few years

#

reactive programming etc

#

I'm sorry for that time of my life was lost to that, but I am glad I made it out, many don't

bronze tendon
#

I would recommend everybody makes the mistake because there are some good ideas in that sphere, but getting lost in the sauce is dangerous

cloud rivet
#

I was watching jon blow give his talk about jai at some functional programming convention, which in itself is crazy since jai isn't anything of the sort, and all the other talks were just talking about code, and how the code looked better and how beautiful the code looked, and then jon gets on stage and demos an actual game, like an actual thing, not the code, he briefly shows screenshots of jai which looks a lot like C spam and not even remotely functional, and it just struck me how this focus on how code looks and how programming feels vs look at what I made and how it performs was just really funny

#

it's a bad signal when someone talks about a language, and shows what the code looks like and how it feels to program in it, and not demoing some awesome thing someone actually made with it, I'm just going to tune out . I dont' write code to write code. I write code to make things

#

and I think this is mostly true from my experience with functional programming

#

totally anecdotal evidence though

#

I wish I had started programming with C

#

and not a higher level language

#

I'd be a totally different, and better engineer

bronze tendon
#

I know I was definitely into the ✨ aesthetics ✨

cloud rivet
#

yeah me too

#

all I care about anymore is what the pixels looks like and the perf

#

the code can be whatever

#

I do want my code to be readable and maintainable

bronze tendon
#

All I know is that I really wish I had not had to unlearn java-isms when I started programming. I do think MIT back in the day was on to something when they taught scheme for their introductory courses. No syntactic fluff, all about problem solving with a simple tool.

#

My programming education was rooted in common sense from a period that I view as full of mistakes

cloud rivet
#

yeah me too, I am fully self taught and just was exposed to the wrong information

#

there was a brief moment early on in 2007, when I read K&R and I started writing in C where I could have made a change, but at the time I saw it more of a oh sure I can build my own datatypes and such, but I get all this for free with python, which was a big L take and I just didn't know it

#

I was writing web apps

#

I still liked making website applications back then, before it lost all its novelty and became boring microservices/k8s and frontend build systems

bronze tendon
#

Modern web dev is way too hard (unironically)

#

I could never get into it

cloud rivet
#

there's a lot to know depending on what you want to do

#

I think it is very boring

broken fog
#

it's literally the easiest thing

#

toolchains are really nice and all the frameworks are well documented

#

though there are plenty of footguns and bad tutorials around

#

i do agree it's boring though

bronze socket
#

yeah that's what makes it hard

broken fog
#

yea KEKW

bronze socket
#

drowing in noob traps + boringness inhibits mental retention

#

and willingness to experiment

#

CSS is one of those things where I wish I just knew it but I am not at all willing to put in the effort to figure out the "right" way of doing it

cloud rivet
#

you largely don't need to really touch CSS much anymore, just customize a Material UI library

#

you'd have to want something very unique

bronze tendon
#

It's so much easier to not worry about all the current trends and just write c++/python/whatever that runs on a box and marshals data around

bronze socket
#

is that how you get those aggrivating "professional" looking infiniscrolling websites

cloud rivet
#

yes

#

but you can have pagination if you want

#

I hardly ever see a PR with a CSS diff

#

maybe it's just like that at my work

#

I don't really work on the frontend much

broken fog
#

it is actual garbage

broken fog
#

most of the shitty complicated layout stuff has been deprecated in favor of flex/grid everywhere

#

and they are so good

#

like if i was building a ui system from scratch i would just copy css flexbox and grid

#

if you're building like internal tools where nobody cares how it looks it's fine

cloud rivet
#

5 years of applications built on top of it now

#

I just kinda disagree but it's ok, sure there might be better options, but our UI is pretty amazing

broken fog
#

but if you have a client they will ask you to change how this button looks and then you'll have to start yeeting !important all over the place

#

it also (i'm talking about the react library here) pollutes the hell out of the component tree making the inspector useless and bloating your payloads

cloud rivet
broken fog
#

that doesn't look like mui, not the one i know of at least

#

you sure you're not talkiing about some other component lib?

#

like one that's actually good KEKW

cloud rivet
#

hrm

#

wait

broken fog
#

oh ye that's probably fine tbh (though, web components lol KEKW)

#

i'm talking about a popular react library called material ui

cloud rivet
#

I think that's it

broken fog
#

afaik it still implements material design 1.0

#

like you know

#

the ancient android lollipop one

#

with all the shadows

cloud rivet
#

that's what that is no?

#

oh I don't know, this is a react UI framework

#

I actually don't know anymore it's been so long

broken fog
#

idk the stuff you sent from your company looks nothing like mui, so either it's some other lib or your frontend devs are doing a lot of work KEKW

cloud rivet
#

which framework we use

#

I'd have to go look at work code

broken fog
#

i hope for their sake it's the former

cloud rivet
#

I don't want to and probably shouldn't lol

broken fog
#

yeah dw

#

i just have uhh opinions

cloud rivet
#

we have really good frontend engineers

broken fog
#

after working with mui for a couple years

#

i do not like that library

#

but hey, it could be worse, could be chakra

cloud rivet
#

it's kind of crazy how all these decisions I made early on are now like what the full application is built on

#

and tons of engineers working on it

#

and I don't even know how it works anymore

broken fog
#

yeah things tend to snowball like that

#

in my very first job i was asked to build a prototype for a new ui for our biggest client

#

this when i was like 19 and had months of work experience

#

so ofc i slapped together something awful in angular (what we used at the time) just to show off to the client

#

and of course that ended up in production

cloud rivet
#

oh no

#

well

#

it's a good sign that something you built as a prototype works though

broken fog
#

it was actually... not horrible tbh

bronze socket
#

imagine if you could actually see all the intern code pushed to production across all apps/products

broken fog
#

i did a lot of work to improve it over the following years

cloud rivet
#

is this angular 1?

broken fog
#

ended up learning a lot from having to deal with my own shit KEKW

#

also ended up as effectively lead developer managing the frontend side of a 6-7 person team with like 2yoe

#

i did not get paid a lead developer salary

#

i left

broken fog
cloud rivet
#

ah

#

that's good

#

react kinda won

broken fog
#

yeaa angularjs was bad

#

2+ was at least

#

kinda modern framework

broken fog
#

the implementation is awful but it has such a nice api especially once function components became the norm

#

angular was far too oop-pilled and component lifetime management was an absolute nightmare

cloud rivet
#

I never used angular much

#

prior to react I used google closure, and how they abandoned it to switch to angular left me burned from using any of their frontend libraries

broken fog
#

yeah don't trust google tech unless it's super proven KEKW

#

it took me like 5 years to trust flutter

#

react has such a huge community around it it just can't die, even if the core team stopped maintaining it someone else would pick it up

#

nextjs is also kinda the "official" react framework in everything but name (iirc something like a third of the core react team works for vercel)

#

i wonder if they're ever gonna come out with the compiler stuff, in theory that would fix a lot of react's performance issues and bring it in line with stuff like svelte

#

that side of web development i actually do find really interesting/fun, building the frameworks themselves

cloud rivet
#

I was always intrigued by dart, but never did anything with it

#

got fps counter

#

a nice 13fps

#

for my cpu raster

#

once I turned on OBS it started dropping a bit

#

there's an issue with the full window size not being drawn

#

but anyway, I got useful text now

broken fog
cloud rivet
#

no

#

0 optimizations done

broken fog
#

oh

cloud rivet
#

it's just all speculative maybe this will work code

#

I want UI controls before I do anything else

#

I can't debug stuff without UI

broken fog
#

i managed about 50fps with a decent number of tris on screen in my super naive cpu renderer i did for a uni project last semester, and that was single threaded running on qemu so i'm sure you can go way faster

cloud rivet
#

I don't want to go into the code and change hard coded values

#

to see things from different angles

broken fog
#

(though it was pretty low res, like 800x600)

#

try profiling it, with a cpu rasterizer drawing pixels itself is probably the bottleneck

cloud rivet
#

I'm not worried about the fps right now

#

I have to also write a profiler to be able to profile

#

I'm going to work on UI some more for a bit

broken fog
#

i actually had worse perf with one fullscreen tri than like 1500 tris covering 25% of the screen area KEKW

broken fog
cloud rivet
#

the offline RT renders look amazing

#

I have waited for a Maya Arnorld render to render for a bit

#

and Marmoset too

#

it's always so nice how things look if you let it render for a while

#

worth the wait for a pretty frame

#

at 13 fps I probably will need to start on perf right away if I can't interact with the UI

broken fog
#

my renderer has so many issues tho agonyfrog

#

turns out doing physically based pt is hard

#

who would've guessed

echo crystal
#

is it debug build

cloud rivet
#

I'm just calling the clang compiler with cli args in a bat file I don't have the concept of build types

#

so I'm not telling it to do any optmization and I am telling to output debug info

#

so maybe it's comparable to a debug build

echo crystal
#

ye

broken fog
#

ah yeah stick an -O3 in there

#

might triple your framerate just doing that

echo crystal
#

only "optimisation" I did so far is AABB for the triangles

#

this is good enough for deccer cubes but not enough for sponza for me

broken fog
#

your sw renderer can handle sponza? KEKW

#

the one i did had shitty gouraud shading and handled up to a couple hundred tris

#

oh and no clipping

echo crystal
#

πŸ˜‚πŸ˜‚

broken fog
#

tbf i wrote it in an afternoon mostly from memory lol

#

i actually added it for fun to a computer arch assignment, the actual assignment was building a kernel

echo crystal
#

still a wip

broken fog
#

yes prof of course my kernel needs a 3d rasterizer api subsystem

broken fog
echo crystal
#

did u make gui n stuff ?

#

for my OS class I only had to do a FAT16 read only filesystem

#

can't imagine having to do a whole kernel πŸ’€

broken fog
#

oh we're not doing any fs stuff

#

it's a super barebones kernel and we didn't have to do the bootloader

#

i'm actually doing the os class rn and the final assignment is upgrade that kernel to support processes ipc and stuff

echo crystal
#

damn that's epic

broken fog
#

so now that it'll have an actual mmu and the ability to alloc heap memory yeah i do plan on adding a little gui environment

#

i did do some fancy stuff for the shell tho

#

like color escape sequences, command history that kinda thing

echo crystal
#

nicee

broken fog
#

honestly super fun assignment, i'm a student teacher assistant in that course now

#

hold on i probably have some screenshot of the 3d graphics stuff

#

we had to do a little game as part of the assignment (ig mostly to test our keyboard driver and stuff was good enough to work in sorta realtime), we went waay overboard KEKW

#

and did like a simple terrain gen and actual physics and stuff

#

oh and made the players capybaras because it was funny

brisk chasm
#

capybaras are very cool furry frogs

echo crystal
#

amazing userland program

broken fog
#

(game is "userland" but all the 3d graphics stuff is a kernel api lmao)

echo crystal
#

sparky capibara golf ?

broken fog
#

super* but ye KEKW

#

what fun are uni assignments if you don't do a lil shitposting

echo crystal
#

i am planning on writing one too

#

once i have less ongoing projects πŸ˜‚

broken fog
#

it's pretty fun tbh

echo crystal
#

kernel

broken fog
#

oh

#

also very fun

#

you learn a lot about how things work under the hood

#

i get to implement a scheduler in like uhh

#

two weeks froge

echo crystal
#

round robin smart

broken fog
#

comp arch and os are probably the best courses in uni so far, really fun and learned a lot

bronze tendon
#

Architecture and my graphics courses were the peak of my college course enjoyment. I regret dodging compilers.

broken fog
#

yea i have a compilers class in two semesters should be fun

#

technically it's next semester but i'm doing an exchange semester which shifts things around

#

i thought of taking compilers now so i could do optimizing compilers on exchange which seems really interesting, unfortunately it's taught in swedish agonyfrog

#

graphics in my uni is kinda ass

#

i've been told it's just threejs bleakekw

cloud rivet
#

horrible

broken fog
#

yes froge_sad

#

wanted to do some graphics in my exchange semester but the gp classes are all autumn semester, i'm going in spring

#

sadge

#

i'll just have to keep teaching myself gp

#

tbf i'm probably above introductory uni course level at this point lol, pbr book and this server taught me a lot

#

and yet still feels like i haven't even scratched the surface

cloud rivet
#

I don't know shit and I think I am above introductory uni course. I literally worked through an introductory uni course text book last year though

#

so I'm sure you are

broken fog
#

is it even possible to know shit

#

every time i learn a thing i learn of three more things i don't know KEKW

cloud rivet
#

same

#

cool I made the AI happy and now I can focus on the next UI thing

#

draggable and resizable windows

#

once I have that I can add a slider

#

once I have a slider I can start working on making progress on rasterizing

#

I may need to start on a profiler though

#

maybe I can find what's slow now without it

#

for a profiler I was thinking a profiling thread where I define markers at compile time and then send ints that refer to declared markers to the thread from where application code runs and get high resolution times in that thread without interfering the actual application code

#

idk what the UI would look like, maybe it just starts as a log output

cloud rivet
#

doesn't print "secret" prints "?"

#

it's already on msvc, clang etc

#

it talks about reflection

#

for loops over your class members :o

#

and parameter lists

#

it's like zig comptime

astral hinge
#

you'd have to inspect the numerical bytes to see what they actually are

cloud rivet
#

well the speaker was saying it wouldn't be leaking what was previousily written to memory

#

oh

#

this is reflection stuff is not C++26

#

it's C++29

#

ok, anyway

#

back to ui stuff

astral hinge
#

tf is ^^{} lol

#

I'll have to watch that

#

being able to generate functions like that would be cool

cloud rivet
#

apparently can generate code into C++ files in C++26 for some of the things that are on the earlier slides

cloud rivet
astral hinge
#

lol the embed

cloud rivet
#

I have crossed the 10k loc mark in my new project πŸŽ‰

C:\Users\Bjorn\projects\code\palinode>tokei
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Batch                   6          110           81            9           20
 C                      18         7922         5399         1656          867
 C Header               17         2454         2208            8          238
 JSON                    1            7            7            0            0
 Markdown                1            1            0            1            0
===============================================================================
 Total                  43        10494         7695         1674         1125
===============================================================================
#

all it can do is render some triangles and print some characters

#

the chars put me over

#

which is kinda cheating

cloud rivet
#

being able to drag a window around will be like the first dynamic thing I'll add to this project, the only sorta thing I have is hitting 1-6 to trigger which render graph to use

dark saffron
cloud rivet
#

the \ slash syntax hurts readability I think

cloud rivet
#

ok I fixed my window dimensions not fully drawing beyond the text component dimensions

#

let me stick another text component in there and see if that works

#

holy shit that just worked πŸŽ‰

#

I need floating point scale next

echo crystal
#

when window title ?

cloud rivet
#

that's next

#

going to add a window bar and put the title in it

#

and make it draggable to reposition the window

echo crystal
#

epic

cloud rivet
#

my font looks horrible with non-integer scale values

#

I think it's my math

#

obviously

#

but also the font

#

I use bing to set my daily desktop wallpaper, I think the universe is trying to tell me something 😨

#

jk

#

it's just some birds

#

I'm fine

#

totally fine

#

ok

#

ok I guess window bar is next

#

well

#

if I shrink my window I get perf

#

so

#

feel like there's a low hanging fruit here somewhere

echo crystal
#

how do u draw the triangle ?

cloud rivet
#

Within its bounding box iterate over every pixel and check the barycentric coordinate

#

Which is dumb

#

I will fix that soon

cloud rivet
#

I think if I break my bounding box into smaller boxes I could tell from the bc coordinates values if any part of the triangle will be inside

#

and skip empty areas

#

I could also work on those smaller boxes concurrently

#

I also will need a depth buffer and use winding order surface removal

#

I should memcpy window background colors as full rows

broken fog
cloud rivet
#

been working on making my non-integer text scaling better, it just can't look good for values under 2x so I just set it to not scale and be 8x16

#

was really unhappy with that code and it's cleaned up now also

#

now I can work on a draggable window title bar

cloud rivet
#

man I don't have 512 simd

#

AVX-512 is the next generation after mine

#

idk

brisk chasm
#

πŸ‡¨πŸ‡³m, cuda, compute shaders also work

cloud rivet
#

well

#

this is supposed to be a cpu rasterizer

brisk chasm
#

you mean software rasterizer

cloud rivet
#

I have a separate gpu rasterizer that I will also work on

#

no

brisk chasm
#

ah ok

cloud rivet
#

a thing that rasterizes on the cpu

brisk chasm
#

its the same code anyway

cloud rivet
#

it isn't

#

I am doing all kinds of shit that would never work on a gpu

brisk chasm
#

: )

cloud rivet
#

and the gpu stuff is all happening in work groups

brisk chasm
#

ye parallel loops rather than one loop

#

i was somehow picturing blokens driven by that cpu rasterizer

cloud rivet
brisk chasm
#

so align your shit properly then

cloud rivet
#

I'm trying to fill a window of arbitrary dimensions with a background color

#

I can't align it like that

brisk chasm
#

you can align the parts which can be aligned and then just fill the rest as usual?

cloud rivet
#

yeah, that makes the code too complex, but that could be something I do later

brisk chasm
#

ah

cloud rivet
#

I was just looking at maybe it was a quick win

brisk chasm
#

or just dont allow resizing

cloud rivet
#

I'm talking about ui windows, and I definitely want to be able to resize my window

#

this is just a for me project

brisk chasm
#

aye

cloud rivet
#

well I guess I will keep all this existing logic then

broken fog
#

and throw out the excess pixels

broken fog
cloud rivet
#

there's just one buffer

#

one bitmap

#

for the full screen

#

the windows are sub sections in that

#

copying to additional buffers isn't going to make it any faster

#

I can't overwrite the values in that map, that would overwrite previously rendered pixels

broken fog
#

i see

cloud rivet
#

I guess at some point creating and copying additional oversized 32 byte aligned buffers will be faster than rasterizing a bunch of surfaces using just one bitmap and worth the extra code complexity

broken fog
#

probably ye

cloud rivet
#

ok got a title bar

#

added some helper methods for rendering text, scaling and padding

#

now I need hover over detection behavior

#

I don't even have any cursor input right now

#

it all works with my scale setting too

#

and I can of course add and theme multiple windows

#

lol those windows have a huge perf impact though

#

I'm going to worry about the perf later

wraith urchin
#

11 fps!?

#

for a triangle?

cloud rivet
#

this is on the CPU

wraith urchin
#

What resolution is this?

cloud rivet
#

like 2K

#

idk

#

it's just a brute force iterating over pixels thing right now

wraith urchin
#

Optimizing stuff like that is very fun I find

#

You have to read the assembly code

cloud rivet
#

yeah whatever it takes

#

just trying to get the behavior where I want it

#

and then I'll make it faster

#

this perf is bad enough I can't add a second triangle

#

so I will have to fix it before then

broken fog
#

unless you get into simd stuff

cloud rivet
#

latest clang

wraith urchin
broken fog
#

then yeah i might just straight up write asm lol

broken fog
cloud rivet
#

oh

#

this is no optimizations

#

idk let me try that

wraith urchin
#

Its actually easier to read O3 than O1 imo

broken fog
wraith urchin
#

O1 is doing a bunch on unnecessary shit so its sometimes confusing

broken fog
#

at least for gcc

#

i haven't actually read clang output

#

but given how c compilers work (single pass with opts off) it probably produces garbage code too

#

it would also be nicer to read if it was a better arch frogsippy

cloud rivet
#

this is -O3

wraith urchin
#

Clang produces pretty good code in my experience

broken fog
wraith urchin
#

O3 ftw!

cloud rivet
#

does it hurt debuggability?

broken fog
#

yes

wraith urchin
#

Yes

cloud rivet
#

ok

broken fog
#

this is why you have separate debug and release builds

cloud rivet
#

I will turn that right on off then

#

I mean I don't need a release build

#

this is never getting released

broken fog
#

no, but having the extra berf is nice when you're just testing stuff

wraith urchin
#

I run in release by default, I only switch to debug if I need to

broken fog
#

and when you need to gdb the thing out comes the debug build

cloud rivet
#

it seems to take about 100ms longer to build with -O3 I think

broken fog
#

having two builds is literally two lines in your makefile

#

yea you'll get longer build times

#

be glad it's only 100ms KEKW

wraith urchin
#

Yeah but the app usually takes less time to start up too

broken fog
#

then again this isn't cipipi so your build times should be fine

#

when i did cpu stuff perf was measured in minutes per frame so working with a debug build was definitely out of the question KEKW

wraith urchin
#

but for the triangle thing it probably takes less than 100ms anyways

cloud rivet
#

I guess the good thing about running in release is you'll catch the UB that you might miss if you're always running debug mode?

wraith urchin
#

Yup

broken fog
#

also yes

cloud rivet
#

ok

#

I still need to get this perf up

#

but later

broken fog
#

yea, but running an optimized build helps a lot

#

it'll make your life generally better

#

ui looking nice btw

#

font looks great froge

cloud rivet
#

thanks to your help

broken fog
#

i'd still take a pixel or two off the top of the t if i'm being super nitpicky

cloud rivet
#

I like that t

broken fog
#

ight understandable

cloud rivet
#

I like that I can theme my windows differently, idk if that's a thing you can do imgui

#

lol my windows wrap unintentionally

#

I need to fix that

broken fog
#

except the one function to draw wrapping text that actually cared about screen bounds

#

if you drew out of bounds vertically you'd overflow the framebuffer and summon nasal demons tho KEKW

cloud rivet
#

easy fix

cloud rivet
broken fog
#

ye same here

#

kernel level ub froge_love

#

you can probably ace by drawing the right pixels out of bounds lol

cloud rivet
#

it's a full course on software rasterization

#

I don't think this a course for a real time renderer though

#

but useful to look at anyway

#

yeah it just renders to a file

#

maybe I move all this to the gpu

#

I'm going to see how far I can get on the CPU

#

in real time

#

I don't want to do any offline rendering though

broken fog
#

iirc someone posted real time pbr on cpu stuff a while back

astral hinge
#

bjorn will be NIHing his own profiling tools so optimization is gonna be a challenge until then

cloud rivet
#

Yeah I have some ideas around that

cloud rivet
#

if, and it's a big if, I wanted to NIH textures I'd have to do a bunch of this

#

but there's like an iterative process once I get basic png working

#

the other thing is animations, I really don't want to support a json format

#

and idk what the alternatives are, I like obj but it has no animations

#

looks like I can export bvh and obj from maya

echo crystal
#

you are making your own image loader as well ?

cloud rivet
#

well

#

if I am using no libraries

#

I'd have to if I wanted to have images

#

I can cheat here

echo crystal
#

there are some very simple formats

cloud rivet
#

I think png is simple

echo crystal
#

idk

cloud rivet
#

it's true I could start even simpler

echo crystal
#

i know bmp and ppm

#

are ver simple

cloud rivet
#

that could be v1 yeah bmp

#

the cheat could be my packager I wrote for rosy, it's a simple format

#

I don't want anymore offline separate CLI tools right now

#

including slangc

echo crystal
#

yeah custom format would work too

cloud rivet
#

well it would have to be transcoded if I wanted anything good

#

heh πŸ˜…

broken fog
astral hinge
#

ppπŸ‡²πŸ‡²

cloud rivet
#

it's not very good, but it works. I should interpolate the movement and do it proper like as I make the UI better

#

do something with the cursor

#

idk

broken fog
#

ooh nice

#

might want to make the color change condition (mouse_over || dragging) instead of just mouseover to avoid the flickering

#

i'm assuming you already have a dragging flag somewhere in your state so it should be trivial

cloud rivet
#

yeah

#

nvim's lsp keeps adding wrong headers I need to tell it to stop automatically adding headers

broken fog
#

yeah it does the same thing for me

#

not wrong headers, but like

#

stuff that's already included indirectly through some other header

#

the funny thing is the lsp knows it's there, but the autocomplete adds the header anyway

cloud rivet
#

I need to set --header-insertion=never somehow

#
return {
    cmd = {
        'clangd',
        '--background-index',
        '--clang-tidy',
        '--header-insertion=never',
    },
    filetypes = {'c', 'cpp'},
    root_markers = {'compile_commands.json', '.git'},
    capabilities = capabilities,
}
#

hrm

#

cpp

#

why is cpp in there

#

that must be copy pasta

astral hinge
#

it must be purged

cloud rivet
#

I just gotta be reading specs and docs and code whenever I have time tbh

#

And writing notes

#

I am going to get an iPad to read with and write on

bronze socket
#

get a paper notebook

true moon
#

Carrying a paper notebook is good for the soul though

cloud rivet
#

yeah they are nice, but on the bus I have enough arm space to barely hold my phone

broken fog
#

paper is nice, but i got an ipad for uni stuff and i can't go back

#

effectively infinite paper, being able to delete stuff any number of times, move stuff around after the fact and all that is just too useful

cloud rivet
#

why can't I?

#

at a lean 188cm 100kg I have big man privileges and don't have to worry about theft

#

I have seen people's ipads being swiped off of their table at restaurants

#

idk if that's going to work on a bus

#

I do like paper notebooks

#

I just need to be practical in this case

elfin cape
cloud rivet
#

looks amazing

#

I think I will just get an ipad though because then I can find it when I lose it

#

as I always lose everything

#

I have an air tag on everything

#

and I have to use my iphone to always find my shit

#

I guess I could stick an airtag on this thing

elfin cape
#

I am looking for something to take notes and do programming for uni. This would be greate choice for you

#

I was thinking about 2-1 but they suck so. notebook and maybe graphical tablet KEKW

cloud rivet
#

it's weird that they don't explain what documents they support

#

Document support

PDF, EPUB (importing)

PDF, PNG, SVG (exporting)

bronze socket
#

those microsoft tablets were nice back in the day, I knew a few people that had them

#

I dunno if they hold up still

broken fog
#

but it's the same price as an ipad air for the nice one which makes it very hard to justify imo

#

since the ipad does quite a lot more + becomes a second monitor for my mac

elfin cape
#

yeah if apple would allow mac os on ipad it would be amazing

broken fog
#

yeah but they'd never do that, the ipad pro would cannibalize macbook air sales KEKW

elfin cape
#

I would buy ipad immediately

broken fog
#

fwiw they're adding a bunch of very macos-like features to ipados 26

#

it all but has a full on desktop environment now

elfin cape
#

Yeah I will buying a macbook since its cheapest laptop with 13" display and amazing battery life and perf bleakekw

broken fog
#

they're clearly aiming for a unified environment but doing so very slowly

broken fog
bronze socket
#

I think the pressure dropped since microsoft stopped making their tablets

broken fog
#

especially now it's 16gb ram

#

8gb was a meme

#

deal breaker for many use cases

elfin cape
#

the m4 one

broken fog
elfin cape
#

idk if I will buying one with more than 256GB storage

bronze socket
#

I just remember people taking notes on them in high school and the pens seeming decent

broken fog
#

windows never worked as a touchscreen os in spite of ms best efforts, it was clunky as hell

bronze socket
#

plus it running full windows 10 was kinda mindblowing when you got used to the apple environment

broken fog
#

and you either got arm (nothing works) or x86 (battery life is dogshit)

bronze socket
#

yeah I might have much worse memories of them if I had my own instead of witnessing other people use them lmao

broken fog
#

apple is absolutely keeping ipad os limited to avoid eating into their own macbook sales but there's also another factor in play imo

#

they prioritize a smooth ux over user freedom

#

that means no, you don't get to run desktop apps on your ipad if we can't ensure they'll be absolutely flawless on the touchscreen

bronze socket
#

in the long term web is probably the great equalizer there anyway

broken fog
#

and that's pretty much impossible without just making it two apps as ms has shown with the failed windows 10 uwp initiative

bronze socket
#

people who have the capability of shipping an app that can run in desktop and mobile modes do so today by having a unified codebase with electron

broken fog
#

desktop and touch ui is just too different

broken fog
#

apple waaay overcharges for storage

bronze socket
#

is it soldered in

broken fog
#

i have 512 in my mbp, enough for everything and i just use an external ssd for photos

broken fog
#

iirc

#

the ram is (it's part of the soc)

elfin cape
#

but not the soc

broken fog
#

oh yea it is

#

rip

elfin cape
#

but you can swap it if you have really good technician but its finicky bleakekw

broken fog
#

yeah i wouldn't do that

#

just buy whatever storage you need on the go

#

probably the biggest flaw with macbooks tbh

#

apple being stingy with storage

elfin cape
#

its just apple

broken fog
#

no reason either, ssds aren't even that expensive even if the ones in macbooks are pretty fancy

elfin cape
#

The macbook is going to be my first apple device

broken fog
#

have you used macos before?

elfin cape
#

a bit

broken fog
#

ight just make sure you actually try a mac for a bit before you go and buy one

#

it can be quite different coming from pcs in some ways and some people hate them

#

it was the opposite for me lol i got an m1 air for work and immediately loved it

elfin cape
#

I have some nit picks but its just matter of getting used to it

broken fog
#

if you're used to dealing with windows setup taking the thing out of the box and having it ready to use in like 30 seconds and no online bullshit is amazing

elfin cape
#

yeah only pain might be the setting up the dev stuff

#

but for sure I am going to customize mac os. From what I have seen the tiling is bad and other stuff

broken fog
#

get rectangle, hotkey to wherever, done

broken fog
elfin cape
#

C++ KEKW

broken fog
#

if you do vk you'll have to go through moltenvk

broken fog
#

if you just target macos it's no different from linux

elfin cape
#

web dev is fine but the vulkan stuff is a bit iffy with rt

#

mesh shaders should be fine

broken fog
#

oh yah

#

forget vk rt

elfin cape
#

somebody has a fork for it

broken fog
#

no support in moltenvk

#

and no ootb support planned in kosmickrisp since it's an extension froge_sad

#

there goes my plan of rewriting platinum in vk KEKW

elfin cape
broken fog
#

tbh metal is a very nice api if you don't mind the objc shit

elfin cape
broken fog
#

(btw sorry for hijacking your project thread bjorn)

cloud rivet
#

it's np at all

#

I spam other people's threads

cloud rivet
#

fixed boundary issues, added stacking, and resizing, performs horribly though

elfin cape
#

I never bother with stacking for my UI. I wonder why it is that slow

#

With modern CPUs you should be getting hundreds of fps for few quads

cloud rivet
#

I'm painting each individual pixel

elfin cape
#

That isn't that slow

#

How do you paint it?

cloud rivet
#

just assign values to a pointer to the bitmap

elfin cape
#

Bitmap is coming from windows API?

cloud rivet
#

no

#

it's just bits

#

I copy it to my draw image in vk and blit it to my swapchain

#

no windows api involved

#

if I get rid of the ui and triangle this is very fast

#

I'm just doing something dumb

elfin cape
#

Hmmm. I will try it when I come home in 9 hours. It's really weird it's that slow

cloud rivet
#

it's just dumb ui logic I'm sure

#

I'm going to write a profiler and make it go faster

elfin cape
#

I wanted to suggest Tracy but you are going full nih KEKW

cloud rivet
#

ya

elfin cape
#

Then VS profiler is a choice

cloud rivet
#

I don't use VS

elfin cape
#

Transferring data like that from cpu do GPU should be really fast. I was spamming 190k copy buffer to buffers commands with 64 bytes each. It took 90 ms because I had a small bug

cloud rivet
#

yeah it is very fast

elfin cape
cloud rivet
#

it's just a lot of logic to draw the window

#

I know I want to write my own profiler

#

I'll just start working on the profiler next

#

makes sense to have that before I start on doing more on the rasterizer side

broken fog
#

if the screen is 4k that's a lot of pixels

elfin cape
broken fog
#

yea that doesn't look like 720