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.

Filter by
Sorted by
Tagged with
1
vote
1answer
170 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 ...
0
votes
0answers
12 views

How does DrawProceduralIndirect use MeshTopology.Triangles?

I'm working on a voxel terrain generation system. Currently I'm running into issues using DrawProceduralIndirect. In the call, you are able to choose how the GPU should render the data you are passing....
0
votes
0answers
16 views

How does directX API implement supersampling in GUP layer?Does it allocate a scaled framebuffer than user-specified framebuffer?

For example,if I create a backbuffer of size 800 * 600 and turn on 4x-supersampling, is it the case that the graphics driver actually allocates a backbuffer of size 3200 * 2400 under the hood then ...
2
votes
2answers
7k views

Calculating vertex normals in OpenGL C++

Does anyone knows a simple solution for calculating vertex normals? I've been looking for this on the internet but i cant find a simple solution, for example, if I have some vertices like this: ...
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 ...
0
votes
1answer
16 views

Unity: Alpha and color issues with opaque projector/decal shader

I have been attempting to make a simple "overwrite" version of Unity's projector shader. I can either respect the color, or respect the transparency, but not both. I have simplified the ...
0
votes
0answers
38 views

How do I fix this unintentional chromatic aberration on a lightmap?

Some strange rainbow halos (front and left) appear after computation of a lightmap for direct light. The formula is dot * dot2 / ( dist * dist ) * dl->intensity ...
36
votes
1answer
9k views

Rendering SVG art directly in XNA

Suppose I have a bunch of 2D art in some vectorized format such as SVG. Is there an easy-ish way to render that directly without having to implement a full SVG renderer myself? Of course I could ...
3
votes
1answer
37 views

Is it possible to correctly catch up a particle system simulation based on long delta time between many frames?

I have a particle system with a physics simulation integrator based on delta time (elapsed time between frames) which is implemented on the GPU in a compute shader. I also have a frustum culling ...
0
votes
1answer
57 views

Where is the Mclip matrix & how do I set it?

According to this article, the Mclip matrix will be used, but I didn't find any function in Directx11 to set this matrix. How do I set it?
0
votes
1answer
77 views

Opengl in 500 lines barycentric calculation question

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling I cannot figure out how we go from uAB-vector + vAC-vector + PA-vector = 0 to the linear system with ...
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 ...
2
votes
1answer
79 views

Opengl in 500 lines point in triangle question

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling I am on lesson 2 of the "Opengl in 500 lines" tutorial. I ...
1
vote
0answers
32 views

Direct State Access (DSA) is Failing, but pre 4.3 OpenGL works [closed]

I currently have an OpenGL project in which I am using GLFW for the window and context creation, and GLAD for loading OpenGL functions. The GLAD version I am using is OpenGL 4.6, compatibility profile,...
1
vote
1answer
67 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 ...
3
votes
1answer
634 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 ...
51
votes
4answers
50k views

What are normal, tangent and binormal vectors and how are they used?

I would like to find out the following information: What are they? Example usage in game development (the area they are used in) About the following vector types: ...
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 ...
0
votes
1answer
279 views

Cocos2d-x setContentSize, setScale give poor graphic quality

I want to create sprite with size is relative to the screen size. I.e: Sprite size is equal to screen width * 0.2. I use setContentSize and ...
-1
votes
1answer
75 views

What is the best way to approach a multi pass rendering system?

I am trying to code a new feature in my engine but I can't find a way to implement my idea, which is the next one. I am trying to get multi pass rendering with more than two passes. I know how to do a ...
0
votes
1answer
113 views

Project 3D points to a plane, then project their bounding box back to 3D

I have a table in 3D space, represented by a plane. I want to project arbitary points representing an object (cup, toy, etc) onto that table, run 2D principal components analysis to get an oriented ...
1
vote
1answer
46 views

Term for compositing textures according to colors in an index texture mask?

I have utilized a tool for a number of years that uses a "masking" technique to 'texture' a 2D graphic, by which it checks a series of solid colors to specify where to 'draw' textures in a ...
0
votes
1answer
292 views

How to make object move in exact gametime in Monogame, XNA?

I have recently started learning monogame. The big question i faced is how to make object move, when gametime variable has an exact value. ...
0
votes
1answer
588 views

Graphics2D.drawImage not working

I'm quite new to java. I'm trying to come up with my own game after watching a few video tutorials. However, I encountered a problem where I cannot draw an external image file that I loaded using the ...
0
votes
2answers
94 views

How does lookAt matrix math work?

Can someone provide me an explanation of how the lookAt matrix works? ...
1
vote
1answer
33 views

How to manually render with a given camera in Unreal Engine 4?

I would like to render with any camera at any given time for a Portal clone project. There's a USceneCaptureComponent2D but it renders the whole scene to a texture. ...
1
vote
1answer
1k views

Depth texture white in shader

I am trying to implement shadow mapping into my project and am stuck at this problem: If I'm reading the shadow map values with glReadPixels and linearize those ...
0
votes
0answers
13 views

How can I easily create textured physics objects of different shapes and sizes?

I want to make a 2D game with this art system: Whats the best way to achieve this in Unity? Can I use sprite renderers or do I need quads or something different? Rectangles seem possible and easy ...
0
votes
0answers
31 views

Compute Shader vs Pixel Shader

I am pretty new to game development and graphic stuff. I find that compute shader is somehow more powerful and flexible than Pixel Shader for almost everything I need so far. But Pixel/Fragment shader ...
0
votes
0answers
13 views

How to test a Unity game with different graphics APIs?

If I don't have a device with Metal, is there a way to test the application with it anyway? And if my device supports both DirectX and OpenGL, how can I tell the application, for example on Windows, ...
0
votes
0answers
14 views

Transparent objects in the scene only get lit half way by point light

I have encountered a weird graphics problem, where all of our transparent objects in the scene only get lit half way (only from the y position downward) by a point light. This happens with all of our ...
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), ...
2
votes
2answers
68 views

Getting data from the backbuffer D3D11 using Map [duplicate]

I'm having some trouble using ID3D11DeviceContext::Map() correctly. Here's the whole function so far: ...
1
vote
0answers
335 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 ...
3
votes
2answers
75 views

Different textures inside and outside a cube in DirectX 11

I want different textures for the outside and inside of a box (cube). The image below shows what I want to achieve. It is kind of an open box, where we can see a different texture inside: I was ...
0
votes
1answer
196 views

How do I implement the parallax effect in 3D graphics?

With a perspective projection matrix and camera system already in place, I have a scene with a small jet fighter flying high over a wide and deep canyon with many cliffs and rocky surfaces; these are ...
0
votes
1answer
611 views

Why does my SFML game cause screen tearing on Linux? [closed]

I wrote a little game of a bouncing ball, using SFML and Box2D. On Windows, the graphics animate smoothly. However, on my Linux machine, the animation stutters randomly. To be precise, I get a ...
0
votes
2answers
82 views

How can I draw orbit paths for a solar system?

I’m trying to make the orbital paths visible for my solar system simulation game. I have most around with trail renderers and solid line sprite but not achieving the desired look I want. I’m hoping to ...
0
votes
2answers
905 views

How can I draw filled triangles in C++?

VERY IMPORTANT NOTE: Im trying to fill a triangle. I have already made the 3D part. Sorry if this wasn't understandable. I'm currently trying to create a simple 3D-Engine. Well, I have successfully ...
0
votes
1answer
45 views

glfw resizing causing image scaling

I have a quad rendered that extends from the top left of the window to with width of the window that is also 64 pixels high. When I resize the window, from its initial size, the quad and text scales ...
1
vote
1answer
129 views

Model gets distorted when rotating the camera

I'm currently developing my own 3d graphics engine and I'm having a hard time figuring out why my 3D models gets distorted when rotating the camera around. This is my projection matrix. I'm following ...
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 ...
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 ...
0
votes
2answers
55 views

How to make player seem bigger / world smaller, without changing world coordinates

I am making a voxel game with OpenGl, I've got the major parts working, except the camera seems small compared to the the blocks. How do I make the camera bigger? Do I do a scaling on the model ...
1
vote
1answer
81 views

PyBullet & OpenGL - Rotations are reversed in OpenGL [closed]

Project description: I am writing a basic game engine to help with my PhD topic on multi-agent learning. I am using PyBullet as the backend physics engine and OpenGL for visual display. I have OpenGL ...
5
votes
2answers
15k views

Rotate vector by matrix?

If I have a Vector, say (1,1), how can I rotate it around the origin (0,0)? I'm working in XNA if that helps.
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: ...
0
votes
0answers
28 views

3D visual effects on videos

I'm trying to get some hands-on experience with 3D visual effects on videos. Similar to those AR apps, I want to add a 3D model with effects, say a dragon, to a video. Something like this famous demo: ...
0
votes
1answer
172 views

Running OpenGL app on Windows XP x86 produces incorrect texture colors

I'm working with the Cen64 emulator and I compiled from source a x86 version that operates fine on Windows 10 x64. As soon as I run it on a Windows XP x86 machine the colors are then all incorrect. ...

1
2 3 4 5
20