9 ms·
Ray Tracer Sandbox in Vulkan
- shmerl 6y agoThe only outliers who didn't adopt Vulkan today are MS, Sony and Apple. MS and Apple have very lock-in minded people among those who decide this. Not sure what stops Sony from doing it. Things went better with OpenXR.
- m-p-3 6y ago.
- pjmlp 6y agoSony already has several low-level APIs, much easier to use than Vulkan and precede it.
- bch 6y agoAre you talking about gnm, gnmx[0] ? [0] https://en.wikipedia.org/wiki/PlayStation_4_system_software https://en.wikipedia.org/wiki/PlayStation_4_system_software
- pjmlp 6y agoYep. It is kind of DirectX 12 like, with a shading language similar to HLSL. Also Switch is always referred as an example of Vulkan support, they also do OpenGL 4.6, but what really matters for native titles on the platform is NVN.
- Arelius 6y agoAnd I'm not sure that it actually has Vulkan support. Can confirm that OpenGL is at least technically supported.
- bazooka_penguin 6y agoThey already had a low level graphics API for ps4, GNM, before Mantle. In fact, EA DICE's Johan Anderson who did most of the groundwork for mantle, said he got his ideas from working with console APIs. At the time he was working on the mantle spec it probably would have been the xbox 360 or ps3 APIs or an early form of the ps4 API. The X1 didn't launch with a low level API, but they provided one some time before 2014 according to a Metro Redux dev
- shmerl 6y agoAMD also makes chips for Xbox, so that isn't really a reason for them. I haven't seen Sony saying they want Vulkan to succeed. Like MS with DX12 and Apple with Metal, they are so far stuck with their GNM.
- pjmlp 6y agoAmong several embedded OEMs and the whole CAD/CAM and scientific industry focused on OpenGL/DirectX, without any patience to deal with low level idiosyncratic of Vulkan and its increasing amount of extensions every month, which is why Khronos decided to try to advocate Vulkan to them via ANARI. Let see if it as successful as OpenCL 2.x that had to reboot back into OpenCL 1.2 for version 3.0. OpenXR doesn't define the 3D APIs, it is just device management, one can use it with whatever APIs one feels like it. And then there is Hollywood switching to CUDA based render farms, like OTOY, because Vulkan Compute doesn't deliver what they need.
- Arelius 6y agoEveryone says Nintendo supports Vulkan. But that wasn't actually the case outside of marketing materials in the past, and nobody has confirmed that this has changed since.
- jsheard 6y agoThe Switch went through Vulkan 1.0 conformance testing, and then again for Vulkan 1.1 and 1.2 https://www.khronos.org/conformance/adopters/conformant-products#submission_521 https://www.khronos.org/conformance/adopters/conformant-prod... There's also a platform integration extension attributed to NVIDIA and Nintendo https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_NN_vi_surface.html https://www.khronos.org/registry/vulkan/specs/1.2-extensions... Seems unlikely they would go to that trouble if Vulkan weren't actually exposed to developers
- Arelius 6y agoSo who does that leave? Linux, Android and Stadia? And maybe Nintendo? There is about as much not supporting it as are.
- Teledhil 6y agoWindows 7 to Windows 10 also have vulkan support. You can use vulkan on Mac and iOS using MoltenVK.
- shmerl 6y agoEverything except these outliers. I have no doubt lock-in will die out in time there as well.
- Arelius 6y agoYou've failed to mention what those are. It seems to me to be the case that "these outliers" are in fact the rule. As a rendering engineer, I have lots of doubt that those vendors will move away from their proprietary APIs, they provide significant advantages, and from anecdotes from around the industry, I think this state is preferred by engineers in AAA development, which I think is where much of the forces in the industry come from.
- slx26 6y agothere are two gifs that are very nice, but extremely heavy, almost 80MB together. you might not want to load that on mobile data
- Sohcahtoa82 6y agoWhy would they use GIF instead of HTML5 video? Could have significantly reduced file size.
- speedgoose 6y agoYou can't embed videos in Github's markdown.
- gallerdude 6y agoOff-topic, is there any mid-level 3D API that I can plug vertices into directly? Everything that I see is either super-low level (Vulcan, OpenGL) or super-high level (Unity).
- jleahy 6y agoLike it or not, the answer is probably OpenGL. If you go with version 3.3 (a good choice in my opinion) and then it's really only a few function calls and you're submitting vertices, and it's going to be supported on any platform. Use glfw and you don't need to worry about platform stuff (creating windows is a pain otherwise). Counting the lines of a renderer I have lying around it's 300 lines (including much whitespace). That's very full functioned, it correctly positions the window in the center of the monitor, handles errors properly, takes mouse and keyboard input, sets up the view/projection matrices, uses shaders, etc.
- phendrenad2 6y agoAgreed. And despite being "deprecated", the "fixed-function" OpenGL 1.x API is still implemented on all major platforms (for now?), and it's even more high-level (although your graphics may look somewhat dated). Plus you can mix/match API levels (I think), so you can start with 1.x and move some things to 3.x/4.x style OpenGL when you need shaders. I wish Vulkan wasn't a huge steep learning cliff in comparison.
- jleahy 6y agoIt'll be there forever (compatibility), but the problem is there's not a lot of overlap between 1.x and 3.x/4.x. I think people are better sticking to the 3.x core profile. Shaders just aren't that hard and fixed function is a really outdated way of thinking. Generally I'd also say stick with 3.x (rather than 4.x) unless you need tesselation shaders.
- moron4hire 6y agoI believe with the latest versions of the APIs, the fixed function pipeline stuff is now emulated in the programmable pipeline, but the two don't mesh well, so you end up with particularly bad performance. I've had to find and install the old DX9 runtime to get some older games to run at reasonable frame rate.
- waiseristy 6y agoI had no idea someone wrote a Vulkan backend for ImGUI. Very useful! https://github.com/Zielon/PBRVulkan/blob/master/PBRVulkan/RayTracer/src/ImGui/imgui_impl_vulkan.cpp https://github.com/Zielon/PBRVulkan/blob/master/PBRVulkan/Ra...
- Impossible 6y agoImGUI has backends for every graphics API in regular use, and some that might be considered deprecated (DX9). Including game engine abstraction layers in Unreal and Unity and console properietrary APIs (not public, of course). Here's a full list of public graphics APIs and windowing systems part of the official release (https://github.com/ocornut/imgui/tree/master/backends https://github.com/ocornut/imgui/tree/master/backends). Maybe with the exception of stb_image, it's only of the most integrated open source libraries in games and graphics
- greggman3 6y agoit's a mistake to think Dear ImGUI has "backends". Dear ImGUI is a few files that generate a vertex list. It then as a bunch of "examples" that show how to render that list with various APIs. Any slightly competent graphics programmer could take that vertex list and render it in any API. Those Examples are not Dear ImGUI. They are just examples. This is the code for each command list upload vertex data upload index data set scissor bind texture draw That's it! Adapt that to any API, whatever your using Because it's an example and because so many unexperienced programmers use it they assume it's some official part of the library. It's not.
- nitrogen 6y agoYou both seem to be right, based on this commit message: > Moving backends code from examples/ to backends/… 24 days ago
- greggman3 6y agoMoving them from examples to backends doesn't change anything. That's likely just a sign that "examples" is now examples of using the API, not examples of integrating with some GPU API. One of the main reasons/goals/points of Dear ImGUI is being able to ingrate it into existing projects. It's deliberately API agnostic. It generates a very simple command list that you can then trivially render yourself in your own engine. Everything else, all the platform specific code in the repo is entirely there to help people understand how to use it or to get started. It's a mistake to think otherwise because it incorrectly limits Dear ImGUI's perceived usefulness. If you believe you have to take a backend or use one of the APIs provided then you'll mistakingly believe it would be hard to put in your existing game. If you understand what it's really about then it's trivial to put it in almost anything. That is by design.
- jlarocco 6y agoPerfect timing! I just got a new machine with a Quadro RTX4000 card, and I've been looking for example code to see what it can do. It still blows my mind that Mandelbrot fractals (and now ray tracing) that would take 10s of minutes to render at 640x480 on my first computer, now render at 60fps on a 4k display with real-time panning/zooming.
- thdrdt 6y agoIt is true that hardware became very fast. But is also amazing raytrace algorithms improved over time. So both hardware and software make real-time raytracing possible. A very nice 'guide' for papers that make software improvements possible is the YouTube channel 2 minute papers.
- hyperpallium2 6y agoDon't Mandelbrot fractals take longer the more you zoom in, because more iterations are needed to distinguish detail? (IIRC correctly from when I played with implementing them)
- saagarjha 6y agoCould you "shortcut" it by taking advantage of the fractal nature?
- ChrisLomont 6y agoNot really. They’re self similar, not self identical, so determining detail takes increasingly more computation as you zoom in.