virtualx-engine/servers/rendering/renderer_rd/shaders/scene_data_inc.glsl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.1 KiB
Text
Raw Normal View History

// Scene data stores all our 3D rendering globals for a frame such as our matrices
// where this information is independent of the different RD implementations.
// This enables us to use this UBO in our main scene render shaders but also in
// effects that need access to this data.
struct SceneData {
highp mat4 projection_matrix;
highp mat4 inv_projection_matrix;
highp mat4 inv_view_matrix;
highp mat4 view_matrix;
// only used for multiview
highp mat4 projection_matrix_view[MAX_VIEWS];
highp mat4 inv_projection_matrix_view[MAX_VIEWS];
highp vec4 eye_offset[MAX_VIEWS];
2023-02-01 04:53:54 +01:00
// Used for billboards to cast correct shadows.
highp mat4 main_cam_inv_view_matrix;
highp vec2 viewport_size;
highp vec2 screen_pixel_size;
// Use vec4s because std140 doesn't play nice with vec2s, z and w are wasted.
highp vec4 directional_penumbra_shadow_kernel[32];
highp vec4 directional_soft_shadow_kernel[32];
highp vec4 penumbra_shadow_kernel[32];
highp vec4 soft_shadow_kernel[32];
mediump mat3 radiance_inverse_xform;
mediump vec4 ambient_light_color_energy;
mediump float ambient_color_sky_mix;
bool use_ambient_light;
bool use_ambient_cubemap;
bool use_reflection_cubemap;
highp vec2 shadow_atlas_pixel_size;
highp vec2 directional_shadow_pixel_size;
uint directional_light_count;
mediump float dual_paraboloid_side;
highp float z_far;
highp float z_near;
bool roughness_limiter_enabled;
mediump float roughness_limiter_amount;
mediump float roughness_limiter_limit;
mediump float opaque_prepass_threshold;
bool fog_enabled;
2022-09-18 07:31:43 +02:00
uint fog_mode;
highp float fog_density;
highp float fog_height;
highp float fog_height_density;
2022-09-18 07:31:43 +02:00
highp float fog_depth_curve;
highp float fog_depth_begin;
highp float taa_frame_count;
2022-09-18 07:31:43 +02:00
mediump vec3 fog_light_color;
2022-09-18 07:31:43 +02:00
highp float fog_depth_end;
2022-09-18 07:31:43 +02:00
mediump float fog_sun_scatter;
mediump float fog_aerial_perspective;
highp float time;
mediump float reflection_multiplier; // one normally, zero when rendering reflections
vec2 taa_jitter;
2022-09-18 07:31:43 +02:00
bool material_uv2_mode;
float emissive_exposure_normalization;
2022-09-18 07:31:43 +02:00
float IBL_exposure_normalization;
bool pancake_shadows;
uint camera_visible_layers;
float pass_alpha_multiplier;
};