Skip to main content
Post Closed as "exact duplicate" by Nathan Reed, Sean Middleditch, Ali1S232, Nicol Bolas, Patrick Hughes
This question appears to only be about shaders, not about full pipelines, so fixed the subject line to make it easier to find
Source Link
Trevor Powell
  • 21.5k
  • 1
  • 63
  • 96

Do opengl games tend to use multiple pipelinesshaders?

Attempting to be clear...

For any given object that you want to render, there may be a whole bunch of things that need to be considered for rendering (Material, Texture, Lighting, Blending etc). But, you may also have some objects which are very simple, and do not have a Texture or material or require any blending and ignore lights.

So, how do people approach this. Do you write one GLSL pipelineshader that has various booleans and checks that need to be set as vertices are pumped through, or do you write several pipelines that are suited to yourseparate shaders for each general categoriescategory of object, and switch between these as your render?

Do opengl games tend to use multiple pipelines?

Attempting to be clear...

For any given object that you want to render, there may be a whole bunch of things that need to be considered for rendering (Material, Texture, Lighting, Blending etc). But, you may also have some objects which are very simple, and do not have a Texture or material or require any blending and ignore lights.

So, how do people approach this. Do you write one GLSL pipeline that has various booleans and checks that need to be set as vertices are pumped through, or do you write several pipelines that are suited to your general categories of object, and switch between these as your render?

Do opengl games tend to use multiple shaders?

For any given object that you want to render, there may be a whole bunch of things that need to be considered for rendering (Material, Texture, Lighting, Blending etc). But, you may also have some objects which are very simple, and do not have a Texture or material or require any blending and ignore lights.

So, how do people approach this. Do you write one GLSL shader that has various booleans and checks that need to be set as vertices are pumped through, or do you write separate shaders for each general category of object, and switch between these as your render?

Source Link
Laurence
  • 197
  • 1
  • 5

Do opengl games tend to use multiple pipelines?

Attempting to be clear...

For any given object that you want to render, there may be a whole bunch of things that need to be considered for rendering (Material, Texture, Lighting, Blending etc). But, you may also have some objects which are very simple, and do not have a Texture or material or require any blending and ignore lights.

So, how do people approach this. Do you write one GLSL pipeline that has various booleans and checks that need to be set as vertices are pumped through, or do you write several pipelines that are suited to your general categories of object, and switch between these as your render?