5
votes
Do GPUs re-draw a all of a character's vertices/triangles/fragments every frame?
What you've said is how most games work, at least at a logical level. (In practice, these stages might not happen exactly sequentially - a GPU might be simultaneously drawing some fragments while ...
4
votes
Accepted
Why do GPUs have limited amount of allocations?
It's not correct to say that - as a general case - GPUs have a fixed limit on the number of allocations that may be made.
What the Vulkan documentation for ...
4
votes
Accepted
Simple square vertex lifting shader
This is actually an illusion. The vertices are not lifted: There aren't enough vertices in the model to create the pinata effect.
Here are the tricks:
The normal map has squares in it to create the ...
4
votes
Accepted
Which memory is used in D3D12 resources?
They are not 3 types of memory. They're 2 different things (physical and virtual memory) and a 3rd that combines the first two for convenience.
Placed resources are blocks of physical memory that the ...
3
votes
Accepted
Why isn't more culling being done on the GPU?
Non-optimality in terms of architecture. Wrong tool for the job.
GPU-optimal tasks are highly parallel: vertex processing, texture processing, computing boid motion, with all kernel-threads running ...
3
votes
Accepted
How to render a grid of dots being exactly 1x1 pixel wide using a shader?
This does pretty well, though I found I needed to add a small fudge factor to avoid dots occasionally winking out when the grid point exactly straddled the border between pixels, but this does create ...
3
votes
Should calculations be done on the CPU or GPU?
A few rules of thumb around this, if the calculation only needs to be done once and applies to the entire object, then you will get best bang for buck calculating it prior to loading onto the GPU. IF ...
3
votes
Pseudo random number generation in compute shader
You have to consider that one GPGPU invocation executes all CSMain in parallel, conceptually all at the same time.
So every pixel in your texture will come back ...
3
votes
Simple coherent noise function to use in a GLSL shader
The best you can do is using a texture to get the noise from, note that this is not the same as sampling a noise texture, you are just getting the random values from the texture so you can animate it ...
3
votes
Why do we use GLSL(Shader) instead of CUDA?
The intuition that CUDA is objectively "better than" dedicated rendering APIs for common rendering workloads is not a good guide.
These are not two competing software libraries that serve ...
3
votes
Do GPUs re-draw a all of a character's vertices/triangles/fragments every frame?
For most modern 3D games running on modern hardware, you've described the basics of how rendering usually works. However, that's not the only option. Other options include:
Using Mesh Shaders instead ...
2
votes
Accepted
How OpenGL running without GPU?
How do you know your programs are running if you can't see anything on your screen?
Or to put it another way - you still have a GPU of some description in your computer, because in addition to ...
2
votes
How do multiple render targets get rendered onto the back buffer(s) then screen?
The render targets become sampling textures for a final compositing pass shader rendering to the back buffer.
The GPU doesn't do any automatic flattening. It all has to be done in a shader.
Ping-...
2
votes
OpenGL Texture Zig-Zag Artifacts Over Time
To me it actually looks and sounds like bad video memory or core issue.
Sometimes video cards can start to corrupt their outputs as the silicon degrades.
If other cards do not show this artifact, then ...
2
votes
How to temporarily set additional system environment variable only in 'play' mode inside godot editor?
Seems the solution that works so far is to write my own shell script.
Here's the script:
...
2
votes
Accepted
Map() fails when reading back GPU Texture
You can't read back from a texture using Map() on a deferred context:
If you call Map on a deferred context, you can only pass
D3D11_MAP_WRITE_DISCARD, ...
2
votes
Accepted
Unity Build GPU Performance
What you are experiencing are various bottlenecks when performance isn't purposely limited.
If you run a game (even a static none-moving cube) a typical game engine will tell the GPU to render and ...
2
votes
Int vs Float, which one is faster for gpu?
When it comes to performance, nothing beats testing the data and algorithms that you're interested in on the hardware that you care about to find out what performs best. Performance almost always ...
2
votes
Accepted
Is DirectX 12 or lower just an API?
Shall it support all GPUs? Or just newer GPUs? What about the version of the Windows OS supported?
From Nvidia, DirectX12 supports all GPUs using the Ampere (RTX 3000 Series), Turing (RTX 2000 Series)...
2
votes
Accepted
How can I efficiently render lots of moving objects in a game?
I understand that for efficient rendering in games, you want to minimize communication between the CPU and GPU. … isn't this the CPU talking to the GPU? Isn't this very slow and what we're supposed to ...
1
vote
Low FPS in Unreal engine, but GPU usage is low as well
Unreal has built in profiling tools to help you identify where the bottleneck is. Open the console and type stat unit and it will show you times in milliseconds for ...
1
vote
Accepted
Why was 24-bit color support introduced twice in GPUs?
The Mach32 chip uses 24bit color, with 32 bits alignment, and it is not intended for 3D graphics. For what I read, using Mach32 cards required a resident software in DOS that slowed DOS down (I'm ...
1
vote
How can I make a custom mesh class in Unity?
I don't recommend creating a new Mesh class for this.
Instead, send your additional 4D data to the GPU as texture coordinates. Don't let the name fool you - these don't need to have anything to do ...
1
vote
What is the difference between these two shaders in terms of performance?
vec2 ofs = horizontal ? vec2(offset.x, 0) : vec2(0, offset.y);
Simple ternary expressions like this can be compiled to a conditional move instruction, with no ...
1
vote
Which Terrain LOD algorithm should I use for super large terrain?
Forget about ROAM. That's the pre-3DFX era of SW rasterizers. I mean, if you're bored, it's a fun exercise, but it's useless in today's era of thousands of shaders units...
I would very strongly ...
1
vote
Understanding buffer swapping in more detail
The problem was related to the window manager. I could see the expected behavior when I ran in full screen.
1
vote
Should calculations be done on the CPU or GPU?
If the data is not expected to change between gpu threads, then it should be performed on the CPU, and sent to the shader via a uniform. Examples of this include:
world to screen transform (sometimes ...
1
vote
Should calculations be done on the CPU or GPU?
The CPU could perform the calculations in a faster rate than a GPU due to higher clock frequency. However, the GPU can do a lot more calculations in parallel. If you are working on a large data set, ...
1
vote
Accepted
reading from texture2d resource in directx11
i have found the solution. it looks even so pretty.
testV.push_back(outputArr[idx])
should have been edited like
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gpu × 183optimization × 36
opengl × 35
shaders × 28
rendering × 23
unity × 22
textures × 15
gpgpu × 14
directx × 13
glsl × 11
graphics × 10
xna × 7
android × 7
3d × 7
cuda × 7
c# × 6
c++ × 6
directx11 × 6
graphics-programming × 6
cpu × 6
flash × 5
nvidia × 5
physics × 4
hlsl × 4
mobile × 4