article thumbnail

Color Change of Sprite Renderer

Cocos

Hi, Is there any way to change color of Sprite Renderer Currently , I am using cocos 3.8. I just want to change sprite color tint in runtime, Or if it is possible to do with 3d material so good to know ,how can I achive that.

Sprite 52
article thumbnail

Color Change of Sprite Renderer

Cocos

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

Render 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

[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. However, the advantages are obvious. So, it’s up to you to decide.

Sprite 52
article thumbnail

Changing vertexData of a sprite in 2D in cocos creator 3.6.2

Cocos

but facing one issue depending on the sprite type mesh which is in CC2.4 where there is a function to create render data renderData.createFlexData but I could not find any way to do it in CC3.6. its creating static data I am not able to render the vertices count when they are changing continuously.(This Since in CC3.6

Sprite 40
article thumbnail

How to render sprite as tiled in cocos creator?

Cocos

How to render sprite as tiled in cocos creator in c++?

Tile 40
article thumbnail

Effective way of using spine animation as sprite

Cocos

But the render overhead is quite high compare to sprite even when I set timeScale = 0 and cache to SHARE_CACHE. Hi, in my game I used alot of spine animation. I don’t want to create separate for that spine to save memory usage. So how can I optimize this? Thanks in advance.

Sprite 40
article thumbnail

How to reduce drawcall, which actually not rendered?

Cocos

perfecto: there is another picture, 50 items in list with same sprites which in autoatlas but still more 100 drawcalls, where is Batching? Remove Label and see the magic. Label will cut auto-batching.

Render 52