How to create a texture?
Cocos
APRIL 22, 2024
As from the view data amplitudes:number[] = []; create a texture for uniform sampler2D soundTex; ? I want to send the texture to the shader mat.setProperty("soundTex", soundTex);```
This site uses cookies to improve your experience. By viewing our content, you are accepting the use of cookies. 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. View our privacy policy and terms of use.
Cocos
APRIL 22, 2024
As from the view data amplitudes:number[] = []; create a texture for uniform sampler2D soundTex; ? I want to send the texture to the shader mat.setProperty("soundTex", soundTex);```
Cocos
APRIL 23, 2024
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, contentSize.width, 1.0 / this.node.getComponent(UITransform).contentSize.height));
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Cocos
MARCH 7, 2024
? ? 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.
Cocos
MARCH 6, 2024
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;
Cocos
MARCH 25, 2024
Assuming you’re using the latest versions of GLSL, you can get texture size with the “textureSize()” Example code here… uniform sampler2D myTexture; // Uniform for the texture void main() { //Note: if you don’t specify a LOD, glsl will default to 0 automatically ivec2 texSize = textureSize(myTexture, 0); // Get size of the texture at LOD 0 int width (..)
Cocos
SEPTEMBER 12, 2023
x, I using this code but it not bring Property affect to shader Ok, this work if turn of Packable in main Sprite inspector Blockquote const sprite = this.getComponent(Sprite); const mat = sprite.customMaterial; mat.setProperty(‘dissolveThreshold’, 0.5); Version 3.6.x,
Cocos
AUGUST 12, 2023
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 sprite texture 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?
Cocos
FEBRUARY 16, 2023
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. to make the color in bottom darker.
iXie gaming
JUNE 7, 2023
Among these, Shader Graph and VFX Graph stand out as the most important additions as they empower developers to craft complex shaders and breath-taking visual effects with relative ease. Shader Graph Shader Graph is a node-based visual interface that allows artists and developers to create shaders without writing complex code.
Cocos
JANUARY 8, 2023
Cocos’s Built in Toon Shader is not working in Snapdragon Devices(Web Mobile Build) properly and everything looks washed out. Details : Built in toon shader. Textures : Has anyone ever came across this issue and has a possible fix around it ?
Cocos
AUGUST 30, 2023
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.
Cocos
JANUARY 10, 2023
We are using built-in toon shader. Textures are added in Pass 1 of the toon shader. Cocos Creator Version : 3.6.2. WebGL Build. Working fine on mediatek/some ios devices. The issues is reported in all snapdragon devices. Normal Appearance : (ignore the UI). Appearance on a snapdragon device :
Cocos
JUNE 8, 2023
Another thing is I noticed that the FPS dropped after the shader was applied to some sprites. So, is there way to cache the rendered texture (including the shader effect) rather than recalculating the same thing every frame. I will check and get back to you.
The Knights of Unity
JUNE 5, 2020
And even before an era of SRPs (Scriptable Render Pipelines), there was a good amount of solid features like today’s topic: Render textures. In this post I’m going to explain to you how to use render textures in your game. For shaders, I used Amplify Shader Editor to add some visual effects on top of the render texture.
Catnip Games
JULY 17, 2022
Spent some time tinkering with shaders. I also tried distortion for the bottom layer but UV wrapping is a problem because the tiles are in a texture atlas. I also tried distortion for the bottom layer but UV wrapping is a problem because the tiles are in a texture atlas. Maybe next time…
Cocos
FEBRUARY 8, 2023
I want to use shader to draw circle on spine animation (result of animtion after render) without using texture renderer, but in shader uv0 it calculates on atlas so the result is not as expected. Can anyone help me?
Nvidia
APRIL 25, 2022
and later feature the new Real-Time Shader Profiler, the first temporal sampling profiler for GPU shaders. and later feature the new Real-Time Shader Profiler, the first temporal sampling profiler for GPU shaders. This profiler enables you to examine the most expensive shaders at each moment in your frame.
Cocos
MAY 24, 2023
When package option is enable, it will try to pack your texture into a larger texture (2048x2048 if I remember correctly). So the shader code will aplly to that larget texture, the uv coordinate you used on the original texture is calulated for this bigger texture, which will have result you received in the video.
Cocos
MAY 13, 2023
Hello, so my issue is such, I have made a shader that causes a UV distortion in the fragment shader, to simulate “flame-like” effects at the edges. There are two variants of these shaders, one where the distortion is dependent on cc_time[0] i.e the time elapsed in seconds when a game is running. 1.0 - newUV.x), min(newUV.y,
GamesIndustry.biz
MARCH 20, 2024
Hennig was on hand to not only introduce the game, but also show off some new Unreal Engine effects featured in the game, like a Nanite adaptive tessellation feature that allows developers to later tile textures and use shader logic to create complex environment effects like foot prints or tire tracks in real-time with a minimum of geometry.
Cocos
FEBRUARY 28, 2024
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.)
Cocos
MARCH 7, 2024
daisyH: textureSize don’t work – vec2 sizeTexture = textureSize(cc_spriteTexture, 0); error ERROR: 0:47: 'texture2DSize' : no matching overloaded function found ERROR: 0:47: '=' : dimension mismatch ERROR: 0:47: '=' : cannot convert from 'const mediump float' to 'highp 2-component vector of float' I only get the circle when the game is not running.
Cocos
JANUARY 11, 2023
Hi muxiandong, While the surface/toon shader resolved the issue on snapdragon devices. But a new issue was reported on mediatek devices using the surface/toon shader. surfaces/toon shader on mediatek devices : Test Project file : ChetanSharmaTextureTest.7z 7z - Google Drive
Cocos
JANUARY 8, 2023
Can you upload effect file @slackmoehrle ? There’s something wrong with the code in this post
Cocos
JUNE 8, 2023
But depends on what you do with texelFetch it could be expensive, any read back from texture would be too. I’m not sure what you want to cache. So if you heavily depending on this feature, it’s not a good idea
Cocos
MAY 6, 2023
So they came and asked: How do I add a new Shader for the CRP? pipeline/passes :Related scripts pipeline/resources/effects :Related shaders pipeline/resources/materials :Related materials Pass Code Next, we’ll ignore all principles and details for now, quickly implement a grayscale effect, and grasp the workflow.
Febucci
MAY 31, 2019
Simply, the Inner Sprite Outline shader is drawn “inside” the sprite, while “Outer” is the opposite. Read more about “Texture’s Texel Size” here. Amplify Shader. In this “Unity Sprite Outline” tutorial we’ll discover how to create both a “Sprite Innerline” and a “Outer Sprite Outline”. Your browser does not support the video.
Cocos
MAY 6, 2023
So they came and asked: How do I add a new Shader for the CRP? pipeline/passes :Related scripts pipeline/resources/effects :Related shaders pipeline/resources/materials :Related materials Pass Code Next, we’ll ignore all principles and details for now, quickly implement a grayscale effect, and grasp the workflow.
Cocos
JULY 5, 2023
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?
Cocos
JUNE 29, 2023
The issue for most developers is knowing how to use SDF with shaders to achieve these effects. One developer has built an excellent extension that allows you to not worry about this and develop more font styles, saving the shaders for you. Thanks to Signed Distance Fields or SDF, you can do this and so much more with them.
Cocos
MARCH 25, 2024
until the issue is fixed (just remember that any scrolling textures that rely on “repeat” wrap mode must be power of 2 in webgl 1.0) OR you can try disabling uniform buffers in engine if you’re not using any custom shaders… but I really wouldn’t recommend this for a number of different reasons.
Cocos
AUGUST 10, 2023
Sorry to litter up the forums with a question like this but I couldn’t find anything about it anywhere online… So… I have made some shaders that use time to essentially animate themselves. Unless I click and hold the right mouse button the shader doesn’t move or update in the scene. (I
Cocos
APRIL 18, 2024
So, we have finally gotten rid of the issue of passing the texture pixels from the previous article. The above is the part of the custom post-processing shader. The corresponding TS code is quite straightforward, just passing the stroke width and stroke color to the shader. The shader is quite simple.
iXie gaming
AUGUST 17, 2023
Use asset stores wisely Unity Asset Store offers a wide range of free and paid assets, such as 3D models, textures, sound effects, and plugins. Custom shaders Gain control over your game’s visual style and performance by creating custom shaders. Be mindful of memory usage, especially on mobile platforms.
Mircosoft Game Dev
JANUARY 27, 2023
Those typically shouldn’t add instability to the engine, but may require doing some changes in your scripts, scenes, and shaders if you were using the affected APIs. Rendering: Properly append global uniform buffer name in gl_compatibility shaders ( GH-72138 ). Shaders: Add derivative functions with precision to shaders ( GH-72109 ).
Mircosoft Game Dev
DECEMBER 9, 2022
Import: Fix swapped color channels in ETC1/ETC2 textures, etcpak expects BGRA data ( GH-69448 ). Rendering: Implement CAMERA_VISIBLE_LAYERS as built-in shader variable ( GH-67387 ). Rendering: OpenGL: Use internal texture name when setting texture uniform location ( GH-69633 ). GH-68870 ).
Catnip Games
JUNE 20, 2023
Everything is just one big texture. The custom terrain shader uses the z-channel to draw water in lower areas of the level. This gives me freedom in level design and saves work making tiles… tileable. Interactive elements will be placed using the in-game editor. So it’s RGBZ.
Cocos
DECEMBER 25, 2023
You just need the following resources and code: A post-processing shader A material with the shader bound to it A post-processing extension TypeScript file for passing parameters to the material Let’s use an example of creating a screen grayscale effect: 1. You can also drag the material into the module’s material slot in the editor.
Nvidia
NOVEMBER 21, 2023
For example, a shader can use warp shuffle instructions to exchange data between threads in a warp without going through shared memory, which is especially valuable in pixel shaders where there is no shared memory. Or a shader can perform atomic additions on half-precision floating-point numbers in global memory. x, u1 mov r3.yz,
Mircosoft Game Dev
JANUARY 25, 2023
Rendering: Decrement texture_binding count when using screen textures ( GH-71764 ). Shaders: Fix code generation for ProximityRange node in visual shader ( GH-71760 ). Note that you need to force recompiling your affected visual shaders by doing any change in their graph. This fixes a regression in beta 14.
Nvidia
MAY 17, 2023
Resource allocation and destruction Creating and destroying buffers, textures, and shaders is fundamental to efficient computer graphics. The pipeline state object encapsulates all of the state required to execute a graphics command, such as the input layout, shader programs, blending state, depth-stencil state, and rasterizer state.
The Liquid Fire
NOVEMBER 9, 2023
We’re not really doing anything with shaders or post processing in the tutorial, so depending on where you want to take the tutorial later, its really up to you which you choose. 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.
PreMortem.Games
FEBRUARY 14, 2024
99% of our assets are self-modeled and textured, as we believe in creating a product that’s totally our own. Through many shader iterations, we can finally say that the water has reached a level where it actually feels convincing in VR.” Plus it’s fairly difficult to find era-appropriate assets for the Titanic.”
Mircosoft Game Dev
JANUARY 23, 2018
implement basic texture loading. generate C++ classes for GLSL shaders at compile time. adapt shader compiler to work with GLSL ES 2.0. implement basic texture loading. The RasterizerStorage interface has methods for creating and modifying various resources such as textures, shaders, materials, meshes and many more.
Expert insights. Personalized for you.
We have resent the email to
Are you sure you want to cancel your subscriptions?
Let's personalize your content