Questions tagged [transparency]

Any part of an object or graphic that light does not fully reflect off of, and thus can be seen through. Also applies to translucency effects.

Filter by
Sorted by
Tagged with
27 votes
2 answers
23k views

Why are some games using some dithering pattern instead of traditional alpha for transparency?

Recently, I have seen some 3D games (eg: GTA IV) to use some kind of ordered dithering to simulate transparency / alpha. The polygons are not transparent as ...
tigrou's user avatar
  • 3,204
16 votes
7 answers
4k 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 "...
Stync's user avatar
  • 311
14 votes
2 answers
24k views

How Do I Do Alpha Transparency Properly In XNA 4.0?

Okay, I've read several articles, tutorials, and questions regarding this. Most point to the same technique which doesn't solve my problem. I need the ability to create semi-transparent sprites (...
Soshimo's user avatar
  • 315
14 votes
1 answer
27k views

How to render a texture partly transparent?

Good Morning StackOverflow, I'm having a bit of a problem right now as I can't seem to find a way to render part of a texture transparently with openGL. Here is my setting : I have a quad, ...
megamoustache's user avatar
12 votes
4 answers
19k views

How do I render a PNG with transparency in LibGDX?

I'm building a simple tic-tac-toe example with LibGDX. I have simple images: cross, circle and board, all pngs created with GIMP with a transparent background. How ...
Vokail's user avatar
  • 437
10 votes
4 answers
4k views

Shadow Mapping and Transparent Quads

Shadow mapping uses the depth buffer to calculate where shadows should be drawn. My problem is that I'd like some semi transparent textured quads to cast shadows - for example billboarded trees. As ...
CiscoIPPhone's user avatar
  • 5,268
9 votes
3 answers
6k views

Order independent transparency in particle system

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because: Each particle is a point sprite in a single mesh and I can't use scene ...
Stepan Zastupov's user avatar
7 votes
2 answers
6k views

What is the order-less rendering technique that allows partial transparency?

I've seen somewhere rendering technique that allows order-less rendering of partially transparent sprites/objects. Though I can't remember what the technique is called, so I'm having trouble Googling ...
kravemir's user avatar
  • 1,657
7 votes
1 answer
8k views

How to write a transparent shader for a sprite that ignores transparent sprites behind it?

I have multiple UI Sprites that have their alpha set so you can see what's behind them. I would like to make these UI Sprites ignore other UI Sprites. So take this first picture. There are 4 UI ...
JacketPotatoeFan's user avatar
7 votes
5 answers
47k views

How can I make my Camera's RenderTexture output have a transparent background?

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the ...
Nathan Friend's user avatar
7 votes
1 answer
5k views

How do games deal with Z-sorting partially transparent foliage textures?

I was busy implementing basic transparency in a prototype I'm working on when something occurred to me. In order for a given texture's transparency to work as expected, the (semi-)transparent texture ...
GarrickW's user avatar
  • 330
7 votes
1 answer
4k views

Depth Peeling implementation problem: How to render the next layer? (OpenGL)

I try to implement order-independet transparency sticking to the pseudo code in the linked paper (page 4). I can't figure out how they are able to do this in OpenGL. I am rendering the scene two ...
mskr's user avatar
  • 233
7 votes
1 answer
601 views

Optimal batching for 2D objects with transparency

I have a collection of 2d objects with transparency. Each object has a depth value to determine draw order and a material. I'm trying to batch them in an optimal way to minimize draw calls. Assume ...
Pris's user avatar
  • 894
6 votes
2 answers
3k views

Jagged transparency when rendering translucent textures (OpenGL 3.2 + GLSL)

Like most others, I'll start off mentioning that I'm still a beginner when it comes to OpenGL and GLSL programming. So bear with me on any dumb mistakes you may spot in the code ahead. I'm basically ...
Jesús Zazueta's user avatar
6 votes
1 answer
2k views

Sprite with alpha Blending in 3D world

I'm working on a game in a 3D world with elements 2D only (Like Don't starve game) for Android and IOS. Currently, I've managed "Sprite" without alpha blending, I've just put a condition in the pixel ...
user34026's user avatar
6 votes
2 answers
2k views

Does Unity's "Transparent Bumped Specular" translate to "semi-shiny must be semi-transparent"?

Unity's documentation for the "Transparent Bumped Specular" shader/material-type is simply a concatenation of each of the descriptions for its Transparent and Specular Shaders (and also Bumped, but ...
Shivan Dragon's user avatar
5 votes
1 answer
6k views

Why do my sprites have a dark shadow/line/frame surrounding the texture?

I'm starting OpenGL with Apple's GLKit hand I'm having some trouble to get my sprites displayed properly. The Problem is that they all are surrounded with thin dark lines. The screen shot below shows ...
Kai's user avatar
  • 153
5 votes
1 answer
12k views

How do I make magenta in my PNG transparent in HTML5/Canvas/JS?

I'm putting together a simple hex map to use within an HTML5 / Canvas / JS game and before I get round to sorting any custom graphics, I was wondering if anybody knew how to make the pink/magenta ...
Chris Evans's user avatar
5 votes
2 answers
397 views

Mobile 3D engine renders alpha as full-object transparency

I am running a iOS project using the isgl3d framework for showing pod files. I have a stylish car with 0.5 alpha windows, that I wish to render on a camera background, seeking some augmented reality ...
Nils Munch's user avatar
5 votes
1 answer
3k views

OpenGL - Z- Buffer translucency

So lately I wanted to use the Z buffer in opengl to order my 2D sprites in my program. Now I didn;t relaize that if you use the Z buffer then you cant blend these sprites. And some of these sprites ...
Amit Assaraf's user avatar
5 votes
1 answer
494 views

Line at edge of transparent texture on XNA mesh

I have a mesh that is computer generated with a texture on top of it with transparancy on one side. The SamplerState is set to LinearWrap because I would like the texture to wrap. The problem I have ...
Wouter's user avatar
  • 281
5 votes
1 answer
3k views

How can glass breaking effect from Smash Hit be achieved? [duplicate]

I saw Smash Hit the other day and was amazed by the physics of the game, specially the shattered glass effect: I've read other posts about this subject but I still feel that they don't share enough ...
karlphillip's user avatar
5 votes
1 answer
2k views

How to detect collision only in non-transparent texture?

I am developing a game using libGDX. I am trying to detect the collision between bee and tube. I am using the following code to detect the collision. ...
Pradip Kharbuja's user avatar
4 votes
2 answers
5k views

Can I clip a collection of geometry to render only inside a particular worldspace volume?

I am making a VR app in Unity. I have a giant map that I want to display on a virtual table. The map is too large to fit on the table, and I cannot change its size. (It is a third party asset, and ...
Evorlor's user avatar
  • 5,775
4 votes
1 answer
2k views

When should I use color keying vs PNG transparency?

SDL (and other toolkits) can use color keying to make a certain color in an image transparent. Alternatively, you could load a PNG image that supports transparency. When should I use which?
user44066's user avatar
4 votes
3 answers
3k views

Alpha blending without depth writing

A recurring problem I get is this one: given two different billboard sets with alpha textures intended to create particle special effects (such as point lights and smoke puffs), rendering them ...
teodron's user avatar
  • 3,271
4 votes
2 answers
2k 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 (...
user avatar
4 votes
2 answers
7k views

Android: Loading bitmaps without premultiplied alpha (OpenGL ES 2.0)

Is this possible? To load textures in non-premultiplied format (Straight alpha?)? My game has 1 or 2 images which have semi-transparent pixels and I need to be able to fade them in and out but this ...
BungleBonce's user avatar
  • 1,927
4 votes
3 answers
3k views

How can I render a semi transparent model with OpenGL correctly?

I'm using OpenGL ES 2 and I want to render a simple model with some level of transparency. I'm just starting out with shaders, and I wrote a simple diffuse shader for the model without any issues but ...
phobitor's user avatar
4 votes
1 answer
3k views

Alpha Blending: use the pixel with the smallest alpha

I'm writing a transparency shader where I need any intersecting textures to, wherever they overlap, take the texture pixel with the smallest alpha value and render only that, discarding the other ...
Essential's user avatar
  • 173
4 votes
3 answers
19k views

Pygame set_colorkey transparency issues

I'm having a strange issue that I cannot seem to remedy. I am doing some prototyping with Pygame on a desktop running windows and a laptop running OS X. Both are running python v2.7.3 (installed via ...
Nathan Chowning's user avatar
4 votes
1 answer
1k views

XNA / MonoGame - render transparent background using stencil buffer problem (3d)

I'm trying to render 3d texture quads with the following properties: With lighting (rule out "AlphaTestEffect"). Transparent background (no opacity levels, just binary opaque or transparent). No ...
Ronen Ness's user avatar
4 votes
1 answer
604 views

How do I check for collision between transparent textures?

I am creating a 2D game using OpenGL. For sprites, I use textured quads (actually two triangles). The texures contain transparent pixels, since objects are not always perfectly rectangular. How do I ...
schemar's user avatar
  • 165
4 votes
2 answers
417 views

XNA Transparency depending on drawing order?

I am drawing two 3D objects, both of them can fade from opaque to transparent independently, and they can intersect between them (so you cannot say when one of them is before the other one). Look at ...
Roman's user avatar
  • 173
4 votes
1 answer
2k views

How do you display non-cutout transparent 2D textures with a depth buffer? (OpenGL)

I've been able to get my 2D renderer to display transparent cutout textures by testing the alpha of a fragment and discarding if it is less than 1 (or any fraction really). The problem is I want to ...
kfan's user avatar
  • 311
4 votes
0 answers
3k views

Overlap transparent particles without blending? (Unity)

I'm trying to create a continuous output of light from an object (like the exhaust of a space ship), and I thought I'd use particles to achieve this. But I'm running into a problem with alpha blending....
eternal's user avatar
  • 341
3 votes
1 answer
8k views

Collision detection with non-rectangular images

I'm creating a game and I need to detect collisions between a character and some parts of the environment. Since my character's frames are taken from a sprite sheet with a transparent background, I'm ...
Jumbala's user avatar
  • 275
3 votes
4 answers
4k views

IOS OpenGl transparency performance issue

I have built a game in Unity that uses OpenGL ES 1.1 for IOS. I have a nice constant frame rate of 30 until i place a semi transparent texture over the top on my entire scene. I expect the drop in ...
user346443's user avatar
3 votes
2 answers
800 views

How to render transparent meshes without sorting? [duplicate]

Let's assume we have some arbitrary triangle manifold meshes which are transparent. How real guys effectively render it? Is it possible todo it without sorting faces back to front (e.g. via bsp) and ...
Konstantin Burlachenko's user avatar
3 votes
1 answer
5k views

What is the AlphaToCoverage blend state useful for?

Alright, just finished most of my early UI stuff and I wanted the windows to have some transparency. So I expanded my application to initialize and bind blend states so that my UI shader could ...
KlashnikovKid's user avatar
3 votes
1 answer
2k views

Make some black pixels transparent in Love2D

Is it possible to put a black opaque rectangle over my game screen and then change transparency on some pixels? For example I have black rectangle on screen represented by 1 ...
Martin Tale's user avatar
3 votes
1 answer
1k views

Change opacity of a texture in XNA 4.0

I have created a terrain using VertexPositionNormalTexture in XNA 4.0, but now I would like to allow the user changing the opacity of the terrain (from 0%, totally opaque, to 100%, totally transparent)...
Roman's user avatar
  • 173
3 votes
1 answer
2k views

XNA 4.0 - Transparent 3D model

I have a little problem with my 3D model (.fbx) rendered in XNA, look at screenshot. Screenshot: It should be a lego brick, which was modelated in Blender, then exported to .fbx and added to XNA ...
MADA's user avatar
  • 33
3 votes
1 answer
796 views

What are some effective methods for implementing downsampled transparency?

It seems that some games have managed to implement downsampled transparency, and presumably gained a significant performance boost. (Examples: Uncharted 2, Crysis 2) A while back I attempted to ...
J Junker's user avatar
  • 265
3 votes
1 answer
488 views

UE4 How to Avoid Boundary Seams with Multiple Refractive Meshes

We use multiple box meshes to create our game world in Unreal Engine 4, but we also use those boxes with translucent/sss materials with refraction. The problem is there are seams between those boxes ...
sirjofri's user avatar
  • 131
3 votes
2 answers
66 views

How can I render all objects behind a plane with a specific transparency value?

I have a game where there a multiple floor levels between the player switches. The floor is not present everywhere, so you can look through it. When 'working' (playing, building stuff, etc.) on a ...
RenK's user avatar
  • 43
3 votes
1 answer
728 views

Odd blending result (semi-transparent 2d quad over 3D scene)

I'm working on a GUI library for my game, and I'm having problems with my blending. I have a 3D scene, which I render with glDrawArrays. In the fragment shader the alpha color is hardcoded 1.0f (...
Basaa's user avatar
  • 1,053
3 votes
1 answer
2k views

How do I procedurally create a directional light cone with an HTML canvas?

To create a directional light effect, I want to draw this kind of transparency mask on an HTML canvas (using context2d): I also want to be able to generate such a mask dynamically. I've tried using <...
jesper's user avatar
  • 131
3 votes
0 answers
244 views

Unusual black squares in transparency effect after wake from sleep

I've encountered unusual black squares in semi transparent textures for a while now, usually in processes that were resumed after the computer woke from sleep. For example I've seen the effect in the ...
Peter's user avatar
  • 9,955
3 votes
0 answers
2k views

How to make the background of an OpenGL object transparent? [closed]

It sounds so simple but i didn't get it to work. The Background of my FrameLayout where i add the GLSurfaceView in is colored blue but there is only black. So here is my method to initiate the ...
Spenhouet's user avatar
  • 365