diff --git a/docs/sdk/script/fn/AddFragmentShader.xml b/docs/sdk/script/fn/AddFragmentShader.xml new file mode 100644 index 000000000..3974842c8 --- /dev/null +++ b/docs/sdk/script/fn/AddFragmentShader.xml @@ -0,0 +1,60 @@ + + + + + + AddFragmentShader + Global + 8.0 OC + + int + + + string + category + + Shader category or shader name the slices are added to. Known categories: + + + Category + Description + + + Common + Applies to everything. + + + Object + Applies to all objects and sprites. + + + Landscape + Applies to the landscape. + +
+
+ + + string + shader + The GLSL shader code. + +
+
+ Adds shader slices to a category of shaders or to a single shader. Returns an identifier for removal. + + Consider using built-in functions such as SetGamma, SetMatAdjust, or SetClrModulation for changing colors instead of writing a custom shader. + + + + AddFragmentShader("Landscape", "slice(color+1) { fragColor.r = 1.f; }"); + Makes the landscape very red. + + + + RemoveShader + +
+ Luchs2016-10 +
diff --git a/docs/sdk/script/fn/RemoveShader.xml b/docs/sdk/script/fn/RemoveShader.xml new file mode 100644 index 000000000..572235e47 --- /dev/null +++ b/docs/sdk/script/fn/RemoveShader.xml @@ -0,0 +1,28 @@ + + + + + + RemoveShader + Global + 8.0 OC + + bool + + + int + id + + Shader id returned from AddFragmentShader. + + + + + Removes a shader which was previously created from script. Returns true on success. + + AddFragmentShader + + + Luchs2016-10 +