Remove Alpha Remove Pixel Remove Sprite
article thumbnail

[Tutorial]Outer Stroke Effect for 2D Sprites

Cocos

Original: [link] Author: BitByBit Outer Stroke Effect for 2D Sprites Continuing from the previous article Inner Stroke Effect for 2D Sprites Introduction In the last article, we introduced the method of inner stroke and also discussed its pros and cons. First, we get the uv of the surrounding pixel through the offset uv.

Sprite 52
article thumbnail

Cocos Creator 3.7.1 Black edges on images

Cocos

The black border is due to the fact that in the WebGL program, when drawing, the texture object’s Filter is set to gl.Linear (linear filtering), when a semi-transparent pixel is sampled adjacent to a fully transparent pixel during pixel interpolation (e.g.,(0.1)).0, 0) of this kind) produces black or white pixels.

Pixel 52
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Issue with masking a render Texture

Cocos

Hello all, I have a shader that takes the alpha value of one texture and applies to a sprite frame. I prefer to go this way so that I can have a gradient fade to transparency… the mask component uses the stencil buffer and isn’t set up to use alpha blending and therefore cannot utilize the gradient of alpha values.

Texture 40
article thumbnail

Sprite Object Shape question

Cocos

I had tried the mask method already with no luck… but you mentioning it here pushed me to go try it some more… actually, I still had no luck using the graphic stencil… but the graphic ellipse did the trick perfectly! You saved me so much time!

Sprite 40
article thumbnail

Making shaders more accessible

Mircosoft Game Dev

To explain the idea of how shaders work, let's consider a very simple shader for drawing a sprite to the screen. Our sprite is 32x32 pixels in size, and it must be drawn at some position. The following OpenGL code sends the sprite to the shader for drawing: OpenGL Commands. Multiply by 2. Substract (1, 1).

Shaders 52
article thumbnail

Full Unity 2D Game Tutorial 2019 – Making Mini Map Mask

Game Development

To do that we will edit the spaceship sprite by clicking on it in the project window. Then set the pixels per unit to 64 and click apply to update the sprites. This will be the mask which shows or hides part of our map based on the alpha value of the mask texture we will add. This will display our render texture.

Texture 52