5#include "gl/lib_begin.h"
10 class CGV_API volume_renderer;
16 extern CGV_API volume_renderer&
ref_volume_renderer(context& ctx,
int ref_count_change = 0);
34 } integration_quality;
49 CM_MAXIMUM_INTENSITY_PROJECTION = 0,
85 IM_ALPHA_THRESHOLD = 2
145 void init_noise_texture(
context& ctx);
152 virtual void clear (
const context& ctx);
154 bool set_volume_texture(
texture* tex);
156 bool set_transfer_function_texture(
texture* tex);
158 bool set_gradient_texture(
texture* tex);
160 bool set_depth_texture(
texture* tex);
162 void set_bounding_box(
const box3& bbox);
164 void transform_to_bounding_box(
bool flag);
166 void set_noise_offset(
const vec2& offset);
170 bool validate_attributes(
const context& ctx)
const;
174 void draw(
context& ctx,
size_t start,
size_t count,
175 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
180#include <cgv/config/lib_end.h>
attribute array manager used to upload arrays to gpu
base class for all drawables, which is independent of the used rendering API.
abstract base class for all renderers that handles a shader program and position / color attribute
a shader program combines several shader code fragments to a complete definition of the shading pipel...
the texture class encapsulates all functionality independent of the rendering api.
renderer that supports point splatting
texture * gradient_texture
the 3D texture containing vector gradients used for lighting normal calculation
texture * depth_texture
a 2D texture from a frame buffer depth buffer used to combine volume rendering with opaque geometry
texture * transfer_function_texture
the 2D transfer function texture used for classification of the volume values
bool apply_bounding_box_transformation
whether to translate and scale the volume to the given bounding box during rendering
vec2 noise_offset
offset applied to the noise texture (can be used in conjunction with temporal anti aliasing)
texture * volume_texture
the 3D texture used for rendering
texture noise_texture
a 2D texture containing random noise used to offset ray start positions in order to reduce ring artif...
box3 bounding_box
the bounding box of the volume in scene units
std::map< std::string, std::string > shader_define_map
typedef for shader define map data structure
volume_renderer & ref_volume_renderer(context &ctx, int ref_count_change)
reference to a singleton volume renderer that is shared among drawables
base class for all render styles
holds options applied before and during shader compilation, such as preprocessor defines and code sni...
bool light_local_to_eye
whether the light is local to the eye position (moves with the eye) or is static to the scene
bool enable_noise_offset
whether to use the noise texture to offset ray start positions in order to reduce sampling artifacts
bool enable_lighting
whether to enable lighting
CompositingMode
the compositing mode used
float specular_strength
material specular component strength
float ambient_strength
light ambient component strength
rgb isosurface_color
the default constant isosurface color
bool enable_depth_test
whether to enable depth testing by reading depth from a texture to allow geometry intersecting the vo...
float isovalue
the value used to check for an isosurface
float gradient_lambda
influence scale for gradient-based opacity modulation
bool isosurface_color_from_transfer_function
whether to color the isosurface based on the transfer function
IsosurfaceMode
mode of a single supported isosurface
float scale_adjustment_factor
the coefficient used to adjust sample opacity based on volume scaling (useful range between 50 and 50...
float slice_opacity
in case of transparent mode, slice opacity
SliceMode
mode of slice rendering
float specular_color_mix
material specular color mix factor (0 = color from transfer function, 1 = pure white)
vec3 light_direction
the direction of the directional light
float roughness
material roughness (inversely proportional to specular shininess)
bool use_gradient_texture
whether to use a supplied gradient texture or compute gradients on the fly via central differences (d...
int slice_axis
coordinate axis orthogonal to which slice is rendered
InterpolationMode
the interpolation method used (supplied volume texture should be set to GL_LINEAR)
float diffuse_strength
material diffuse component strength
bool enable_gradient_modulation
whether to enable modulating the volume opacity by the gradient magnitude
box3 clip_box
a bounding box used to define a subspace of the volume to be visualized
float slice_coordinate
coordinate value along axis defining slice in range [0,1]
IntegrationQuality
quality measure for the number of steps used during ray marching