Remove Code Remove Sprite Remove Texture
article thumbnail

Strategies for Optimizing Multiplayer Games in Unity

Logic Simplified

Use Compressed Textures : Textured images can be saved with lower resolutions while compressed formats such as ASTC and DXT1 and DXT5 reduce memory usage without quality reduction. Texture Atlasing combines multiple textures into one atlas to lower the number of texture switches that occur.

article thumbnail

Tutorial: Cocos Shader Series - Use a Noise Map to Make a Dissolve Texture

Cocos

Blockquote const sprite = this.getComponent(Sprite); const mat = sprite.customMaterial; mat.setProperty(‘dissolveThreshold’, 0.5); Version 3.6.x, x, I using this code but it not bring Property affect to shader Ok, this work if turn of Packable in main Sprite inspector

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

Sprite Outline Shader in Unity

Febucci

In this “Unity Sprite Outline” tutorial we’ll discover how to create both a “Sprite Innerline” and a “Outer Sprite Outline”. Simply, the Inner Sprite Outline shader is drawn “inside” the sprite, while “Outer” is the opposite. Read more about “Texture’s Texel Size” here. Inner Sprite Outline HLSL.

article thumbnail

Can't set texture for spriteframe

Cocos

i wrote a little code to load asset texture from resource. i wrote a little code to load asset texture from resource. 0 ){ let l = new Node; this.node.insertChild(l,cnt); this.label[i][j] = l.addComponent(Sprite); const sf = new SpriteFrame(); sf.texture = tex[0]; this.label[i][j].spriteFrame var tex = Array(25).fill(new

article thumbnail

Can't set texture for spriteframe

Cocos

first, I recommend you to follow the TS style when you are coding, that will make your code easy to read. from your code, I guess you want to load some text images and cache them to an array, then you use them to create the spriteFrames when needed. hello ,bro. for example, use let instead of var. the error comes out.

article thumbnail

Cocos creator (2.4.13) Effect Material is not centered at the Sprite Node

Cocos

height)); I am considered myself as a beginner of GLSL shader coding and would be appreciated if anyone would explain to me and show me how to fix this. The goal is to make my effect able to follow the position of my node. 5 + ((gl_FragCoord.xy)/ iResolution.xy); p.x *= iResolution.x / iResolution.y; intensity); } }% // In typescript this.

article thumbnail

How to get an array of pixel colors from an image?

Cocos

I installed extensions in VS C (Cocos Effect, Shader languages support for VS Code) my next thought was to get into the shader to try working with the texture there, but I ran into difficulties: 1.) I couldn’t find the right package for working with textures to get pixel colors #include <common/texture/texture-lod> 2.)