Hacker Newsnew | past | comments | ask | show | jobs | submit | suprjami's commentslogin

How on earth are these made?

One of my goals this year is to write a basic software 3D renderer from first principles. No game engine, no GPU. I'm looking forward to it.

OP's link is a good one, but if you want a different perspective (heh), there's https://gabrielgambetta.com/computer-graphics-from-scratch/i..., also from scratch, also for free. The name clash is unfortunate, I don't really know who started using it earlier :(

Good show, this is how I recommend doing it and have been teaching it for years.

It's quite unfortunate that basically everyone thinks 3D graphics necessarily implies rasterisation and using someone else's API, and I feel extremely lucky to have taught myself in a time when you could trivially display images by direct memory access (mode 13h), and to have focused on ray tracing instead of rasterisation.



build-your-own-x*, a popular compilation of "well-written, step-by-step guides for re-creating our favorite technologies from scratch", contains some.

* https://github.com/codecrafters-io/build-your-own-x


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

One Formula That Demystifies 3D Graphics


this is such a a nice video. but honestly understanding perspective divide intuitively is probably less than 1% of what 3d rendering is all about.

if you are looking for a resource for this, I did this exact thing last year through pikuma that man is the best software teacher online I have come across. Highly recommend his 3D software renderer course.

I agree 100% gustavo is such a great teacher. i tried scratchapixel before and its nice but it was with pikuma that everything finally clicked.

Gustavo here. Thank you for the mention!

Wow did not expect to get a thank you from the legend himself! Thank you for your great courses and the care and effort you put into them sir! :D

I have a pre-Ryzen AMD thin client which draws MAXIMUM 10W. Idle 5W. A lot less CPU power but still. 15W for a modern SBC is a joke.


STS - Shit Tier Support


Gimme a dark/light mode switch. CSS is allowed.


Use a checkbox, d. Define vars for light mode. Override when checked for dark mode with body:has(#d:checked) and can include the dark mode media query too


See https://lyra.horse/blog/2025/08/you-dont-need-js/, via https://news.ycombinator.com/item?id=45056878 (which discussion contains some deeper explanation).


Why would you build a switch instead of relying on the user’s system settings? The only reason I can imagine is that your dark/light mode is not usable/readable so it forces the user to switch


I often use different light/dark settings between apps and my system. Just because I want system UIs to be dark, for example, doesn't mean I want to read long pages of white-on-black prose on your blog.


Then you still don't need a switch on every website. Just set the browser to display the light version and have it ignore the system setting.


That's what we need, for browsers to have a setting to remember our light/dark preferences per-domain.

Seconded. Just because I like to have the browser toolbar dark and GitHub dark doesn't mean I also want to read lengthy articles (LWN) in thin white text on a black background.


My specific usage is a site to host my own internal training content.

I want to read it in dark mode and give users that option, but I want to present it in light mode because dark mode suffers poorly from video compression when screen sharing.

I currently have a JS toggle for it which uses local browser storage, but ditching JS would be nice if possible.


Having it default to the users preference is nice, but you should still provide an override. I sometimes use my browser in light mode while my OS is dark mode. Many times, I find the contrast for dark mode websites too low unless I’m in a totally dark room.


Because I don't want to toggle my whole system theme based on one special website.


Checkbox and :checked are your friends.


Great idea! Then you can move to a Chromium-based browser which has (checks notes) uBlock Origin Lite.

Oh.


While I agree with the sentiment that LLM coding can produce a lot of inefficient junk code which works with holes if you're lucky...

What you're describing is 7 days of productivity supported by probably 7+ years (or 27+ years) of experience and learning and getting things wrong and restarting over again.

It is definitely wonderful to see though.


Extremely cringe article.

The biggest thing to affect laptops in "decades" is solid state storage. No longer do you need to worry about killing your entire device simply by putting it down on a solid surface.

There are also plenty of other things like modern dense lithium ion batteries with 12+ hour runtimes, super power friendly CPUs of all architectures, the ultra-thin body and metal body popularised by Apple, LCD panels without ghosting, external power bricks instead of literally a PC power supply in a briefcase.

But yeah sure, the infinite slop plagiarism machine is coming. Gotta get some clicks!


Buy from listings with many sales and good reviews.

Look for reviews with real images and real seeming phrases in many languages, not 10 accounts all posting the same phrase with no pictures.

Buy from stores with a name, preferably who have established a "brand" for themselves across many products. UGreen are a great example of this for USB gadgets.

Don't buy from stores named Shop195772040, these will take your money and disappear or ship fakes. Don't buy suspiciously cheap items with no sales, these will do the same.


If you want to do it cheap, get a desktop motherboard with two PCIe slots and two GPUs.

Cheap tier is dual 3060 12G. Runs 24B Q6 and 32B Q4 at 16 tok/sec. The limitation is VRAM for large context. 1000 lines of code is ~20k tokens. 32k tokens is is ~10G VRAM.

Expensive tier is dual 3090 or 4090 or 5090. You'd be able to run 32B Q8 with large context, or a 70B Q6.

For software, llama.cpp and llama-swap. GGUF models from HuggingFace. It just works.

If you need more than that, you're into enterprise hardware with 4+ PCIe slots which costs as much as a car and the power consumption of a small country. You're better to just pay for Claude Code.


I was going to post snark such as “you could use the same hardware to also lose money mining crypto” then realized there are a lot of crypto miners out their that could probably make more money running tokens then they do on crypto. Does such a market place exist?


This is essentially vast.ai, no?


A quick glance at their homepage says they run in "secure datacenters", so no.


Then you glanced too quickly, vast.ai absolutely has non-datacenter GPUs.

https://vast.ai/hosting#gpu-farms-homelabs


Very interesting, thanks! Definitely something to consider for my environment.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: