Hi folks!
Been struggling with finding good information on how to set up my rendering strategy for a home rolled html5 webgl game engine that I'm working on.
I'm doing 2d mostly, but might mix some 3d into it at a later stage. I wonder if there's some good practice I should keep to when it comes to render calls, shader programs and textures.
Right now I'm trying to cram as much into one rendercall and use a large texture map for most of my textures, this works pretty well and I'm getting a great performance, so it makes me wonder how far I can push the GPU and perhaps do some crazy/fun things when it comes to shaders in future development. I'm also thinking that I should perhaps see the renderer through a more shader centric viewpoint, which means that I have some fun rewriting ahead of me.
Right now I have a pretty general purpose 2d shader that handles most of my draw calls, it can blend colors or just render primitives with colors, or it can render textures. Maybe I can do more specific shaders for specific tasks and add some more shader programs when rendering a scene, what amount of shaders is common for a single scene? can I use 1-5 or maybe 10-20 without worrying?
Same goes with textures, now I'm pretty hardcore, everything I render comes from like 1-3 textures these days, in one game that I'm working on the texture map is pretty large as well (4096^2) Is it good to have large texture maps like that, or should I keep them around 512/1024^2'ish instead?
What are common when it comes to texture binding within a specific scene?
I started OpenGL when it was fixed pipeline, and I've mostly learned through basic OpenGL literature, it seems hard to get good info about a real implementation as most is basic stuff on that level. I really want to get to the next stage when it comes to graphical programming, and those questions have bothered me to no end! Hope to get some good insight from you guys!
Cheerz!