dynamic shader creation More...
#include "material.h"
Functions | |
string | LoadFunc (char *func) |
Load shader function from file. | |
string | computeTexel (Texture &t, string name) |
Computes texel color accordig to texture mode. |
dynamic shader creation
string computeTexel | ( | Texture & | t, | |
string | name | |||
) |
Computes texel color accordig to texture mode.
t | pointer to texture data | |
name | texture name |
ADD mode: add texel RGB values to color RGB values. Alpha channels are multiplied
MODULATE mode: multiply texel channels with actual color channels
DECAL mode: mix texel and color together
BLEND mode: mix texel and color together, multiply alpha channels
REPLACE mode: replace fragment color directly with texel color
string LoadFunc | ( | char * | func | ) |
Load shader function from file.
func | shader function source file |