59 float3x3 rotation_mat = to_float3x3(srt.lookdev_rotation);
63 sh.
L0.M0 = srt.in_sh.L0_M0;
64 sh.
L1.M0 = srt.in_sh.L1_M0;
65 sh.
L1.Mn1 = srt.in_sh.L1_Mn1;
66 sh.
L1.Mp1 = srt.in_sh.L1_Mp1;
68 srt.out_sh.L0_M0 = sh.
L0.M0;
69 srt.out_sh.L1_M0 = sh.
L1.M0;
70 srt.out_sh.L1_Mn1 = sh.
L1.Mn1;
71 srt.out_sh.L1_Mp1 = sh.
L1.Mp1;
74 LightData sun = srt.in_sun;
77 sun.object_to_world = transform_from_matrix(to_float4x4(
sun_direction));
82 int2 local_texel =
int2(global_id.xy);
84 SphereProbePixelArea write_coord;
93 int3(local_texel, write_coord.layer),
94 srt.get_mip_data(0, local_texel, read_coord, write_coord, rotation_mat));
101 int3(local_texel, write_coord.layer),
102 srt.get_mip_data(1, local_texel, read_coord, write_coord, rotation_mat));
109 int3(local_texel, write_coord.layer),
110 srt.get_mip_data(2, local_texel, read_coord, write_coord, rotation_mat));
117 int3(local_texel, write_coord.layer),
118 srt.get_mip_data(3, local_texel, read_coord, write_coord, rotation_mat));
125 int3(local_texel, write_coord.layer),
126 srt.get_mip_data(4, local_texel, read_coord, write_coord, rotation_mat));
130 static_assert(SPHERE_PROBE_MIPMAP_LEVELS == 5);