Questions tagged [graphics-programming]
Programming related to the visual representation of information on computer screens.
412 questions
0
votes
0
answers
44
views
Can a single large SSBO in vulkan store different types of structs?
I was using tinkering with vulkan and was wondering if a SSBO can store a mix of structs of different kind like shown in picture and pass offsets of the said structs to access them in shader.
0
votes
1
answer
113
views
Why does early z not work with fragment shaders using discard
I am currently trying to understand why using discard inside of a fragment shader disables early z.
I am using a simple cutout shader, which discards fully ...
0
votes
0
answers
115
views
What is the best way to draw chunks?
I'm developing a voxel engine with OpenGL and C++ and searching how Minecraft-like games set up VAO, VBO, and EBO. I'm also dealing with transparency geometry and depth testing issue.
There are 3 ...
0
votes
1
answer
281
views
Game engine dev vs game programmer
I love rendering, coding game logic and implementing physics systems using libraries like SDL2, however, I also enjoy using those systems to design and put together games. Do my interest more align ...
0
votes
0
answers
113
views
How to load shaders in a game engine asset loading system?
I am making an asset loading system for my game engine, which is written in C++, and the idea I had in mind is that for each asset there is a corresponding loader class. Although not entirely the same ...
0
votes
1
answer
52
views
Uniform buffer updates and shadow-maps rendering, cause mesh twitching
Trying to render 3D shadow_maps with Vulkan, but getting buffer update de-sync I suspect.
My question is, how do I solve the problem, when rendering, and uniform buffer data updates are not in sync, ...
2
votes
0
answers
72
views
How do I get this texture mapping for my quad (no triangles) to be perspective correct?
I'm working on a 3D Software Rasterizer and I'm wanting to render textures on walls now. I've tried to do it myself, but failed since it just distorts. I read up on the wikipedia page for Texture ...
1
vote
1
answer
641
views
IDXGIFactory::CreateSwapChain() vs D3D11CreateDeviceAndSwapChain - When to use which for making a swap chain?
I'm following a bunch of tutorial series on how to set up Direct3D 11 for 3D rendering, I'm focusing on the swap chain part for now. The main tutorial series I am following is the one by PardCode on ...
0
votes
1
answer
80
views
Frustum Culling Not Utilizing Entire Bounding Sphere in OpenGL
My frustum culling is detecting an object as culled even though not the entire object's bounding sphere is out of the frustum yet. It's like it believes the bounding sphere's radius is smaller than it ...
1
vote
0
answers
291
views
Cheap 2D fluid simulation at low resolution
I have a 64x64 display and an accelerometer.
I want to run a 2D fluid simulation and take a reading from the accelerometer as the gravity vector.
I'm going to be doing this on fairly low-end hardware (...
0
votes
1
answer
140
views
What are some basic methods/algorithms for drawing wireframe shapes using Gizmos?
This is definitely a "doing for the sake of learning" question, so apologies in advance for that, but how would you go about using the Gizmos class to draw a basic wireframe shape?
I'm ...
4
votes
1
answer
172
views
What are N-Buffers?
For a school project, I had to read a scientific paper that talked about Ambient Occlusion. In it, the authors mentionned using a technique they call N-Buffering. From what I understood, it looks like ...
2
votes
2
answers
696
views
How do materials and shaders work in graphics programming?
I stumbled upon a few videos about shaders and materials from The Cherno and my understanding is that materials are this sort of input that a shader takes to calculate an output instead of hard coding ...
0
votes
1
answer
252
views
Setting up perspective projection in OpenGL
I'm trying to set up perspective projection in OpenGL but it doesn't work
...
0
votes
0
answers
55
views
Efficient Implementation of Dynamic Snake-Like Body in UE5: Seeking Advice on Optimized Approach
Platforms: iOS, Android, and PC.
I want to implement a snake body that can dynamically grow in length, narrow, and bend (simulate body movement, similar to bending in an arc).
I'm using UE5, and ...