mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
fix bug#11009
This commit is contained in:
parent
a2016301f5
commit
e0b80660c8
1 changed files with 9 additions and 2 deletions
|
|
@ -1000,13 +1000,19 @@ static void build_lighting( struct tnl_program *p )
|
|||
STATE_POSITION);
|
||||
struct ureg V = get_eye_position(p);
|
||||
struct ureg dist = get_temp(p);
|
||||
struct ureg tmpPpli = get_temp(p);
|
||||
|
||||
VPpli = get_temp(p);
|
||||
half = get_temp(p);
|
||||
|
||||
|
||||
/* In homogeneous object coordinates
|
||||
*/
|
||||
emit_op1(p, OPCODE_RCP, dist, 0, swizzle1(Ppli, W));
|
||||
emit_op2(p, OPCODE_MUL, tmpPpli, 0, Ppli, dist);
|
||||
|
||||
/* Calulate VPpli vector
|
||||
*/
|
||||
emit_op2(p, OPCODE_SUB, VPpli, 0, Ppli, V);
|
||||
emit_op2(p, OPCODE_SUB, VPpli, 0, tmpPpli, V);
|
||||
|
||||
/* Normalize VPpli. The dist value also used in
|
||||
* attenuation below.
|
||||
|
|
@ -1038,6 +1044,7 @@ static void build_lighting( struct tnl_program *p )
|
|||
emit_normalize_vec3(p, half, half);
|
||||
|
||||
release_temp(p, dist);
|
||||
release_temp(p, tmpPpli);
|
||||
}
|
||||
|
||||
/* Calculate dot products:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue