Skip to content

Commit ed2a8f4

Browse files
committed
drivers/glrend/cache: fix radii lights when inner == outer
First of all, it was meant to be 1e-6, not 1e6. But regardless, that behaviour doesn't match what it did originally. softrend/setup.c does this: if (lp->radius_inner != lp->radius_outer) alp->falloff = BR_DIV(alp->intensity, lp->radius_inner - lp->radius_outer); i.e. no falloff if they're equal. Replicate this behaviour.
1 parent fb36b63 commit ed2a8f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/glrend/cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static int casfd(br_gl_main_data_scene *scene, const state_light *in, size_t i,
124124
radii->radius_outer = in->radius_outer;
125125

126126
if(radii->radius_inner == radii->radius_outer)
127-
radii->radius_outer += 1e6f;
127+
radii->radius_inner = 0;
128128

129129
break;
130130
}

0 commit comments

Comments
 (0)