Questions tagged [graphics-programming]
Programming related to the visual representation of information on computer screens.
413 questions
0
votes
0
answers
40
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
0
answers
114
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
0
answers
111
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
0
answers
156
views
How do portals in Duke Nukem 3D traverse into other sectors properly while keeping things rendering normally?
I'm making a very simple portal based software renderer in PyGame that just uses portals as links to other sectors - like a window or doorway. I've have gotten somewhat far, with texture mapping (...
1
vote
1
answer
632
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 ...
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 (...
4
votes
1
answer
170
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 ...
0
votes
1
answer
248
views
Setting up perspective projection in OpenGL
I'm trying to set up perspective projection in OpenGL but it doesn't work
...
2
votes
1
answer
338
views
Padding in a vec3f array in WebGPU memory layout
I'm trying to write a WGSL structs parser (sort of webgpu-utils thing). In order to better understand the memory layout, I'm using wgsl offset computer as a helper.
Having the next struct:
...
2
votes
1
answer
163
views
How should I bind various types of material data to the ray tracing rendering pipeline in DirectX12?
My problem is a bit complicated. When doing ray tracing rendering, all data in the scene needs to be prepared. In addition to texture resources, each object to be rendered will also have its own ...
1
vote
1
answer
1k
views
How to create a ScriptableRenderPass that renders normally, with lighting?
What I'm trying to do: Render GameObject(s) of a specific Layer in my custom pass. I want to do something more later, but I'm just trying to get it to render exactly as URP would for now.
I'm just ...
0
votes
1
answer
226
views
Tessellation shaders not working, no objects drawing on screen
Using this tutorial https://learnopengl.com/Guest-Articles/2021/Tessellation/Tessellation and this tutorial https://www.youtube.com/watch?v=21gfE-zUym8 I implemented tessellation shaders that I haven'...
0
votes
1
answer
111
views
What is the process of making a chracter creator like black desert in godot/unity?
example
I get the point of switching heads or other body part models as long as they are all attached to the same bones then the animations will work, but what about changing the color of lips, ...
0
votes
1
answer
341
views
Unity Shader - Moving one texture around and on top of another texture
I have a shader that applies a texture to a sphere with lighting, making it look like a nicely lit planet:
The code for my shader is here:
...
1
vote
1
answer
272
views
Drawing a filled ellipse in Unity
For my Unity puzzle game, I am looking to draw elliptical "shadows" under certain letters in a Text Mesh Pro text field.
These shadows will have varying widths depending on the width of the ...
0
votes
1
answer
2k
views
How do I corretly use a Direct X 12 Root Signature?
I know a Direct X 12 Root Signature tells Direct X 12 how to use the resources between the CPU and GPU, but I'm having a hard time using it.
I tried using it before but it kept failing saying the ...
0
votes
1
answer
754
views
Why clip in clip space - confusion with Gribb-Hartmann clip plane extraction
I understand to extract clip planes from the perspective matrix one can follow the methodology laid out by Gribb-Hartman as documented here:
http://www.cs.otago.ac.nz/postgrads/alexis/planeExtraction....
4
votes
2
answers
2k
views
In OpenGL, why do people worry that the accuracy of the depth buffer gets worse the farther away?
I'm really new to graphics programming, so I'm learning about depth buffers with this article.
I got that the conversion from View Space to NDC is non-linear, but I think we can avoid the problem by ...
0
votes
0
answers
419
views
OpenGL : std140 alignment and uint64_t arrays
I have a problem but I can't figure out what is happenning (I think that there is an alignment problem...), so in my OpenGL application I use bindless textures which handles are sent to the shader via ...
1
vote
0
answers
333
views
How to get world coordinates from a 4X4 camera matrix
I have Intel T265 camera which has a camera coordinates system like following diagram:
The camera system has two cameras and the center of the two cameras is the position of the camera system.
The ...
3
votes
0
answers
363
views
How to make use of resizable BAR?
From what I understand, resizable BAR (aka. Smart Access Memory) makes it possible to access the whole GPU memory from CPU code. But how can a programmer make use of that?
Is there an example or code ...
0
votes
0
answers
183
views
What does glBlendFunc(GL_DST_COLOR, GL_ZERO); mean?
I need to write a description about a filter method I made but I don't know what glBlendFunc(GL_DST_COLOR, GL_ZERO); means.
0
votes
2
answers
749
views
Generate vertices of a sphere by using spherical coordinates
I'm trying to generate points for a sphere by subdividing the space of spherical coordinate in res sector and res slices.
At first I did my own implementation, but it wasn't working. After a while I ...
1
vote
1
answer
987
views
Unity: Alpha and color issues with opaque projector/decal shader
I have been attempting to make a simple "overwrite" version of Unity's projector shader. I can either respect the color, or respect the transparency, but not both.
I have simplified the ...
-1
votes
1
answer
336
views
Opengl in 500 lines barycentric calculation question
https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling
I cannot figure out how we go from uAB-vector + vAC-vector + PA-vector = 0 to the linear system with ...