Questions tagged [blending]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
215 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 ...
user avatar
  • 1,102
0 votes
0 answers
27 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 ...
user avatar
  • 619
1 vote
2 answers
51 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 ...
user avatar
2 votes
0 answers
46 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 ...
user avatar
  • 21
0 votes
0 answers
83 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 ...
user avatar
  • 3
0 votes
0 answers
27 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
2 votes
1 answer
392 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 ...
user avatar
1 vote
1 answer
490 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 ...
user avatar
  • 148
0 votes
0 answers
44 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, ...
user avatar
  • 1
1 vote
1 answer
93 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....
user avatar
0 votes
2 answers
305 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 ...
user avatar
0 votes
1 answer
227 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 ...
user avatar
  • 3,022
0 votes
2 answers
1k 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 ...
user avatar
0 votes
1 answer
448 views

Blending for multiple lighting passes

I am attempting to perform shadow mapping with deferred shading, using the following code: ...
user avatar
  • 2,555
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 ...
user avatar
0 votes
2 answers
173 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 ...
user avatar
0 votes
0 answers
746 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 ...
user avatar
0 votes
1 answer
892 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 ...
user avatar
3 votes
1 answer
727 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 ...
user avatar
  • 268
2 votes
0 answers
724 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 ...
user avatar
  • 268
1 vote
0 answers
63 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 ...
user avatar
  • 181
0 votes
1 answer
11k 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 ...
user avatar
  • 1,005
0 votes
1 answer
509 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 ...
user avatar
  • 95
0 votes
2 answers
127 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 ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
  • 5,231
0 votes
0 answers
121 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 ...
user avatar
0 votes
0 answers
798 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 ...
user avatar
  • 293
2 votes
2 answers
653 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. ...
user avatar
  • 171
0 votes
1 answer
479 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 ...
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, ...
user avatar
  • 1,891
0 votes
0 answers
89 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), ...
user avatar
  • 63
2 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 ...
user avatar
1 vote
1 answer
464 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: ...
user avatar
  • 564
8 votes
2 answers
8k 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 ...
user avatar
0 votes
1 answer
650 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 ...
user avatar
  • 103
2 votes
1 answer
811 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 ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
3 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 ...
user avatar
4 votes
2 answers
1k 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: ...
user avatar
  • 107
0 votes
1 answer
190 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 ...
user avatar
  • 284
1 vote
1 answer
2k 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: ...
user avatar
  • 151
2 votes
0 answers
399 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 ...
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 ...
user avatar
  • 1,444
0 votes
1 answer
112 views

Blending and shadowmapping?

I am trying to implement shadow mapping, and currently I have 2 point lights and 1 global ambient light source and my rendering loop looks roughly like this (the details are not relevant): ...
user avatar
  • 1,386
3 votes
2 answers
828 views

Laser Beam End Points Problems

I am building a game in XNA that features colored laser beams in 3D space. The beams are defined as: Segment start position Segment end position Line width For rendering, I am using 3 quads: ...
user avatar
2 votes
2 answers
198 views

Replacing 4 additive sprite layers with a single shader. Just can't get it right

I'm using directx9 and have 4 textures I want to draw on top of each other. if I do this: PDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA); PDevice->SetRenderState(D3DRS_DESTBLEND,...
user avatar
  • 123
2 votes
1 answer
1k views

What is this alpha blending result?

I'm having an exam soon and got a problem with one alpha blending exercise: ...
user avatar
5 votes
3 answers
9k views

OpenGL additive blending not working as expected

I am trying to achieve additive blending with point sprites. When the sprites overlap, all I get is solid red, when I expect to get a smooth blend from red->yellow->white. My sprite texture has all ...
user avatar
  • 805
5 votes
2 answers
2k views

blending with the foreground but not the background

I want to draw some very-semi-transparent objects on top of my scene and have them blend nicely with the other pixels in the scene, but not blend with the background; if I draw a semi-transparent ...
user avatar
  • 6,867