Skip to main content
4 events
when toggle format what by license comment
Jun 19, 2020 at 10:35 comment added GnoSiS No, parameters are different, even for the same shaders, but for the most part they It could be the same per object/component being drawn. Changing the Uniform buffer before each draw seens even more expensive, if each draw would just do a single mesh - that's like having 1000s of draws instead of just 2-5.
Jun 17, 2020 at 22:07 comment added wip Very often Vertex Buffers contain the same kind of information for all objects in the scene (Position, Texture UV coordinates, Normal), and this content type is the same for all shaders in the scene. Most often what makes the materials look different, is the set of parameters passed by Uniform Buffer. Are you passing a lot of additional data in your VBO? It might be possible to optimize that.
Jun 17, 2020 at 9:11 comment added GnoSiS Fair points on most of my concerns, that more or less I already knew. On your last point though I really meant VBOs - as the shader parameters are passed down per vertex at first and then per fragment - how else can you have different shader/rendering per polygon/pixel?
Jun 12, 2020 at 16:26 history answered wip CC BY-SA 4.0