<p>I'm trying to write a simple shader program (one vertex shader and one fragment shader) that gives the same result as if no shaders were defined. After several hours of reading documentation and trying all sorts of approaches, i still can't figure out this (seemingly) very simple task.</p>
<p>What would such a vertex &amp; fragment shader pair look like?</p>

CC BY-SA 4.0
2024-11-24T21:48:51.230Z
It sounds like you want to emulate the deprecated [fixed-function pipeline](https://www.khronos.org/opengl/wiki/Fixed_Function_Pipeline) which had things like lights and texturing built-in. Is that correct? (It would be a *lot* of shader code to do so completely, but much less code to emulate a specific configuration of the fixed-function pipeline.)
Kevin Reid
CC BY-SA 4.0
2024-11-24T22:46:46.833Z
We don't typically call them "identity" or "no-op" they are instead called "pass through" shaders. They pass data through without modifying it. Unless you are after fix-function results which is something different all together. Please clarify.
pmw1234
CC BY-SA 4.0
2024-11-25T07:58:27.977Z
@KevinReid So the fixed-function pipeline is used if i don't set up any shaders? Doesn't the modern "core" profile disable or at least deprecate that?
delt
CC BY-SA 4.0
2024-11-25T16:05:38.597Z
That sounds right, but I'm not specifically familiar with OpenGL profiles, so I can't confirm it (I haven’t actually written non-ES OpenGL code in a long time). I would have assumed that having "no shaders defined" is an *error* in that case. So, I'm asking you to clarify your question by specifying which behavior you're trying to achieve more precisely than “the one I get with no shaders”. If you’re getting a useful visual result with no shaders, I'd guess you _are_ using the fixed-function pipeline.
Kevin Reid
<opengl><shader><fragment-shader>
"Identity" or "no-op" GLSL shader program
delt
# "Identity" or "no-op" GLSL shader program

(Asked by: username_0 on 2024-11-24)

I'm trying to write a simple shader program (one vertex shader and one fragment shader) that gives the same result as if no shaders were defined. After several hours of reading documentation and trying all sorts of approaches, i still can't figure out this (seemingly) very simple task.

What would such a vertex & fragment shader pair look like?

**Tags:** opengl, shader, fragment-shader

> **Comments:**
> **username_1**: It sounds like you want to emulate the deprecated [fixed-function pipeline](https://www.khronos.org/opengl/wiki/Fixed_Function_Pipeline) which had things like lights and texturing built-in. Is that correct? (It would be a *lot* of shader code to do so completely, but much less code to emulate a specific configuration of the fixed-function pipeline.)  
> **username_2**: We don't typically call them "identity" or "no-op" they are instead called "pass through" shaders. They pass data through without modifying it. Unless you are after fix-function results which is something different all together. Please clarify.  
> **username_0**: @username_1 So the fixed-function pipeline is used if i don't set up any shaders? Doesn't the modern "core" profile disable or at least deprecate that?  
> **username_1**: That sounds right, but I'm not specifically familiar with OpenGL profiles, so I can't confirm it (I haven’t actually written non-ES OpenGL code in a long time). I would have assumed that having "no shaders defined" is an *error* in that case. So, I'm asking you to clarify your question by specifying which behavior you're trying to achieve more precisely than “the one I get with no shaders”. If you’re getting a useful visual result with no shaders, I'd guess you _are_ using the fixed-function pipeline.  

---

## 0 answers

