cocos shader glPrograme 和 ProgrameState

GLPrograme 是可以複用的

N個Node可以使用同一個GLPrograme

但是如果Programe內擁有uniform變量時

每個特定的變量對應一個ProgrameState

/**
GLProgramState holds the 'state' (uniforms and attributes) of the GLProgram.A GLProgram 
can be used by thousands of Nodes, 
but if different uniform valuesare going to be used, 
then each node will need its own GLProgramState
*/

使用多重shader

https://blog.zengrong.net/post/2052.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章