Kategorie: Global
Ab Engineversion: 8.0 OC
AddFragmentShader
Beschreibung
Adds shader slices to a category of shaders or to a single shader. Returns an identifier for removal.
Syntax
int AddFragmentShader(string category, string shader);
Parameter
- category:
- Shader category or shader name the slices are added to. Known categories:
Kategorie Beschreibung Common Applies to everything. Objekt Applies to all objects and sprites. Landschaft Applies to the landscape. - shader:
- The GLSL shader code.
Anmerkung
Consider using built-in functions such as SetGamma, SetMatAdjust, or SetClrModulation for changing colors instead of writing a custom shader.
Beispiel
AddFragmentShader("Landscape", "slice(color+1) { fragColor.r = 1.f; }");
Makes the landscape very red.
Siehe auch: RemoveShader