Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_shader_shared.h
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #ifndef GPU_SHADER | #ifndef GPU_SHADER | ||||
| # include "GPU_shader_shared_utils.h" | # include "GPU_shader_shared_utils.h" | ||||
| #endif | #endif | ||||
| #define WORKBENCH_SHADER_SHARED_H | #define WORKBENCH_SHADER_SHARED_H | ||||
| struct LightData { | struct LightData { | ||||
| float4 direction; | float4 direction; | ||||
| float4 specular_color; | float4 specular_color; | ||||
| float4 diffuse_color_wrap; /* rgb: diffuse col a: wrapped lighting factor */ | float4 diffuse_color_wrap; /* rgb: diffuse col a: wrapped lighting factor */ | ||||
| }; | }; | ||||
| struct WorldData { | struct WorldData { | ||||
| float4 viewport_size; | float2 viewport_size; | ||||
| float2 viewport_size_inv; | |||||
| float4 object_outline_color; | float4 object_outline_color; | ||||
| float4 shadow_direction_vs; | float4 shadow_direction_vs; | ||||
| float shadow_focus; | float shadow_focus; | ||||
| float shadow_shift; | float shadow_shift; | ||||
| float shadow_mul; | float shadow_mul; | ||||
| float shadow_add; | float shadow_add; | ||||
| /* - 16 bytes alignment - */ | /* - 16 bytes alignment - */ | ||||
| LightData lights[4]; | LightData lights[4]; | ||||
| Show All 11 Lines | struct WorldData { | ||||
| float curvature_ridge; | float curvature_ridge; | ||||
| float curvature_valley; | float curvature_valley; | ||||
| float ui_scale; | float ui_scale; | ||||
| float _pad0; | float _pad0; | ||||
| int matcap_orientation; | int matcap_orientation; | ||||
| bool use_specular; | bool use_specular; | ||||
| float xray_alpha; | |||||
| int _pad1; | int _pad1; | ||||
| int _pad2; | |||||
| float4 background_color; | |||||
| }; | |||||
| struct ExtrudedFrustum { | |||||
| /** \note vec3 array padded to vec4. */ | |||||
| float4 corners[16]; | |||||
| float4 planes[12]; | |||||
| int corners_count; | |||||
| int planes_count; | |||||
| int _padding[2]; | |||||
| }; | }; | ||||
| #define viewport_size_inv viewport_size.zw | struct ShadowPassData { | ||||
| float4 far_plane; | |||||
| float3 light_direction_ws; | |||||
| int _padding; | |||||
| }; | |||||