Questions tagged [graphics-programming]

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

40 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
3answers
552 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 ...
4
votes
0answers
92 views

Tangents face the same direction on opposite sides of mesh

I have noticed that the tangent vectors that I am calculating are not always facing the correct direction. The tangents on the left and right of the mesh both face the same direction. Here is a ...
4
votes
1answer
477 views

Java Slick2d lighting using Raycasting

I am trying to make a top down view game in java using the Slick2d library, for lighting I wanted to do something like this : http://www.redblobgames.com/articles/visibility/. I was wondering if there ...
3
votes
0answers
102 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
0answers
692 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-...
3
votes
0answers
757 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 ...
3
votes
0answers
782 views

Can I use a shader with 2 different textures in Cocos2D (x)?

We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
2
votes
0answers
1k 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: ...
2
votes
0answers
107 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 ...
2
votes
0answers
640 views

How do you tell OpenGL ES 2.0 to use a texture as the depth buffer?

I want to render a scene with an outline post processing effect in OpenGL ES 2.0. First I render all the opaque objects. Then I use a post processing shader for silhouette detection that uses the ...
1
vote
0answers
62 views

RayCasting with Mode7

I'm trying to join the mode7 algorithm with RayCasting. For mode7, I'm using a simple rotation matrix to implement the rotation. The result is a little strange and I can't fix it. Do you know what is ...
1
vote
1answer
122 views

How to Render two or more images on video frame in same draw call using metal

I'm new bee to graphics programming and i have an existing code base which basically takes frame from video and passes it to metal shader where effects (like colour changes) happens. Whats currently ...
1
vote
0answers
216 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
0answers
111 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
0answers
24 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 ...
1
vote
0answers
153 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
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
387 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
237 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
81 views

Why does XNA create two GraphicsDeviceManager services?

While working with XNA today, I looked at the debugger information for Game.Services to retrieve the GraphicsDeviceManager so ...
1
vote
0answers
231 views

Batching Homogeneous Render Objects in XNA, 2D Component-Entity Engine?

I've been working on my component-entity engine for about 3 months now, and have managed to get nearly every constituent system working with little effort or compromise. My system has the following ...
1
vote
1answer
47 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 ...
0
votes
1answer
27 views

How to position/transform vertices for 2D UI in shaders?

I am building a 3D engine and have a rendering abstraction that focuses on writing shaders. Most my 3D shaders have gl_Position output like: ...
0
votes
1answer
43 views

OpenGL Rendering Pipeline

I've been learning OpenGL graphics programming and I've decided I'd quite like to make a simple game using OpenGL. Drawing something in OpenGL, needless to say, is quite the endeavour. However it ...
0
votes
0answers
32 views

Pseudocode for calculating per vertex normals for a trianglestrip mesh

I have a terrain that is defined as a trianglestrip mesh. Now I'm trying to calculate the normals of each vertex but I've realised that my normal way of calculating vertex normals only works with ...
0
votes
0answers
14 views

PBR specular highlight artifact

I am trying to implement pbr and it seems I have an artifact at the specular highlight This is basically the code ...
0
votes
0answers
30 views

What information should be included in a render command?

I'm writing a 3D renderer for my engine and now that I'm working properly with a scenenode system, I've decided to implement render queues (command lists to some) and render commands. I wanted to know,...
0
votes
0answers
38 views

OBB Frustrum Culling in Clip Space

I've been trying for a while to implement a frustum culling method using a per-computed AABB in object space and transforming it's corners into clip space. ...
0
votes
0answers
23 views

Gamma adjustment slider implementation

Various online sources talk in sufficient detail about gamma correction. By following them, I achieved a rendering pipeline that looks somewhat like this: ...
0
votes
0answers
42 views

What are the options when float textures aren't precise enough?

I am currently experimenting with rendering planetary scale terrain. I am generating the terrain on the GPU with noise, and to fix the 32 bit floating point precision problems, I generate the ...
0
votes
1answer
51 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 ...
0
votes
0answers
25 views

Sprite alignment in my sprite packer

I am creating the "perfect" sprite packer. This is a sprite packer that makes sure the output sprite is fully compatible with everything. It converts (if needed) the source frames to BMP in memory It ...
0
votes
0answers
41 views

How to divide commands to CommandLists in DirectX12/Vulkan?

Currently my DirectX graphics engine submits all draw commands in a single, large CommandList. I want to paralellize my CommandList recording to improve performance on CPU side, but I'd have to ...
0
votes
0answers
1k 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: ...
0
votes
1answer
39 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 ...
0
votes
0answers
107 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 ...
0
votes
0answers
331 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 ...
0
votes
1answer
211 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
votes
1answer
235 views

Fastest Software Gamma=2.2 for RGB?

With gamma=2.0 you can use that Carmack's inverse sqrt hack or a lookup table. Yet all standard graphic formats mandate the use of gamma=2.2, and SVGA framebuffer also requires it. Unfortunately, for ...
-3
votes
1answer
135 views

I need to make a create-a-class system like in COD

I need to make a create-a-class system like in COD but I don't know what code I need. I am also wondering if I have to make a photoshop image for every way it could look or do I type in the code to ...