Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/material.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/model/material.cc b/src/model/material.cc
index 93492f5..29dde49 100644
--- a/src/model/material.cc
+++ b/src/model/material.cc
@@ -332,6 +332,25 @@ void Material::load_shaderfile(const std::string &shadername)
} else if (firstword.compare("environment") == 0) {
layer->set_tcgen(Layer::TCGenEnvironment);
layer->set_texmap(Layer::TexMapEnvironment);
+ } else if (firstword.compare("rgbgen") == 0) {
+ if (linestream >> firstword) {
+ aux::to_lowercase(firstword);
+ if (firstword.compare("color") == 0) {
+ layer->set_rgbgen(Layer::RGBGenColor);
+ } else if (firstword.compare("engine") == 0) {
+ layer->set_rgbgen(Layer::RGBGenEngine);
+ } else if (firstword.compare("entity") == 0) {
+ layer->set_rgbgen(Layer::RGBGenPrimary);
+ } else if (firstword.compare("entitysecond") == 0) {
+ layer->set_rgbgen(Layer::RGBGenSecondary);
+ } else if (firstword.compare("entitythird") == 0) {
+ layer->set_rgbgen(Layer::RGBGenTertiary);
+ } else {
+ con_warn << shaderfile.name() << " unknown rgbgen function '" << firstword << "' at line " << linenumber << std::endl;
+ }
+ } else {
+ con_warn << shaderfile.name() << " missing rgbgen function at line " << linenumber << std::endl;
+ }
} else if (firstword.compare("blendfunc") == 0) {
if (linestream >> firstword) {
aux::to_lowercase(firstword);