Easy3D 3.0.0
Loading...
Searching...
No Matches
render_settings.h
1
28#ifndef EASY3D_RENDERER_RENDER_SETTINGS_H
29#define EASY3D_RENDERER_RENDER_SETTINGS_H
30
31#include <easy3d/renderer/render_device.h>
32
33namespace easy3d {
34
38 bool enabled = false;
40 unsigned map_size = 1024;
42 float light_distance = 50.0f;
44 float darkness = 0.6f;
46 float softness = 0.0f;
48 bool virtual_background = false;
51 };
52
56 bool enabled = false;
58 float radius_ratio = 0.045f;
60 float bias = 0.005f;
62 float intensity = 1.0f;
63 };
64
72 bool enabled = false;
74 graphics::TransparencyMethod method = graphics::TransparencyMethod::sorted;
76 unsigned layers = 4;
77 };
78
92
96 void validate_render_settings(const RenderSettings &settings);
97
102 void validate_render_settings(const RenderSettings &settings,
103 const graphics::DeviceCapabilities &capabilities);
104
105} // namespace easy3d
106
107#endif // EASY3D_RENDERER_RENDER_SETTINGS_H
Definition collider.cpp:182
void validate_render_settings(const RenderSettings &settings)
Definition render_settings.cpp:63
Vec< 4, float > vec4
A 4D point/vector of float type.
Definition types.h:46
Portable screen-space ambient-occlusion settings.
Definition render_settings.h:54
float intensity
Occlusion darkening strength in [0,1].
Definition render_settings.h:62
bool enabled
Enable ambient occlusion.
Definition render_settings.h:56
float bias
Depth bias in view-space units; nonnegative.
Definition render_settings.h:60
float radius_ratio
Sample radius as a fraction of the scene bounding-sphere radius; positive.
Definition render_settings.h:58
Declarative effect settings shared by all rendering hosts.
Definition render_settings.h:80
bool eye_dome_lighting
Enable eye-dome lighting.
Definition render_settings.h:86
ShadowSettings shadow
Shadow-map settings.
Definition render_settings.h:82
std::vector< vec4 > clipping_planes
Up to two world-space halfspaces, each retaining dot(plane, vec4(position,1)) >= 0.
Definition render_settings.h:90
AmbientOcclusionSettings ambient_occlusion
Screen-space ambient-occlusion settings.
Definition render_settings.h:84
TransparencySettings transparency
Transparent-fragment compositing settings.
Definition render_settings.h:88
Portable shadow-map settings.
Definition render_settings.h:36
bool virtual_background
Render a shadow-receiving background plane without a picking ID.
Definition render_settings.h:48
bool enabled
Enable shadow mapping.
Definition render_settings.h:38
float darkness
Shadow darkening in [0,1], where one is black.
Definition render_settings.h:44
float light_distance
Light-frustum distance as a multiple of the scene radius; at least 1.1.
Definition render_settings.h:42
vec4 virtual_background_color
Linear RGBA color of the virtual background plane.
Definition render_settings.h:50
unsigned map_size
Shadow-map side length in pixels; must be a positive power of two.
Definition render_settings.h:40
float softness
Normalized blocker-search/filter radius in [0,1]; zero selects hard shadows.
Definition render_settings.h:46
Portable transparent-fragment compositing settings.
Definition render_settings.h:66
unsigned layers
Maximum depth-peeling layers or linked-list fragments per pixel; positive.
Definition render_settings.h:76
graphics::TransparencyMethod method
Compositing method; sorted is the portable default.
Definition render_settings.h:74
bool enabled
Definition render_settings.h:72
Optional effects and implementation choices reported by a device.
Definition render_device.h:472