You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be really nice and useful to have the ability to define in vertex blocks and out fragment blocks, so GLSL could function somewhat like HLSL. The following syntax would be very handy:
Which could be compiled in two stages or in one. It just reduces code duplication and in big projects that's one of the reasons HLSL is used; because it is easy to write shaders with multiple entrypoints in them. It doesn't matter if you have to compile this in two stages, because with HLSL that's the case as well. Even the renaming 'vert' to 'main' and 'frag' to 'main' would be fine using glslangValidator if this would be supported. I think this would be great; especially if you have multiple compute shaders that are similar but do different things, you could make two separate files and use includes for the majority, but that might make it less clear (especially since these files are finally linked together). Or for something like raytracing shaders it would definitely be a huge relief.
The text was updated successfully, but these errors were encountered:
I think it would be really nice and useful to have the ability to define in vertex blocks and out fragment blocks, so GLSL could function somewhat like HLSL. The following syntax would be very handy:
Which could be compiled in two stages or in one. It just reduces code duplication and in big projects that's one of the reasons HLSL is used; because it is easy to write shaders with multiple entrypoints in them. It doesn't matter if you have to compile this in two stages, because with HLSL that's the case as well. Even the renaming 'vert' to 'main' and 'frag' to 'main' would be fine using glslangValidator if this would be supported. I think this would be great; especially if you have multiple compute shaders that are similar but do different things, you could make two separate files and use includes for the majority, but that might make it less clear (especially since these files are finally linked together). Or for something like raytracing shaders it would definitely be a huge relief.
The text was updated successfully, but these errors were encountered: