Hacker News new | ask | show | jobs
by soylentgraham 1947 days ago
What do you want to make!

Starting with a software renderer is nuts.

Start with unity, make an unlit shader, start doing basic effects (in colours, then using texture samples) using uv coordinates. (In frag, ignore vertexes to start with). Just remember youre just colouring a pixel, on a bit of a surface.

1 comments

> Starting with a software renderer is nuts.

No, not really. You can write a simplistic ray tracer and rasterizer in about 10 - 50 lines tops:

https://github.com/d26900/JamaisVu/blob/main/tests.c

Lines 66 - 91.

The result/screenshot: https://github.com/d26900/JamaisVu

If this is "nuts", then so be it. Let me be nuts. :P

I wouldnt use line count as a metric to judge how sensible an approach it is for learning how to get into graphics programming.

The OP already cited shaders as one avenue, and shaders are so so easy to get immediate results from; as opposed to making a small mistake in a path tracer and spending hours debugging why your screen just shows one colour.

Need to debug where youve gone wrong with a shader? Return float4(uv,0,1) and its working again.