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. aExtend is the expanded Alpha. Here, we take the opposite approach.

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. png.zip (8.6 zip (636.5

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

D2 log 074 – New level format

Catnip Games

Everything is just one big texture. I export the rendered terrain from Blender as a RGBA image but with alpha value set to depth. This gives me freedom in level design and saves work making tiles… tileable. This gives me freedom in level design and saves work making tiles… tileable. So it’s RGBZ.

Terrain 52
article thumbnail

Does Spine work with USE_INSTANCING?

Cocos

Hello, I’m working on a custom material/effect with a USE_INSTANCING branch that works on sprites, but does not work on a spine character. v_instancedCol1; col2 = v_instancedCol1; col3 = v_instancedCol1; #else col1 = u_col1; col2 = u_col2; col3 = u_col3; #endif o *= texture(cc_spriteTexture, uv0); vec4 mask = vec4(texture(maskTex, uv0).rgb,

Texture 40
article thumbnail

Shader Help required (UV distortion with cc_time[0])

Cocos

1.0 - newUV.x), min(newUV.y, 1.0 - newUV.y)); // Calculate the flame distortion amount based on the distance from the edge float distortionAmount = flameIntensity * (1.0 - smoothstep(0.0, 1.0 - newUV.x), min(newUV.y,

Shaders 40
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. Full Unity 2D Game Tutorial 2019 – Mini Map Render Texture. In order to do that we first need to make a render texture. This will display our render texture.

Texture 52
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. As you can see: Vertices / UVs are sent via attributes.

Shaders 52