Questions tagged [graphics-programming]

Programming related to the visual representation of information on computer screens.

Filter by
Sorted by
Tagged with
1 vote
1 answer
68 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: ...
Michael Sazonov's user avatar
1 vote
0 answers
70 views

Use of a Global Shaders in Unreal Engine to apply some pre-processing operations

I'm a little experienced in Unreal Engine, but I don't know the Unreal's graphics programming from a very low level. More in details I would like to know how could use an Unreal's Global Shader to ...
Giuseppe's user avatar
1 vote
1 answer
54 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 ...
AshenvaleZX's user avatar
0 votes
0 answers
77 views

PyOpenGL "Attempt to retrieve context when no valid context" - seems to be Linux specific?

I've been trying to learn PyOpenGL, so I'm still pretty clueless about what's going on. I've been following a video series. I couldn't get it to stop throwing "Attempt to retrieve context when no ...
brododragon's user avatar
0 votes
1 answer
135 views

Recommended approach to image rendering on quads for OpenGL-backed canvas

I am working on a vector graphics rendering library for OpenGL in Rust. Currently, the library's API is as follows: ...
JS4137's user avatar
  • 107
1 vote
1 answer
414 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 ...
danglingPointer's user avatar
0 votes
1 answer
49 views

moving an object around a Circle [closed]

I am going to draw a shape like a gear, how can I move a tooth around a circle? Something like the image below : For example, I need to draw 20 teeth at equal intervals around a circle with a ...
Ashkan Khajeh's user avatar
0 votes
1 answer
90 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'...
Chillzy's user avatar
  • 47
0 votes
1 answer
50 views

Why does Radiosity Normal Mapping use 3 directional components and not 5?

I have read the HL2 Paper and Presentation for Radiosity Normal Mapping. I am currently trying to implement it myself. I already managed to generate a single radiosity lightmap by drawing a hemicube ...
Raildex's user avatar
  • 703
0 votes
1 answer
85 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, ...
user avatar
0 votes
0 answers
92 views

Gaussian blur only blurs the interior of primitive?

I cannot work out why my blur shader based on this example affects only what's inside the illuminated sphere. Below is the loop I'm using to blur an HDR framebuffer 5 times horizontally and vertically ...
Sina Dasht's user avatar
0 votes
1 answer
150 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: ...
Cato's user avatar
  • 33
0 votes
0 answers
163 views

How to do perspective transformation of linear depth in vertex shader

I know mathematics of perspective transformation. ...
JiangnanLong's user avatar
1 vote
1 answer
161 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 ...
kanamekun's user avatar
  • 369
2 votes
0 answers
150 views

Depth func LESS EQUAL not working as expected

How is it possible that a fragment is generated, passes the depth test but isn't written to the current render target? This is the pixel history I see if I capture a frame in RenderDoc: The fragment ...
leone ruggiero's user avatar
0 votes
1 answer
733 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 ...
Sammy's user avatar
  • 1
0 votes
1 answer
57 views

Anyone about me how we make games in Android , also about me can we use c# or c++ in blender [closed]

game development in blender with c# hello everyone about me c# coding for games in blender game engine how i can use blender in Android because i'm new student in game developement Also about me how ...
Hritik gautam's user avatar
0 votes
1 answer
379 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....
Humility Dev's user avatar
0 votes
2 answers
270 views

How would I go about preparing my skybox for a z-up world orientation?

**Solved!** Special thanks to comments from Maximus Minimus and Jherico. Scroll down for the solution made in the shader. I am working on a vulkan renderer in rust using the ash crate. I would like to ...
Joseph Vargas's user avatar
4 votes
1 answer
674 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 ...
misaki's user avatar
  • 141
0 votes
0 answers
41 views

shader can't read data except position, texcoord, normal

i want to read bone's weight but shader can't read data this is my vertex type ...
문형준's user avatar
0 votes
0 answers
258 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 ...
MacEquette's user avatar
0 votes
1 answer
40 views

Drawing multiple simulation ticks in a single render frame

I have a 2D fixed-timestep simulation (a bunch of moving sprites) that ticks several times per render frame. I would like to render the state of each tick, so that all the ticks between render frames ...
Raigan Burns's user avatar
1 vote
0 answers
263 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 ...
Nick X Tsui's user avatar
0 votes
1 answer
76 views

How to construct a matrix with the following mapping

How would I create a matrix that maps coordinates like so: Near plane x: [-3,3] -> [-1,1] y: [-6,2] -> [-1,1] z: 2 -> -1 Far plane ...
user3346597's user avatar
3 votes
0 answers
233 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 ...
thalm's user avatar
  • 217
4 votes
1 answer
2k views

What is GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS?

I am a beginner in OpenGL. I am learning about textures in OpenGL. What I don't understand is how to determine how many texture units are in the GPU. I heard someone said that you can see how many ...
Enthalpy127's user avatar
0 votes
0 answers
127 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.
achilles's user avatar
-1 votes
1 answer
67 views

Why are vertices coordinates are always between -1 and 1 in 3D Models

I'm writing my very first 3D rendering engine in C++ using SDL2, and I've been following this book that has multiple code examples that has 3D models with vertices that all have coordinates between -1 ...
Fudge Racoon's user avatar
0 votes
2 answers
523 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 ...
Syrinxos's user avatar
0 votes
0 answers
894 views

Supporting multiple graphics apis

I would like to provide support for switching between both OpenGL and Vulkan in my game (and potentially DX12 later). Currently I only know OpenGL so I am working on that. I have read a lot of posts ...
MasterReDWinD's user avatar
1 vote
1 answer
749 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 ...
Zoop's user avatar
  • 161
1 vote
1 answer
548 views

Get black bars with framebuffer and glViewport

I have read several tutorials and answers regarding framebuffers and glViewport, but I can't seem to resolve this issue I have. I want to take a low resolution framebuffer (400x225) and place it in a ...
Aaron Z's user avatar
  • 33
-1 votes
1 answer
258 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 ...
Bluebomber357's user avatar
1 vote
1 answer
106 views

Opengl in 500 lines point in triangle question

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling I am on lesson 2 of the "Opengl in 500 lines" tutorial. I ...
Bluebomber357's user avatar
0 votes
1 answer
220 views

Difference between shader input element classification between D3D12 and Vulkan

I'm confused about the difference between the shader input element classifications in D3D12 and Vulkan. For example, in Vulkan I could have the following declarations: ...
0xbadf00d's user avatar
1 vote
1 answer
432 views

OpenGL: What to do after running glBufferData?

I am interested in understanding a bit more behind how OpenGL does its memory management and what are some good practices before I start heavily coding and back myself into a corner. The real question ...
Josh B.'s user avatar
  • 113
-1 votes
1 answer
330 views

What is the best way to approach a multi pass rendering system?

I am trying to code a new feature in my engine but I can't find a way to implement my idea, which is the next one. I am trying to get multi pass rendering with more than two passes. I know how to do a ...
Loki's user avatar
  • 1
0 votes
0 answers
31 views

Mathematics should I learn for 2D and 3D game programming/development [duplicate]

What mathematics should I learn to become game programer 2D and 3D. From the very basic for beginner until advance
Ade Aprianto's user avatar
0 votes
2 answers
285 views

How to switch career to game engine/graphics programming [closed]

My whole background is related to enterprise applications but I've been thinking of switching my career path from enterprise/business to something that I feel is more challenging and interesting. One ...
PentaKon's user avatar
  • 338
3 votes
2 answers
1k views

How does cube mapping work?

Based on my reading of cube mapping tutorials so far, my understanding is that you need a direction vector, and from the direction vector we can determine the point of intersection with one of the six ...
BunnyDhaliwal's user avatar
2 votes
1 answer
1k views

Calculating Directional Shadow Map using Camera Frustum

I'm trying to calculate the 8 corners of the view frustum so that I can use them to calculate the ortho projection and view matrix needed to calculate shadows based on the camera's position. Currently,...
Sammi3's user avatar
  • 219
0 votes
1 answer
1k views

How to position/transform vertices for 2D UI in shaders?

I am building a 3D engine and have a rendering abstraction that focuses on writing shaders. Most my 3D shaders have gl_Position output like: ...
kevzettler's user avatar
0 votes
3 answers
539 views

OpenGL Rendering Pipeline

I've been learning OpenGL graphics programming and I've decided I'd quite like to make a simple game using OpenGL. Drawing something in OpenGL, needless to say, is quite the endeavour. However it ...
Featherball's user avatar
0 votes
1 answer
343 views

Pseudocode for calculating per vertex normals for a trianglestrip mesh

I have a terrain that is defined as a trianglestrip mesh. Now I'm trying to calculate the normals of each vertex but I've realised that my normal way of calculating vertex normals only works with ...
Sammi3's user avatar
  • 219
1 vote
1 answer
127 views

SDL window crashes when mouse goes below a certain point

I added code to check the rgb values of my surface, and whenever i call the function it seems to work fine! the only problem is that whenever the mouse goes under y = 400 the entire window crashes... ...
Jcsq6's user avatar
  • 113
0 votes
0 answers
287 views

OBB Frustrum Culling in Clip Space

I've been trying for a while to implement a frustum culling method using a per-computed AABB in object space and transforming it's corners into clip space. ...
BioAbner J's user avatar
4 votes
0 answers
1k views

Object Transparency Dithering (as shown in Super Mario Odyssey)

A couple games I've been playing recently all have a similar goal of dithering objects when they approach the near clip plane. Super Mario Odyssey applies this dithering-near-clip-plane effect, but ...
Taras Palczynski's user avatar
0 votes
0 answers
73 views

Gamma adjustment slider implementation

Various online sources talk in sufficient detail about gamma correction. By following them, I achieved a rendering pipeline that looks somewhat like this: ...
ZalewaPL's user avatar
  • 113
0 votes
0 answers
207 views

What are the options when float textures aren't precise enough?

I am currently experimenting with rendering planetary scale terrain. I am generating the terrain on the GPU with noise, and to fix the 32 bit floating point precision problems, I generate the ...
Raouf's user avatar
  • 83

1
2 3 4 5
8