在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
local prog = cc.GLProgram:create("res/shader/light2d.vsh","res/shader/light2d.fsh") prog:link() prog:updateUniforms() local progStat= cc.GLProgramState:create(prog) progStat:setUniformVec2("u_lightPosition",cc.p(GVar.halfWinW,GVar.halfWinH)) progStat:setUniformVec4("u_lightColor",cc.vec4(1,1,1,1)) progStat:setUniformFloat("u_lightRange",100) playerImg:setGLProgram(prog) playerImg:setGLProgramState(progStat)
|
请发表评论