This site uses cookies to improve your experience. To help us insure we adhere to various privacy regulations, please select your country/region of residence. If you do not select a country, we will assume you are from the United States. Select your Cookie Settings or view our Privacy Policy and Terms of Use.
Cookie Settings
Cookies and similar technologies are used on this website for proper function of the website, for tracking performance analytics and for marketing purposes. We and some of our third-party providers may use cookie data for various purposes. Please review the cookie settings below and choose your preference.
Used for the proper function of the website
Used for monitoring website traffic and interactions
Cookie Settings
Cookies and similar technologies are used on this website for proper function of the website, for tracking performance analytics and for marketing purposes. We and some of our third-party providers may use cookie data for various purposes. Please review the cookie settings below and choose your preference.
Strictly Necessary: Used for the proper function of the website
Performance/Analytics: Used for monitoring website traffic and interactions
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?
My spine skeleton has lots of textures. I cant understand how to set loaded texture to skeleton. Sprites from new texture dont want to refresh and are still pink. I have several png files on export from Spine program. Most of this png file I need only on endgame. Thats why I want to load this png files in runtime.
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
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.
Are you using a texture map or are they all individual images that’s moving in and out of cache could it be phone freeing up memory space while in background? I have not had this but I use Texture map one big image. ohh edit is it you need to say sprite->retain(); to keep it then you have to sprite->release();
We use Texture Packer v7 and it supports Polygon atlases. Useful links: codeandweb.com Cocos2d-x performance optimization with polygon sprites Are you experiencing low FPS in your cocos2d-x game? Optimize your sprite sheets to get the best performance for the players! 版本号) 2.1.3 ### Affected platform?(受影响的平台)
I use texturepacker and I have a few big 1024x1024 textures loaded with: SpriteFrameCache::getInstance()->addSpriteFramesWithFile. Then I use: initWithSpriteFrameName(); to assign them to Sprites. Nothing fancy.
does not update sprite sheets when they are updated. Only the texture changes but the sprite frames are not. This breaks the sprites in the scene, inspector and assets view. Expected behaviour: When entering Cocos Creator, sprite sheets are re-loaded and updated. Sprite properties are updated in the Inspector.
Just 2 different ways to initialize the sprites I do load multiple big sprite sheet textures (like 4-5 between 1024x1024 and 2048x2048). I don’t think createWithSpriteFrameName or initWithSpriteFrameName changes anything.
[link] Learn how to use the “Auto Atlas” feature to create sprite sheets in this new tutorial! You’ll also learn how to publish sprite sheets from texture packer and import it in your project! This will increase your game’s performance if you have a ton of images to load in your game.
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.
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];
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.
plist"); //Create sprite auto sprite = Sprite::createWithSpriteFrameName(“mySpriteName.png”); addChild( sprite, 1); are you loading a few SpriteSheets at the same time rather then one big one ?
Hello all, I have a shader that takes the alpha value of one texture and applies to a sprite frame. Basic masking functionality without using the mask component.
On my latest game, I have a weird issue with texture and I have no idea why I have this ( I could only reproduce it once but players do find it from time to time). Suddenly, when the player plays, the screen goes all wrong as if all the textures were now corrupted. Like if all textures now point to the distortioned monster spriteframe.
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 i’m using cocos creator 3.7.0
However whenever I load an atlas, it loads all its contents to the memory even before a SpriteFrame is set to a Sprite. GFX Memory Texture increases ). Even before it is actually rendered. Is this the expected behavior or am I missing something ? Even a directory load, loads all of it to memory. (
Hi, i want to apply a sprite as a tiled background and apply to it an animation like a movement. I want to give this effect changing the “offset” of the texture/sprite of it. This Node has a sprite set as Tiled I don’t want to make a script that calculate position and if at certain value must to set the start position.
if you are encountering Sampler binding ‘cc_spriteTexture’ at set 2 binding 12 index 0 is not bounded one of the possible reasons may be the textures don’t load completely. hello ,bro. first, I recommend you to follow the TS style when you are coding, that will make your code easy to read. for example, use let instead of var. to solve this.
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. _OutlineSize is the stroke width.
? ? Does the shader have a built-in function to get the texture size? I’m trying to draw a circle on a texture, the texture is in sprite. I tried it in different ways, sometimes it turns out to be a stretched circle, sometimes it’s not visible at all, sometimes only part of the circle is visible.
Does the shader have a built-in function to get the texture size? I’m trying to draw a circle on a texture, the texture is in sprite. I tried it in different ways, sometimes it turns out to be a stretched circle, sometimes it’s not visible at all, sometimes only part of the circle is visible. float v = length(uv); v -= 0.5;
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.)
So that is exactly what we have done, going hands-on with Muse Sprite, Muse Texture, Muse […] The post Unity AI Muse Tools Review appeared first on GameFromScratch.com. GameFromScratch.com Unity AI Muse Tools Review Unity have recently announced that all 5 in development Unity AI tools are available inside the Unity editor.
I have a sprite (a regular line) and I wanted to apply a wave effect to it. It looks like a wave, but it goes beyond the texture area. I tried to normalize by passing the dimensions of the sprite (line) to the shader like this mat.setProperty("iRsolutetion", new Vec2(1.0 / this.node.getComponent(UITransform).contentSize.width,
On a smaller texture, the distortion is greater than on a larger texture. The HelloWorld texture has a size of 196 X 270. One shader is used, only the spritetexture changes. I scaled it up in the graphics editor to 400 x 554 and the distortion is barely noticeable. Do you need some tweaks or is this a bug?
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. Hello, I tried to use the cocos2d-x preset, but I got a weird render for the SpriteRenderer. (I They are stretched and cropped.
Resources just feels like it should be things like 3d Models and Textures, but if you want to stick with the original, that’s fine. The first thing to download will be the sprites and textures from the original tutorial. 02_TacticsRPG_Textures.zip Unzip the folder and move Dirt.png into the Textures folder.
For me, even for a simple sprite to work, I need to change its texture filter type to none (in editor) to make it work. I tried it with auto atlas and texture filter trick mentioned above no longer work as well. Hello @pandamicro I’m having the similar issue. Could you please look into it?
By test case i am assuming a way to recreate, I simply created a node with a billboard component and used a sprite as the texture. The color changes based on what is behind the billboard: The ‘water’ behind the white icon is a plane mesh I can bring the icon back to normal color by compromising the water material (see next reply)
My case is: only one 3d model + 3d camera + active post process FXAA on that camera + active render texture for that camera, then use sprite to display render texure on UI. With change FXAA to TAA, I got different result: FXAA => black background around 3D model. TAA => transparent background around 3D model.
My case is: only one 3d model + 3d camera + active post process FXAA on that camera + active render texture for that camera, then use sprite to display render texure on UI. With change FXAA to TAA, I got different result: FXAA => black background around 3D model. TAA => transparent background around 3D model.
My case is: only one 3d model + 3d camera + active post process FXAA on that camera + active render texture for that camera, then use sprite to display render texure on UI. With change FXAA to TAA, I got different result: FXAA => black background around 3D model. TAA => transparent background around 3D model.
My case is: only one 3d model + 3d camera + active post process FXAA on that camera + active render texture for that camera, then use sprite to display render texure on UI. With change FXAA to TAA, I got different result: FXAA => black background around 3D model. TAA => transparent background around 3D model.
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.
Techniques such as using lower-resolution textures, controlling particle spawn rates, and optimizing the lifespan of particles can significantly reduce the load on the GPU. Efficient Use of TexturesTextures are a significant component of mobile game visuals, but high-resolution textures can quickly consume memory and processing power.
We organize all of the trending information in your field so you don't have to. Join 5,000+ users and stay up to date on the latest articles your peers are reading.
You know about us, now we want to get to know you!
Let's personalize your content
Let's get even more personalized
We recognize your account from another site in our network, please click 'Send Email' below to continue with verifying your account and setting a password.
Let's personalize your content