Questions tagged [blending]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 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 ...
0
votes
0answers
32 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, ...
1
vote
1answer
47 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....
0
votes
2answers
160 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 ...
0
votes
1answer
94 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 ...
0
votes
2answers
482 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 ...
0
votes
1answer
226 views

Blending for multiple lighting passes

I am attempting to perform shadow mapping with deferred shading, using the following code: ...
2
votes
2answers
1k 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 ...
1
vote
2answers
122 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 ...
0
votes
0answers
450 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 ...
0
votes
1answer
636 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 ...
2
votes
1answer
472 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 ...
2
votes
0answers
477 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 ...
1
vote
0answers
54 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 ...
0
votes
1answer
5k 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 ...
0
votes
1answer
326 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 ...
0
votes
2answers
100 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 ...
2
votes
1answer
2k 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 ...
0
votes
0answers
114 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 ...
0
votes
0answers
558 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 ...
2
votes
2answers
528 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. ...
0
votes
1answer
427 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 ...
1
vote
1answer
8k 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, ...
0
votes
0answers
81 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), ...
2
votes
1answer
1k 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 ...
1
vote
1answer
383 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: ...
8
votes
2answers
5k 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 ...
0
votes
1answer
487 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 ...
2
votes
1answer
662 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 ...
0
votes
1answer
1k 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 ...
3
votes
2answers
1k 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 ...
4
votes
2answers
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: ...
0
votes
1answer
178 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 ...
1
vote
1answer
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: ...
2
votes
0answers
378 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 ...
2
votes
1answer
6k 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 ...
0
votes
1answer
107 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): ...
3
votes
2answers
717 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: ...
2
votes
2answers
192 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,...
2
votes
1answer
964 views

What is this alpha blending result?

I'm having an exam soon and got a problem with one alpha blending exercise: ...
5
votes
3answers
7k 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 ...
5
votes
2answers
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 ...
2
votes
0answers
83 views

Glowing Effect and Blending [duplicate]

I am using C++ and SDL and I am trying to get lines with a glowing effect as provided by the image of the game Defcon on the continental outlines. How could I achieve this glow and blend of the ...
2
votes
1answer
356 views

Independent blending with DXGI_FORMAT_R16G16_SINT

I'm implementing direct volume rendering engine with volume bricking, but I'm stuck with this problem: For each volume brick I render to color render target [CRT] (for visualization) and to data ...
0
votes
1answer
970 views

How can I draw a small bitmap on a larger bitmap at a particular position? (Canvas / SurfaceView)

I'm building a game that requires additive blending of colours for certain bitmaps. Say I have 4 different types object, there are maybe ten of each type on the screen with each type having a ...
0
votes
0answers
137 views

How to put OpenGL in a state for drawing blended, colored, nontextured polys?

Using OpenGL1.1 (sadly) I'm trying to draw a cube, which is colored and alpha blended. It is instead showing up as opaque black. Even without including alpha in the color it still shows up as opaque ...
0
votes
1answer
505 views

Incorrect colour blending when using a pixel shader with XNA

I'm using XNA 4.0 to create a 2D game and while implementing a layer tinting pixel shader I noticed that when the texture's alpha value is anything between 1 or 0 the end result is different than ...
3
votes
1answer
600 views

Premultiplied Alpha And Alpha Testing

I have a shader that is supposed to work with either alpha blending or alpha testing, but the color values being passed in are premultiplied alpha values. Is there an easy/standard way to have it ...
5
votes
1answer
1k views

What are the rest of the blending functions used for?

In general, I know of five ways to make use of blending functions (these are for OpenGL, but replace glBlendFunc() with ...
1
vote
1answer
121 views

Drawing sprites messes up my model in XNA4

I have a model which draws correctly in XNA4. However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering model is ...