00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #pragma once
00019
00020 #include "..\iparamb2.h"
00021
00022 class imrShader;
00023 class mrShaderDesc;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class imrShaderClassDesc : public ClassDesc2, public InterfaceServer {
00034
00035 private:
00036
00037
00038 enum {
00039
00040 kApply_Lens,
00041 kApply_Material,
00042 kApply_Light,
00043 kApply_Shadow,
00044 kApply_Environment,
00045 kApply_Volume,
00046 kApply_Texture,
00047 kApply_Photon,
00048 kApply_Geometry,
00049 kApply_Displace,
00050 kApply_PhotonEmitter,
00051 kApply_Output,
00052 kApply_LightMap,
00053 kApply_PhotonVol,
00054 kApply_Other,
00055
00056
00057 kApply_Bump,
00058 kApply_ContourShader,
00059 kApply_ContoutStore,
00060 kApply_ContourContrast,
00061 kApply_ContourOutput,
00062 kApply_Illum,
00063 kApply_PassMerge,
00064
00065 kApply_MtlPhen,
00066
00067 kApply_Count
00068 };
00069
00070 public:
00071
00072
00073 enum ApplyFlags {
00074
00075 kApplyFlag_Lens = (1 << kApply_Lens),
00076 kApplyFlag_Material = (1 << kApply_Material),
00077 kApplyFlag_Light = (1 << kApply_Light),
00078 kApplyFlag_Shadow = (1 << kApply_Shadow),
00079 kApplyFlag_Environment = (1 << kApply_Environment),
00080 kApplyFlag_Volume = (1 << kApply_Volume),
00081 kApplyFlag_Texture = (1 << kApply_Texture),
00082 kApplyFlag_Photon = (1 << kApply_Photon),
00083 kApplyFlag_Geometry = (1 << kApply_Geometry),
00084 kApplyFlag_Displace = (1 << kApply_Displace),
00085 kApplyFlag_PhotonEmitter = (1 << kApply_PhotonEmitter),
00086 kApplyFlag_Output = (1 << kApply_Output),
00087 kApplyFlag_LightMap = (1 << kApply_LightMap),
00088 kApplyFlag_PhotonVol = (1 << kApply_PhotonVol),
00089 kApplyFlag_Other = (1 << kApply_Other),
00090
00091
00092
00093 kApplyFlag_Bump = (1 << kApply_Bump),
00094 kApplyFlag_ContourShader = (1 << kApply_ContourShader),
00095 kApplyFlag_ContourStore = (1 << kApply_ContoutStore),
00096 kApplyFlag_ContourContrast = (1 << kApply_ContourContrast),
00097 kApplyFlag_ContourOutput = (1 << kApply_ContourOutput),
00098 kApplyFlag_Illum = (1 << kApply_Illum),
00099 kApplyFlag_PassMerge = (1 << kApply_PassMerge),
00100
00101 kApplyFlag_MtlPhen = (1 << kApply_MtlPhen),
00102
00103
00104 kApplyFlag_All = (~0 & ~kApplyFlag_MtlPhen),
00105
00106
00107 kApplyFlag_Default = (kApplyFlag_Material | kApplyFlag_Texture | kApplyFlag_Illum | kApplyFlag_Bump),
00108 };
00109
00110
00111
00112
00113
00114
00115 virtual imrShader* CreateShader(bool loading = false) = 0;
00116
00117
00118
00119 virtual unsigned int GetApplyTypes() = 0;
00120
00121
00122 virtual mrShaderDesc& GetShaderDesc() = 0;
00123
00124
00125 virtual ParamBlockDesc2* GetParamPBDesc() = 0;
00126 virtual Tab<ParamBlockDesc2*>& GetParamSubPBDescs() = 0;
00127
00128
00129 virtual ParamBlockDesc2* GetResultPBDesc() = 0;
00130 virtual Tab<ParamBlockDesc2*>& GetResultPBDescs() = 0;
00131
00132
00133 virtual ParamBlockDesc2* GetConnectionPBDesc() = 0;
00134 virtual Tab<ParamBlockDesc2*>& GetConnectionSubPBDescs() = 0;
00135
00136
00137 virtual IAutoMParamDlg* CreateShaderParamDlgs(HWND hwMtlEdit, IMtlParams *imp, ReferenceTarget* obj) = 0;
00138 };
00139
00140
00141
00142 #define GETIMRSHADERCLASSDESC_CMD 0x984a860f
00143
00144
00145 inline imrShaderClassDesc* Get_mrShaderClassDesc(ClassDesc* cd) {
00146
00147 if((cd != NULL) && (cd->Execute(GETIMRSHADERCLASSDESC_CMD) == (GETIMRSHADERCLASSDESC_CMD + 1))) {
00148 return static_cast<imrShaderClassDesc*>(cd);
00149 }
00150 else {
00151 return NULL;
00152 }
00153 }
00154