Remove Render Remove Sprite Remove Texture
article thumbnail

Sprite Shader Render out of bounds

Cocos

Good evening, I just finished writing my own custom shader to create 2D shadows on sprites, but I can’t find a way to increase the render area of ​​the sprite. The sprite size is 450x450, I created an atlas and used the trim option, this reduced the frame to 156x393. Is there a way to increase the render bounds?

Sprite 52
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. Do render Textures not support alpha in cocos? Basic masking functionality without using the mask component.

Texture 40
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. Anyhow, the shader works, I can set it up on a spriteframe and it works as expected… however, when I add the render text. Basic masking functionality without using the mask component.

Texture 40
article thumbnail

Cocos Shader Tutorial 1.0 - about UV

Cocos

The vertical axes of textures and picture pixels is shown above, when sampling textures in shaders, that is from top to bottom, which is top-right corner. If your previous development experience is based on OpenGL, you may find that the texture on your grid is vertically flipped. _pass = this.node.getComponent(Sprite).material.passes[0];

Shaders 98
article thumbnail

GLES2 renderer optimization - 2D batching

Mircosoft Game Dev

While Juan ( reduz ) has been busily working on Vulkan, the rest of the rendering team have not been idle. They have been working on many bug fixes and some improvements to the OpenGL rendering in the 3.x Up until now, the GLES2 2D renderer has been drawing primitives (such as rectangles) on an individual basis. How it works.

Render 52
article thumbnail

GPU memory Atlases and Textures

Cocos

However whenever I load an atlas, it loads all its contents to the memory even before a SpriteFrame is set to a Sprite. Even before it is actually rendered. GFX Memory Texture increases ). Is this the expected behavior or am I missing something ? Even a directory load, loads all of it to memory. (

Texture 40
article thumbnail

TexutrePacker export settings with CocosCreator 3.6.2

Cocos

Hello, I tried to use the cocos2d-x preset, but I got a weird render for the SpriteRenderer. (I I see that I have to disable the Trim for the Sprite component here: TexturePacker, the trim lost the positions ). The left sprite is a normal.png. The 2 others sprites are from texture packer. Packer.png. AndreasLoew

Sprite 52