Live data from Hacker News

Meta releases Intermediate Graphics Library

khronos.org

51–60 of 221 posts

Re: Meta releases Intermediate Graphics Library

#51
Darn, I opened the link and saw it was using Python. Sadly that seems to just be for the install process, for whatever reason.

Does anyone have any recommendations for an intermediate graphics library that uses Python and supports compiling your code to a WebGL target?

I'm interested in exploring SDF functions in a parametric CAD context, but coming from a Mechanical Engineering background. Not having to learn a new programming language for a side curiosity would be ideal.

Re: Meta releases Intermediate Graphics Library

#52
post #3

Not trying to shit on anyone, but that screenshot reminds me of 1990s/early 2000's games. I'm sure there has been a ton of work that went into it, but having some better textures or highlighting the usability would go a long way. Just based on the screenshot, I am not sure that I would even bother to dig too deeply into the library.

You are too kind. Mid to late 90s game. What is up with those shadows. I have written a 3D-engine with better image quality than this like 20 years ago. At least it is not a teapot.

> I have written a 3D-engine with better image quality than this like 20 years ago.

Well good news, it's not a 3d engine at all! It's a nice common API to cover all the existing graphics APIs.

Re: Meta releases Intermediate Graphics Library

#53
post #16
post #3

Not trying to shit on anyone, but that screenshot reminds me of 1990s/early 2000's games. I'm sure there has been a ton of work that went into it, but having some better textures or highlighting the usability would go a long way. Just based on the screenshot, I am not sure that I would even bother to dig too deeply into the library.

the screenshot could/should probably be better, but that doesn't mean the library is incapable of producing higher quality renders. I haven't dug in, but I am assuming this is basically Meta's WGPU. if so, these sorts of libraries are low level libraries abstracting different platforms that can be used to build high quality render pipelines on top of that can run anywhere. you could build an N64 quality rendering pip…

It does seem to be Meta's answer to WGPU.

The picture looks like they didn't have automatic tonemapping, the rendering equivalent of auto exposure control. So the picture is too dim. I brought it into a photo editor, saw that the top third of the intensity space was empty, used "Levels", and it looked much better.

That's a standard glTF test scene, called "bistro". Here's the same scene, rendered with Rend3/WGPU.[1] Here's the source code for that example.[2] Rend3 is a level above WGPU; it deals with memory management and synchronization, so you just create objects, materials, transforms, and textures, then let the renderer do its thing. Rust handles the object management via RAII - delete the object, and it drops out of the scene.

Looking at Meta's examples, there are too many platform-specific #ifdef lines. More than you need with WGPU. Probably because WGPU is usually used with something like Winit, which abstracts over different window systems.

We'll have to wait for user reports about performance. Meta didn't show any video. Here's a test video of mine using Rend3/WGPU on a town scene comparable to the "bistro" demo.[3] This is a speed run, to test dynamic texture loading and unloading while rendering. The WGPU people are still working through lock conflicts in that area. The idea with Vulkan land is that you should be able to load content while rendering is in progress. For that to be useful, all the layers above Vulkan also have to have their locking problems hammered out. Most open source game engines don't do that yet. Unreal Engine and Unity do, which is why you pay for them for your AAA title.

[1] https://raw.githubusercontent.com/BVE-Reborn/rend3/trunk/exa...

[2] https://github.com/BVE-Reborn/rend3/blob/trunk/examples/scen...

[3] https://video.hardlimit.com/w/sFPkECUxRUSxbKXRkCmjJK

Re: Meta releases Intermediate Graphics Library

#55
post #43

If you're looking for something like this, Sokol is a much simpler alternative: https://github.com/floooh/sokol It doesn't support vulkan though, but if that's important to you you're probably much better off just using vulkan directly since it's supported on all the major platforms.

What about https://github.com/gfx-rs/wgpu It is written in Rust

wgpu is great and worth considering

Re: Meta releases Intermediate Graphics Library

#56
post #36

For an intermediate library, it doesn't actually seem to be very much backend-independent. At least the desktop sample [1] has a disappointing amount of code paths with parallel implementations for OpenGL and Vulkan, switched at compile time using "#if USE_OPENGL_BACKEND". I guess this means that this sample will use OpenGL rather than Metal on macOS? They claim there's a Metal backend, but how would one enable that…

Those seem to be mainly platform-specific initialization things, like creating a window and rendering context. That's pretty normal for these types of rendering libraries which don't include a full blown portable windowing API.

If you use something like SDL, you'll probably be able to minimize the platform-specific stuff.

Re: Meta releases Intermediate Graphics Library

#57

Can someone explain the significance of this? I do WebGL development and I believe there is already an intermediate layer called Angle that WebGL compiles to. The Angle layer decouples the hardware from the software and allows hardware vendors to develop drivers that run Angle and shader languages to target Angle without the two needing to know anything about each other. (Not sure if that's right?) This seems like an…

Angle is ultimately a OpenGL|ES implementation on top of other APIs since webgl is pretty close to GLES, but desktops don't typically implement GLES. This (IGL) is more a layer sitting on top between your app and the system provides API since pretty much every system has a different blessed API these days: Browser:WebGL/WebGPU, Windows:DirectX/Vulkan, Mac:Metal, Linux/Android:Vulkan, Consoles: Proprietary APIs like N…

So then the full stack for using IGL in browser (on Windows at least) would be App Code -> IGL -> WebGL -> ANGLE -> DirectX -> Hardware device?

Owie

Re: Meta releases Intermediate Graphics Library

#60
post #20
post #3

Not trying to shit on anyone, but that screenshot reminds me of 1990s/early 2000's games. I'm sure there has been a ton of work that went into it, but having some better textures or highlighting the usability would go a long way. Just based on the screenshot, I am not sure that I would even bother to dig too deeply into the library.

"Just based on the screenshot, I am not sure that I would even bother to dig too deeply into the library." Adding any PBR materials as samples would have been the wrong choice, since those are not hardware or graphics api dependent, and are always for the implementor to implment by themselves. You don't want a graphics api to look nice at this abstraction level. You get access to device resources, shader API etc. Onc…

> Adding any PBR materials as samples would have been the wrong choice, since those are not hardware or graphics api dependent, and are always for the implementor to implment by themselves.

That "bistro" image is all PBR materials, represented in glTF. It's supposed to look the same for all standards-compliant glTF renderers, and it pretty much does. I posted the same scene in another renderer above. It's a brightly sunlit scene with no environment shaders, so it looks rather blah. glTF and Vulkan can do more than that, but this is all the test example asked for.

Post reply on HN