23 votes
Accepted

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Speed is the most common reason why this is not done. In fact you can do what you propose, if you make your own operating system, its just going to be very slow for architectural reasons. So the ...
joojaa's user avatar
  • 8,437
20 votes

When is a compute shader more efficient than a pixel shader for image filtering?

John has already written a great answer so consider this answer an extension of his. I'm currently working a lot with compute shaders for different algorithms. In general, I've found that compute ...
bernie's user avatar
  • 830
18 votes
Accepted

Performance of Compute Shaders vs. Fragment Shaders for Deferred Rendering

After more analysis, the TL;DR here is that, yes, the slowdown is due to memory locality, and yes the pixel order is to blame. More interestingly, by writing the shader differently, we can greatly ...
geometrian's user avatar
  • 1,980
14 votes

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

work on any 32-bit color GPU (even old ones)? Bit of history here: this is how games were done on PC up until graphical accelerators started to become available in the mid-90s. It did indeed work on ...
pjc50's user avatar
  • 241
14 votes

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Just to add to joojaa's answer, things are still being drawn pixel by pixel. You're just generating the pixels using a vertex shader/assembler/rasterizer, then texturing and lighting them using a ...
russ's user avatar
  • 2,392
9 votes
Accepted

What methods/technologies to reduce required performance for virtual reality are there?

Avoid stereo when possible There was some research published recently measuring when users can or cannot tell whether the specular contribution, which is view point dependent, is different between ...
Julien Guertault's user avatar
7 votes

What methods/technologies to reduce required performance for virtual reality are there?

Alex Vlachos from Valve has had two great GDC talks about this: the one from 2015 the one from 2016 Other than that (and what you have linked yourself), there isn't much left to do than to simply ...
IneQuation's user avatar
6 votes
Accepted

Can I use QueryPerformanceCounter to measure single draw or compute call performance?

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 ...
Nicol Bolas's user avatar
  • 9,792
6 votes
Accepted

Tasks of a professional graphics programmer?

I don't know if this is exactly what you're looking for. I work tangentially in the film and TV industry. I don't work for a studio, but I work on the software that studios use for their productions. ...
user1118321's user avatar
  • 3,411
6 votes
Accepted

Dealing with wasted space when using SIMD on CPU for vector maths

There's a third option you've neglected. Because of how graphics APIs work, typically you have to copy the data between the CPU and GPU anyway - even if you're on a mobile SoC where they share the ...
Dan Hulme's user avatar
  • 6,810
5 votes
Accepted

How can an OpenGL visualization run for weeks?

Opengl doesn't care how long it has been running. However there are a few other challenges with long running applications in general: memory leaks, both normal ones and opengl resources. lack of ...
ratchet freak's user avatar
5 votes

Performance impact during texture layer loading

From the way the problem only manifests when you start overwriting previously used texture tiles, I suspect you're running afoul of some driver heuristic that's attempting to manage the lifetime of ...
Nathan Reed's user avatar
5 votes
Accepted

Do modern GPUs contain barrel shifters?

Yes ( with 50% of the FMA 32b throughput on nVIDIA Maxwell). See https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#arithmetic-instructions
Fabrice NEYRET's user avatar
5 votes

When is a compute shader more efficient than a pixel shader for image filtering?

I stumbled on this blog: Compute Shader Optimizations for AMD Given what tricks can be done in compute shader (that are specific only to compute shaders) I was curious if parallel reduction on ...
maxest's user avatar
  • 66
5 votes
Accepted

Register pressure in Compute Shader

Lowering register pressure doesn't necessarily give you any performance boost though. I recently went through this exercise myself on GCN architectures (for a simple ray tracer) and reduced register ...
JarkkoL's user avatar
  • 3,636
4 votes
Accepted

How does everyone count "Rays per Second"?

I've seen both, unfortunately. I'm not fond of rays per second as meaning exclusively primary rays and I'd suggest "paths per second" or better yet "samples per second" instead. "Complete ray" is not ...
Karl Schmidt's user avatar
4 votes

Estimating the area of a triangle-circle intersection

Working Towards an Exact solution Just some quick thought before I must run! Ok, let us turn the problem on its head. What if one does not calculate the area of the triangle cut by the circle. ...
joojaa's user avatar
  • 8,437
4 votes
Accepted

Optimizing performance on hardware

Although you may be able to detect what hardware is available as a first approximation of a computer's capability, depending on this might not be useful since the same hardware may behave differently ...
trichoplax is on Codidact now's user avatar
4 votes

Challenges of Offline Rendering

Since you've used the "path tracing" tag, I'm assuming you're thinking mainly about light transport. At SIGGRAPH 2015, there was a course on the topic of path tracing in movie production that may be ...
Stefan Werner's user avatar
4 votes

Are MMORPGs, specifically WoW, limited by their latency in terms of FPS?

Online games do not work the way you describe. The server doesn't give the client one frame's worth of data every frame. That would be awful. Instead, every client has its own copy of the game state, ...
Dan Hulme's user avatar
  • 6,810
4 votes

Should you measure mesh complexity in triangles or vertices?

Since you're talking about "vertex shaders" and "fragments", I assume that your question is to be interpreted in the context of real-time rendering using the graphics pipeline on a modern GPU through ...
Michael Kenzel's user avatar
4 votes
Accepted

Can meshes be reused in raytracing?

Example code tends to be bad code from a performance (or even software engineering) standpoint because... it's an example. Its primary purpose is to make it clear how to do a thing, not to do it in an ...
Nicol Bolas's user avatar
  • 9,792
3 votes

Dealing with wasted space when using SIMD on CPU for vector maths

While the existing answer adress your question quite well, I'd like to add some general advice, even if you might already be aware of that. Rather than just wasting that fourth component on the GPU, ...
Christian Rau's user avatar
3 votes
Accepted

Challenges of Offline Rendering

From the presentations on non real time rendering I've seen at SIGGRAPH, the answer is basically yes, a lot of time is spent making render times faster. For instance, even with huge amounts of ram, ...
Alan Wolfe's user avatar
  • 7,801
3 votes

How can an OpenGL visualization run for weeks?

Yes, of course. The duration it has to run for doesn't make much difference. Your Android smartphone's main GUI is OpenGL, and phones typically have an uptime longer than four weeks. Air Traffic ...
Dan Hulme's user avatar
  • 6,810
3 votes

How does MSAA performance scale?

Roughly speaking, what the Supersampling Anti-Aliasing method does is: For each pixel in the image to render "Split" the pixel of a target image, usually in 2, 4, 8 or 16. Actually this step is ...
wip's user avatar
  • 1,861
3 votes
Accepted

Why are tessellation shaders disliked?

An answer with details gotten elsewhere: It's bad on mobile: ARM doesn't have a tessellation unit so is emulated in software. Tiled based architectures will write vertex data to main memory before ...
Alan Wolfe's user avatar
  • 7,801
3 votes
Accepted

Should you measure mesh complexity in triangles or vertices?

Vertex count may be more accurate of a measurement of "mesh memory usage and mesh rendering time", but vertex count is not nearly as easily measured. Yes, given a specific mesh with all of its ...
Nicol Bolas's user avatar
  • 9,792
3 votes
Accepted

Different Vertex structures in multi-purpose system

Most rendering engines do need to handle multiple vertex structures depending on the type of shading being used on the mesh. If there are only a small number of discrete vertex structures, you could ...
Nathan Reed's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible