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.

110 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
952 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 ...
5
votes
1answer
181 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 ...
4
votes
0answers
753 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/...
4
votes
0answers
215 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 ...
3
votes
0answers
227 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 ...
3
votes
1answer
632 views

Loop around a 2D Tile Map

I have made an algorithm for procedurally generating a 2D tile map in Unity. The player can use the mouse to pan the view and look at the map. My intention was that when the player reaches one of ...
3
votes
0answers
313 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 ...
3
votes
0answers
368 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 ...
3
votes
0answers
430 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 ...
3
votes
0answers
222 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 ...
3
votes
0answers
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 ...
2
votes
0answers
28 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 ...
2
votes
0answers
30 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 ...
2
votes
0answers
238 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 ...
2
votes
0answers
114 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/...
2
votes
0answers
781 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: ...
1
vote
1answer
25 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 ...
1
vote
0answers
36 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 ...
1
vote
0answers
40 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), ...
1
vote
1answer
30 views

How do I prevent buffered image size fluctuation when rotating?

As you can see in the GIF, as the car rotates, as the Car rotates, the size appears to change to fit the determined height and width, what would be the best way to change these in conjunction with the ...
1
vote
1answer
144 views

How can I render a font in C with OpenGL?

What I tried: I was testing some things in order to render text with stb_truetype.h and OpenGL in C. I took as a reference the example that appears here. Basically, this example, loads a .ttf file and ...
1
vote
0answers
64 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: ...
1
vote
0answers
24 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 ...
1
vote
0answers
332 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 ...
1
vote
2answers
106 views

Generate a wave noise map

How can we generate the wave-like texture like this The author(RujiK) says in reply he used the texture generator(http://www.kitfox.com/projects/perlinNoiseMaker/index.html), but no matter how I ...
1
vote
1answer
66 views

OpenGL approach to depth-testing-like combination of a large buffer of fragments

I have a depth buffer and color buffer created by another effect. The buffer is more than double my screen size. It is not rendered from geometry, but as a whole it resembles a rendered scene with an ...
1
vote
0answers
119 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. ...
1
vote
0answers
551 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 ...
1
vote
0answers
57 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. ...
1
vote
0answers
90 views

images loaded onto texture appear completely white

I am applying a texture to a primitive plane using ARKit and Unity like so, ...
1
vote
0answers
86 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 ...
1
vote
0answers
39 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, ...
1
vote
0answers
97 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 ...
1
vote
0answers
80 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 ...
1
vote
0answers
516 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 ...
1
vote
0answers
845 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 ...
1
vote
0answers
172 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 ...
1
vote
0answers
143 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 ...
1
vote
0answers
75 views

Let one camera frustum intersect another's

I am currently struggling with the issue of combining two camera's render outputs. One camera renders orthographic 2D objects (e.g. facing the X/Y plane), the other renders 3D objects overlaid on top ...
1
vote
0answers
221 views

Advice on mapping tiles to a height map/3D world

I've been attempting to think of a way to map tiles to a height map. Where a grid can be either layered or integrated into the world data. However, since I am not using voxels I could use some advice ...
1
vote
0answers
116 views

Having problems drawing entities the right way in my isometric game

I am making an isometric game where I have moving Entities's not bound to tiles, and a 3d ArrayList map which is populated by <...
1
vote
0answers
31 views

Multi Sampling in Rendering Pipeline?

I am trying to understand : How does multi-sampling rasterization effects pixel shader output? In a nutshell (i am skipping some steps to stay on point of question): Vertex data is fetched. Vertex ...
1
vote
0answers
57 views

Concerns about using a 3D tileset grid

I'm thinking of implementing a 3D tile system for my engine, and tie it to it's world streaming system as well. As in, using it for it's terrain for an open world in an engine that theoretically can ...
1
vote
0answers
74 views

How to create words as objects in Unity?

I am working on a game that has words as obstacles, i.e. the player needs to climb over and around them. There will be hundreds of words in the game therefore I need a way to automate the placement. I ...
1
vote
0answers
44 views

Matrix stack from direction vector chain

I've implemented an IK system for a grabber arm based on several straight segments, starting from a fixed point. The IK is based on a mass-spring simulation, which eventually rests. What I'm left with ...
1
vote
0answers
2k views

Implement Candy Crush like level graph

I want to implement road-map like level graph where in you can see what level are you and your friends are on. Just like we see in Candy Crush Saga.For people who have not seen Candy Crush Saga, ...
1
vote
0answers
57 views

Directional light view frustum stabilisation

Calculating directional light view frustum based on scene objects(bounding frustum) results in noticeable scene jittering on camera movement in CSM and non-CSM rendering code paths. What are the ...
1
vote
0answers
130 views

convert 2d pt into non-affine coordinate system

Say I have a coordinate system that goes from (0,0) to (1,1). We'll call this screen_space. ...
1
vote
0answers
273 views

Texture artifacts depending on texture size

I get some strange artifacting with textures depending on their size. I run OpenGL 3.3 with an GTX 580 so it should definitely support non power of two textures. I've narrowed down the problem ...
1
vote
0answers
615 views

Algorithm for creating mesh from 2D image silhouette

I'm looking for an algorithm that can take a 2D image, approximate it's shape and then generate a low poly mesh. Basically, the same what Unity does with sprites when you select tight mesh instead of ...