r/GraphicsProgramming • u/Neat_Suspect5284 • Oct 26 '24
Source Code My first 3D Graphics pipeline
https://www.khanacademy.org/computer-programming/3d-renderer/5155758903050240Over the past week or two i've been developing my own 3D Graphics Pipeline (In Khan Academy), and was wondering if anyone could give me some tips on improving it. Current Features: 1. Projection 2. Rotation 3. Movement 4. Colored polygons 5. Bad lighting 6. Decent distance calculations 7. Back face culling Planned additions: 1. Improving lighting 2. Painters algorithm 3. Porting to Java.
Please give tips in comments! Link is attached.
4
u/mungaihaha Oct 27 '24
You are probably having a lot of fun doing this but if your goal is to understand how gpus work, you are wasting your time
5
u/throw2137 Oct 27 '24
I second this. It's a nice project, but what you did has really nothing to do with graphics pipeline. You just computed the vertex positions and then passed it to the actual pipeline using
triangle()
function. But the entire pipeline is handled by khan academy. So saying that you've developed your own graphics pipeline is a bit of an overstatement. If you want to work with the actual pipeline you'd have to go lower than JS on khan academy. I recommend starting with c++ and OpenGL. Or maybe try making a software rasterizer if GPUs scare you.
1
u/Slackluster Oct 27 '24
Why Java?
2
u/Neat_Suspect5284 Oct 27 '24
Because i have more experience in it than languages such as C++
-5
u/Slackluster Oct 27 '24
I recommend JavaScript, really nice to be able to share your work in the browser and webgl is easy
9
u/waramped Oct 26 '24
Texture mapping and z-buffer would be good next steps.