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.
1,068
questions
2
votes
1
answer
50
views
How to create colorizable vegetation albedo textures similar to Horizon Zero Dawn?
In the talk "Between Tech and Art: the Vegetation of Horizon Zero Dawn", Gilbert Sanders says "we average out the color of our albedo textures to mid gray value".
But the final ...
0
votes
1
answer
35
views
RenderTexture doesn’t work in build
A Gameobject sprite, a Texture2D which is written into using "Texture2D.ReadPixels" works/is visible in the Editor/Play Mode but is not/is invisible when built.
The Texture2D is written to ...
0
votes
1
answer
43
views
post process behavior artifacts on new unity versions
I have an old project that I need to run on Unity 2022.3.40. It uses post process behavior and post process works absolutely fine in the editor, just as before migrating to new Unity. But when I make ...
0
votes
1
answer
24
views
Differences between rotations and translations of different camera properties in LiBGDX
I am trying to understand the camera API (applicable to perspective camera ONLY) of LiBGDX.
It really does not make sense that you can call rotate and translate on many different properties of the ...
0
votes
0
answers
31
views
How do I repeatedly change the colors of a list of cubes in run time without causing a bottleneck to my fluid simulation?
I am coding a 3d fluid simulation. I want to render each cell of the simulation grid with a cube, so I have a grid of cubes. Each cube has its own color, and the colors are stored in a compute buffer. ...
0
votes
0
answers
32
views
LOD selection issue
I have been developing an LOD algorithm similar to Nanite's style. I have been developing the algorithm using Vulkan .However, I encountered problems with LOD selection. It seems that the algorithm ...
0
votes
0
answers
31
views
Rendering sometimes blocks when updating Index Buffer at runtime
I developed a way to update my index buffer at run-time in Vulkan. Unfortunately, sometimes the rendering process blocks. I think that is caused by the update of the index buffer. The following code ...
0
votes
0
answers
98
views
How to compute screen-space error for LOD selection?
I'm developing a LOD selection system and I would like to select a LOD level based on screen-space error. Could someone explain how I can accurately compute the screen-space error?
0
votes
1
answer
58
views
Update index buffer in Vulkan at run-time
What is the proper way to update at run-time the index buffer in Vulkan?
Many thanks
2
votes
1
answer
94
views
How to check if an AABB is behind another AABB while isometric depth sorting?
I have an isometric scene in a custom engine where my world sim is 3D, but I'm rendering sprites. To depth sort, I follow the approach in this blog post. Basically: wrap each sprite in an AABB, then ...
0
votes
0
answers
71
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 ...
0
votes
0
answers
25
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 ...
0
votes
0
answers
37
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 ...
0
votes
0
answers
35
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 ...
4
votes
1
answer
126
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
0
answers
30
views
Black screen when sizing JFrame/JPanel with Toolkit.getDefaultToolkit().getScreenSize()
I am working on a game engine.
...
0
votes
0
answers
78
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, ...
1
vote
1
answer
98
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 ...
0
votes
1
answer
85
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 ...
2
votes
1
answer
115
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 ...
0
votes
1
answer
199
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 ...
0
votes
1
answer
117
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 ...
0
votes
0
answers
61
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 ...
0
votes
0
answers
38
views
1
vote
0
answers
65
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 ...
2
votes
1
answer
370
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 ...
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 ...
1
vote
0
answers
211
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 ...
0
votes
0
answers
468
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 ...
1
vote
0
answers
33
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 ...
1
vote
1
answer
127
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 ...
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 ...
0
votes
1
answer
84
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?
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 ...
0
votes
0
answers
46
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:
...
0
votes
1
answer
151
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 ...
1
vote
0
answers
64
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. ...
0
votes
1
answer
279
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 ...
1
vote
1
answer
206
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 ...
0
votes
2
answers
284
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:
...
0
votes
1
answer
282
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 ...
0
votes
1
answer
284
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 ...
3
votes
0
answers
90
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 ...
1
vote
1
answer
918
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
73
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 ...
1
vote
1
answer
197
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 ...
0
votes
1
answer
387
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 ...
2
votes
1
answer
490
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 ...
0
votes
1
answer
336
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 ...
0
votes
1
answer
115
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 ...