Added material inspector and setting of materials #168
|
@ -267,22 +267,18 @@ namespace YAML
|
|||
static bool decode(YAML::Node const& node, SHMaterialSpec& rhs)
|
||||
{
|
||||
// Retrieve Shader Asset IDs
|
||||
if (!node[VERT_SHADER_YAML_TAG.data()])
|
||||
return false;
|
||||
rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
if (!node[FRAG_SHADER_YAML_TAG.data()])
|
||||
return false;
|
||||
rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
if (node[VERT_SHADER_YAML_TAG.data()])
|
||||
rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
if (node[FRAG_SHADER_YAML_TAG.data()])
|
||||
rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
|
||||
// Retrieve Subpass
|
||||
if (!node[SUBPASS_YAML_TAG.data()])
|
||||
return false;
|
||||
rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as<std::string>();
|
||||
if (node[SUBPASS_YAML_TAG.data()])
|
||||
rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as<std::string>();
|
||||
|
||||
// Retrieve
|
||||
if (!node[PROPS_YAML_TAG.data()])
|
||||
return false;
|
||||
rhs.properties = node[PROPS_YAML_TAG.data()];
|
||||
if (node[PROPS_YAML_TAG.data()])
|
||||
rhs.properties = node[PROPS_YAML_TAG.data()];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue