mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
i965: Calculate the positional light in homogeneous coordinates.
fix bug#11009
This commit is contained in:
parent
b47c9f8c91
commit
214347fdb4
2 changed files with 10 additions and 0 deletions
|
|
@ -1003,6 +1003,11 @@ static void build_lighting( struct tnl_program *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, Ppli, 0, Ppli, dist);
|
||||
|
||||
/* Calulate VPpli vector
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -960,6 +960,11 @@ static void build_lighting( struct tnl_program *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, Ppli, 0, Ppli, dist);
|
||||
|
||||
/* Calulate VPpli vector
|
||||
*/
|
||||
emit_op2(p, OPCODE_SUB, VPpli, 0, Ppli, V);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue