Remove Render Remove Shaders Remove Sprite
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

Color Change of Sprite Renderer

Cocos

To modify the material, you need to add color parameters to the corresponding shader. SpriteRenderer does not provide an interface to modify the color. You can change it by modifying the material. Like this surface-effect.effect.zip (1.2

Render 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. 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

Shader array properties

Cocos

stringwizard5: If you use the material.setProperty function, one of the possible arguments that it can take is render pass I am not quite sure what do you mean. We are currently using this shader to create dynamic light effect on 2d sprites, so we are updating it very often. Also every sprite has it’s own material.

Shaders 40
article thumbnail

Shader Problem in IOS

Cocos

I have a question related to shaders. I created a game in which I added a shader; it works fine in web mobile and Android, but in iOS it gives an error during rendering. How to solve this issue version-3.8.2 17:49:37 [ERROR]: [ERROR] file /Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm:

Shaders 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. Use UV in Shader Both 2D and 3D shaders in Cocos are obtained in the vertex shader (VS) and passed to the pixel shader (FS). x,waveFactor.y-uv0.y); x,waveFactor.y-uv0.y);

Shaders 98