shared shader but unshared uniform parameter?

Started by MichaelJPCT, June 05, 2017, 08:31:36 AM

Previous topic - Next topic

MichaelJPCT

http://www.jpct.net/forum2/index.php/topic,3965.msg27866.html#msg27866

i search the forum and found the above thread and maybe it's the same question as i have.
i hope to use 1 shader instance for multiple objects but their uniform parameters are different.
is the solution in the above thread the only solution?
is it more troublesome than using 1 shader for each object? is it worth the trouble?

MichaelJPCT


EgonOlsen

You can use an http://www.jpct.net/jpct-ae/doc/com/threed/jpct/IRenderHook.html implementation und override the setCurrentShader() method in that one.