article thumbnail

Shader Problem in IOS

Cocos

I have a question related to shaders. I created a game in which I added a shader; it works fine in web mobile and Android, but in iOS it gives an error during rendering. How to solve this issue version-3.8.2 17:49:37 [ERROR]: [ERROR] file /Applications/Cocos/Creator/3.8.2/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm:

Shaders 40
article thumbnail

Shader Problem in IOS

Cocos

There is also two more custom shader // Copyright (c) 2017-2020 Xiamen Yaji Software Co., pos = inTransform * pos; //cc_matViewProj * #endif uv0 = a_texCoord; #if SAMPLE_FROM_RT CC_HANDLE_RT_SAMPLE_FLIP(uv0); #endif color = a_color; vec2 singleStepOffset = vec2(3.0/4096.0,

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

[Tutorial]Outer Stroke Effect for 2D Sprites

Cocos

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. aExtend is the expanded Alpha. Here, we take the opposite approach.

Sprite 52
article thumbnail

Shader display problem

Cocos

// Copyright (c) 2017-2020 Xiamen Yaji Software Co., 1.0], editor: {type: color} } endColor: { value: [1.0, o.r = o.g = o.b = gray; #endif #if USE_HORIZONTAL o.rgb *= mix(startColor, endColor, vec4(uv0.x)).rgb; rgb; #endif #if USE_VERTICAL o.rgb *= mix(startColor, endColor, vec4(uv0.y)).rgb; 1.0], editor: {type: color} } endColor: { value: [1.0,

Shaders 52
article thumbnail

[CC 3.7.3] Shader Error?

Cocos

I’m just learning how a shader works. So, I just copied from the built-in sprite effect file to mine. Now, back to the issue, I think, only “cc_matWorld” is used from #include <builtin/uniforms/cc-local> If I commented both of these lines, there were no error. But, everything stopped working as intended.

Shaders 40
article thumbnail

Shader on IOS error

Cocos

I have a question related to shaders. I created a game in which I added a shader; it works fine in web mobile and Android, but in iOS it gives an error during rendering. How to solve this issue version-3.8 error - Attribute a_uv0 is missing, add a dummy data for it. 17:39:35 [ERROR]: [ERROR] file /Applications/CocosCreator/Creator/3.8.0/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm:

Shaders 40
article thumbnail

Shader Help required (UV distortion with cc_time[0])

Cocos

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,

Shaders 40