me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
5 changed files with 8 additions and 12 deletions
Showing only changes of commit c7456272b1 - Show all commits

View File

@ -236,6 +236,8 @@ ForEachMacros:
- LOOP_UNSELECTED_POINTS - LOOP_UNSELECTED_POINTS
- LOOP_VISIBLE_KEYS - LOOP_VISIBLE_KEYS
- LOOP_VISIBLE_POINTS - LOOP_VISIBLE_POINTS
- LIGHT_FOREACH_BEGIN_DIRECTIONAL
- LIGHT_FOREACH_BEGIN_LOCAL
- LISTBASE_CIRCULAR_BACKWARD_BEGIN - LISTBASE_CIRCULAR_BACKWARD_BEGIN
- LISTBASE_CIRCULAR_FORWARD_BEGIN - LISTBASE_CIRCULAR_FORWARD_BEGIN
- LISTBASE_FOREACH - LISTBASE_FOREACH

View File

@ -95,8 +95,7 @@ void light_eval(ClosureDiffuse diffuse,
uv = uv * UTIL_TEX_UV_SCALE + UTIL_TEX_UV_BIAS; uv = uv * UTIL_TEX_UV_SCALE + UTIL_TEX_UV_BIAS;
vec4 ltc_mat = utility_tx_sample(utility_tx, uv, UTIL_LTC_MAT_LAYER); vec4 ltc_mat = utility_tx_sample(utility_tx, uv, UTIL_LTC_MAT_LAYER);
LIGHT_FOREACH_BEGIN_DIRECTIONAL(light_cull_buf, l_idx) LIGHT_FOREACH_BEGIN_DIRECTIONAL (light_cull_buf, l_idx) {
{
light_eval_ex(diffuse, light_eval_ex(diffuse,
reflection, reflection,
true, true,
@ -113,8 +112,7 @@ void light_eval(ClosureDiffuse diffuse,
LIGHT_FOREACH_END LIGHT_FOREACH_END
vec2 px = gl_FragCoord.xy; vec2 px = gl_FragCoord.xy;
LIGHT_FOREACH_BEGIN_LOCAL(light_cull_buf, light_zbin_buf, light_tile_buf, px, vP_z, l_idx) LIGHT_FOREACH_BEGIN_LOCAL (light_cull_buf, light_zbin_buf, light_tile_buf, px, vP_z, l_idx) {
{
light_eval_ex(diffuse, light_eval_ex(diffuse,
reflection, reflection,
false, false,

View File

@ -82,8 +82,7 @@ LightData debug_light_get()
} }
LIGHT_FOREACH_END LIGHT_FOREACH_END
LIGHT_FOREACH_BEGIN_DIRECTIONAL(light_cull_buf, l_idx) LIGHT_FOREACH_BEGIN_DIRECTIONAL (light_cull_buf, l_idx) {
{
LightData light = light_buf[l_idx]; LightData light = light_buf[l_idx];
if (light.tilemap_index == debug_tilemap_index) { if (light.tilemap_index == debug_tilemap_index) {
return light; return light;

View File

@ -92,14 +92,12 @@ void shadow_tag_usage(vec3 vP, vec3 P, vec2 pixel)
{ {
float dist_to_cam = length(vP); float dist_to_cam = length(vP);
LIGHT_FOREACH_BEGIN_DIRECTIONAL(light_cull_buf, l_idx) LIGHT_FOREACH_BEGIN_DIRECTIONAL (light_cull_buf, l_idx) {
{
shadow_tag_usage_tilemap(l_idx, P, dist_to_cam, true); shadow_tag_usage_tilemap(l_idx, P, dist_to_cam, true);
} }
LIGHT_FOREACH_END LIGHT_FOREACH_END
LIGHT_FOREACH_BEGIN_LOCAL(light_cull_buf, light_zbin_buf, light_tile_buf, pixel, vP.z, l_idx) LIGHT_FOREACH_BEGIN_LOCAL (light_cull_buf, light_zbin_buf, light_tile_buf, pixel, vP.z, l_idx) {
{
shadow_tag_usage_tilemap(l_idx, P, dist_to_cam, false); shadow_tag_usage_tilemap(l_idx, P, dist_to_cam, false);
} }
LIGHT_FOREACH_END LIGHT_FOREACH_END

View File

@ -29,8 +29,7 @@ void main()
bounds.bounding_corners[2].xyz, bounds.bounding_corners[2].xyz,
bounds.bounding_corners[3].xyz); bounds.bounding_corners[3].xyz);
LIGHT_FOREACH_BEGIN_DIRECTIONAL(light_cull_buf, l_idx) LIGHT_FOREACH_BEGIN_DIRECTIONAL (light_cull_buf, l_idx) {
{
LightData light = light_buf[l_idx]; LightData light = light_buf[l_idx];
float local_min = FLT_MAX; float local_min = FLT_MAX;