Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [blending]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
56 views

Textures still show as opaque even when alpha is multiplied by zero

I'm having a some problems with blending in OpenGLES2.0 I'm drawing a texture above a framebuffer (with ARGB channels). When I draw a transparent texture over a solid color, the alpha channel is ...
Gabriel Machado's user avatar
2 votes
1 answer
129 views

How do I mix an image with a specified color?

I have some images of static objects using per-pixel alpha (trees, rocks) for a background. In order to make them look a bit more natural, I want to create some kind of atmospheric fog, which means ...
Intice's user avatar
  • 31
0 votes
0 answers
383 views

Rendering texture as pure white / filled with color with SDL2

I added a glow or shine effect to make character flash with one color for a short period of time, it looks like this. The code in draw function: ...
SavedowW's user avatar
0 votes
0 answers
47 views

How to blend local cubemaps?

I have a (GPU) Buffer that contains the World Position and Extents of Local Cubemaps aswell as a TextureArray that contains the textures of the Cubemaps. The Bounds of the Local Cubemaps are Axis ...
Raildex's user avatar
  • 761
0 votes
0 answers
45 views

Correct palette vs player color RGB combination

I'm trying to replicate a RTC game as a pet project. The thing is, the units have a .BMP palette. From index 0 to 63, palette colors will be combined to the player color, since that parts of the unit ...
sm1l3yZzZ's user avatar
0 votes
3 answers
257 views

How to tile 4 images and blend the seams

Scenario For the sake of example I have four textured planes that overlap each other. Theoretically this produces one large image but the textures come from a third party at run time and often are ...
Jacksonkr's user avatar
  • 229
1 vote
2 answers
1k views

How to blend a 2D terrain

Rimworld (shown above) has many different terrain types. In order to achieve Rimworld styled terrain, I need to achieve two goals A) How to render differently textured terrains B) How to blend these ...
Blue Bug's user avatar
  • 1,112
0 votes
1 answer
158 views

Substance Painter: Fix color addition

Substance Painter appears to add colors together wrongly when selecting "Normal Blending Mode" The right side is what photoshop does correctly, meaning R+G+B values in the border region ...
AzulShiva's user avatar
  • 669
1 vote
2 answers
134 views

unsmooth blending with deferred shading and light volumes

So I implemented deferred Shading with a single full screen light pass (picture 2) (by passing the light-data as an array to the shader) and deferred shading with point light volumes (picture 1) (by ...
Sprinklerkopf's user avatar
2 votes
0 answers
68 views

OpenGL : Blending & feedback effect

I'm struggling on a simple project, as an example/sandbox, I'm rendering a small oscillating rectangle on my output. I'm not using glclearcolor() but instead, on ...
ebkgne's user avatar
  • 21
0 votes
0 answers
84 views

How to efficiently average multiple rotations (quaternions)? [duplicate]

So, I'm working on an animation system in C++, and am trying to blend multiple animations together. A slerp is easy on two quaternions, but is it efficient (or accurate) to chain together for more ...
Danny's user avatar
  • 123
0 votes
0 answers
55 views

Per-component Shader Blend in Unity

Context : I'm writing a 2D mobile game in Unity where the graphics are essentially black lines drawn on a background image plus some lighting. Running full RGB calculations for every step seems like a ...
MInvertedM's user avatar
2 votes
1 answer
2k views

How can I blend an animated character with ragdoll physics collisions?

I'm trying to make an effect that a ragdolled character controlled by an animator also affected by the physics collisions. Similar to this game: Crazy Shopping. The problem is animator controller ...
Arlandria's user avatar
2 votes
1 answer
817 views

Additive Blending and Gamma Correction

Should one do additive blending (aka lightmapping) in linear space? I tried doing it in linear space, and it became, well, linear and bland, losing that cool HDR-style bloomy effect. Is there some ...
SmugLispWeenie's user avatar
1 vote
1 answer
758 views

Texture with transparency not rendered correctly in LibGDX

The title might be a bit misleading but I'm having a hard time to explain the problem so I'll try with pictures: Same tree from opposite site: I'm trying to create a voxel game and at the moment I ...
BlakkM9's user avatar
  • 148
0 votes
0 answers
68 views

Calculate animation weights based on two variables

I am working on a custom engine and have been tinkering with animations using the Cal3D library. My previous experience with animations was based on prototyping a bit with Unity's Mecanim. Right now, ...
Devem's user avatar
  • 11
1 vote
1 answer
115 views

LibGDX transparent textures look weird for a brief moment during skeleton animation

So I have a stage with some characters (Spine2D Skeletons). Each character has a health bar/stamina bar texture above them. The textures are simple PNGs with some gradient on them and transparency too....
Daniel D.'s user avatar
0 votes
2 answers
414 views

Mip map artifacts

I have created a texture in Blender in texture paint mode. Then I have started to add some details for side and corner texture. They are primarily height maps. I had some minor pixels being a ...
Candid Moon _Max_'s user avatar
0 votes
1 answer
316 views

Supporting uniform/non-uniform scale in hierarchical animation

I have worked with hierarchical blended animation systems for a number of years, but I have never been quite sure how to handle scale correctly. The introduction of non-uniform scale is additionally ...
Steven's user avatar
  • 3,062
0 votes
2 answers
2k views

OpenGL - Changing blending modes using sprite batching

I'm working on a game which uses sprite batching to render sprites efficiently where each sprite gets batched with its VBO data into a VAO every frame (containing vertex coordinates, texture data and ...
Jeremiah Cummings's user avatar
0 votes
1 answer
657 views

Blending for multiple lighting passes

I am attempting to perform shadow mapping with deferred shading, using the following code: ...
Ian Young's user avatar
  • 2,649
3 votes
2 answers
2k views

Blending between many materials

I am storing one material ID per vertex in my meshes. In the shader for the mesh, I have a texture array full of textures that the material ID can refer to. The fragment color is chosen using ...
epitaque's user avatar
0 votes
2 answers
207 views

What does glBlendFunc do when given an incorrect enumeration value?

In cocos2d-x, I am using particle system from plist with blend values: dst = 1, and src = 100 which is wrong enum for gl_blend. Although app logged "OpenGL error 0x0500" but it still run and showed a ...
Ngọc Anh's user avatar
0 votes
0 answers
931 views

Faster way to do multi texture blending(HLSL, triplanar texturing and overhang mapping)

Right now I'm doing a lot of lerping to blend my textures based on height(under water, mid ground and height ground), normal.y >= 0.0 for the under side of the terrain, fractal blend map for a marble ...
Justin William Stanley Bryant's user avatar
0 votes
1 answer
1k views

Layers in PixiJS

I am using the PixiJS framework to create a 2D RPG Game. How can I create a PIXI.Container with a transparent background which I can render on top of my main stage ...
Pepe Becker's user avatar
3 votes
1 answer
1k views

Color spaces: Should colors be converted to linear color before applying premultiplied alpha?

For instance, when loading an image that is SRGB, which of these is correct? Simple premultiply: Take SRGB color from file and multiply RGB by alpha or Convert to linear before premultiply: Take ...
Tim R.'s user avatar
  • 268
2 votes
0 answers
820 views

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

In OpenGL, I am using GL_SRGB8_ALPHA8 for the OpenGL internal texture format for my textures and render targets. This eliminated some banding I was seeing in dark ...
Tim R.'s user avatar
  • 268
1 vote
0 answers
72 views

Controllable color blending?

I'm relatively new to color blending in DirectX, and I'm hoping there is a relatively simple answer to this question. I am targeting Direct10.1. What I am trying to achieve is colour blending of two ...
Matt's user avatar
  • 181
0 votes
1 answer
14k views

Low-poly heightmap

I want to transform a 'normal' heigthmap into something like this: Starting from a normal grayscale heightmap like this: I looked into Voronoi, but I cant find a way of how to tranform the grayscale ...
floAr's user avatar
  • 1,005
0 votes
1 answer
616 views

OpenGL - Quad is being separated like a two triangles after blending

I wanted to add transparency for my UI elements, so I enabled blending by adding: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); before ...
skprime's user avatar
  • 105
0 votes
2 answers
156 views

Cannot get mask with multiple textures to work

I am trying to render three textures: Background, Black/White Foreground Mask and Foreground. I have used this OpenGL - mask with multiple textures, but I cannot get it to work. I only get the last ...
Javier Ramírez's user avatar
2 votes
1 answer
4k views

Is it possible to interpolate different sprites? [duplicate]

I can interpolate different animations based on position, rotation, and scale. I want to do the same for different sprites, automatically. For example, lets say I have a soda can being crushed. I ...
Evorlor's user avatar
  • 5,793
0 votes
0 answers
136 views

ETC1 texture opacity

I'm using the cocos2d-x engine and want to support etc1 on android devices for my game. For ETC1 i'm using the mali compression tool, and GLSL. Everything is working, but I can't change the opacity ...
jeromintus's user avatar
0 votes
0 answers
988 views

OpenGL - Make two images blend together

I have 2 images that are .png and they mix together, The problem is that one overwrite the other. I know that the draw order matters, but In that case I should redraw the icons 2 times ( there is a ...
D4rWiNS's user avatar
  • 293
2 votes
2 answers
730 views

How to create a material that blends textures in Blender to Unity workflow

I'm new to Blender and Unity and trying to figure out the best way to create a material that will use either vertex colors or a texture map to interpolate between other textures on a single mesh. ...
kitfox's user avatar
  • 171
0 votes
1 answer
525 views

Unity Make sprite visible only to shaders

I have made a shader for my UI buttons, the sprites should be black and white, so they can be used as a mask when blending. They should allow for the image behind them to pass through the whiter ...
user3195897's user avatar
1 vote
1 answer
10k views

Unity3D sprites vs Mesh Quads - Depth, Blending, Shadows

I'm new to unity but not new to game development. In my OpenGL ES 2.0 (mobile) games I create a vertex array of all my "sprites" and stuff it in a VBO. Then draw them as I need them one at a time, ...
badweasel's user avatar
  • 1,991
0 votes
0 answers
91 views

Unity: Combine two UVs by alpha

I'm currently creating a voxel game like Minecraft. To display the damage of blocks, I want to combine the alpha channel of one part of my texture map with the actual texture (like Minecraft does), ...
yxyx136's user avatar
  • 63
3 votes
1 answer
2k views

Basic terrain shader without using external texture

I have this: (Right now I have the height map in a x*x size 2D array and a 1D vector too.) What I am trying to achieve is something like this: Without using any textures, only plain colors. So ...
Zoltantan's user avatar
1 vote
1 answer
550 views

How to setup a particular blend state where the alpha channel is additive?

I would like to set a blend state to be "additive" and do the following: ...
SmartK8's user avatar
  • 614
9 votes
2 answers
10k views

"Normal" Blend Mode with OpenGL Trouble

I've been having a lot of trouble trying to get a OpenGL blend function to work as I'd expect it to with like what I'd expect (or from any sensible image editing program). As an example, I'll use ...
Lemon Drop's user avatar
0 votes
1 answer
696 views

Algorithm for texture blending modification

Im currently writing a terrain editor for my game (for the record: no commercial intentions) and after having implemented the terrain morphing to my liking im now working on the texturing of said ...
Cromon's user avatar
  • 103
2 votes
1 answer
947 views

Additive blending problems

I'm trying to get the blend of two images to work without luck. I have a render target on which I have an object, then I want to render again the same object in same position but with different ...
juan_morata's user avatar
0 votes
1 answer
3k views

What is "ping pong" in the context of graphics rendering?

I have to render a scene, once per light, and blend the result of the various passes. I heard and read that one way to increase performances and render targets to use would be ping pong. I'm new to ...
juan_morata's user avatar
4 votes
2 answers
2k views

How to blend multiple normal maps?

I want to achieve a distortion effect which distorts the full screen. For that I spawn a couple of images with normal maps. I render their normal map part on some camera facing quads onto a ...
János Turánszki's user avatar
4 votes
2 answers
2k views

Best way to blend colors in tile lighting? (XNA)

I have made a color, decent, recursive, fast tile lighting system in my game. It does everything I need except one thing: different colors are not blended at all: Here is my color blend code: ...
ben's user avatar
  • 117
0 votes
1 answer
302 views

Blending issue with framebuffer

I'm trying to get some particles to work properly - they should blend among themselves but not with the background color. For this I'm using additive blending, textures with premultipled alpha and set ...
user40079's user avatar
  • 284
1 vote
1 answer
3k views

Best Way to Render Multiple Lights with Deferred Rendering and GLSL

So I've implemented deferred rendering in GLSL and OpenGL for my game engine. I want to blend together multiple lights, but the performance is a bit sub-par. How I'm doing it now is the following: ...
BlueSpud's user avatar
  • 161
2 votes
0 answers
405 views

2D Animation Blending [closed]

I have been researching on 2D Animation Blending technique similar to what Unity 4.3 has. I know how Animation blending in 3D works but I have no idea how it works in 2D. How does 2D Animation ...
user44894's user avatar
3 votes
1 answer
7k views

Procedural terrain - how to blend textures between dynamic meshes

I think I should structure this question better. I'm developing a procedural terrain structured with voxel chunks. Every chunk: contains a NxNxN voxel array generated with perlin noise 3d ...
Leggy7's user avatar
  • 1,464