00001 // Filename: config_shader.cxx 00002 // Created by: drose (19Mar00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "config_shader.h" 00020 #include "casterShader.h" 00021 #include "outlineShader.h" 00022 #include "planarReflector.h" 00023 #include "projtexShader.h" 00024 #include "projtexShadower.h" 00025 #include "shader.h" 00026 #include "shaderTransition.h" 00027 #include "spheretexHighlighter.h" 00028 #include "spheretexReflector.h" 00029 #include "spheretexShader.h" 00030 #include "spotlightShader.h" 00031 00032 #include <dconfig.h> 00033 00034 Configure(config_shader); 00035 NotifyCategoryDef(shader, ""); 00036 00037 ConfigureFn(config_shader) { 00038 CasterShader::init_type(); 00039 OutlineShader::init_type(); 00040 PlanarReflector::init_type(); 00041 ProjtexShader::init_type(); 00042 ProjtexShadower::init_type(); 00043 Shader::init_type(); 00044 FrustumShader::init_type(); 00045 ShaderTransition::init_type(); 00046 SpheretexHighlighter::init_type(); 00047 SpheretexReflector::init_type(); 00048 SpheretexShader::init_type(); 00049 SpotlightShader::init_type(); 00050 00051 //Setup shader rendering orders 00052 ShaderTransition::set_shader_order(ProjtexShadower::get_class_type(), 2); 00053 00054 ShaderTransition::set_shader_order(OutlineShader::get_class_type(), 4); 00055 ShaderTransition::set_shader_order(ProjtexShader::get_class_type(), 4); 00056 ShaderTransition::set_shader_order(SpheretexShader::get_class_type(), 4); 00057 ShaderTransition::set_shader_order(SpotlightShader::get_class_type(), 4); 00058 00059 ShaderTransition::set_shader_order(SpheretexHighlighter::get_class_type(), 6); 00060 00061 ShaderTransition::set_shader_order(SpheretexReflector::get_class_type(), 8); 00062 00063 ShaderTransition::set_shader_order(PlanarReflector::get_class_type(), 10); 00064 00065 //Tell shaderTransition the shaders that require blending 00066 ShaderTransition::set_shader_always_blend(SpotlightShader::get_class_type()); 00067 ShaderTransition::set_shader_always_blend(SpheretexHighlighter::get_class_type()); 00068 }