Live data from Hacker News

I learned Vulkan and wrote a small game engine with it

edw.is

31–40 of 268 posts

Re: I learned Vulkan and wrote a small game engine with it

#31
post #14

I think vulkan is great, but its only purpose is to take full advantage of advanced GPU features. It also leads to better performance when using advanced GPU features compared to OpenGL. Generally, I feel OpenGL is the recommended route if you don't really aim for advanced rendering techniques. There are plenty 2D /lowpoly/ps1-graphics games right now, and those don't need to use vulkan. Vulkan is an example of how t…

It's not just about performance, I think one of the reasons for moving away from OpenGL is that the High level functions are inconsistent across driver implementations/GPUs. Whats the point of an abstraction layer if you keep having to write GPU/driver specific code. Its better to have a low level driver and a high level library instead.

Re: I learned Vulkan and wrote a small game engine with it

#32
Great writeup! I learned Vulkan myself so that I could write a scientific data visualization engine (https://datoviz.org/ still quite experimental, will release a newer version soon). I had some knowledge of OpenGL before and learning Vulkan was SO hard. The learning resources weren't that great 5 years ago. I took up the challenge and it was so much fun. It took me months to understand the role of the various dozens of abstractions. In the process I wrote a small wrapper around Vulkan (https://datoviz.org/api/vklite/) to make it a bit less painful to work with (it supports a subset of the features, those that are the most required for scientific visualization purposes).

Re: I learned Vulkan and wrote a small game engine with it

#33

hey just curious, any reason why some of these articles I see from time to time don't apply some simply CSS? I don't mind the raw html, I'm mostly wondering if there's some benefit to it that I might not be aware of.

The site definitely has CSS, just not a lot of it.

Re: I learned Vulkan and wrote a small game engine with it

#34
post #29
post #21

Earlier quoted context omitted.

> only supported on about 28% of reports. This information is misleading because it includes old reports from years ago, before this feature existed. It does NOT mean that 28% of devices out there have support. You will need Steam hardware survey results and cross reference gpuinfo.org or Android hardware survey results which directly list Vulkan versions. Dynamic rendering is available on all desktop GPUs (Intel, NV…

I get your point. But you might be surprised how many PCs are still in use that have pre-Skylake Intel IGPs. Some people just don't update their drivers, either.

Pre-Skylake Intel never had proper Vulkan support (on Linux at least) so it's a non issue.

I use a 2015 Skylake laptop for most of my graphics programming project and it's got full Vulkan 1.3 and wide set of features. The hardware doesn't do mesh shaders or Ray tracing but apart from that every new feature is available.

Not updating drivers is a problem, especially on mobile. Thankfully auto updaters are very common these days.

Re: I learned Vulkan and wrote a small game engine with it

#36

Earlier quoted context omitted.

A middle ground is webgpu. It is much less verbose than Vulkan and is guaranteed to run anywhere, including the browser. At the same time, it has access to "modern" features like compute shaders which would not be available in webgl. It also doesn't have much legacy cruft leading to multiple ways of doing the same thing, unlike opengl. The main advantage is that it's new, so there are many fewer tutorials available f…

It's a JavaScript API, it only runs in the browser. It's not real.

That's just not true. https://wgpu.rs/

I'm literally writing native code running on linux with winit and wgpu right now.

Re: I learned Vulkan and wrote a small game engine with it

#37
This might come off as a surprise to some people but getting good performance with Vulkan (compared to say OpenGL) isn't trivial because:

the Vulkan driver is missing that ~20k loc of code that OpenGL driver does for you to set up the rendering pipelines, render targets etc.

This is all code that already exists in the OpenGL driver and has been optimized for +20 years by the best people in the industry.

So when you start putting together the equivalent functionality that you get out of the box with OpenGL on top of Vulkan doing it the naive way doesn't magically give you good perf, but you gotta put in some more work and then the real problems start stacking up such as making sure that you have all right fences etc synchronization primitives in place and so forth.

So only when you actually know what you're doing and you're capable of executing your rendering with good parallelism and correct synchronization can you start dreaming about the performance benefits of using Vulkan.

So for a hobbyist like myself.. I'm using OpenGL ES3 for the simplicity of it and because it's already good enough for me and I have more pressing things to matter than spend time writing those pesky Vulkan vertex descriptor descriptor descriptors ;-)

Btw this is my engine:

https://github.com/ensisoft/detonator

Re: I learned Vulkan and wrote a small game engine with it

#38
post #14

I think vulkan is great, but its only purpose is to take full advantage of advanced GPU features. It also leads to better performance when using advanced GPU features compared to OpenGL. Generally, I feel OpenGL is the recommended route if you don't really aim for advanced rendering techniques. There are plenty 2D /lowpoly/ps1-graphics games right now, and those don't need to use vulkan. Vulkan is an example of how t…

A middle ground is webgpu. It is much less verbose than Vulkan and is guaranteed to run anywhere, including the browser. At the same time, it has access to "modern" features like compute shaders which would not be available in webgl. It also doesn't have much legacy cruft leading to multiple ways of doing the same thing, unlike opengl. The main advantage is that it's new, so there are many fewer tutorials available f…

I thought its browser support was pretty bad? https://caniuse.com/webgpu

Firefox and Safari don't support it yet. And how would you even deploy it to Steam (edit: or rather, make a desktop or mobile game with it)? Can you wrap it in a webview?

Doesn't seem mature...

Re: I learned Vulkan and wrote a small game engine with it

#39

Earlier quoted context omitted.

It's a JavaScript API, it only runs in the browser. It's not real.

That's just not true. https://wgpu.rs/ I'm literally writing native code running on linux with winit and wgpu right now.

Wait, is that the same as using WebGPU? It says outside of browsers it uses opengl and vulkan and directx.

Re: I learned Vulkan and wrote a small game engine with it

#40

hey just curious, any reason why some of these articles I see from time to time don't apply some simply CSS? I don't mind the raw html, I'm mostly wondering if there's some benefit to it that I might not be aware of.

Just a guess, but the folks interested in low level graphics programming are probably the same people who would want to stay away from bloated frontends?

A simple blog post doesn't need super fancy design when its content can speak for itself.

Post reply on HN