article thumbnail

Sprite outer outline shader

Cocos

I need a shader that draws the outer outline of a sprite. Since this shader draws the outer contour, I need to prepare sprites with a sufficient size in advance and disable trimming in the editor. I borrowed the framework for the shader experiment from the built-in shader “builtin-sprite.effect”, which is located in “3.8.6\resources\resources\3d\engine\editor\assets\effects\for2d”.

article thumbnail

How to convert a Shadertoy shader for Cocos Creator 3.8.6 (Web build)?

Cocos

I’m trying to convert a shader from Shadertoy to use it within Cocos Creator, but I’m not sure how to properly translate the shader code or set up the necessary uniforms. Shader I’m trying to convert: shadertoy.com Shadertoy Build shaders, share them, and learn from the best community.

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

Integrating 2D and 3D Art: Creating Cohesive Game Worlds 

iXie gaming

Pro Tip: Use orthographic or isometric perspectives for both 2D sprites and 3D environments. Pro Tip: Use real-time lighting rigs on 3D elements and hand-paint corresponding shadows on 2D sprites. This consistency in light behavior and texture fidelity is essential when toggling between flat sprites and dimensional meshes.

Art
article thumbnail

Sprite Shader Render out of bounds

Cocos

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?

article thumbnail

2D Lighting System for Cocos Creator - Visual Editor & Real-time Shadows

Cocos

x version Polygon sprite, arbitrary polygon texture rendering that can be batched RiveAnimation, load Rive format animation, supports WeChat and Douyin mini games SpriterAnimation, load animation exported by Spriter, supports all platforms Supported engine versions Engine version: Cocos Creator 3.6.0 opengles2.0) can run, webgl2.0(opengles3.0)

article thumbnail

How to convert a Shadertoy shader for Cocos Creator 3.8.6 (Web build)?

Cocos

to pass the uniform to the material like this: @ccclass("WormHole") export class WormHole extends Component { material: Material = null; onLoad() { this.material = this.getComponent(Sprite).sharedMaterial; Then create a sprite and assign the material just created to it. Finally I added the component to the Sprite. float ap = 1.0;

article thumbnail

From Sketches to Game Worlds — The Art of Game Creation 

iXie gaming

Beyond off-the-shelf software, top studios often develop custom shader libraries, sophisticated VFX pipelines, and precise GPU budget trackers to ensure real-time performance remains flawless. Shader Compatibility : Artists and developers collaborate to create and implement custom shaders tailored to visual effects or gameplay mechanics.

Art