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
1 vote
0 answers
43 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
55 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
  • 703
17 votes
3 answers
5k 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
153 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
72 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
29 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
107 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
39 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
59 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
  • 395
0 votes
0 answers
41 views

How to smooth sprites drawn from an atlas (either with linear filtering or some post processing technique)?

I've been doing a 2D renderer for a Tibia clone and came up with a design where all textures are bundled into a texture atlas. The pixelated style isn't working well (textures are often shrinked or ...
fusion32's user avatar
1 vote
0 answers
31 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
106 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
33 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
87 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
41 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
128 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
82 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
31 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
  • 1
0 votes
2 answers
133 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
150 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
186 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
75 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
408 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
60 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
149 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
  • 167
0 votes
1 answer
150 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
262 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
159 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
  • 703
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
0 answers
128 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
514 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
41 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
298 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
146 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
1 answer
98 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
437 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
2k 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
0 votes
1 answer
189 views

r/l/b/t parameters in orthographic projection?

I am trying to implement following: What are the l r b t units? I understood that r-l= is just ...
dgan's user avatar
  • 131
1 vote
1 answer
265 views

Can less than 30 FPS feel good with 60 FPS input handling?

2D animation can go as low as 12 FPS and still feel good to watch, but the minimum FPS considered to be "playable" in games is 30 fps. I believe this to be a consequence of the user ...
Gyoo's user avatar
  • 72
1 vote
1 answer
168 views

How do I modify parts of a texture on a quad?

I am programming a Real Time Strategy game, and I was wondering how I could retexture one part of a terrain quad to change a texture in the position where I click at. For example, if I clicked in the ...
rjhwinner03's user avatar
0 votes
0 answers
168 views

How can I move an object on a non flat surface in vulkan?

I am writing a small "game" in vulkan, in which a car can move in an environment that is not flat, like a desert with valleys. I am able to translate my car and follow it with the camera on ...
Luca Venturini's user avatar
0 votes
1 answer
85 views

Scene Turns purple on headset but not in editor

I have a scene that looks fine in the editor and even if I am connected via Oculus link and am running the game the plane interior comes out fine. However when I push a build through adb or app lab I ...
Doug Ray's user avatar
  • 143
1 vote
1 answer
252 views

Screen space reflections bug

I try to implement screen space reflections in my graphics engine using ray marching algorithm. After a lot of trying I got this result: https://youtu.be/yzkgpcliBVQ As you can see, the reflections ...
Алексей Карамбович's user avatar
0 votes
0 answers
152 views

WDDM vs DirectX vs Device Driver(say for Nvidia Card )?

I thought I knew what DX and Graphics card device driver meant. Today I was reading about Windows Display Driver Model(WDDM) and couldn't figure out what it does? It says WDDM is a Display driver ...
GRANZER's user avatar
  • 101
0 votes
1 answer
75 views

Unity 2021 Silicon Build Performs Poorly with DynamicGI.UpdateEnvironment()

I recently upgraded my large-scale RPG world project from 2019 LTS version to 2021 for the native Silicon support. I have a Silicon based Mac and even though the game seems to have smoother FPS in the ...
Sarp Saysel's user avatar
0 votes
0 answers
548 views

Unity UI Line Rendering (UILineRenderer) pixelated

I'm using UILineRenderer to draw curve of the map. The one thing I'm finding is that the drawing is pixelated despite adding more data points. setting the quality in game view to 4K UHD, and ...
ThePedestrian's user avatar
1 vote
1 answer
5k views

What is the purpose of tangent and bitangent vertex attributes?

Every vertex of a 3D mesh has position and some optional values like texture coordinates, vertex color, and normal, but also tangent and bitangent vectors. While the purposes of texture coords, vertex ...
convert's user avatar
0 votes
0 answers
36 views

Tiles render a black margin depending of screen size

I have a rendering problem since long time and I don't know how to solve it. I develop roguelike game where I display a 2D TopView map based on a simple png file like this : But, with different game ...
bux's user avatar
  • 147
0 votes
1 answer
353 views

Level Creation - How to achieve seamless race tracks?

I'm aiming to make a racing game in Unity. Please take a look at the image provided below, and suggest me the best technique to achieve something like it. (Keeping the performance as optimized as ...
Haseeb Ali's user avatar
0 votes
1 answer
261 views

Choosing Number of Points and PPI Resolution To Future-Proof Game Images

I'm working on an iOS SpriteKit game and I'm currently designing some images to be used as character animations in Photoshop. There are many different iPhones with various screen sizes and resolutions,...
muZero's user avatar
  • 103

1
2 3 4 5
21