12 entt::meta_factory<reflection_probe_component>{}
13 .type(
"reflection_probe_component"_hs)
29 .data<&reflection_probe_component::set_faces_per_frame, &reflection_probe_component::get_faces_per_frame>(
"faces_per_frame"_hs)
36 .data<&reflection_probe_component::set_apply_prefilter, &reflection_probe_component::get_apply_prefilter>(
"apply_prefilter"_hs)
40 entt::attribute{
"tooltip",
"Enables prefiltering which improves quality but may impact performance"},
46 try_save(ar, ser20::make_nvp(
"probe", obj.get_probe()));
47 try_save(ar, ser20::make_nvp(
"faces_per_frame", obj.get_faces_per_frame()));
48 try_save(ar, ser20::make_nvp(
"apply_prefilter", obj.get_apply_prefilter()));
56 if(
try_load(ar, ser20::make_nvp(
"probe", probe)))
61 size_t faces_per_frame = 1;
62 if(
try_load(ar, ser20::make_nvp(
"faces_per_frame", faces_per_frame)))
64 obj.set_faces_per_frame(faces_per_frame);
67 bool apply_prefilter =
false;
68 if(
try_load(ar, ser20::make_nvp(
"apply_prefilter", apply_prefilter)))
70 obj.set_apply_prefilter(apply_prefilter);
Class that contains core reflection probe data, used for rendering and other purposes.
auto get_probe() const -> const reflection_probe &
Gets the reflection probe object.
void set_probe(const reflection_probe &probe)
Sets the reflection probe object.
attributes::value_type attribute
std::map< std::string, meta_any > attributes
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Structure representing a reflection probe.