src/glux_engine/material_generator.cpp File Reference

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.

Detailed Description

dynamic shader creation


Function Documentation

string computeTexel ( Texture t,
string  name 
)

Computes texel color accordig to texture mode.

Parameters:
t pointer to texture data
name texture name
Returns:
shader piece of code

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.

Parameters:
func shader function source file
Returns:
string with shader function source

Generated by  doxygen 1.6.2