Enum zsjstandardparams{... p_aov_spec_fresnel, P_aov_refl_fresnel, ...};
Node_parameters {... Aiparameterstr ("Aov_spec_fresnel", "Spec_fresnel"); Aiparameterstr ("Aov_refl_fresnel", "Refl_fresnel"); ...}; }
node_initialize{ shaderdata* data = new shaderdata; Ainodesetlocaldata (node,data);}; node_finish{ if (Ainodegetlocaldata (node)) { ShaderData* data = (shaderdata*) ainodegetlocaldata (node); ainodesetlocaldata (node, null); delete data; }};node_update{ ShaderData *data = ( shaderdata*) ainodegetlocaldata (node); data->aov_spec_fresnel = params[p_aov_spec_fresnel]. Str; data->aov_refl_fresnel = params[p_aov_refl_fresnel]. Str; aiaovregister (Data->aov_spec_fresnel.c_str (), ai_type_rgb, ai_aov_blend_opacity); Aiaovregister (Data->aov_refl_fresnel.c_str (), ai_type_rgb, ai_aov_blend_opacity);}; Shader_evaluate{ shaderdata *data = (shaderdata*) ainodegetlocaldata (node); ... if (Sg->rt & ai_ray_camera ) { aiaovsetrgb (Sg, data->aov_spec_fresnel.c_str (), aicolor (Fresnel_spec)); aiaovsetrgb (Sg, data->aov_refl_fresnel.c_str (), aicolor (FRESNEL_REFL)); }
[attr Aov_spec_fresnel] aov.type INT 0x05 default STRING "Spec_fresnel" aov.enable _composition BOOL TRUE [attr Aov_refl_fresnel] aov.type INT 0x05 default STRING "Refl_ Fresnel "Aov.enable_composition BOOL TRUE
Self.addaovlayout (Aovreorder = [' Spec_fresnel ', ' Refl_fresnel '])
Arnold Shader Custom AoV