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.

128 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
2k views

Making a pixel-perfect viewport in LibGDX

My game that uses LibGDX as the graphics library, should be playable with every display. Here's the problem: It have to be pixel-perfect. That means, the scale factor must be an integer value, so that ...
null's user avatar
  • 191
5 votes
1 answer
212 views

Fixing the size?

My app isn't compatible with all screen sizes. When testing on a small size, my textview overlaps with my button. So, as suggested on the Android Documentation, and many stack overflow pages, I ...
Ruchir Baronia'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
4 votes
0 answers
1k views

Normal Mapping a Cubemap

I posted a question on Stackoverflow and it was suggested that it would be better asked here. I have a sphere. It was created via the icosphere method outlined here: http://blog.andreaskahler.com/2009/...
NeomerArcana's user avatar
4 votes
0 answers
244 views

DX 11 Specular Highlights in Deferred Renderer

I am currently implementing a deferred renderer in DX11.1. Right now I am having a problem that I can't seem to crack with specular highlights when I have multiple light sources. I keep a vector of ...
Patrick Purcell'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
3 votes
0 answers
344 views

Changing sprite tint over time in Unity. Sprites affected by "light"

Recently I was playing "Altos Adventure" on mobile. I was curious how I could implement an effect similar to their game background. The sprites tint over time to match the time of a day. It's blue ...
Random generalist's user avatar
3 votes
0 answers
460 views

Smoothly fitting texture tiles using alpha gradient on edges

I'm trying to draw a background texture with tiles that I'll rotate and mirror to create a maze. Here is a sample tile: As you can see, I use an alpha gradient on the borders. If I'd use a sharp ...
Juan's user avatar
  • 193
3 votes
0 answers
493 views

Subsurface Scattering - Transmittance

I have a question related to SSS and especially transmittance. I've looked at several papers about that topic, most of them from Jorge Jimenez, which are very interesting and, I admit, a bit hard for ...
MaT's user avatar
  • 1,045
3 votes
0 answers
244 views

Unusual black squares in transparency effect after wake from sleep

I've encountered unusual black squares in semi transparent textures for a while now, usually in processes that were resumed after the computer woke from sleep. For example I've seen the effect in the ...
Peter's user avatar
  • 9,925
3 votes
0 answers
1k views

Geometry Shader and Stream Output with Directx11

I am having trouble trying to send verticies generated in the Geometry Shader to Stream Output. What I am trying to accomplish is to generate verticies from the Geometry Shader and store them to a ...
lexro's user avatar
  • 31
2 votes
1 answer
1k views

How to manually render with a given camera in Unreal Engine 4?

I would like to render with any camera at any given time for a Portal clone project. There's a USceneCaptureComponent2D but it renders the whole scene to a texture. ...
Daniel Marques's user avatar
2 votes
0 answers
49 views

How to generate a star onto a render texture with spherical warping

How would one proceduraly generate a star in a compute shader that looks like one of thes two at any size needed. Also any way transfer this into a spherical map, would be appreciated. Goal is to ...
chief65's user avatar
  • 21
2 votes
0 answers
32 views

Cheap way to soften contactpoint of character with ground

The view of my game is always semi topdown. I'm trying to make the contactpoint between characters and the floorplane more grounded without rendering hundreds of sprites. One thing that I think could ...
Dirk Boer's user avatar
  • 139
2 votes
0 answers
435 views

How do you find the collision between 3D boxes and 3D QUAD face meshes?

I have an axis aligned bounding boxes for 3D object collision, but I have a complex 3d mesh that's divided into 3d faces so I want to check for bounding boxes and collision with the faces of that ...
karamazovbros's user avatar
2 votes
0 answers
118 views

How would I warp a mesh with code?

I recently asked a question about putting a camera at the head of a 3D human model here and it worked out rather well and whatnot, but there is still a problem that bothers me: How would I contort/...
Gumptastic's user avatar
2 votes
0 answers
876 views

Quaternion to direction vector - flipping

I've kinda solved this myself by adapting the Camera::setDirection code from OGRE to work for my need: Now I have the following code: ...
Ilija Boshkov'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
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
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
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
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
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
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
1 vote
1 answer
200 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
1 vote
1 answer
270 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
1 vote
0 answers
131 views

How to implement texture slicing

I'm making a simple game in C# and i'm trying to slice my UI images into 9 smaller rectangles, so the image doesn't get stretched when drawing to different resolutions, but i'm having lots of problems ...
RickS.'s user avatar
  • 51
1 vote
0 answers
70 views

Synchronizing transformation of a Rect class between CPU and GPU

I implemented a Rect class in my custom game engine that utilizes openGL. I decided to approach the whole Rect class design like ...
Fudge Racoon's user avatar
1 vote
0 answers
194 views

Which algorithms to use for drawing procedural paint splatters?

I want to create procedural paint splatters on textures. I want somewhat similar effect like in Splatoon 2. I think I need to modify albedo image - drawing splatters there. Right now I came up with ...
idchlife's user avatar
  • 229
1 vote
1 answer
241 views

OpenGL height map accuracy for planetary rendering

I am trying to implement planetary rendering and I am trying to use OpenGL tessellation to model the terrain. Here is an overview picture using cube faces projected onto a sphere: If I use the ...
wedesoft's user avatar
  • 125
1 vote
0 answers
62 views

Unreasonable CPU consumption for server build with nographics

I have built my game in server mode on Mac OS and attached profiler to it. In profiler I can see unreasonable high cpu load. Other scripts take a lot of cpu time. How can this be optimized? Vsync ...
Daily Dreamer's user avatar
1 vote
1 answer
49 views

Find point along x axis where yz plane flips to back facing after perspective projection. Have a solution but don't know why it works

I am trying to find the point along the x axis where a plane with normal pointing along the x axis would flip to back facing after perspective projection. Essentially the red line in this image. My ...
Kaitlyn Emmons's user avatar
1 vote
0 answers
423 views

Line of sight shader

Strategy games (such as Door Kickers) use a player's unit's line-of-sight as a major game feature. To provide feedback to the player regarding which areas are in view and which are not, different ...
DrMcCleod's user avatar
  • 111
1 vote
0 answers
96 views

GLSL link fails with C9999 (too many buffer declarations?)

I'm receiving a C9999 (*** exception during compilation ***) linker error for an OpenGl 4.6 compute shader. It seems to be related to the number of SSBOs I have declared (14 separate declarations), ...
gdevi's user avatar
  • 11
1 vote
0 answers
348 views

How to decide sprite size for isometric tile textures?

When I draw these textures on screen, I put them in a sprite and specify a width and height to draw the sprites in like this: ...
eguneys's user avatar
  • 247
1 vote
0 answers
35 views

Why does BorderLayout crop out JSlider on JFrame

I have some working code with a small circle randomly appearing around a large circle in the middle, kinda like planets. I have implemented a JSlider that controls the speed of the small ball moving ...
Laser Infinite's user avatar
1 vote
0 answers
2k views

Post processing effects not visible on mobile apk build

While setting up post processing on a project that I am currently working on, I discovered that post processing effects are not visible on the apk build on mobile. I setup a new Project with URP on ...
Gozmetaiemax's user avatar
1 vote
0 answers
188 views

Draw coloured transparent polygons on top of texture in modern opengl

I am trying to render an image in the viewPort using symmetry_create = 1 and binding texture to it. ...
Argha Chakraborty's user avatar
1 vote
0 answers
1k views

Is it possible to crop a render texture in unity?

Basically what I want to do is, take the source render texture from OnRenderImage and crop it (continuously). I've already achieved this by using ...
Baek Ryun's user avatar
1 vote
3 answers
2k views

Graphics2D.drawImage not working

I'm trying to come up with my own game using Java AWT after watching a few video tutorials. However, I encountered a problem where I cannot draw an external image file that I loaded using the ...
Zerro97's user avatar
  • 53
1 vote
0 answers
89 views

Wave interference like render effect

(Someone on gaming told me to better post this here.) So in a lot of games lately I've seen this weird "light interference effect" where objects on the edges of my screen become red and blue blurry. ...
Rokolell's user avatar
1 vote
0 answers
112 views

images loaded onto texture appear completely white

I am applying a texture to a primitive plane using ARKit and Unity like so, ...
Pavan K's user avatar
  • 163
1 vote
0 answers
115 views

What is a good way to load and provide graphics to classes and subclasses in monogame?

First of all: I'm not sure if my question is worded well, I just can't think of any better way. I'm also a beginner both at Monogame and programming in general, so my question might miss the actual ...
Flo's user avatar
  • 11
1 vote
0 answers
46 views

Tiled: handling multiple map sizes

I have two sets of assets (lo res and hi res) that are exact replicas of each other except one set is twice the size of the other and used for larger screens. At runtime, I find the users screen size, ...
Eric's user avatar
  • 111
1 vote
0 answers
130 views

How to reduce weird polygon artifacts?

I wrote an application that takes an obj file, parses all the vertices, UV coordinates and normals, loads them into an OpenGL VBO and presents the model on screen. It works, but I'm getting annoying ...
MathuSum Mut's user avatar
1 vote
0 answers
115 views

How to mitigate this strange pattern shown in Phong lighting?

I am creating an entire lighting scene in OpenGL. The entire scene consist of only one point light. I noticed some strange z-fighting like pattern. This flickers when I move the camera. Can anyone ...
Lywx's user avatar
  • 111
1 vote
0 answers
687 views

How to fit a bitmap to a random size rect so it does not strech? (Android Studio)

I'm trying to fit a bitmap to a random size rect but I don't want the bitmap to be streched out. I've tried using BitmapShader and tile it but it become animated and not fixed. Here is my code ...
realNewbie's user avatar
1 vote
0 answers
1k views

How does Unity's QualitySettings.masterTextureLimit work?

I'm trying to get to the bottom of how masterTextureLimit works, but my results have been inconsistent so far. I created a massive sprite (8192x8192), and I'd like to resize it at runtime to save ...
eternal's user avatar
  • 341
1 vote
0 answers
186 views

PIXI v4 - Is possible to disable Multi Texture Batching in PIXI v4 ?

I would like to know if is possible to disable the multi texture batching in a PIXI V4 game. Recently i jus update my game PIXI lib from version 3 to 4.2. I`m using cocoon Canvas + . It seems ...
Daniel Santos's user avatar
1 vote
0 answers
157 views

Rotating an Object Around an Axis

I have a circular shape object, which I want to rotate like a fan along it's own axis. I can change the rotation in any direction i.e. dx, dy, dz using my transformation matrix. The following it's ...
Marvel's user avatar
  • 131