Color is the visual perception of light by humans into named categories, commonly "red," "green," and "blue."

learn more… | top users | synonyms

0
votes
0answers
30 views

Linear color workflow with render to texture - Banding in alpha channel?

In OpenGL, I am using GL_SRGB8_ALPHA8 for the internal texture format for my render targets. This eliminated some banding I was seeing in dark opaque areas. However, in the following screenshot, you ...
3
votes
1answer
55 views

How to save one color channel, taking only 1 byte per pixel?

How can I save only one color channel, such that it would only take 1 byte per pixel? I only want to save the alpha channel and apply colors later using a custom shader. But all the formats I tried ...
1
vote
2answers
41 views

Phaser BitmapData Pick Color and Paint

Hi guys, Could anyone kindly shows me a little bit of code about pick and paint color to the sprite? here is my code that I have played around, but I still cannot find out and achieve it. Thanks ...
1
vote
2answers
73 views

What is the benefit of YCbCr?

Why would someone want to store images as YCbCr instead of RGB in RAM or in GPU memory?
3
votes
1answer
45 views

Unity, Solid Color to link Platforms

[UNITY] As you can see above a solid color is connecting one platform to another. My question is whether this color must be applied through code or through a sprite. In my game there are three lanes ...
1
vote
0answers
39 views

How to color individual parts of curve in unity, real time?

So I have a mesh curve that I've imported from Blender. What I want to do is to place individual points on the curve (at fixed distance) and then based on a specific number, color them. Let's say for ...
0
votes
1answer
76 views

How can I duplicate this color/hue shifting effect in C#?

I am looking for a way to duplicate this color shifting effect: I don't think it matters but the starting frame would be this: My instinct was that some type of hue shift is occurring in a way ...
1
vote
1answer
40 views

Gradient Banding in Unity Android

In an Android game, I have a gradient background that changes color over time. This was achieved by creating a 1x2 pixel texture in code, and stretching it over a large quad with bilinear filtering. ...
2
votes
1answer
85 views

Creating colour spectrum by light flux values

I am using radiosity method to compute the inter-reflected light within a room. The room is gridded into small patches and the light flux in lumen is calculated for each. This part is done. Now I want ...
1
vote
1answer
94 views

Pixel Picking vs Raycasting

I was recently introduced to a way of picking in OpenGL known as pixel picking (or color picking). From my understanding, how this is done is that the scene is rendered to the back buffer with a ...
0
votes
0answers
52 views

How do I procedurally generate a histogram from an image?

I have a media player application which uses shaders. I'm searching for the best way to generate a histogram for the displayed image. I've thought of these 2 approaches: Generate histogram using ...
1
vote
1answer
63 views

Gameobjects disappearing when changing renderer.material.color

I'm generating an array of objects using this code: while(currentPosition.z < poolSize){ var ringObj = GameObject.Instantiate(ring) as GameObject; ringObj.transform....
0
votes
0answers
39 views

Spectral path tracing - image color/brightness incorrect

I implemented a spectral path tracing using physically base BRDF models such as Oren-Nayar,Specular Reflection and Transmission, Lambertian. All calculation in the path tracer uses standard illuminant ...
0
votes
1answer
79 views

Monogame - how to make a smooth color transition with Color.Lerp()?

I would like to know how to dynamically change a color. My code: Color myColor; Color startColor = new Color(255, 255, 255); Color finalColor = new Color(231, 214, 90); myColor = Color.Lerp(...
1
vote
1answer
275 views

How to get a pixel color from a specific sprite on touch (unity)?

I have a 2 layers of a different sprites. How can i get a pixel color from lower sprite? I know how to get touch and world coordinates, but i have no idea what to do next. Touch touch0 = Input....
9
votes
1answer
147 views

Cycling through colors with the same brightness

Ok. So I have a game I am working on with a bunch of colored particles. Each of them gets their own color however they are all close to a specific shade. To explain that better I am using the HSV ...
-2
votes
2answers
109 views

How do I properly combine the colors of different lights?

Let's say I have 4 light colors: (0.6,0.0,0.0), (0.0,0.6,0.0), (0.1,0.1,0.1), (0.1,0.1,0.1) And now I want to combine them properly. I can't add them together, because if I add for example 3rd ...
2
votes
1answer
252 views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
4
votes
1answer
61 views

Is this converting from or to premultiplied alpha?

I found this code buried under some rocks: var divAlpha = 0xff00/color.A; var r = (byte) (color.R*divAlpha >> 8); var g = (byte) (color.G*divAlpha >> 8); var b = (byte) (color.B*divAlpha &...
0
votes
0answers
30 views

How to screen color blend spritebatch?

batch.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); batch.setColor(new Color(0xFF0000FF)); batch.draw(...); Expected result: Current result: How can I achieve something ...
3
votes
0answers
38 views

Bitmap font engine: When is color modulation not supported?

I am developing a bitmap font renderer for a 2D game using SDL 2. (If it matters, I'm using Debian 8 "jessie".) I had planned on storing the glyphs as a grayscale image, translating gray levels to ...
4
votes
1answer
254 views

How to reduce color space in a post-processing material in Unreal Engine 4

I'm trying to get an old-school Quake 1 look going in UE4. I am currently using this blueprint in order to get a retro style large pixel filter. In game (might need to zoom in to see the ...
1
vote
1answer
143 views

How do I make a 2D sprite flash green when tapped?

I have a sprite that is based on an image of a gray circle. When the user touches the sprite, I want the sprite to flash green, as in I want the circle to appear to turn green for 0.2 seconds. I tried ...
0
votes
0answers
415 views

Unity 3D - Changing emission color in realtime after export doesn't work

I am using the following code to change material's emission color in realtime: Color selectionColor = new Color(0.3f, 0.2f, 0.0f); void Start() { gameObject.GetComponent<Renderer>()....
0
votes
0answers
40 views

Advice on adding RGB values

I am trying to make a flash game (I don't want to say too much). Part of the game is mixing colors. The problem with this is that these are colored wooden tiles and at first I was going to have each ...
1
vote
2answers
74 views

SDL_LoadBMP into glTexImage2D results in scewed colors

I read up on this but i can not find the error. Some suggest switching the format from RBA to RGBA but the surface data says it is 3 byte data. Here are snippets and results of my source. Loading ...
0
votes
0answers
30 views

show different color areas of image on touch

How do I show colors filled in on a colorless version of an image on user touch. (for example color mania or guess the colors app). I know one way is to provide the same image 3 times (for 3 colors) ...
2
votes
1answer
58 views

Math behind XNA's spriteBatch.draw() color parameter?

I'm trying to make a shader that changes the color of a sprite the way the XNA spriteBatch.draw() color parameter changes color. I don't know exactly what it is called (the closest word I can think of ...
3
votes
2answers
440 views

Color key or transparent images?

Ive seen a lot of people make sprite sheets magenta instead of transparent and then they make the magenta transparent using code. What is best (Performance) to use transparent images or use a color (...
1
vote
1answer
491 views

How can I use a lookup table for brightness and contrast?

Currently, I implemented a rudimentary brightness and contrast algorithm that changes brightness and contrast pixel by pixel. This was super inefficient performance wise and the algorithm looked a bit ...
8
votes
5answers
4k views

How to Color.Lerp between multiple colors?

I have found it rather difficult to find a solution to this in the Unity documents. Color.Lerp(Color a, Color b, float t) is a function that gradually changes a color according to a step t, giving it ...
0
votes
2answers
71 views

How to determine areas of pixels of different colors or luminosities?

I want to create a program that determines all the areas of a given picture that have a different color, or the same color with different luminosities. Are there known algorithms that do this job ? I ...
0
votes
1answer
89 views

Is it possible to store diffuse and normal maps in the same texture area and preserve SRGB/linear space?

Usually, one would want to upload texture data to OpenGL with GL_SRGB* for the internalformat of a texture, and GL_RGB* (or some other linear format) for normal data or specular highlight maps. We can ...
0
votes
1answer
124 views

Why does RGB order differ between color formats?

On the reference page for SurfaceFormat, it indicates that the Bgra4444 format is an unsigned format which is 16-bits long, with 4 bits per color with alpha. Further down the page, it describes the ...
0
votes
0answers
68 views

Color from OBJ not displayed in Blender

I want to import some .obj file that I have made with MeshLab. The point cloud file was actually in .pcd format and I used pcl_pcd2ply tools from PCL to change it into PLY-Format. Then I import it ...
0
votes
2answers
68 views

Getting a color value from a coord

My goal is to get a RGB value of a pixel based of off a X,Y coordinate. I have been working on AIs for a small project attempting to make a bot that can pass through a maze. I want to get the pixel ...
0
votes
1answer
424 views

In Pygame, how can I check if an object is touching a color?

Is there a way to tell if a sprite is touching a specific color on the screen, maybe given as a hex code. I know you can do pygame.sprite.collide for sprites, but how can you do this for a specific ...
2
votes
0answers
575 views

Easy way to set face colors with indexed VBOs?

I'm loading OBJs, which lend themselves well to setting up as indexed VBOs, since each vertex is only defined once and then a face definition will reference the same vertex more than once when they ...
2
votes
1answer
142 views

How can I tint a Texture2D with a gradient?

I am working on a lighting system for my game. Instead of lighting each tile completely with only one color, I want to create a gradient on that tile so to make the lighting look more dynamic and ...
2
votes
1answer
459 views

How do I multiply two RGBA colours?

I have two RGBA integers. What procedure should I perform on them to return the multiplied colour? Do I need to split the RGBA integer into its component integers (R, G, B, A)? I'm using this for a ...
-2
votes
1answer
556 views

GLSL- How to change a certain color of a sprite, to another color passed into the shader?

There are sprites, with certain pixels being bright pink, and a shader dyes these pink or grayscale pixels to a custom color determined by the player. For example, a character looks normal except for ...
0
votes
1answer
462 views

How to make it two seconds for Time.time?

var targetscript : Diamond; var red : Color; var orange : Color; function Start () { gameObject.camera.backgroundColor = red; } function Update () { if (targetscript.score > 4) { ...
32
votes
6answers
5k views

Do complementary shadows make sense for games?

According to color theory, shadows work better if they don't use pure blacks or grays, but instead use a color that's complementary to the color of the object casting that shadow. That is, if you ...
0
votes
1answer
82 views

How does Texture2D.GetData return coloured pixels?

I'm trying to work out how the pixels are stored in the returned array but I'm not having a lot of luck (and thus my calculations don't seem to be working). I realize that the pixels are stored in ...
23
votes
6answers
4k views

Algorithm to modify a color to make it less similar than background

I'm creating a demo of 20 balls bouncing each other, with a background filled with a solid color. Color for each ball is chosen randomly with randint(0, 255) for each R, G, B tuple component. Problem ...
0
votes
1answer
78 views

OpenGL strange rendering problem when buffers have different sizes

I have encountered a very odd error in my program, "odd" in the sense that everything the API says suggests that the error should not occur. I have a bunch of 2D un-indexed vertex data, and I want to ...
4
votes
1answer
288 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
2
votes
2answers
609 views

Palette reduction to pre-defined palette

I'm writing a bunch of GLSL effects for fun, but I can't wrap my head around this. Basically, I want to reduce a texture's palette into a pre-defined set of colors. For example, a post-processing ...
14
votes
7answers
3k views

What does the term “channel” mean when used in regards to computer graphics?

I was studying terminology for computer graphics, and this statement came up that confused me. The image can have alpha channels for transparency. I tried searching for the meaning of the term "...
9
votes
2answers
438 views

How do I simulate color blindness for accessibility testing?

Is there an application I can download (or some configuration of Windows, or something) that will let me see how my game will appear to users with different color-blindnesses? There are already good ...