What happened with cc.GlProgram?

What happened with cc.GlProgram?
0
#1

Hi there, first time posting.

I was wandering what happened with cc.GLProgram ? In cocos creator v2.0.5 it’s not working anymore, it worked in earlier v1.10.

This works in v1.10, but not in v2.0.5

let glProgram = new cc.GLProgram();

Thanks in advance.

0 Likes

Using web GL shaders
#2

@jare can you tell us?

0 Likes

#3

We completely rewrote the underlying renderer in v2.0, so the GLProgram is removed.
See https://github.com/cocos-creator/creator-docs/blob/next/en/release-notes/upgrade-guide-v2.0.md for more details about changes of v2.0.
We are developing a new Material/Effect System for custom rendering support.

1 Like

#4

So how do we write shaders in v2.0 then, is there a way ? How soon will Material/Effect System going to come, should I revert to 1.10 then ? I like new upgrades that come with v2.0, but if there is no way to use shaders for now, I would probably revert to older verison.

0 Likes

#5

You can use https://github.com/ShawnZhang2015/ShaderHelper

2 Likes

#6

Thanks jare, this is what I needed. Cudos. :+1:

0 Likes

#7

Hi Jare,
I would like to know if those shaders can work also with spine renderer after a small tweak? I don’t know a lot about shaders unfortunately, so will appreciate some help. Or in general if the shader affects everything rendered below it and not only attached texture, that will help me a lot.

0 Likes

#8

Wow, awesome!

0 Likes