by argv » Fri Oct 06, 2017 5:10 pm
Currently, we have the ability to apply fragment shaders to arbitrary textures. This is quite useful! However, there's no way to give them additional uniforms from ZScript.
This makes it especially hard (and slow) to do complex effects on the status bar/HUD. I recently posted
a request for help with drawing a stylized bar on the HUD, and while I was given a clever solution, it's still much slower than drawing the entire thing with a shader and a single draw call.
Please consider adding a drawing API to ZScript that applies a fragment shader to a region of the screen, and allows ZScript code to pass arbitrary uniform variables (preferably including additional textures) to the shader.
Currently, we have the ability to apply fragment shaders to arbitrary textures. This is quite useful! However, there's no way to give them additional uniforms from ZScript.
This makes it especially hard (and slow) to do complex effects on the status bar/HUD. I recently posted [url=https://forum.zdoom.org/viewtopic.php?f=3&t=58079]a request for help with drawing a stylized bar on the HUD[/url], and while I was given a clever solution, it's still much slower than drawing the entire thing with a shader and a single draw call.
Please consider adding a drawing API to ZScript that applies a fragment shader to a region of the screen, and allows ZScript code to pass arbitrary uniform variables (preferably including additional textures) to the shader.