59 halp_meta(name,
"PBR Mesh")
60 halp_meta(category,
"Visuals/3D/Scene")
61 halp_meta(c_name,
"pbr_mesh")
62 halp_meta(description,
"Wrap GPU geometry in a 3D scene with a transform and configurable PBR material.")
63 halp_meta(authors,
"ossia team")
65 manual_url,
"https://ossia.io/score-docs/processes/pbr-mesh.html")
66 halp_meta(uuid,
"d7a2f5c9-3e8b-4b1d-a6f2-5c8e9d1f3b7a")
72 halp_meta(name,
"Mesh");
73 halp::dynamic_gpu_geometry
mesh;
74 float transform[16]{};
75 bool dirty_mesh =
false;
76 bool dirty_transform =
false;
81 halp::gpu_texture_input<
"Base Color Tex"> base_color_tex;
82 halp::gpu_texture_input<
"Metal Rough Tex"> metal_rough_tex;
83 halp::gpu_texture_input<
"Normal Tex"> normal_tex;
84 halp::gpu_texture_input<
"Emissive Tex"> emissive_tex;
89 halp::color_chooser<
"Color"> base_color;
90 halp::hslider_f32<
"Metallic", halp::range{0., 1., 0.}> metallic;
91 halp::hslider_f32<
"Roughness", halp::range{0., 1., 0.5}> roughness;
94 halp::color_chooser<
"Emissive", halp::color_init{.init = {0., 0., 0., 1.}}>
96 halp::hslider_f32<
"Emissive strength", halp::range{0., 100., 1.}> em_strength;
109 halp_meta(name,
"Scene Out");
110 ossia::scene_spec scene;
132 std::shared_ptr<const ossia::scene_state> m_wrapped_state;
137 void* m_cached_buf0{};
138 int64_t m_cached_vertices{-1};
139 int64_t m_cached_indices{-1};
140 void* m_cached_tex[4]{};
141 float m_cached_factors[10]{};
142 float m_cached_upstream[16]{};
143 std::vector<void*> m_cached_aux;
144 int64_t m_version_counter{0};
149 uint64_t m_material_stable_id{};
150 uint64_t m_primitive_stable_id{};
151 uint64_t m_xform_stable_id{};
152 uint64_t m_upstream_xform_stable_id{};
163 ossia::gpu_slot_ref m_material_ref{};
164 ossia::gpu_slot_ref m_xform_ref{};