Programming related to the visual representation of information on computer screens.
6
votes
1answer
113 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 them to do bump mapping without a tangent or bitangent but I basically copy-...
28
votes
3answers
13k 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 ...
1
vote
1answer
39 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
2answers
113 views
What's the difference between Gameplay Programming and Graphic Programming?
I know the answers are obvious, someone told me this:
Graphics Programming: DirextX, OpenGL, etc.
Gameplay Programming: Bringing everything together. From design, music, levels, etc.
But may you ...
0
votes
0answers
14 views
Drawing a 2D polygon filled with a rotated texture
As I have seen, System.Drawing.Graphics in C# has proven to be really bad at handling larger images. So, if I want to draw a both tiled and rotated image, I will have to draw each tile directly to the ...
1
vote
3answers
234 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
2answers
224 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
1answer
86 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
2answers
57 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.
const FLOAT clearColor[4] = { rand() / (float) RAND_MAX, 0.0F, 0.0F, 1....
4
votes
2answers
264 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 ...
20
votes
7answers
5k 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
1answer
94 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 ...
0
votes
1answer
99 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 ...
0
votes
1answer
58 views
In game engine, how to get the vertices buffers of different vertex formats for render from the mesh file properly?
I'm a fresher on engine programming. I have a question of how we can get the vertices buffers of vertex formats from the mesh file.
For example, in OBJ file or FBX file, we save the positions, ...
1
vote
0answers
170 views
How can I create a wind visual effect like Ori?
I'm working on a mobile game in Cocos2D. The game mechanic is very similar to Ori and the Blind Forest's parachute (Kuro's feather) mechanic. I want to be able to render a visual effect for wind ...
0
votes
0answers
42 views
Tilemap not rendering properly
I'm making a single-screen scrolling platformer (OpenGL/SDL) and I've made a tilemap out of a 2D array, pre-sized with variables of the LEVEL_HEIGHT and LEVEL_WIDTH. Each element in this 2D array ...
0
votes
1answer
82 views
What technique should I use to implement the following type of “diggable” terrain?
I'm trying to replicate a certain game mechanic from the game Diggles.
This game takes place in a vertical cross-section of the earth and allows the player to dig tunnels and caves into the ...
1
vote
1answer
186 views
Is it possible (and practical) to dynamically create normal maps from graphics in Pixi.js?
I am building a tile game using Pixi.js. The game features dynamically-generated terrain and a day/night cycle. I'd like to use a normal map to give the sense of sloping hills or mountains.
Luckily ...
1
vote
0answers
123 views
Which programming language should I start with in game dev? [closed]
I am a front end web developer and I've always been interested in building games. I work primarily with HTML, CSS, PHP, and JavaScript on a daily basis, so I'm not new to coding. I would like to ...
0
votes
0answers
23 views
How to assemble a skinned character model from component meshes?
I need to enable visible item swapping on 3d characters for my game, but for the life of me I can't work out how to do this in Three.js. Any information about how bones and skinning work in general or ...
1
vote
1answer
57 views
Skeletal Animation - Caching global bone transforms
Very often I see skeletal animation implemented like this:
On Init - store bone's local transforms and inverse bind pose
On Update - traverse the skeleton tree, multiplying local transforms on the ...
0
votes
1answer
84 views
Enlarge screen space Texture by set pixel amount
I have a texture shown over the screen using screen space UV's. The Texture is 495x,596x, Screen size is 888,500, but can change. The Texture has a Tile of (3.469775f,1.392644f) to correct for ...
1
vote
2answers
138 views
How to make a “Camera” in Java
I need some help with getting my camera to work in java for a game that I am making. The problem is is that I've never made a camera in a game before and this is my first time trying to make one in a ...
1
vote
0answers
351 views
Dual Contouring - what is it and how to use it?
I'm having trouble understanding Dual Contouring yet and I need some explanations from someone who has first hand experience.
I searched all I could before writing this question. I've already read:
...
0
votes
0answers
24 views
Timed Line Drawing
I'm trying to program a remake of the classic Missile Command Atari game from scratch, but I've run into a problem. So I have a function that can draw a line from one point to another. I figured I ...
4
votes
1answer
139 views
How do I use openGL shader to reproduce this Photoshop implementation?
Here are my Photoshop actions:
step1 - convert the current image into gray
step2 - use the default parameters, as showed in the screenshot
step3 - use the 『Hue/Saturation』 to convert the grey ...
2
votes
2answers
259 views
Why did 320x240 become the famous Mode X, and not 400x300? [closed]
Mode X was hack invented during the good old days of DOS gaming, offering 320x240 resolution, 256 colors, square pixels, and page flipping.
VGA adapters had 256 KB of memory.
320 * 240 = 76800 bytes
...
0
votes
2answers
132 views
Progress bar for EXP in javascript [closed]
So I am making an incremental game with Javascript, HTML5, and CSS, I need to have this bar that is esentialy a div with a p element in it "fill up" as the player earns more points through sacrifice. ...
2
votes
1answer
115 views
How can I recover polygons and normal maps from compiled games through emulation of D3D or OpenGL?
I am trying to generate labeled training data for an artificial visual cortex to learn on. I'm looking for a tool that will, instead of rendering the scene at each pixel just give me the pre-rendered ...
1
vote
1answer
33 views
What happenes if you leave out buffers for the inputassembler that the vertex shader expects?
I'm working through my first attempt at a "graphics engine" (I use the term loosely as I'm not aiming for much more than something that will display a few meshes). I want to leave my classes as ...
2
votes
1answer
342 views
Unity + Oculus Rift - Setting field of view or rendering part of display
I need to render a small portion of the display to a texture.
I found a script to simulate a scissor rect by modifying the projection matrix - Unity 5 doesn't seem to provide any out-of-the-box ...
3
votes
2answers
337 views
How to achieve a dynamic soft see-through hole effect in a wall with shaders?
I'm looking for a way to create a dynamic soft see-through hole effect for room walls. I know a few ways how to do it (for example multitexturing with second layer being the hole mask in screenspace), ...
2
votes
0answers
58 views
uv tiling and offset for uvs not min-max 0-1
For the purpose of the question, a unit = 1 meter.
So, I have a triangle strip that is 4x8 meters (for argument's sake; it is procedurally generated by player). I also have a texture which is ...
30
votes
1answer
4k views
Why is shadow mapping the standard?
Though I am a programmer by trade, I have barely touched game development at all. I've had this question for some time, and now that I'm looking into game development I thought it would be a good time ...
-1
votes
2answers
111 views
What's the difference between the representation of a line and that of a line segment?
What is the difference between a line and a line segment from the implementation point of view?
To me, line segment means:
class LineSegment2d
{
Point2d start, end;
public:
......
}
This ...
1
vote
0answers
140 views
OpenGL textureGather and DirectX gather
These functions sample multiple RGBA pixels but return only a single component.
OpenGL: https://www.opengl.org/sdk/docs/man/html/textureGather.xhtml
DirectX: https://msdn.microsoft.com/en-us/library/...
1
vote
0answers
70 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 ...
7
votes
1answer
239 views
What is a lobe, in reference to lighting and graphics
I sometimes see references to lobes when talking about lighting, especially with specular lighting, but also with spherical harmonics which doesn't do specular.
Can anyone explain what exactly a lobe ...
0
votes
1answer
250 views
How to calculate spherical harmonic coefficients for indirect diffuse?
After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
2
votes
0answers
118 views
Animations in games
I wonder how skeletal animations in games work.
I am Writing my own Graphics Engine for "fun", and I have come across several problems with animations.
Here is how I do it right now:
1: Load the ...
1
vote
1answer
1k views
Rescale pixel art scenery before rendering in SDL2
I looked at this page that mentions the SDL2_gfx library for rescaling SDL_Surfaces without the image getting blurry:
SDL zooming/upscaling without images becoming blurry?
I wanted to know if it was ...
1
vote
0answers
22 views
Creating VR Headset Video
So I have a video stream of known resolution and I have a VR headset via HDMI at a known resolution.
Is there an existing library to create the slight fisheye and side-by-side layout for these ...
6
votes
2answers
751 views
Low quality bilinear sampling in WebGL/OpenGL/DirectX
I'm seeing low quality bilinear texture sampling in WebGL, OpenGL and Directx, and was wondering if anyone knew how to make it higher quality? The picture below should help show what I mean.
The ...
3
votes
2answers
906 views
How do I use graphics APIs to select the proper display device among multiple attached to a PC?
I have an LCD monitor display and Oculus Rift attached to my PC. I have an Nvidia 820M dedicated GPU. How does the GPU know to which display device it has to render (or to send rendered information)? ...
1
vote
2answers
163 views
Is it possible to run GLFW eventhough my graphic card(Nvidia) supports Direct3d API? [closed]
I have Nvidia 820M GPU installed in my windows 7 machine. In nvidia control panel it is showing it supports Direct3d API version 11. Am I able to run OpenGL applications(using GLUT,GLFW) on my machine ...
8
votes
1answer
132 views
Is quadrilinear texture sampling hardware supported?
If you have a volume texture with mipmaps, GL_LINEAR_MIPMAP_LINEAR texture sampling will perform quadrilinear texture sampling.
Is that implemented in hardware like bilinear texture sampling is? Or ...
1
vote
1answer
80 views
Can you trilinear sample a non volume texture?
Let's say that i have a regular 2d texture (not a volume texture). Is it possible to do trilinear texture sampling of that texture even though it isn't a volume texture in opengl or directx?
...
5
votes
2answers
1k views
How can I tell a fragment shader to not write a particular pixel?
In a WebGL I'd like to send a screen space quad through that gets processed by a fragment shader, but have the fragment shader only write out a pixel under certain conditions (say... that it was ...
0
votes
1answer
214 views
Depth Stencil Buffer
In OpenGL, what is the difference between GL_DEPTH_COMPONENT and GL_DEPTH_STENCIL?
I have looked around and have been unable to find a clear explanation.
Information on their usage with GLSL would ...
0
votes
0answers
109 views
Is it reasonable to generate mipmaps on the color attachment of my framebuffer in realtime?
I'm looking into hdr tonemapping and so far all the equations I've found result in really, dulled results.
One i haven't tried uses an average luminance of the image. The pdf I've been reading ...