Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Programming related to the visual representation of information on computer screens.

0
votes
1answer
127 views

How to create a decent strategy game without becoming an artist?

I love to make games. But I am not an artist. I never learned to make 2d or 3d models. I spent most of my time on programming. I know there are Game engines for non-programmers. But I am looking a way ...
0
votes
0answers
71 views

Rendering clouds similar to Sky: Light Awaits?

I'm interested in adding clouds to my game, with a style similar to those in Sky: Light Awaits You can see them in motion in these videos: (Starts at 26:00) https://www.youtube.com/watch?v=...
0
votes
1answer
14 views

Directx 12 Root signature compatibility with pso

Can you bind a different root signature than the one that pipeline was created with? If so does it have to have exactly the same parameters or could it have like one more but the pipeline will ignore ...
1
vote
0answers
85 views

how to calculate smooth normals for 10,000,000 vertices?

I am trying to calculate smooth normals with angle weight for a huge mesh with 10 million vertices. Currently, i am using map/dictionary to store the traingles connected to a vertex. That is, for each ...
1
vote
1answer
119 views

Why do GPUs have limited amount of allocations?

I've been learning Vulkan lately and I read that you can allocate VRAM memory only set amount of times and it doesn't matter if it's 2gb or 2kb, why is it? I'm specifically referring to ...
3
votes
1answer
67 views

Render moveable entities into 3D isometric world?

I have a separate list of moveable entities, and then the regular 3D map, represented by a 2D array of stacks of tiles. My problem is that right now, I'm rendering my moveable entities after the map, ...
2
votes
1answer
153 views

Strange realtime shadows in Unity3D

I'm trying to do realtime lighting, and my shadows are acting very strange. When I project a spotlight out from the camera (like a flashlight in a first person game) my shadows show up as 3D skews of ...
0
votes
0answers
31 views

D3D12 SV_InstanceID + dynamic indexing not working?

I'm implementing geometry instancing in my engine and I am having trouble indexing the constant buffer that's holding per-instance data using SV_InstanceID. Am I doing something wrong? Here is the ...
21
votes
1answer
2k views

Why do transformation matrices always have an extra dimension? [duplicate]

In 3D math I always see matrices with one additional dimension. For example, in 3D graphics, matrices are always 4x4 and in 2d they are 3x3 matrices. Can anyone explain why?
5
votes
1answer
100 views

Ordered dithering between “discrete” colors?

I want to achieve color dithering between discrete colors like this: As you can see, there is no gradient, or technically there is, but very discrete as it's only a 3 color image (right bar). So I ...
0
votes
0answers
107 views

Add emission to shader

I wrote a shader for a targeting system. It creates a parabola of chevron arrows which slowly scroll in the direction of the trajectory. The chevrons also fade to zero alpha at the beginning and end. ...
1
vote
1answer
93 views

Does it make sense to do more calculations in the fragment shader if there are more vertices than pixels?

I'm very new to graphics programming, and as I understand it vertex shaders are called per vertex and fragment shaders are per pixel (ignoring anti-aliasing). When it comes to optimization all sources ...
0
votes
0answers
17 views

Java Question about setLayout(null);

I'm new to the programming world and would like to learn from experienced teachers. How would I be able to add a picture to a JFrame and at the same time be able to add a panel So I could add buttons ...
1
vote
0answers
98 views

How does one create ENB for games like: San Andreas

I know this particular community could be wrong for such a question that includes programmers, modders and such. I believe I should be asking such question on stackoverflow.com or something similar, ...
1
vote
1answer
53 views

Does GL Memory model guarantees that late Depth Testing accesses depth buffer values in same draw call

Suppose I issue a draw command that draws 3 overlapping triangles (T1, T2, T3). Fragment shader assigns Depth = 3 to T1 fragments, 2 to T2 and 1 to T3 fragments. Depth Buffer is cleared to 0 before ...
2
votes
0answers
183 views

ray-casting, floor-casting part fails

I'm currently working on a ray-casting engine in Java and I can't figure out what's wrong with my code. For the learning and theory I use: The permadi tutorial: ( https://permadi.com/1996/05/ray-...
0
votes
0answers
70 views

How to implement materials with variable numbers of textures in Assimp?

When importing a mesh, Assimp loads its material, which stores a list of textures of different types; for the sake of this question, let's say I only care about these types: ...
0
votes
1answer
41 views

OpenGL: How to render a “shadow” for an object that's behind another?

First off, an image from Fez that depicts the effect I'm after: I'm trying to achieve a similar effect in my project. I'm quite certain this is done with a stencil buffer, but the resources on such ...
1
vote
0answers
20 views

How can I load a file in memory on the Apple IIGS?

I recently got an Apple IIGS and have it booting GS/OS off of a compact flash with 10 32MB ProDOS volumes. It's a great little setup and I've installed ORCA/M, 816 Paint, Merlin 16+ and Complete ...
5
votes
1answer
192 views

How can I dynamically switch between graphics APIs?

In games like the new "Doom", you have a console, from which you can use commands to reduce the game's quality or even to switch graphics API, from Opengl to Vulkan and viceversa. How is this done? I ...
0
votes
1answer
48 views

What does declaring a const float within a function do? (CGFX)

I've been working with this piece of code to get the mip map level that I should sample for a texture that I got off a forum somewhere. I noticed that they use a const float. Now from what I ...
1
vote
1answer
31 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
3answers
303 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
1answer
97 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 ...
1
vote
1answer
120 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
0
votes
0answers
189 views

Depth aware blur - Kawase

I am using this Kawase Blur, to apply blur onto my buffer. But I would like to apply this blur in an uniform way, no matter the distance of the objects from the camera. I guess that I need to use the ...
0
votes
0answers
86 views

Problems with sampling the shadow map with deferred rendering OpenGL 3.3

I am trying to implement simple shadow mapping for a project i am working on. I can render the depth texture to the screen so i know it's there, the problem is when I sample the shadow map with the ...
2
votes
0answers
33 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
1answer
163 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 ...
3
votes
2answers
661 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
2answers
90 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 ...
0
votes
1answer
134 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
2answers
58 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
1answer
61 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 <...
0
votes
1answer
248 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 ...
6
votes
4answers
647 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
1answer
21 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
3answers
771 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
1answer
133 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? ...
0
votes
0answers
42 views

given 4 points on a textured sphere extract a 2d plane and it's projected texture

Setting the scene I'm working on a feature in scenekit where i have a camera at the center of a sphere. The sphere has a texture wrapped around it. Let's say it was a 360 degree image captured inside ...
0
votes
1answer
488 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 ...
55
votes
7answers
25k 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
0answers
99 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
1answer
430 views

Playstation 4 OpenGL ES support (or Xbox)

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
1answer
125 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
2answers
2k 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
2answers
60 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
0answers
56 views

Converting game units to players display/pixels

As the title I'm quite new to game dev and I can't really grasp converting game values into what player sees. For example I have a game that is 100x100 units and for now I would like the whole world ...
0
votes
1answer
37 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 files that ...
-1
votes
1answer
669 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 ...