Stack Exchange Network

Stack Exchange network consists of 175 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

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.

0
votes
1answer
17 views

what is the difference between the regular camera and the fist person camera?

I'm asked to implement first person camera but all I know is the regular camera that moves when I hit specific keys and could anyone tell me the steps to implement it?
0
votes
0answers
13 views

What handles the automatic conversion between color depths

My Google-fu may be weak, but I'm having trouble finding the answer to this and was hoping to get some insight. My shaders deal in 32-bit float RGBA values, but I'm rendering to a R8G8B8A8 target. ...
-1
votes
1answer
35 views

How to implement trail renderer like unity?

I wang to implement a trail renderer in my course about compute graphics using OpenGL. I google this question and search it in https://gamedev.stackexchange.com/ and find nothing except unity trail ...
1
vote
1answer
27 views

Displaying debug line in custom raytracer implementation

Not sure if I should post this here or on the Math forum, but I will try my luck. Some background. I made my custom raytracer. The processing happens purely on the CPU for now, no GPU interaction ...
2
votes
2answers
55 views

Midpoint displacement generating unsatisfactory terrain

Following this lesson for implementing mid-point displacement algorithm for terrain generation. I aim at generating a wavefront(obj) file of the terrain I have an array of dimension (2^n + 1) x (2^n +...
1
vote
1answer
103 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 ...
0
votes
3answers
101 views
-5
votes
1answer
50 views

How to create “Hexagon” GameObject in unity

So i'm making a mobile 3d game, and i need to have Hexagon gameobject and yeah i searched the whole internet but didn't find any solution (i've tried blender to create hexagon but it didn't work, when ...
0
votes
0answers
30 views

How could the DOS Quake 1's pixelated look be achived with openGL, for example: Limiting the Colors to 256? [duplicate]

I want to achive the DOS Quake 1's pixelated look and limit the displayed colors to 256 in my engine, but I don't know how to do that. And also, I'm using java. Here is the code of my Fragment shader:...
0
votes
1answer
103 views

Unity using 40% GPU for just a UI interface on ultra but 90 on low?

So I made some software using unity for my FRC team. All this application is, is just a User Interface with labels, input fields, buttons, etc... When I choose the quality to be on Ultra, I will get ...
1
vote
0answers
46 views

Draw coloured transparent polygons on top of texture in modern opengl

I am trying to render an image in the viewPort using symmetry_create = 1 and binding texture to it. ...
0
votes
0answers
57 views

Show the edges between the clipping plane and clipped objects

I want to utilize shaders to not only discard fragments if they are on one side of a predefined plane but also render a contour along the intersection. My fragment shader currently does something ...
0
votes
0answers
42 views

Graphics messed up when I try to reskin the game in Android Studio

I need a little help. I'm new in Android Studio, I have a game where I want to reskin the design. First of all when I install it on my phone with the original files the game run perfectly without ...
1
vote
1answer
127 views

How much slower is it to draw on “half pixels”?

I've noticed that games like Diep.io are using floating decimal points for thin stroke lines on the grid. I have even tried this myself, by adding 0.5 to all of the ...
2
votes
1answer
68 views

Planet Surface Rendering: Precision issues [duplicate]

I have been experimenting with C++ and OpenGL, and I am currently writing a program that renders the surface of a planet; specifically, our moon. It's a modified version of the GPU Gems implementation ...
3
votes
2answers
148 views

Is it possible to apply a texture to a 2D-sprite in unity 2-d?

I want to take an (animated) 2-d sprite and apply a texture to it. Basically, I want every non-transparent pixel to be covered by the texture (color is disregarded). I understand I can probably ...
1
vote
1answer
46 views

How to access Lit shader properties through code?

Currently i'm using HDRP in my project, so i have a question. How can i access Lit shader properties through code ? Or where i can see names of variables in this shader ? For example:
0
votes
0answers
119 views

Find transformation to align two polygons at fixed points?

Problem I have a source image (arbitrary width and height c) shown here as a rectangle [X1,X2,X3,X4]. It contains two points C and D (both known coordinates within ...
0
votes
2answers
66 views

Difference between reflection mapping and raytracing

Both methods involve casting a ray unto the reflecting object. It will be reflected. In reflection mapping - the intersection of this reflected ray with the environment map (texture) will yield the ...
0
votes
1answer
73 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. ...
0
votes
0answers
24 views

Texturing edges of a procedurally generated polygon

I'm generating a polygon from code to display unit ranges in my game. Here's how it looks so far: I would love to be able to now use my texture and only apply it to the edges of this polygon (imagine ...
0
votes
0answers
35 views

Handling battle/screen graphics

This is more of a conceptual question, but I'm a bit stuck and wondering if I should continue how I'm going or just rebuild the graphics system my game is using. So here's the high level: Right now, ...
0
votes
1answer
37 views

XNA 4.0 How to change GraphicsDevice Default DepthStencilState Value

I want to change one of the deafult values of my GraphicsDevice to that: GraphicsDevice.DepthStencilState.DepthBufferEnable = true; But I know only to change it ...
0
votes
1answer
33 views

Unity Graphics.DrawMesh lags behind rotation?

I have a setup in unity using Graphics.DrawMesh() to draw a mesh on my players camera location in the update loop, ...
1
vote
2answers
94 views

How to develop custom Unity graphics?

Processing is a Java library for working with computer graphics, providing methods by which to draw primitive objects, custom meshes, etc., as well as mathematical methods (such as Simple Harmonic ...
0
votes
0answers
54 views

OpenGL outline of clip plane

I've implemented a clipping and capping view similar to the example called "simplecap.zip" in this page: http://users.polytech.unice.fr/~buffa/cours/synthese_image/DOCS/trant.sgi.com/opengl/examples/...
0
votes
1answer
78 views

Polygons depth sorting in Z-buffer

Why is it that the Z-buffer algorithm does not require polygons to be depth sorted to function correctly?
1
vote
0answers
31 views

Pre-rendered visual effects?

So if I want to create a really fancy and beautiful 2d effect of a campfire I open After Effects, create the effect and then export 2d animation as a .xml file, png sequence etc. And it works anywhere ...
0
votes
1answer
33 views

Use 2 values of a mask

Let's say one has a black/gray/white mask and wants to draw picture A over the white/gray values and picture B over the black/gray values (the blacker the more B picture). The best I come up with ...
0
votes
1answer
180 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 ...
3
votes
1answer
159 views

Object made of cubes looks different based on the distance in Unity3D?

I made a "Wall" from basic Unity3D cubes. They are placed tightly so the wall looks like one big rectangular prism. If I look at it from close distance, it looks as it should be: one big rectangular ...
0
votes
2answers
79 views

3D affine transformation (rotation) mimicking Mode 7, Java 2D

I watched videos of games using mode 7 like Outrun or Space Harrier and I want to make a game which imitates this classic graphic. I was inspired by Notch's Prelude Of The Chambered too. After ...
0
votes
1answer
65 views

C# Unity - Multiplying Colors in loop results in wrong results

Good day, I'm trying to generate a tilemap, my current setup is a base tileset, and a few overlays for the different biomes / terrain heights. In my code, I generate each biome's tileset, based off of ...
1
vote
0answers
136 views

Is it possible to crop a render texture in unity?

Basically what I want to do is, take the source render texture from OnRenderImage and crop it (continuously). I've already achieved this by using ...
0
votes
2answers
49 views

Sprite brighter than texture

I have imported a new texture into UE, and have created a new sprite. I have setup the material of the sprite as follows: I have also set my texture as texture-parameter. But my sprite renders ...
0
votes
1answer
66 views

How much time would it take to make a sprite-based isometric game with customizable characters? [closed]

I've never been good with 3-d models, but I can do sprites. I was hoping I could perhaps make a 2-d isometric game that acts like 3-d. Something like Don't Starve is what I have in mind. Here's the ...
0
votes
0answers
40 views

Cascading Shadow Maps - Spotlight Projection

In all the cascading shadow map explanations I have read, the final projection into the shadow-map is done using an orthographic projection. This makes sense for a directional light because a ...
-6
votes
1answer
93 views

I don't know what's wrong with the code

I am making a 2D game in java but it doesn't draw anything on the srceen and I don't know why. I have files(Main.java -> JFrame, Game.java -> GameLoop). Code: Main.java: ...
0
votes
2answers
46 views

Adding large 3d models into Unity

I have a 3d model of a restraunt with several characters in it probably over a hundred objects. Whenever I try to import it into Unity Unity just loads forever until I force close it. How do you ...
-1
votes
1answer
105 views

Interesting graphic artifact

I was exploring old Minecraft source code when I encountered this: I just wanted to know what causes such distortion and how to fix it with OpenGL?
2
votes
0answers
119 views

How do you find the collision between 3D boxes and 3D QUAD face meshes?

I have an axis aligned bounding boxes for 3D object collision, but I have a complex 3d mesh that's divided into 3d faces so I want to check for bounding boxes and collision with the faces of that ...
2
votes
1answer
546 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 ...
6
votes
1answer
205 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
1answer
397 views

JFrame pack() method

I'm quite new to java. I was developing a game using java and I realized that the position of pack() method can influence rendering. For instance: Frame Class ...
0
votes
0answers
54 views

Slick2D - Shaders and Antialiasing

I'm looking for a way to smooth anti-alias my game, especially while using scale and translate operations. While translating my images are tearing, regardless of image filter. I tried to : change ...
0
votes
1answer
218 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 ...
1
vote
1answer
131 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
1answer
56 views

How do you handle large triangles with frustum?

I am rendering the Sponza scene ato test my frustum implementation. My current approach is simply, test if the vertices of the triangle are within the frustum (angle between the camera looking ...
1
vote
0answers
105 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, ...
3
votes
1answer
110 views

Do I have to take aspect ratio into account, when computing a direction in View Space?

I read an article about implementing a Single-Pass Volume Renderer. After thinking about it, I have a question, which concerns the provided GLSL code snippet of the Fragment Shader. To calculate the ...