Shader API

If you liked this item, please rate it up on Steam Workshop page.

Author: 『Sora』

Last revision: 27 Oct, 2017 at 19:19 UTC

File size: 7.17 KB

On Steam Workshop

Description:

Modder tool.

Adds a fix for shaders which allows multiple mods to have their shaders function at the same time instead of overwriting eachother. To use, simply replace the "return {stuff}" of your shader callback with shaderAPI.Shader(‘ShaderName",{stuff}), and add an if statement to check for shaderAPI before you register your shader function, and if it exists just throw shaderAPI.Shader("ShaderName",mod.shaderFunction).

Alternatively, you can throw any function or table to shaderAPI at any time using the function listed above!

In addition, this allows you to modify and add shaders in any callback simply by using the shaderAPI.Shader call, and can also be used in multiple areas of the program instead of having to cram all your shader stuff into one file – huzzah for require users everywhere!