frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Software rendering in 500 lines of bare C++

https://haqr.eu/tinyrenderer/
31•mpweiher•1h ago

Comments

t1234s•30m ago
I jumped when the first image loaded on the page.. didn't expect that.
hnlmorg•17m ago
What image was that? The first image I get is a headshot.

Personally I’d have gone with a teapot as my demo but I don’t see anything shocking about the model the author chose.

mito88•6m ago
> I jumped when the first image loaded on the page.. didn't expect that.

mbappe'?

bob1029•16m ago
I wish we could have just one of these tutorials properly cover the concern of triangle clipping. This is the part that I struggle with the most in a software renderer. If you are going to be building a practical one, this is something you will eventually have to deal with, even for super basic scenes. Any time geometry intersects the view frustum you need to clip those triangles.
delta_p_delta_x•3m ago
The easiest way is to actually... not clip, trivially discard triangles that are outside the viewing frustum, and forward the rest to the rasteriser. With pixel-level hierarchical clipping and guard-band clipping (which is what is actually done in most hardware nowadays), one can use bounding boxes and barycentric coordinates to straightforwardly rasterise fragments.
articulatepang•11m ago
I went through this a few months ago in Rust. I wrote all the code by hand, no LLMs. Then I went ahead and added a small "game" on top, plus some special effects like pixelization shaders and chromatic aberration at the edge of a flashlight.

https://github.com/kshitijl/tinyrenderer-rs

if anyone is interested! The repo has lots and lots of in-progress screenshots so you can see the renderer come to life, plus all the hilarious visual bugs along the way.

I learned a lot! My biggest lesson, other than the specifics of how rendering works, was that modern CPUs are really fast: a single-threaded CPU renderer can definitely run an interactive 3D game with some fancy special effects.

chrisjj•1m ago
[delayed]

Astronomers may have found the first exomoon

https://www.eso.org/public/news/eso2610/
81•MarcoDewey•1h ago•36 comments

Private healthcare makes industries less innovative. It's time for change

https://werd.io/private-healthcare-makes-industries-less-innovative-its-time-for-change/
95•benwerd•1h ago•60 comments

Software rendering in 500 lines of bare C++

https://haqr.eu/tinyrenderer/
31•mpweiher•1h ago•7 comments

AI Companies Are Trying to Hide a Staggering Amount of Debt

https://futurism.com/artificial-intelligence/ai-companies-hide-debt-off-balance-sheet
185•technewssss•2h ago•88 comments

Writing by Hand is Good for your Brain

https://nealstephenson.substack.com/p/writing-by-hand-is-good-for-your
49•dwwoelfel•53m ago•2 comments

Scanning for Pangram Errors

https://veryfineprint.substack.com/p/scanning-for-pangram-errors
40•jsnell•6d ago•24 comments

Terence Tao's ChatGPT conversation about the Jacobian Conjecture counterexample

https://chatgpt.com/share/6a5fdc7a-d6f8-83e8-bbea-8deb42cfed56
1024•gmays•21h ago•587 comments

The Telegarden (1995-2004)

https://goldberg.berkeley.edu/garden/
15•zetamax•2d ago•2 comments

Cruller: Bun's Zig Runtime, Continued on Zig 0.16

https://ziggit.dev/t/cruller-buns-zig-runtime-continued-on-zig-0-16/16734
125•Erenay09•9h ago•86 comments

The Unity CLI: manage Unity from your terminal

https://unity.com/blog/meet-the-unity-cli
52•nateb2022•1d ago•15 comments

Quality non-fiction books are the antithesis of AI slop

https://resobscura.substack.com/p/quality-non-fiction-books-are-the
454•benbreen•1d ago•220 comments

Everyone should know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
555•WadeGrimridge•21h ago•203 comments

Show HN: Bento - An entire PowerPoint in one HTML file (edit+view+data+collab)

https://bento.page/slides/
944•starfallg•23h ago•217 comments

Alphabet's cash burn raises alarm for Big Tech as AI spending climbs

https://www.reuters.com/business/retail-consumer/alphabets-cash-burn-raises-alarm-big-tech-ai-spe...
191•1vuio0pswjnm7•2h ago•184 comments

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
584•syrusakbary•21h ago•116 comments

Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot

https://jointhefreeworld.org/blog/articles/emacs/emacs-eglot-scala-kotlin/index.html
118•jjba23•2d ago•96 comments

Are AI labs pelicanmaxxing?

https://dylancastillo.co/posts/pelicanmaxxing.html
635•dcastm•21h ago•237 comments

OpenStreetMap: Admin_level for All Countries

https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative#Table_:_Admin_level_for_all_cou...
4•ivanjermakov•4d ago•0 comments

Protecting our FLOSS commons from LLMs

https://blog.codeberg.org/protecting-our-floss-commons-from-llms.html
155•acmnrs•14h ago•97 comments

ANSI escape injection in MCP servers: Hidden from humans, visible to AI

https://brightsec.com/research/detecting-ansi-escape-sequence-injection-in-mcp-servers-with-dast/
42•xgpyc2qp•2d ago•23 comments

Test-time training 3D reconstruction

https://github.com/Inception3D/TTT3R
22•soupspaces•1w ago•2 comments

Making

https://beej.us/blog/data/ai-making/
417•erikschoster•23h ago•169 comments

I Regret Migrating to Codeberg

https://xn--gckvb8fzb.com/i-regret-migrating-to-codeberg/
49•boramalper•1h ago•28 comments

The startup's Postgres survival guide

https://hatchet.run/blog/postgres-survival-guide
478•abelanger•1d ago•206 comments

Amiga 1000: Ten years ahead of its time

https://dfarq.homeip.net/amiga-1000-ten-years-ahead-of-its-time/
139•giuliomagnifico•9h ago•125 comments

Frequently Asked Questions on Expertise

https://jtpeterson.substack.com/p/faq-on-expertise
30•surprisetalk•3d ago•3 comments

Show HN: Cactus Hybrid: We taught Gemma 4 to know when it's wrong

https://github.com/cactus-compute/cactus-hybrid
170•HenryNdubuaku•21h ago•37 comments

John C. Dvorak has died

https://twitter.com/na_announce/status/2079952538040672302
867•coleca•19h ago•287 comments

Making ASCII Art in Vim

https://alexyang.dev/vim-ascii-art/
105•evakhoury•2d ago•14 comments

Malleable Computing, Emacs, and You

http://yummymelon.com/devnull/malleable-computing-emacs-and-you.html
137•kickingvegas•18h ago•41 comments