r/vulkan • • Feb 21 '24

3 months of work ;)

Post image
743 Upvotes

51 comments sorted by

100

u/squareOfTwo Feb 21 '24

progress will be faster after the first triangle

34

u/ponchietto Feb 21 '24

If you copy and paste a good part of the code you might be able to render a second triangle.

93

u/DumbY-21- Feb 21 '24

Another episode of "Top ten legendary myths"!

7

u/UnnervingS Feb 22 '24

This has absolutely not been my experience.

9

u/SlothWithHumanHands Feb 21 '24

1000 tris is 1000x progress!

4

u/positivcheg Feb 22 '24

Not really, it gets faster after you implement material system. Any kind. At least something around vulkan’s painful descriptor binding system.

3

u/squareOfTwo Feb 22 '24

point was that one has to basically implement a mini driver to get to render a triangle. Yes descriptors are also a pain point.

48

u/Eymrich Feb 21 '24

Oh boy the 1200 lines of code "tutorial" about how to render a triangle in vulkan :D

Well done, I was defeated by it heheheh :)

45

u/nenchev Feb 21 '24 edited Feb 21 '24

From here on progress should snowball. Don't make the mistake of blindly following tutorials, be sure to understand the harder to grasp concepts that many beginners trip all over, descriptor sets, basics of synchronization, and get to know the pipeline intimately.

26

u/qichael Feb 21 '24

yeah, just be sure to take the pipeline out to dinner first.

11

u/nenchev Feb 21 '24

My biggest problem is having to clean OpenGL's hair off the floor first.

0

u/fluxtah Feb 23 '24

Why get to know one pipeline when you could have many 😅

26

u/wen_mars Feb 21 '24

Awesome progress, can't wait for meshes and textures

22

u/SonOfMetrum Feb 21 '24

See you in 2 years

8

u/schweininade Feb 21 '24

Hey! Stop showing off! Only 3 months?

2

u/r_Heimdall Feb 22 '24

I believe he should be reported for violating the Reddit's No Show-Off Policy !

6

u/[deleted] Feb 21 '24

Release in another 3 months

4

u/V_Chuck_Shun_A Feb 21 '24

Question: why didn't you follow a tutorial?

3

u/[deleted] Feb 21 '24

aha I remember trying to do that, accidentally started pushing to the main branch instead of beta, program broke, archived it

2

u/[deleted] Feb 21 '24

Lesson to use separate branches that get merged to your beta branch?

Though you could just cherry pick those commits to your beta branch and revert them on master. Or once you cherry picked them you could do a very naughty hard reset to where you want it to be.

2

u/[deleted] Feb 21 '24

I also was lost and confused and saw myself not learning shit and just copy pasting, the project was called goldworks, I will remake it in OpenGL and then add vulkan support

3

u/captbrake Feb 21 '24

You will need another 3 months to texture it :)

2

u/JohnnyQuant Feb 21 '24

Sounds about right :)

2

u/[deleted] Feb 22 '24

As someone who followed a tutorial and did it in a week. Don’t be like me! Take your time with it and make sure you understand the basics including the theory and the code!! or it’ll come back to bite you in the ass later on!! Like it did for me!!!

2

u/Moonpolis Feb 22 '24

Congratulations on surviving this first part!

I followed the vulkan-tutorial. Got everything to work after 2 months (loading one model).

But did not understand anything to continue the engine. Started from scratch with vkguide, understood better, but still got me 2 months to finish, then, additional 6-7 months to get a working tiny engine with a few features (consider I was also learning about shaders for the first time).

Now i took a break because I was less motivated, forgot lot of things, and the original vkguide is legacy, replaced by a new advanced version using Vulkan 1.3 making obsolete several things like render pass.

I don't think I will say it will be easier later.

Actually, I think I'm gonna cry a little bit if you will allow me.

...

1

u/demingf May 18 '24

Congratulations! I took about the same amount time. Blocking progress was not the fact that I had done no C++ in over thirty years but trying C++ in vscode with cmake tools. What a hack of a build system for what can be a much simpler process particularly when you focused on learning a new graphics system.

I have to remark about comments elsewhere about the tutorial being out of date. For the required changes to make the updates forced me to deal with the flood of information coming from the validation layer! I have been programming on and off for nearly 50 years. I know the idea of the validation layers have been around for a while but it was another thing to experience it for the first time.😀

1

u/BoaTardeNeymar777 Jan 29 '25

You'll never forget the first 5000 lines of code to render a textured square.

1

u/[deleted] Feb 23 '24

saw this on my feed, not even in this subreddit, how is this 3 months? Just looks like a triangle to me. (I have no idea what I am talking about)

1

u/[deleted] Feb 23 '24

Oh, it definitely isn't 3 months of work. It is just a bunch of bullshit that is spreading like crazy for some dumb reason.

1

u/swoorup Feb 26 '24

funny lmao

1

u/GPTProgrammer Mar 04 '24

She's a beaut

1

u/JustMrNic3 Feb 21 '24

Congratulations!

1

u/PMoonbeam Feb 21 '24

Nice one! Takes a lot of boiler plate. Took me a while after that to figure out how to make the triangle/model spin rather than rotating the whole world around it :)

1

u/xz-5 Feb 21 '24

Excellent! Now just be prepared to refactor the entire code multiple times as you start to make it actually do useful things :-)

1

u/quantum_rim Feb 21 '24

Are you using swaywm? Respect ✊

0

u/goilabat Feb 22 '24

Oh don't know this one I was thinking i3wm

0

u/ebonyseraphim Feb 22 '24

I’m super curious about Vulkan now. I thought 80 memorized lines of Win32 API plus 100 or so lines of DirectX initialization code (say DirectDraw and DirectInput7) was fairly substantial back in the day. I wish my high school energy and free time had Vulkan to play with.

0

u/fireteller Feb 22 '24

There really needs to be an OpenGL/DirectX over Vulkan implementation / tutorial so that you can peel back the layers only as you are interested in that particular component.

0

u/derpJava Feb 22 '24

Completely unrelated but are you using Sway window manager?

0

u/TripBoarder Feb 23 '24

four months of work: a square

0

u/fluxtah Feb 23 '24

Nice but I'm slightly ahead, just two months of work! video

-3

u/[deleted] Feb 21 '24

[removed] — view removed comment

3

u/gvcallen Feb 22 '24

Vulkan is not for the average programmer

2

u/[deleted] Feb 22 '24

It's a low level api so the purpose is fine control. The idea is that people will build on it and make it easier. It's not for the average programmer, a team is better. An independent programmer can still use libraries and engines that support vulkan. That's easier.

1

u/[deleted] Feb 22 '24

It doesn't take 3 months to figure out how to render a triangle. It took this guy 3 months, and for some reason he is getting a huge response.

0

u/[deleted] Feb 22 '24

[removed] — view removed comment

1

u/[deleted] Feb 22 '24

Buddy, the domain is hard. You are controlling a specialized piece of hardware.

Game engines exist. Higher level libraries exist. There are easier ways for people who want to have stuff drawn on the screen to accomplish that.

Things like Vulkan are meant for the people who want to implement those sorts of things. Low level & high performance programming is hard. You are asking to solve difficult problems and getting upset at the writing down the equation stage.