article thumbnail

Shader array properties

Cocos

How can we pass an array to a shader via setProperty? I see on some documentation that array is available now, but the only topic I found about shader array is this one, which is quite old. How to make a color array property for a shader? Check the code sample and the image for a reference.

Shaders 40
article thumbnail

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

Cocos

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,

Shaders 98
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

Can someone provide a working shader code for cocos2dx 4?

Cocos

Hello, before refering me to the tests or explaining in the theory what a shader is and how code it, can someone actually share a simple working code to apply to a sprite? I have been researching for a week now through old threads and tutorials all over the internet and the code has completly change in cocos2dx 4.0,

Shaders 40
article thumbnail

[Tutorial] Write a Post-Processing Shader using CRP Step-by-Step - Guide to Cocos Cyberpunk Source Code

Cocos

This series of articles will analyze the source code from various perspectives to improve your learning efficiency. Download the project source code for free at: [link] Today’s content is relatively simple, suitable for both juniors to explore and seniors for entertainment. So they came and asked: How do I add a new Shader for the CRP?

Shaders 52
article thumbnail

[Release post of the official Shader Graph extension]

Cocos

To promote collaboration and innovation within the developer community, we have open-sourced the full set of source code for this plugin under the MIT license. GitHub: shader-graph Preview Basic Structure Preparation Phase Cocos Creator 3.8.2 editor and the shader-graph.zip shader-graph.zip plugin. Open Cocos Creator 3.8.2

Shaders 52
article thumbnail

Write a Post-Processing Shader using CRP Step-by-Step - Guide to Cocos Cyberpunk Source Code

Cocos

This series of articles will analyze the source code from various perspectives to improve your learning efficiency. Download the project source code for free at: [link] Today’s content is relatively simple, suitable for both juniors to explore and seniors for entertainment. So they came and asked: How do I add a new Shader for the CRP?

Shaders 52
article thumbnail

Identifying Shader Limiters with the Shader Profiler in NVIDIA Nsight Graphics

Nvidia

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.

Shaders 52