Zakhar
#1
Hello everybody!
After migration to 2.3.3 i got problem with my shader effect.
In editor v2.2.2 my shader looks like this:
In web shader looks like this:
In editor v2.3.3 shader looks as in editor v2.2.2
But in web i got just black screen
My shader code:
void main () {
vec3 col = smoothstep(0.7, 0.1, distance(vec2(0.5), v_uv0)) * vec3(0.0, 0.3, 0.45);
gl_FragColor = vec4(col, 0.25);
}
Hey @Zakhar did you solve it?
If not I’ll save your life
I spend 4 hours to run a simple shader code correctly and found this before a lost my mind
add this line to a component in the scene. Dynamic atlas messes up uv coordinates
cc.dynamicAtlasManager.enabled = false;
Hope it helps
or another option is set packable option to false of the texture of sprite frame of sprite onLoad like this:
this.Sprite = this.node.getComponent(cc.Sprite);
this.Sprite_Frame = this.Sprite.spriteFrame;
this.Sprite_Frame._texture.packable = false;
Hope it helps also
1 Like
system
closed
#6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.