Questions tagged [graphics-programming]
Programming related to the visual representation of information on computer screens.
412 questions
1
vote
1
answer
134
views
How to adjust scaling with rotation?
I'm rendering a texture to a square.
I have to scale the texture because it is 10 times wider than it is tall.
In my fragment shader I divide both the X and Y texture coordinates (I'm using OpenGL), ...
2
votes
3
answers
2k
views
OpenGL: How do I map a square texture onto a rectangular surface?
I'm not asking about how to map the texture itself. I'm just wondering how I could go about evenly mapping a texture to an object so that it repeats itself instead of stretching to the surface.
For ...
0
votes
1
answer
670
views
Normals on a sphere
I am generating vertices for a sphere by normalizing the vertices of a cube. The coordinates of the vertices are mapped to [-1; 1].
.
I want to get the normal vector of each vertex.
My question is ...
2
votes
2
answers
598
views
How To Add Animation Graphics To An Android Game
How to make something like this animation drawings that coming out from the car ?
(I'm using android studio)
The Game's Link : Finger Driver
2
votes
0
answers
41
views
What does a game programmer and graphics programmer do? [duplicate]
I'm quite the novice in terms of my knowledge of game development, and I'd incredibly appreciate any further insight on this. To be a bit more specific, I encountered this video, (https://www.youtube....
2
votes
1
answer
2k
views
One Giant Shader VS Many Small Shaders
I am building forward rendering engine combined with atlas shadow map technique.
My goal is to build an engine that is capable of rendering similar scenes from games such as..
Doom
Overwatch
So I ...
5
votes
2
answers
8k
views
Do sprite animations usually run at the same framerate as the game itself?
Just getting into game development and wondering about fps. For example, Binding of Isaac can run at 60 fps, but looking at its sprite sheet, the walk animation is only 12 frames. The game animation ...
1
vote
2
answers
210
views
How to clip 3D object in projection (octants)?
In example we've wrote some code in Pascal (graph unit) which rotates 3D object in oblique frontal (dimetric) projection in all octants positioned in center of them.
The projection's type:
The code 1 ...
0
votes
1
answer
1k
views
GLfloat vs GLfixed vs GLint performance in 2017
Some people claim that floats should be used for rendering vertices in modern graphics cards, because graphics cards are optimized for floating-point arithmetic and therefore, integer calculations are ...
0
votes
2
answers
120
views
How to render a model that consists of individually transformable parts?
Consider a 3D model for a spider that consists of a body and eight legs. The legs can be transformed (rotated) relative to the body. I am not sure what the common ways of rendering such a scene are, ...
1
vote
1
answer
487
views
Zooming in so a smaller portion of the game scene fills the entire screen
so i am creating a game similar to super-smash-bros, in which the camera should zoom in on players when they are close together, and scale back when they are apart. I create a window for my game via
<...
1
vote
1
answer
1k
views
Change transparency of image at runtime, LOVE2D
I would like to know how to take a defined image (e.g. a tile) in the LOVE game engine and draw it with a transparency that may vary per-frame. Stencils seem to only work for completely hiding parts ...
8
votes
4
answers
4k
views
Why are 3d projections on a 2d screen not like what the human eye sees?
Firstly, I'm sorry if this question doesn't make much sense or is poorly written - I have almost no experience with programming, and none at all with game development. I'm also not sure it's an ...
0
votes
1
answer
63
views
OpenGL only utilizing the last initialized sprite's positional data
I'm currently creating a 2d fighting game utilizing OpenGL and I have run into a problem where OpenGL is only drawing at my last initialized sprite position, regardless of how many sprites I ...
4
votes
3
answers
4k
views
Ray tracing and Z buffering in graphics
I am a high school student taking computer science as a subject, and someone who is very interested in the game development industry. I am currently writing an essay on Raytracing and Z-buffering by ...
0
votes
1
answer
660
views
How shader program still works even after detaching shader object?
In the following process of shader creation, shader object is detached after linking program (glLinkProgram), how does the shader program still works after detaching and deleting shader objects?
...
1
vote
1
answer
2k
views
What is the "correct" way to render to a cubemap using Vulkan?
After searching far and wide for the solution to this, the only one I have been able to find that verifiably works is to the render a face to a framebuffer and then use a memcpy to copy that ...
58
votes
7
answers
28k
views
Why do game studios need graphics programmers if they're using game engines?
In the credits section of the games I play, there are names of graphics programmers. If they used a game engine, why do they need a graphics programmer? Isn't the game engine doing their job?
1
vote
0
answers
320
views
How do I deform a texture?
I'm using LibGDX, and I don't know where to start; I would like to deform a texture.
Let's say I have a PolygonSprite, and I have vertices and a texture.
Image 1 represents what I have. I would like ...
1
vote
2
answers
2k
views
Playstation 4 OpenGL ES support (or Xbox) [closed]
I know that the Playstation 3 supported at least OpenGL ES 1.0, and the Vita OpenGL ES 2.0. But what about the Playstation 4 (and/or the new PS4 Pro)? Does anyone know for certain if it has native ...
0
votes
1
answer
279
views
Why is my transform stretching?
I've read a lot about transformations: model to world space, world to camera space and projection transformationsl but when programming it, I can't get things right. I think I'm missing something, so ...
1
vote
2
answers
4k
views
2D racetrack collision bounce using angle of reflection (bounce angle)
I am currently working on a race game where I want to define the collision of my vehicle with the outer and inner borders of the track.
If that happens to be the case I want to vehicle to bounce of ...
0
votes
2
answers
135
views
Java 2D - Cannot get code to work for generating points for a line with a start point and Angle
I am developing a Java 2D video game. I am trying to write code to generate points for a line (actually a projectile path), at a specified angle, from a given start point. There seems to be ...
0
votes
1
answer
82
views
Possible Framerate Problem using Pygame?
This is the first game I've ever tried to make using Pygame and I am running into some issues displaying the player character and the enemy characters. I have a "main" game file and other ...
-1
votes
1
answer
2k
views
How can you procedurally dismember a character model? [duplicate]
For example in the new Doom, you can use a chain saw and slash an enemy apart, the enemy actually splits in half in the path of the chain saw. I know how to do the cheap effects where you store a copy ...
2
votes
1
answer
630
views
Second glBindBuffer() call crashes program on Draw call
Background/Issue: I'm pretty new to openGL and I'm trying to create a game engine (for learning purposes) and my program keeps crashing on my glDrawElements() call but only after trying to set ...
1
vote
2
answers
688
views
Mining procedural caves in Unity
I am using cellular automata to randomly generate caves in Unity. Attached is a screenshot:
The black area represents walls. Walls can contain resources that can be mined.
Walls are made of blocks. ...
1
vote
1
answer
457
views
What does the alpha channel on a back buffer do?
I see that e.g. in OpenGL it is possible to create a back buffer with an alpha channel (RGBA8888). What's the effect/advantage over having an RGB888 back buffer?
0
votes
1
answer
88
views
Trying to subdivide an ISO tile
I have code that calculates where the user clicked inside an iso tile in an isometric map. The tile has a width of 1 unit and a height of 0.5 units. My code calculates where they touched inside the ...
1
vote
2
answers
4k
views
How do I create my own GPU accelerated graphics API in C#?
I am creating 2D game engine in C# and I need some graphic API, so that user can draw sprites or convex vector shapes. I tried to use GDI+ for it. But I discovered that GDI+ is not GPU accelerated and ...
0
votes
1
answer
770
views
Artifacts when trying to implement Cook-Torrance BRDF
I am trying to implement the Cook-Torrance BRDF within OpenGL, but I keep running into issues. The most obvious one are black patches and a bright spot at (0, 0). I checked my shader multiple times, ...
4
votes
1
answer
868
views
How could I render a star like those in Elite Dangerous - coronas and some sort of 3D "plasma" effect on the surface?
Lets assume I wish to render a large, 3D, star object in a game engine using OpenGL. I can use a few different meshing methods: this includes mapping a cube to a sphere (with better subdivision to ...
0
votes
0
answers
2k
views
How to use Graphics.DrawProcedural to render a quad over a scene?
I want to learn this so I could do some screen space particles in Unity. This is meant as a sort of "hello world" shader.
my current script is:
...
3
votes
2
answers
837
views
How can I make a "paint" effect?
I am wondering how one could implement "paint" in games. As a reference, I have two games I am specifically thinking about which are Super Mario Sunshine with its "goo" and Splatoon.
I'm wondering ...
11
votes
1
answer
3k
views
Shader to see silhouette through alpha blended sprites
I want to achieve in Unity a see through effect like the one in these examples:
In my specific scenario there are a couple of requirements:
Sprites are using alpha blending, and sprites have ...
5
votes
3
answers
1k
views
How do I handle Game Screens in LibGDX?
In my game the main screen is the playscreen. But because I want to draw the menu and the gameover screen on top of the playscreen, I don't create separate screens for them. But if I want to replay, I ...
0
votes
1
answer
95
views
how are the vertex properties of meshpart decided based on model format in xna
Exactly how the question says , how does the vertex properties like vertex stride and the data stored in the mesh part decided based on the format of a model and how would i determine that and then ...
28
votes
1
answer
16k
views
What are screen space derivatives and when would I use them?
I see the ddx and ddy glsl functions and the hlsl equivalents come up in shader code every now and then. I'm currently using ...
29
votes
3
answers
15k
views
Why don't most major game engines use gifs for animated textures?
What is better to use Animation Sheets or Gifs? One advantage Gifs have over Animation Sheets is that you don't have to think about frames going too fast or too slow because of your code and updating ...
0
votes
1
answer
764
views
How do I perform an Iris Wipe transition, using C++ in SDL 2.0?
How do I perform image masking/clipping using an arbitrary shape like a circle?
I want to do an Iris Wipe transition, similar to in the movies. By Iris transition, I mean the circle transition ...
0
votes
2
answers
2k
views
What's the difference between Gameplay Programming and Graphic Programming?
I know the answers are obvious, someone told me this:
Graphics Programming: DirectX(or Direct3d), OpenGL, Vulkan, Metal..
Gameplay Programming: Bringing everything together. From design, music, ...
2
votes
3
answers
5k
views
What is the lowest-level way of making graphics from scratch?
I am currently trying to get into game development and trying to understand 3D games. I would like to learn to code from scratch without any 3D engines. Some of the things I found was libraries like ...
1
vote
2
answers
288
views
Can my game be 8-bit even though it has hi-res text? [closed]
My game has 8-bit sounds, 8-bit graphics, 8-bit everything. Except one thing: the level selection screen. It has small text and therefore must be hi-res to be readable. What should I do?
Edit: The ...
0
votes
1
answer
1k
views
How does code translate to graphics? [closed]
I know this is kind of a basic question, but I'm trying to create my own game from scratch and really don't understand this. How does the code of a videogame program certain pixels to be certain ...
0
votes
2
answers
478
views
DX11 Clear Issue, Irregular pattern
So far I've put together a bare minimum of a DirectX 11 application. All it does is clear the window to a random shade of red.
...
5
votes
2
answers
6k
views
Separating game logic and rendering
I know this has been asked before but I would like some things cleared up.
I understand that game logic and rendering should be separated but my problem is more or less how? For instance, should the ...
1
vote
0
answers
70
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 ...
26
votes
8
answers
14k
views
What advantage do OpenGL, SFML and SDL have over software rendering?
I started watching the Handmade Hero stream, where Casey Muratori creates a game engine without using frameworks or such.
Yesterday I got to the part where he showed how an image is drawn onto the ...
2
votes
2
answers
613
views
Anti-Aliasing Problem
So, I was annoyed by how the HUD for my GameState was very pixel-ated and I wanted to change that through the use of anti-aliasing. However, it works with a small exception:
It adds all these lines to ...
0
votes
1
answer
282
views
How does one structure a Player GUI
I am using Java and the Slick2D library.
I've been testing around with ways to develop a Player Graphical User Interface (GUI) (to show armour, items picked up, weapons equipped, etc). The one ...