diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2015-03-05 21:33:59 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2015-03-05 21:44:23 +0300 |
commit | 37d7b2d3b620bcd9dc5d0c5e6aa99968c5bb51ef (patch) | |
tree | 5ba73cfb926acad327b655dfab9cf919365bd103 /source/blender/collada/DocumentImporter.cpp | |
parent | e2d4a93a008429ecd95a65a08bb48edfc6fdd305 (diff) |
Revert "COLLADA - support for shadeless material (SHADER_CONSTANT)"
This reverts commit 04b0a9f4b885e8e3b0b3207f3b3cda74b936df3e.
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 655e01a6dad..462b7b6f200 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -800,13 +800,10 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia else if (shader == COLLADAFW::EffectCommon::SHADER_LAMBERT) { ma->diff_shader = MA_DIFF_LAMBERT; } - else if (shader == COLLADAFW::EffectCommon::SHADER_CONSTANT) { - ma->mode = MA_SHLESS; - } // default - lambert else { ma->diff_shader = MA_DIFF_LAMBERT; - fprintf(stderr, "Shader type %d is not supported, default to lambert.\n", shader); + fprintf(stderr, "Current shader type is not supported, default to lambert.\n"); } // reflectivity ma->ray_mirror = ef->getReflectivity().getFloatValue(); @@ -902,7 +899,7 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia COLLADAFW::Texture ctex = ef->getEmission().getTexture(); mtex = create_texture(ef, ctex, ma, i, texindex_texarray_map); if (mtex != NULL) { - mtex->mapto = (shader == COLLADAFW::EffectCommon::SHADER_CONSTANT) ? MAP_COL : MAP_EMIT; + mtex->mapto = MAP_EMIT; i++; } } @@ -933,21 +930,6 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia } } #endif - -/** - * <constant> cannot have diffuse, ambient, specular, shininnes as its child. - * So color is solely based on - * the emission color, so we map emission color to material's color - */ - if (shader == COLLADAFW::EffectCommon::SHADER_CONSTANT) { - COLLADAFW::Color col_emmission; - if (ef->getEmission().isValid()) { - col_emmission = ef->getEmission().getColor(); - ma->r = col_emmission.getRed(); - ma->g = col_emmission.getGreen(); - ma->b = col_emmission.getBlue(); - } - } material_texture_mapping_map[ma] = texindex_texarray_map; } |