blob: 42d38e54d9a1370f4d3a6e1c57475cd5bc926fcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef GPU_SHADER
# include "gpu_shader_shared_utils.h"
#endif
#define WORKBENCH_SHADER_SHARED_H
struct LightData {
float4 direction;
float4 specular_color;
float4 diffuse_color_wrap; /* rgb: diffuse col a: wrapped lighting factor */
};
struct WorldData {
float4 viewport_size;
float4 object_outline_color;
float4 shadow_direction_vs;
float shadow_focus;
float shadow_shift;
float shadow_mul;
float shadow_add;
/* - 16 bytes alignment - */
LightData lights[4];
float4 ambient_color;
int cavity_sample_start;
int cavity_sample_end;
float cavity_sample_count_inv;
float cavity_jitter_scale;
float cavity_valley_factor;
float cavity_ridge_factor;
float cavity_attenuation;
float cavity_distance;
float curvature_ridge;
float curvature_valley;
float ui_scale;
float _pad0;
int matcap_orientation;
bool use_specular;
int _pad1;
int _pad2;
};
#define viewport_size_inv viewport_size.zw
#define packed_rough_metal roughness
|