Array support for shaders

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Array support for shaders

Post by Apeirogon »

If I want to apply shader to some rectangle area on a screen, I must send vertices coordinate of that rectangle to shader.

But if I want apply shader to several rectangles on a screen, I must copy-paste shader, i.e. save same shader with different name, several times, because
Uniforms are so named because they do not change from one execution of a shader program to the next within a particular rendering call. Kronos wiki(TM)
So I cant send next vertices coordinate to same shader in time while it process previous.

So, for such reason, I think that have support to arrays in gldefs would be nice.

Return to “Feature Suggestions [GZDoom]”