Nicol Bolas
  • Member for 5 years, 11 months
  • Last seen this week
Should new graphics programmers be learning Vulkan instead of OpenGL?
38 votes

Learning graphics programming is about more than just learning APIs. It's about learning how graphics works. Vertex transformations, lighting models, shadow techniques, texture mapping, deferred ...

View answer
What does "st" mean in the context of OpenGL?
Accepted answer
32 votes

The common names for the components of texture coordinates are U and V. However, because the next letter used (for 3D textures) is W, that causes a conflict with the names for the components of a ...

View answer
What are Metal and Vulkan?
24 votes

Metal and Vulkan are low-level 3D graphics APIs, in much the same way that OpenGL and Direct3D are 3D graphics APIs. Metal is Apple's API, usable on iOS and MacOS. Vulkan was developed by the Khronos ...

View answer
What's the main difference of pipeline process between Vulkan and DX12?
15 votes

D3D12 has 4 separate kinds of command lists: direct, bundle, compute, and copy. Vulkan has similar concepts, but they happen in a different way. Command buffers are allocated from command pools. And ...

View answer
Why can't I utilize multiple CPU cores with OpenGL like Vulkan?
Accepted answer
12 votes

Because the fundamental foundation of OpenGL makes multi-CPU-core submission impossible. OpenGL, at its core, is a synchronous API. Every OpenGL command behaves "as if" it were executed and completed ...

View answer
Help me grasp Anisotropic Filtering (AF)
Accepted answer
10 votes

To understand the nature of anisotropic filtering, you need to have a firm understanding of what texture mapping really means. The term "texture mapping" means to assign positions on an object to ...

View answer
What are the use cases for multiple render passes?
Accepted answer
9 votes

Instead of listing specific use cases, I will explain the technical limitations of a render pass structure which would prevent someone from putting all of their rendering within it. The use cases ...

View answer
Vulkan: Uniform Buffers versus Push Constants for static data
Accepted answer
9 votes

UBOs can be updated at any time with vkCmdUpdateBuffer From the specification: "vkCmdUpdateBuffer is only allowed outside of a render pass." So "at any time" is not the case. Even if it were ...

View answer
How to do error handling with OpenGL?
8 votes

While Debug Output is good, and manual glGetError usage is adequate, it's often better to employ a more dedicated tool for finding exactly where OpenGL errors came from. RenderDoc is probably the ...

View answer
Why does opengl perform clipping in clip coordinates?
Accepted answer
8 votes

The space after clip space is normalized device coordinate space, which is obtained by dividing clip.xyz by clip.w. If W is zero... oops. Oh sure, you could put a conditional test to see if W is zero ...

View answer
Binding vs bindless
Accepted answer
7 votes

When a shader accesses a resource (buffer or texture), it needs some information about that resource to be able to do so correctly. On a modern GPU, that information will generally just be some kind ...

View answer
Understanding VAO and VBO
7 votes

So my understanding of VBO they're essentially Buffer objects (bunch of bytes to be sent to the GPU) with the difference that VBO are specifically dedicated to Vertex Data. Is this correct? A "...

View answer
Is vkCmdPushDescriptorSetKHR efficient?
Accepted answer
7 votes

What you're ultimately trying to do is, between draw calls, change some state that allows one to select which set of read-only data to use in the rendering process. There are many techniques for this. ...

View answer
Why do identical polygons not z-fight in OpenGL?
Accepted answer
6 votes

There are explicit rules in the OpenGL specification about invariance guarantees. For the purpose of this discussion, these rules boil down to the following. Given a particular series of vertex ...

View answer
Clarifying vulkan glsl std140
Accepted answer
6 votes

The block should total up to 8320 bytes. No, it shouldn't. You use a uint[16] array. Well, std140 layout makes it clear that the array stride for any array is always rounded up to the stride of a ...

View answer
How to access several textures from huge amount of textures in a shader?
6 votes

Well, it's unlikely that 10,000 cubemaps could fit into memory at all (at 128x128x4-bytes-per-pixel, 10,000 cubemaps would require upwards of 4GB of RAM). But as far as the mechanism to use a large ...

View answer
Vulkan: how does host coherence work?
Accepted answer
6 votes

How does the driver know what to update/transfer and when? It doesn't. There is no transfer or update in that fashion. All memory allocated through a Vulkan device represents memory that some device ...

View answer
When does it make sense to use drawRangeElements
Accepted answer
6 votes

The problem glDrawRangeElements was invented to fix was effectively removed by the advent of vertex buffers. What glDrawRangeElements allows the implementation to do is to know exactly what range of ...

View answer
Shader storage buffer indexing by 4 bytes instead of 3?
Accepted answer
6 votes

Does anyone ahve[sic] any idea of where to start looking You fell victim to one of the classic blunders. Never use a vec3 in a UBO or SSBO. While vec3s take up 12 bytes, they always have the ...

View answer
Why use image load / stores instead of FBOs
Accepted answer
6 votes

Why would you use Images instead of Framebuffers? Image Load/Store is not intended to replace framebuffers. It's a feature that allows (relatively) arbitrary reading and writing to memory. So you ...

View answer
What does "Bidirectional" in BRDF mean?
6 votes

BRDFs are functions the define the distribution of the way light reflects off of a surface. They effectively answer the question, "given a light source here, how much light is reflected to me?" Well, ...

View answer
Fragment shader's output variables
Accepted answer
6 votes

It works almost exactly the same way as vertex shader inputs. In vertex shaders, you have inputs. And these inputs represent vertex attribute indices, the numbers you pass to glVertexAttribPointer ...

View answer
Can I use QueryPerformanceCounter to measure single draw or compute call performance?
Accepted answer
6 votes

That diagram includes a CPU block titled "wait for GPU". I do not see the part of your code that includes an equivalent command. Furthermore, even if it did include glFinish/glClientWaitSync/etc, ...

View answer
How am I able to perform perspective projection without a near plane?
5 votes

In this case, the geometry of similar triangles ABC and ADE is used to determine the height of D via the solution of DE. It is obvious that if the near plane is at 0 (AE=0), then a division by 0 ...

View answer
What's the difference between Clipping and Culling?
Accepted answer
5 votes

When it comes to graphics, the term "culling" by itself doesn't really have a single definition or location within the pipeline. The term is sometimes applied to primitives and it is sometimes applied ...

View answer
Async readback storage buffer
Accepted answer
5 votes

First, that's the wrong memory barrier. The barrier is for how you intend to use the memory, not how it was written to. I'd like to hide the latency by reading the data written by the previous ...

View answer
Why do polygons have to be "simple" and "convex"?
5 votes

Polygon rasterization (the conversion of the analog polygon data into a raster image) is a key operation in rasterization-based rendering. As such, performing this operation fast, and with predictable ...

View answer
For shader math, why should linear RGB keep the gamut of sRGB?
5 votes

In practice, when we say "linear RGB," we mean "sRGB without the gamma correction." It would be more correct to say that there is the "sRGB colorspace" and the "linearized sRGB colorspace", with the ...

View answer
What's the meaning of the "dynamic" in "high dynamic range"?
Accepted answer
5 votes

Dynamic, adjective: 1: pertaining to or characterized by energy or effective action; vigorously active or forceful; energetic: ... 4: of or relating to the range of volume of musical ...

View answer
Is there a DSA technique for transform feedback?
5 votes

There isn't a DSA way to bind buffers to the feedback buffer bindings. But that's because transform feedbacks are objects, and there is a DSA way to attach buffers to transform feedback objects: ...

View answer
1
2 3 4 5 6