Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [graphics]

A very generic term referring to visual part of a game. Try to avoid unrelevant usage and instead tag for specific graphics type (2D, 3D), API, framework or a library you are using, if possible.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Height gradient generation from height map,using compute shader has weird artifacts

I am trying to generate the height gradient (the slope) for a heightmap of mine using a compute shader in Unity, and the result has weird ringing artifacts and I completely lost what could be wrong. I ...
Keksoskajoska's user avatar
0 votes
0 answers
18 views

The perspective projection change the sign of z

I have an issue, I am drawing a cube in 3d. I am using z-buffer for hidden surfaces removal. But the hidden faces are drawn (i see the inside of the cube). After some research And I found that this ...
Abdel Majid Kansoussi's user avatar
0 votes
0 answers
28 views

How to implement graphics API functions like setUniform on a cross-platform shader in VLang?

I've been working on a C++ game engine for a while, but I decided to scrap the project because doing it in C++, despite my best efforts, I could feel the technical dept building. As such, I switched ...
Spencer Rosas-Gunn's user avatar
0 votes
0 answers
23 views

Texture space Raytracing of cylinder primitive in godot shader for Helix interception

I have been trying to do raytracing of an helix in a spatial shader in godot 4.2, but apparently I missed something because the result is bloby and melty at the cylinder level. The basics is that I ...
user29244's user avatar
  • 327
4 votes
1 answer
118 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 ...
Gyoo's user avatar
  • 186
0 votes
0 answers
21 views

Black screen when sizing JFrame/JPanel with Toolkit.getDefaultToolkit().getScreenSize()

I am working on a game engine. ...
Grinding For Reputation's user avatar
0 votes
0 answers
51 views

C++ how to load different assets within an asset manager?

I'm in the process of redoing my asset/resource manager currently I have load functions scattered throughout my code for example LoadMeshFromFile(), LoadTextureFromFile(), LoadShaderFromFile(), etc, ...
Konjointed's user avatar
1 vote
1 answer
84 views

Mirroring a Character's Position In a Shadow After Rotating 180 Degrees

Description: I am creating a 2.5D RPG. When my character moves from left to right, they rotate 180 degrees to face the new direction. Just like this example. They also have a blob shadow sprite that ...
PayasoPrince's user avatar
0 votes
1 answer
77 views

How to get the direction to the sky a pixel is facing to draw a sky?

I am drawing an empty texture over a framebuffer with a fragment shader active to try and draw a sky, but I need the direction each pixel is facing in (for correct linear perspective) to draw the ...
Tachytaenius's user avatar
2 votes
1 answer
67 views

Hide Horizon Line with Small Terrain?

I'm drawing a sky plane with an atmosphere fragment shader in front of my terrain. It looks pretty much fine at sea level, but if you move above the sea level, the illusion is quickly broken, as you ...
Scollier's user avatar
  • 124
0 votes
1 answer
177 views

Shader to give the effect of a 2D character covered in oil

I have a 2D pixel art game where characters can be covered in a flammable black oil-like substance and I am looking for a simple way to depict that visually. Simply tinting the character black won't ...
Martin's user avatar
  • 43
0 votes
1 answer
90 views

Normalized coordinates not translating to screen coordinates the way I need them to

I am making a simple game in C# using pictureboxes. I want to move a picturebox on a form. Once this picturebox is placed in a new location, I normalize its X,Y coordinates between [0, 1] and then ...
CluelessWizard's user avatar
0 votes
0 answers
42 views

Spherical Billboard Effect

I try to make a spherical billboard that follow the camera's direction. But, the result that I got is model get distorted or event twisted. If I'm using only a yaw/pitch quaternion per time, it works ...
oremx986a's user avatar
0 votes
0 answers
34 views

How can I create a Spotlight in a Vertex Shader?

...
mueoc mueoc's user avatar
1 vote
0 answers
62 views

LWJGL3. A strange graphic artifact of OpenGL 3.x

I work in java with lwjgl3. I came across a strange artifact, the source of which I have not been able to determine for a very long time. I'm drawing a large surface. When I approach this surface and ...
alfabouh's user avatar
2 votes
1 answer
233 views

How is a Spherical Harmonics Lightmap generated?

I have successfully generated a single color lightmap using ray tracing. For each texel in the lightmap, I trace into the hemisphere (using the normal) and capture the incoming light. This single ...
Raildex's user avatar
  • 761
17 votes
3 answers
6k views

Game loop isn't performing well enough, so my frame rate is too low (Windows Form + GDI+)

I decided to learn about building games, so I picked up C# to use it along with Windows Form - I already have C# experience, so that was the main reason I did so. That said, I tasked myself to build a ...
curiousguy_08's user avatar
1 vote
0 answers
192 views

Recreating The Visual Effect From Super Mario RPG Remake In Unity URP

The upcoming remake of Super Mario RPG uses an effect that adds a 'colorful fog'(I'm really struggling to describe it 😅) to certain parts of the screen. It's mostly used in the corners and top of ...
PayasoPrince's user avatar
0 votes
0 answers
275 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
1 vote
0 answers
31 views

Issues with bitmap character spacing

I've been working on a bitmap character renderer for my game engine in C#, however, I've been running into some spacing-related problems. This script parses the font and gets all the relevant data ...
Jessica Jones's user avatar
1 vote
1 answer
121 views

Can somebody please explain why my illumination is inconsistent?

100% not a graphics guy here. Problem Demonstration. Randomly discovered this when showing the project to a friend after not touching it for over a month (been working on other stuffs). First I ...
memorylick's user avatar
1 vote
0 answers
45 views

How to Generate a Texture to Make an Obstructing Plane Appear Invisible in a 3D Scene?

I have a 3D scene with a camera. Between the camera and the scene, I have a plane with arbitrary orientation. This plane obscures a portion of the scene from the camera’s perspective (anything behind ...
John's user avatar
  • 111
0 votes
1 answer
72 views

How to get rid of shading seams inside a cylinder?

Is there any other way to remove these shading "seams" other than to increase the vertex count of the cylinder?
Majs's user avatar
  • 405
1 vote
0 answers
32 views

Differentiate Generic Tromino or Tetramino Match vs Specific Shape (Square, Line, L, ect..) in Match-3

This is primarily a user interface question related to match-3 games and visualizing a goal for the player using clear imagery. I'm interested in having a match-3 game where if you get certain matches ...
G. Putnam's user avatar
  • 111
0 votes
0 answers
238 views

Implementing Camera Movement and Rotation in 3D Game Engine

Apologies in advance for any mistakes on terminology, I'm really really new to this I'm completely new to 3d (and it's maths) but as a personal exercise I'm doing my own game engine that displays a ...
MiguelP's user avatar
  • 103
0 votes
0 answers
40 views

Perspective projection distortions

I'm building my own engine using python and pygame however my cube model is not able to be displayed correctly. This is my result after applying translation, scaling and projection matrices: ...
Zoler1337's user avatar
0 votes
1 answer
136 views

Perspective projection not working as intended

I copied a perspective projection matrix from here (https://jsantell.com/3d-projection/) and applied it to my vertices. It looks ok but without depth. Rotation matrices also work. When I try to divide ...
Zoler1337's user avatar
1 vote
0 answers
48 views

Trying to plot trajectory of rocket using only its current position and velocity components

I have a 2D controllable rocket for which I want to plot the parabolic motion. Additionally, the parabola should be able to change due to the thrust of the rocket accelerating it in either direction. ...
confused_aspirant's user avatar
0 votes
1 answer
210 views

How to achieve no gaps between triangles in software renderer like in Quake?

I've heard alot that I need to use fixed-point math, top-left rule, etc. to eliminate gaps between triangles but the thing is how did Quake not have any gaps, did it? I've seen Quake's math file and ...
MaximMogulev's user avatar
1 vote
1 answer
136 views

Bending at edges of screen

This is a weird effect where objects bend at the edges of the screen (shearing?). It doesn't happen everywhere. I know it happens in Minecraft and Godot, but not Blender or Bevy. What is it and is ...
human_nr_294211's user avatar
0 votes
0 answers
36 views

Persistent Variable Issue: Incorrect Texture Index in C++/Opengl Rendering

I am attempting to render two different textures in C++/OpenGL. However, I am encountering an issue where the integer I pass as the texture index to my Fragment Shader always seems to be set to 0. In ...
DDD's user avatar
  • 11
0 votes
2 answers
202 views

Which method of preventing viewport distortions is most ideal?

I am working on rendering various 2D shapes in OpenGL. After initial experimentation, I came to the conclusion that the rendered image is distorted due to the window having a non-square aspect ratio: ...
JS4137's user avatar
  • 107
0 votes
1 answer
221 views

Animating A 2D Stylized Cloud Programmatically

I am tiling the following background cloud image horizontally. I would like to give it more character by making the top of the image deform. I would preferably like the puffs on top to bulge bigger ...
PayasoPrince's user avatar
0 votes
1 answer
247 views

How do game devs tie physics to fps?

If a GPU is rendering 3D graphics, doesn't it have to wait for the CPU to finish computing all the physics calculations before returning a frame? And if it does have to do that, then how does game ...
Nathan Francisco-Ribeiro's user avatar
3 votes
0 answers
83 views

Smooth self shadow on dense foliage

I don't know how to achieve or research smooth lighting on foliage, like in this screenshot of theHunter: Call of the Wild. The grass is translucent, but blocks light smoothly when it's tall and ...
Cebbi's user avatar
  • 171
1 vote
1 answer
720 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
69 views

Why do texture samplers seem to bleed into other instances when rendering multiple instances of the same mesh with differing textures

So I will start off by laying out the relevant structure of my program. I am using vulkan to render the same mesh over a few instances. To do this I have: a vertex buffer, used per vertex, which is ...
InvalidOverhead's user avatar
1 vote
1 answer
185 views

What's the purpose of this cross product and dot product in triangle clipping code?

I have this code that inserts a triangle into the drawing list. The PHD_VBUF structure stores one x,y,z vertex. If the vertex is behind the front plane, then ...
black4's user avatar
  • 205
0 votes
1 answer
291 views

What is the advantage of using Element Buffer Objects, if any?

I'm following the amazing LearnOpenGL tutorials and noticed that Element Buffer Objects, which were mentioned and used in the Hello Triangle chapter, never appear again. So my question is, is using ...
Logan Bentley's user avatar
2 votes
1 answer
412 views

Recreate red & cyan menu item highlight from Persona 5

I would like to animate two of my UI images in a similar manner to the red and blue images below: I'd like to accomplish this through script, but I'm not certain if it's possible. Does anyone have ...
PayasoPrince's user avatar
0 votes
1 answer
280 views

How to store animation data on the GPU?

I want to store my animations on the GPU via buffers (instead of using a single constant buffer which contains the current skeleton frame only), so the vertex shaders of the skeletal meshes can read ...
Raildex's user avatar
  • 761
0 votes
1 answer
92 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
  • 761
0 votes
0 answers
143 views

Is FFXV's LOD system similar to Unreal Nanite's LOD system?

I was reading this article and it seems the LOD system in FFXV is similar in that the texture is not swapped, but the number of polygons changes depending on the distance. Is Nanite the same, or is it ...
Sayaman's user avatar
  • 200
0 votes
1 answer
687 views

Using GetRawTextureData<Color32>() in Unity with non RGBA32 textures?

I am trying to manipulate a Texture2D using GetRawTextureData<Color32>() as this does not require extra memory to be allocated like ...
mike's user avatar
  • 481
0 votes
1 answer
43 views

Object stuck to screen no matter what eye position is used

I've run into an issue when trying to write a simple rendering program in D3D11. I'm 90% sure it's to do with some faulty matrix multiplication or generation, but I've tried debugging the values of ...
vK 3 1 RON's user avatar
0 votes
0 answers
402 views

Directx12 command list reset close memory leak

I simply reset and close the command list but my memory usage goes up 5 gb per second. This is the simple list of things I do Reset command buffer Close command buffer Reset command allocator I feel ...
Roveldo's user avatar
  • 50
0 votes
1 answer
199 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
  • 93
0 votes
1 answer
117 views

How to emulate the look of loading ZX Spectrum title screens in Unity

I am looking to replicate the style of screen loading as seen on the ZX Spectrum in Unity. Not the stripes of colors in the background. Just the title image loading. Specifically the way it looks in ...
Logan Grocholski's user avatar
1 vote
1 answer
718 views

How To Calculate The Correct Sprite Dimensions?

I am creating a 2.5D game similar to Paper Mario. I want the sprites that I import to Unity to be the perfect dimensions so that quality is not affected by the camera's position. If I'm understanding ...
PayasoPrince's user avatar
0 votes
1 answer
3k views

Sprite becomes blurry or jagged when camera zooms out

My game uses 2D sprites in a 3D environment, and I'm really struggling with my sprites' quality. I have high resolution vector art with clean linework created for my sprite. I'm exporting it as a .PNG ...
PayasoPrince's user avatar

1
2 3 4 5
22