As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [performance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
545 views

Data structure and algorithm for clipping triangulation with leaf nodes of an octree

I have an application in which I am using an octree to store a volume mesh of axis-aligned bounding boxes (AABBs). Given a water-tight manifold triangle mesh, I need to: find if an AABB is ...
gnzlbg's user avatar
  • 141
8 votes
2 answers
290 views

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

I'm interested in virtual reality, but according to some sources, less than 1% of computers in use today have the necessary performance to run modern VR games, granted many of them are not intended ...
Syzygy's user avatar
  • 183
17 votes
3 answers
5k views

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

Games and other graphically intensive applications use frameworks like OpenGL and DirectX. Also they require features like pixel shader and DX12. But why would we need all these frameworks and GPU ...
Suici Doga's user avatar
13 votes
1 answer
6k views

Loop performance in a shader

I am wondering what's the best way to integrate a dynamic loop function in a shader? First, it seems that dynamic arrays are not possible. So, is it better to create a maximum size array and only ...
MaT's user avatar
  • 1,219
8 votes
1 answer
422 views

Do modern GPUs contain barrel shifters?

I'm aware that most modern GPUs, although designed for floating point, are more or less equivalent in integer performance these days, with a few caveats like the lack of a fused multiply add. I'm not ...
russ's user avatar
  • 2,332
3 votes
0 answers
272 views

Projecting light shapes

I am wondering how professional light visualizer software (like Capture Argo - WYSIWYG - Realizzer - LightConverse) project the lights on the objects (like stage, floor, people), even projecting the ...
Freddy Violato's user avatar
19 votes
3 answers
5k views

Difference between rendering in OpenGL and 3D animation software

With OpenGL and such I can render some pretty amazing looking things in "real time" 60 FPS. However, if I try to make a video of that same scene in let's say Maya, or 3ds Max it would take MUCH MUCH ...
J.Doe's user avatar
  • 1,445
11 votes
2 answers
572 views

With modern fillrates and deferred rendering, is occlussion culling still relevant?

For example, while it's the current top-of-the-line GPU, the GTX 980 has a staggering 72.1 gigapixels/second fillrate, which with back-to-front rendering and/or Z buffer checks, seems almost ...
Llamageddon's user avatar
3 votes
1 answer
135 views

Is there some book about how to design a 3D math lib? [closed]

3D math covers vector algebra and matrix algebra, which are easily calculated on paper, but not so easy when coding them effectively. I only leant some basic algorithms on matrix in my Data Structure ...
Lucas's user avatar
  • 139
9 votes
2 answers
279 views

When is it better to upload partial model matrices to the vertex shader?

As of now, when rendering my scene and while iterating through the scene graph, for each node its model matrix is calculated from the parent's model matrix and the scene node's pose. This is quite ...
Nero's user avatar
  • 1,310
9 votes
1 answer
907 views

Shader uniform performance

I'd like to know if there's any performance impact based on how I struct my shader uniforms. For instance, is passing 4 floats worse than passing a single vec4?
Felipe Lira's user avatar
  • 1,236
16 votes
1 answer
1k views

Is a constant condition more costly than switching shaders?

In general, branching in shaders is not a good idea. But now I have a shader with a condition that is constant with respect to the entire draw call. So the branch that is executed is always the same ...
nikitablack's user avatar
6 votes
2 answers
3k views

How to reduce the number of draw calls when rendering one object multiple times?

Especially when rendering particle effects, the same object needs to be rendered several times with slightly modified properties. But these changes are often limited to properties like pose or ...
Nero's user avatar
  • 1,310
12 votes
1 answer
9k views

Why is accessing textures much slower when calculating the texture coordinate in the fragment shader?

When using textures in GLSL, it is best to calculate the final texture coordinates in the vertex shader and hand them over to the fragment shader using varyings. ...
Nero's user avatar
  • 1,310
22 votes
1 answer
3k views

Why is this conditional in my fragment shader so slow?

I have set up some FPS-measuring code in WebGL (based on this SO answer) and have discovered some oddities with the performance of my fragment shader. The code just renders a single quad (or rather ...
Martin Ender's user avatar
  • 2,710
11 votes
1 answer
3k views

What is the performance tradeoff between forward and deferred rendering?

Forward rendering is the process of computing a radiance value for a surface fragment directly from input geometry and lighting information. Deferred rendering splits that process into two steps: ...
John Calsbeek's user avatar
14 votes
1 answer
2k views

When to disable perspective correct interpolation ( noperspective )

In GLSL, perspective correct interpolation of vertex attributes is the default setting - one can disable it for specific vertex attributes by using the noperspective qualifier. Other than in post-...
gemse's user avatar
  • 243
57 votes
3 answers
34k views

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

Image filtering operations such as blurs, SSAO, bloom and so forth are usually done using pixel shaders and "gather" operations, where each pixel shader invocation issues a number of texture fetches ...
Nathan Reed's user avatar
  • 24.4k
36 votes
2 answers
12k views

What is the cost of changing state?

Programmers are supposed to have a fairly good idea of the cost of certain operations: for example the cost of an instruction on CPU, the cost of a L1, L2, or L3 cache miss, the cost of a LHS. When ...
Julien Guertault's user avatar
11 votes
3 answers
2k views

Why do Vertex Buffer Objects improve performance?

From my basic understanding, a Vertex Buffer Object works something like this (pseudo code): Normally, if one wanted to say, draw a square, one could issue line drawing commands. ...
Ethan Bierlein's user avatar
22 votes
3 answers
4k views

Performance of vector graphics versus bitmap or raster graphics

Sometimes I use vector graphics, simply because they look just slightly nicer in some cases, and other times, I use bitmap/raster graphics. I was wondering, are there any significant performance ...
Ethan Bierlein's user avatar

1
2