@soulthreads@mastodon.gamedev.place avatar

soulthreads

@soulthreads@mastodon.gamedev.place

Still trying to find my place in this mad world

This profile is from a federated server and may be incomplete. Browse more on the original instance.

danluu, (edited ) to random
@danluu@mastodon.social avatar

I can't quite put my finger on it, but there's something delightful about this list of "legitimate" uses of negative literals:

https://github.com/elm/compiler/issues/1773.

I think part of it is the circumstances that would compel users to construct such a list. Until that thread, it hadn't even occurred to me that someone would present a case against the existence of negative literals that required a rebuttal.

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@danluu @pervognsen Oh man, it's always so funny (and frustrating) when the compiler screams at you instead of doing the actual thing you want the program to do.
Like, you already wrote the logic to handle this case, why not turn into something useful instead of making it an error?

E.g. I'm having a lot of mixed feelings about Zig, which recently made it an error if you declare a variable and don't change its value later — you are supposed to mark it as const instead. Just, why?

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@floooh @zeux @NohatCoder @danluu @pervognsen yeah, being almost-always-const is fine, but not when the compiler forces you to do it for no reason.
I can only imagine how fun it is going to be to try to debug/iterate on something, and now you have to change var/const in an unrelated place all the time.
Having it as a warning would've been much better.

fanf, to random
@fanf@mendeddrum.org avatar
soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@fanf One thing I didn't get from you post is — you mention web apps to cross security boundaries — and that doesn't make any sense to me.
But maybe I've just been stuck in a cave for far too long. Can you provide an example of such a web app?

Nice post btw.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Update about shadows in my WebGPU project: I decided I don't like any of the true soft shadows solutions out there, so instead I've switched to ESM instead of VSM (half memory footprint, less light bleeding), 7x7 two-pass blurred, and called it a day.

Currently on my GTX 1060 the 2k shadow map generation takes about 1.5ms, and blurring it takes another 1.5ms. The final render takes about 3.5ms.

video/mp4

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@lisyarus what's the cause of the glitches in the upper part of the video?

aeva, to random
@aeva@mastodon.gamedev.place avatar

I finally fixed Tangerine's oklab color implementation last night, and then went and also implemented oklch and hsl. I really like oklch! It feels like I magically unlocked a bunch of new colors. It's really powerful for generating color pallets.

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@aeva so what was the issue after all?

fasterthanlime, to random
@fasterthanlime@hachyderm.io avatar

pleased to report that "stick around for some more time, who knows, things might get better" wasn't a con and some things, do, in fact, get better over time.

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@fasterthanlime I don't know the actual context to this post, but the juxtaposition with the toot about deleting Premiere Pro is kinda funny

soulthreads, to random
@soulthreads@mastodon.gamedev.place avatar

Recently I worked on a project which involved fiddling with colors quite a bit. Naturally, I wanted to try Oklab color space, since it seems like a great choice.

The project in question is rendered with DX11, and I'm not really familiar with it (more of an OpenGL guy still), so I googled HLSL shaders which converted sRGB to Oklab.

(1/2)

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

The ones I found publicly were seemingly okay but if you stared into the matrices and formulas long enough, you'd see a bunch of errors sprinkled here and there.

That, combined with (I think?) different matrix column-row order in HLSL vs. GLSL, resulted in some fun debugging hours.
In the end I just went with what the "official" Oklab page says, plus adding check for division by 0 for atan2 call.

I'm left wondering, do people actually test it before publishing that stuff online?

(2/2)

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@aeva for me the problem was seemingly random, but I got NaNs (I think it's NaNs) with pure grayscale colors, which was caused by 'a' and 'b' of 'Lab' both being zero — that is when converting from Oklab to OkLCH and passing them to atan2.

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@aeva yeah, I wonder about that too. I guess it's fitting with the whole 'ok' part of the Oklab name. 😁

soulthreads, to random
@soulthreads@mastodon.gamedev.place avatar

Hi, I'm a software developer by day, family member by the evening, and sleeping at night.

My areas of interest are computer graphics, and software performance and correctness. Rest assured, I'm amateur at all of these, but hey, at least I'm trying.

Once made an awful little plotting library for Dear Imgui that inspired other people to make an actual good one, proud of that.

aeva, to random
@aeva@mastodon.gamedev.place avatar

I think programming would be better if source code supported text formatting so you could do stuff like bold or underline really important things, but instead we get plaintext with sometimes dubious encoding assumptions.

soulthreads,
@soulthreads@mastodon.gamedev.place avatar

@aeva so, uh, there's this somewhat obscure language called Oberon, designed by Niklaus Wirth, and the IDE for it (called BlackBox I think?) doesn't really have syntax highlighting, you really can just do whatever with the text: make it bold, change font size, whatever. It's wild.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • tacticalgear
  • InstantRegret
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • kavyap
  • JUstTest
  • modclub
  • ethstaker
  • cubers
  • normalnudes
  • everett
  • GTA5RPClips
  • cisconetworking
  • osvaldo12
  • Leos
  • megavids
  • tester
  • anitta
  • lostlight
  • All magazines