nothings

@[email protected]

Sean Barrett of "stb" fame (also RAD, LGS, IF, t.b)

This profile is from a federated server and may be incomplete. View on remote instance

nothings , to random

New twitch programming stream starting at 8:30 AM PST, 16:30 UTC. https://twitch.tv/nothings2

introducing Voxel Fridays (on Thursday).

Programming a new voxel engine, plus discussion about importance of sticking to one project and not haring off into whatever random idea catches your fancy in the moment.

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

This was rather interesting.

https://www.youtube.com/watch?v=GVxSREVTFTA

nothings ,

@sol_hsa As a Gen Xer, I can't quite tell how much the things that apply to me are accurate Gen X assessments, and how much is astrology-style "most people would agree this applies to them".

nothings , to random

Test twitch stream:
https://www.twitch.tv/nothings2

It's up now. Assuming all goes well, in 15 minutes (at 12:30 PM Pacific) I'll be chatting a little bit, talking about the plan and maybe I'll demo some of the stuff I've been doing.

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

Perlin noise will be the death of me. After searching for "simple" solutions that ended up being overly complex, I settled on stb_perlin.h from @nothings but it just returns zeros. The issue is that Raylib also uses it, so I'm having to call into undocumented raylib functions. I wish there was a way to include it twice.

nothings ,

@grumpygamer It is a standard weird thing with Perlin noise that it's 0 at all integer inputs, and this bites people all the time unfortunately.

nothings , to random

RE: https://mastodon.gamedev.place/@lritter/115930083242119640

first wait 'til Elon Musk kills Twitter
then send instructions back in time
with posting guide for Leonard Ritter

nothings , to random

RE: https://mastodon.gamedev.place/@draknek/115704122780333721

I was one of the other authors whose free games were used as a basis for this (by permission, under contract).

Read the split thread for details; I agree with every word Alan has written (both the positives about the game, and the negatives about Jonathan Blow).

https://mastodon.gamedev.place/@draknek/115704125102372454

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

Act 1: year 2018, Unity added a whole bunch of texture formats to the scripting API, including integer ones, e.g. GraphicsFormat.R16G16B16A16_UInt (https://docs.unity3d.com/2018.2/Documentation/ScriptReference/Experimental.Rendering.GraphicsFormat.R16G16B16A16_UInt.html).

nothings ,

@aras Just curious, in the gist in 2023 you said the bug was closed as a feature request, so is 2025 here a typo or was there another bug report?

nothings ,

@aras Excellent.

By which I mean not excellent at all, etc.

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

@elpres @nothings @Doomed_Daniel @dotstdy @slembcke @floooh

so here's some benchmark data. Caveats: only one run, so ignore spikes and small anomalies, my barrier may not be optimal, etc.

Benchmark runs 1 million work units which are empty, so basically we just wait at barrier 1 million times. Machine has 12 cores, 24 threads. Y axis is seconds.

This translates to about 76M barriers at 1 thread, 5.4 at 2, 5.9 at 3(?), 5.6 at 4, 1.8 at 5, 0.9 at 6, 0.4 at 7 and then it levels out.

ALT
nothings ,

@dotstdy @sol_hsa Imagine each thread is simulating a sequential electronic circuit that is connected to all the others through sequential logic (buffers, etc). Each of them does work to compute the output of their circuit at the next cycle independently, but then they need to share values with each other before starting the next cycle.

nothings ,

@dotstdy @sol_hsa I think the problem is that there's only ~four circuits.

@aras@mastodon.gamedev.place avatar aras , (edited ) to random

I wanted to fix a :blender: bug, but ended up rewriting the code to be much shorter, faster, and work without bugs. Sometimes you have to look at the code, ask "wait what is this even trying to do?", and do it in a saner way, instead of trying to keep on patching upon the existing pile of code. https://projects.blender.org/blender/blender/pulls/148783

nothings ,

@aras How much more code is hidden in calc_wipe_band()? Or is that a pre-existing function (which probably didn't exist when the code was first written).

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

I’ve always felt a bit bitter about not getting much recognition for NVTT. I know it’s been used in tons of games, but most of them don’t give me any credit.

That’s why it was such a pleasant surprise the other day when a developer personally thanked me for it. He was working on a remake of an old title and they were still using it.

nothings ,

@castano Do you know if there's a modern commonplace path for converting latlong to cubemaps to then feed to nvtt? Both of the suggestions on your nvtt page are unsupported/non-Windows and seem to predate modern seamless cube map filtering, so now something simpler would suffice.

nothings ,

I need a windows cmdline app, so no web pages. The other two you mention were the ones I was referring to from your nvtt page: cmft has no windows binary, and cubemapgen is looking long in the tooth (and seems to specialize in the the crazy unnecessary filtering). I guess I'll have t ogive that a shot.I realize this is outside your modern area of expertise, thanks for thinking about it.

nothings ,

@castano I don't have a pipeline yet, but I was assuming I'd have to write out DDS files. I'm non-float data for now, but is there a non-DDS-input cubemap path in nvcompress, or do I just have to do six encodes and repack myself if I want floating point?

nothings ,

@castano Anyway, that looks reasonable especially since I don't have an existing DDS writer, THANKS! Did you just throw this together now, or cut and paste from something existing?

Issues I see are:

(1) only writes float formats (which you just said don't work with nvcompress), I'll need to set up 8-bit R,RGB,RGBA (or does -rgb and -lumi do that?)

(2) maybe want higher-quality resampling, but maybe I can start the cube resample at double or quad res and rely on downsampling to clean it up

nothings ,

@castano (but the delta to writing 8-bit DDS is pretty small, I can do that myself, don't worry, you've done enough!)

I guess technically the supersampling wouldn't be via mipmap generation, but I can just run stb_image_resize2 to downsample to the correct size.

nothings ,

@castano got it working in uint8 and 3-channel works verified in RenderDoc (still have to write code to swap BGR, since no RGBX DXGI format, only BGRX, and to incorporate stb_image_resize2 to supersample). THANKS VERY MUCH, huge time savings!

For reference, converted to C pre-99, uint8 support: https://gist.github.com/nothings/8cb0a71317ba129ca0a30868c2de06f3

Now I just have to finish the DDS-to-OpenGL loader I started writing on Tuesday.

nothings ,

@castano Actually I guess RGBX isn't an issue, I can just write rgba and then use nvcompres bc1/bc1a/bc3/bc5 switches to determine whether to discard alpha channel?

Though I don't see a way to ignore alpha channel with BC7 except presumably with an explicitly 3-channel input file. But then again I'm probably not using BC7 any time soon.

nothings ,

@castano Dang, spoke too soon, renderdoc will open these 8-bit-per-channel DDS files but nvcompress won't. Not sure if I missed some change in the writer or if its limitations in what's supported? Maybe it expects non-DXGI-format DDS for plain 8-bit? I seem to remember seeing that in the spec that the "simpler" format is recommended for plain old images. I just did it this DXGI way since it was the smallest difference from the existing float writer.

nothings ,

@castano Nevermind, it's all good. I accidentally was writing the pf.size field with the pixel byte size instead of the pf structure size.

nothings ,

@castano because of my silly VC6 thing, precompiled cmdline apps are SO MUCH more useful to me than libraries, but I would expect most people to be on a continuum from here to there.

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

This alpha blending article made rounds today, I like it!
https://blog.pkh.me/p/43-the-current-technology-is-not-ready-for-proper-blending.html

But... it kinds bails out when it comes to solve the hard stuff, that is, how to blend shapes to buffer.

Are there any articles that try to even propose a solution that? What would a practical oklab pipeline look like?

Let's prune that down to render an UI, which is overlaid on a game viewport.

nothings ,

@MikkoMononen Iggy had to implement most Photoshop blending modes since they're supported by Flash. We implemented programmable blending by copying out a rectangle of the current rendertarget to a temp buffer and using that as input to the blend math, rather than swapping between multiple rendertargets. That made it cheaper to only update a small region of the screen.

nothings ,

@rygorous @MikkoMononen Oh yeah, I should've been clearer this was done as a stopgap more than because of potential benefit. But I'm pretty sure the performance thing is real because otherwise you have to copy the whole rendertarget when ping-ponging.

nothings ,

@rygorous @MikkoMononen I don't think we're talking about the same thing? If you're ping-ponging, everything you render to A needs to end up in B, even if that last blend is small.

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

@eniko had a post awhile back about "remember in DOS when you could load up qbasic and it could do text and graphics and music and sound all out of the box that was cool we should do that again but more modern"

At the time I said "That latter is a thing that's been gnawing on my own hindbrain for awhile. I haven't quite found the angle that really will wake me into a full project on it."

It's high time I refined that angle.

nothings ,

@mcmartin Surely a 'retrocoder' is someone for whom it's retro when they do it, not one who was there at the time, but:

I'm ok with explicit flush. Also, computers are fast so don't worry about API for partial updates. Also computers are fast so ok to constantly stream unused textures, though I don't think that's needed anyway? (At each 'flush', cache in RAM but don't upload until close to flip time.) If you cared about laptop battery, maybe, but then you don't want free-running worker anyway!

nothings ,

@mcmartin Okay, if you want to be interesting:

  1. thread that uploads texture once a frame "in the background" (technically this is probably main thread and USER is in the background)

  2. memory map "video mem" pages so you get page faults for automatic change detection (but page granularity, not dirty rects, unless you use invent weird memory layout). could upload 120/240 fps

  3. if user calls flip(), suspend auto-updating unless flip() is called less often than ~30 fps, for easy anti-tearing

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

OK Go - Impulse Purchase. Heavily featuring :blender: and geometry nodes, a collab with blender studio. Production file and some tech bits over here: https://studio.blender.org/blog/impulse-purchase-production-file/

https://www.youtube.com/watch?v=fwzbIUffcR4

nothings ,

@aras Neat!

(They missed an obvious chance to reference the morphing geometric shapes from my OK Go WTF video, but given that I'm the only person who would get that reference I guess I'm okay with it.)

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

Finally got my Keychron K5 Max. First impressions, it'll take some getting used to. It's low profile but still not low enough to rest your wrists on the desk like you can comfortably with a laptop keyboard, an Apple Keyboard or a Logitech MX Keys. So I'll probably have to get a wrist rest anyway.

nothings ,

@rygorous @pervognsen

"My keyb is a Keychron Q3 with Gazzew Boba U4 switches. My daily driver is Qwertykeys Neo 80 with Wuque WS Silent Tactiles"

nothings , to random

This is the article I learned how to program 3D from (I was 14 when it was published, and I probably read it within a few months of its publishing since my school library had a subscription). Also I didn't know Pascal.

https://byte.tsundoku.io/#198103-056

Via https://mstdn.io/@sohkamyung/115100687369384634

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

"Decoupled Fallback: A Portable Single-Pass GPU Scan": GPU prefix sum that is very close to performance of Decoupled Lookback (which is nvidia-specific) and is portable across various GPU archs. https://dl.acm.org/doi/10.1145/3694906.3743326 and code https://github.com/b0nes164/Decoupled-Fallback-Paper

(primary author, Thomas Smith, contributed faster GPU radix sort to UnityGaussianSplatting last year)

nothings ,

@aras sigh

pkhuong , to random

Randomly started thinking about fractional cascading on linked lists. I think that's just weird skiplist?

nothings ,

@pervognsen @rygorous @pkhuong I took two undergrad classes taught by the guy who invented skip lists, and I've still never used them.

@pervognsen@mastodon.social avatar pervognsen , to random
nothings ,

@pervognsen Ah, do you know of them? I'm still social media mutuals with the author of that article.

nothings ,

@pervognsen I was good online friends with the author of the original MOO (which was eventually used for LambdaMOO without the original author's involvement), and we bounced many ideas off each other while developing Sludge and MOO.

nothings , to random

For that weird, narrow segment of technically-minded programmers who want to know how we programmed 3D graphics in the 90s and also want to know about 80% of the stuff I programmed before RAD, I sat down for a 5 hour interview on the Wookash Podcast. https://www.youtube.com/watch?v=T1tXepGXDDM

nothings OP ,

@zeux I think the only major thing we didn't get to is Iggy, the flash player I wrote at RAD. I even set it up with my description of the Level 2 postscript effort (language interpreter + graphics engine, just like the flash player), and it'd be a fun follow-up to Tyler Glaiel's description of his flash player.

nothings OP ,

@aras Hope you find it not a waste of time!

@pervognsen@mastodon.social avatar pervognsen , to random

Deal infinite damage [in Magic: The Gathering], as long as the twin primes conjecture is true. https://www.reddit.com/r/BadMtgCombos/comments/1feps3y/deal_infinite_damage_for_4gru_as_long_as_the_twin/

nothings ,

@pervognsen A tiny bit unsatisfying that this turns out to hinge on a card that does multiple prime-number things.

@pervognsen@mastodon.social avatar pervognsen , to random

An old blog post (with working code) from @pkhuong that deserves to be reposted. How to print integers really fast: https://pvk.ca/Blog/2017/12/22/appnexus-common-framework-its-out-also-how-to-print-integers-faster/#an_itoa

nothings ,

@pervognsen Interesting that radix-100 is "attributed" to a Facebook in 2012. I was using radix-100 to print profile timing values in stb_iprof in 2003, and I imagine I'd heard of the idea somewhere else, but I dunno, maybe we're all just re-inventing it. (Certainly I don't think anyone else got it from iprof, although Jeff did get it from me for stb_sprintf.) http://silverspaceship.com/src/iprof/

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

Blog post about lossless float image compression (EXR, HTJ2K, JPEG-XL, mesh optimizer): https://aras-p.info/blog/2025/07/08/Lossless-Float-Image-Compression/

nothings ,

@aras There is nothing wrong with any of this, but:

When testing on an arbitrary workload (dataset) like this, might be nice to include a few graphs showing results for each individual image to see if there are any patterns.

On existing graphs, presumably you're effectively using arithmetic mean of all graphed parameters or something even worse (depending on how computed). Consider geometric mean instead, which is better at weighting each item in the dataset equally.

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

Continuing with EXR/HTJ2K/JPEG-XL comparisons for lossless float image compression. Here's a chart.

What's a "Mop" data point? That is mis-using @zeux mesh-optimizer vertex codec to compress an image. Arseny is a witch!

https://github.com/aras-p/test_exr_htj2k_jxl

Now, I'll continue talking with JPEG-XL people, and start talking with OpenEXR people I guess :)

nothings ,

@aras Do any of the "real" image formats implement parallel decompression?

@aras@mastodon.gamedev.place avatar aras , (edited ) to random

What are ffmpeg developers known for? Writing lots of good assembly code, perhaps.
What are they less known for? Keeping their enum values stable :)

https://trac.ffmpeg.org/ticket/11641 (the comments are lovely, eh)

nothings ,

@aras maddening

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

I was trying to find an old Channel 9 video and it turns out someone made an index with links to archive.org copies of all (?) the videos: https://walkingcat.github.io/ch9-index/

nothings ,

@cmik @pervognsen 20-ish years ago I bemaoned the fact that web browser innovation didn't include things like just saving a text-only copy of every web page you ever visited. 20 years later, yeah, still nope.

And google letting you control history would also be great.

@pervognsen@mastodon.social avatar pervognsen , to random

I saw some online discourse complaining about excessive AI rubberbanding in Mario Kart World. What's your favorite worst example of rubberbanding in games? Nevermind, we all know it's NBA Jam. It's not just the AI shooting better, all your own shots suddenly brick like crazy and even dunks will start to rim bounce.

nothings ,

@pervognsen FYI FWIW, this is just an informational addendum not a correction or contradiction. Robotron: 2084 (1982) was a framebuffer+blitter game. And it kind of shows? IIRC Defender (1981) was too, but its graphical structure seems more like something classic scanout graphics could do.

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

Maybe it's time for my annual Zig mini-project to see how things have improved. The language isn't an ideal fit for my needs (which are better filled by C or Rust depending on the use case) and the compiler was always super slow when I tried it in the past (e.g. significantly slower than rustc for small to medium size projects with no dependencies) so it was hard to justify. It sounds like their debug build backend has gotten a lot faster recently, which would help.

nothings ,

@pervognsen An old Twitter post I made when I was secretly working on a C compiler at RAD (which I ended up abandoning since working on Oodle was (quite reasonably) deemed more important).

The quoted tweet was something like "post an opinion that will get you dunked on by your peers".

(The C preprocessor I wrote eventually got repurposed at Epic to preprocess shaders.)

nothings ,

@pervognsen I suppose I could try making it again from scratch, but I have even less need for it. Maybe just to have it to point to as a performance target. That'd be using up a lot of my (presumably limited) remaining life to prove a point, though.

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

For those of you that are interested, I solved my problem by converting the up/down/right/left keyboard vector into an angle and then calling the same code the controller does. 2 lines solved and it all now uses the same code.

nothings ,

@grumpygamer If you allow more than one input method simultaneously, also make sure you can't move twice as fast by holding down keyboard controls AND controller.

@jplebreton@mastodon.social avatar jplebreton , to random

https://www.kpbs.org/news/border-immigration/2025/02/28/german-tourist-held-indefinitely-in-san-diego-area-immigrant-detention-facility this is obviously horrible, though its remark about how fiscally "inefficient" this completely unnecessary detention is assumes that the point of ICE et al is to efficiently detain people, rather than to intimidate everyone and make them afraid to enter this country. from the latter perspective, $5000/mo is well worth paying to maintain a state of ambient terror and random violence.

nothings ,

@jplebreton we can't expect anything from GDC. check out these fools:

nothings ,

@Doomed_Daniel @TomF @jplebreton Just to be clear, it's an old image from elsewhere that I repurposed, I didn't mean to emphasize b2b in this situation, just the whole image.

But while the expo floor may have always been b2b, traditionally we've emphasized the talks as the heart of GDC, and the talks are not and have never been "b2b" (although I suppose you could wrangle the meaning of "b2b" to match).