I’m trying out geometry shaders using glsl #150. Got a basic pass through shader done, but I have a question:
I have a paired vertex and fragment shader, where vryNormal is an output from vertex shader to the fragment.
If is possible for me to use a geometry shader between these two without having to change the inputs fragment shader?(the geometry shader will be generating new geometry and new vryNormal values)
(vert)out vryNormal -> (frag)in vryNormal
(vert)out vryNormal -> (geometry)inout vryNormal -> (frag)in vryNormal
I think i read in the spec that you can’t have “inout” at a global level. Is there a way of doing this or do i have to design all my shaders that might have a geometry stage as having 3 stages, and just use a pass through shader in the case where i don’t want want to do anything in the geometry shader.
I7m sorry if this isn’t clear or it’s a dumb question, but any help is appreciated