59 VolumeIntegrationQuality integration_quality = VolumeIntegrationQuality::k128;
61 bool enable_noise_offset =
true;
65 bool enable_depth_test =
true;
67 float picking_opacity_threshold = 0.03f;
70 VolumeCompositingMode compositing_mode = VolumeCompositingMode::kBlend;
73 float scale_adjustment_factor = 100.0f;
76 bool show_volume =
true;
78 bool enable_lighting =
false;
80 bool light_local_to_eye =
true;
82 bool use_gradient_texture =
false;
86 float ambient_strength = 0.3f;
88 float diffuse_strength = 0.8f;
90 float specular_strength = 0.4f;
92 float roughness = 0.3f;
94 float specular_color_mix = 0.0f;
97 bool enable_gradient_modulation =
false;
99 float gradient_lambda = 0.0f;
104 float isovalue = 0.5f;
106 rgb isosurface_color = { 0.7f };
108 bool isosurface_color_from_transfer_function =
false;
115 float slice_coordinate = 0.5f;
117 float slice_opacity = 0.5f;
135 texture noise_texture =
texture(
"uint8[R]", TF_LINEAR, TF_LINEAR, TW_REPEAT, TW_REPEAT);
143 bool apply_bounding_box_transformation =
false;
154 void init_noise_texture(
context& ctx);
157 bool init(
context& ctx)
override;
159 void clear (
const context& ctx)
override;
161 bool set_volume_texture(
texture* tex);
163 bool set_transfer_function_texture(
texture* tex);
165 bool set_gradient_texture(
texture* tex);
167 bool set_depth_texture(
texture* tex);
169 void set_bounding_box(
const box3& bbox);
171 void transform_to_bounding_box(
bool flag);
173 void set_noise_offset(
const vec2& offset);
175 bool enable(
context& ctx)
override;
177 bool validate_attributes(
const context& ctx)
const override;
179 bool disable(
context& ctx)
override;
181 void draw(
context& ctx,
size_t start,
size_t count,
182 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1)
override;
base class for all drawables, which is independent of the used rendering API.
the texture class encapsulates all functionality independent of the rendering api.