v7.0
シェーダ コンテナ(コンパウンドまたはマテリアル)にシェーダをネストします。
NestShaders( InputObjs, ShaderContainer ); |
| パラメータ | タイプ | 説明 |
|---|---|---|
| InputObjs | 文字列 |
ネスト対象のシェーダ。 デフォルト値:指定されていない場合は、選択するよう求められます。 |
| ShaderContainer | 文字列 |
ネストするシェーダを含むコンテナ。 デフォルト値: "" |
/*
This example demonstrates how to use the NestShaders command.
*/
NewScene(null, false);
CreatePrim("Sphere", "MeshSurface", null, null);
// Create a Shader Compound Containing Phong
CreateShaderCompound("Sources.Materials.DefaultLib.Scene_Material.Phong", null);
// Create 2 shaders under the material
CreateShaderFromPreset("Shaders\\Texture\\Cell.Preset", "Sources.Materials.DefaultLib.Scene_Material", null);
CreateShaderFromPreset("Shaders\\Texture\\Checkerboard.Preset", "Sources.Materials.DefaultLib.Scene_Material", null);
// Nest both shaders under the shader compound
var shadersToNest = "Sources.Materials.DefaultLib.Scene_Material.Cell,Sources.Materials.DefaultLib.Scene_Material.CheckerBoard";
NestShaders( shadersToNest, "Sources.Materials.DefaultLib.Scene_Material.ShaderCompound" );
// Unnest one shader from the shader compound. At this point the shader does not
// have a parent; you should always renest it under a container.
var shadersToUnnest = "Sources.Materials.DefaultLib.Scene_Material.ShaderCompound.Cell";
UnnestShaders( shadersToUnnest , "Sources.Materials.DefaultLib.Scene_Material" );
// Renesting under the material.
NestShaders( shadersToUnnest , "Sources.Materials.DefaultLib.Scene_Material" ); |
CreateShaderFromPreset CreateShadersFromMaterialPreset CreateShaderFromCLSID CreateShaderFromProgID CreateShaderCompound UnnestShaders AddShaderCompoundPort RemoveShaderCompoundPort MoveShaderCompoundPort RenameShaderCompoundPort ExportShaderCompound ImportShaderCompound ExplodeShaderCompound SetShaderCompoundPropertiesEx GetShaderCompoundProperties EditShaderCompoundPPGLogic