Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/spe/DrawSpan.cc @ 793:c260205d3185
add light switch api
author | yutaka@localhost.localdomain |
---|---|
date | Mon, 03 May 2010 05:09:58 +0900 |
parents | f2497e0ecd7c |
children | 496a8159e840 |
comparison
equal
deleted
inserted
replaced
792:f2497e0ecd7c | 793:c260205d3185 |
---|---|
224 #else | 224 #else |
225 int alpha = color & 0xff000000; | 225 int alpha = color & 0xff000000; |
226 #endif | 226 #endif |
227 /*完全に透けているか判断*/ | 227 /*完全に透けているか判断*/ |
228 int flag = (alpha != 0); | 228 int flag = (alpha != 0); |
229 int *light_sys_switch = (int*)smanager->global_get(LightSysSwitch); | 229 int *light_sysswitch = (int*)smanager->global_get(LightSysSwitch); |
230 | 230 //smanager->printf("sys %d\n",light_sysswitch); |
231 if ( *light_sys_switch == 1) { | 231 |
232 if ( *light_sysswitch == 1) { | |
232 color = infinity_light_calc(color,normal_x,normal_y,normal_z, | 233 color = infinity_light_calc(color,normal_x,normal_y,normal_z, |
233 smanager,localx,localy,zpos, | 234 smanager,localx,localy,zpos, |
234 world_x,world_y,world_z); | 235 world_x,world_y,world_z); |
235 } | 236 } |
236 | 237 |
443 vector float light_vector __attribute__((aligned(16))) = {0,0,0,0}; | 444 vector float light_vector __attribute__((aligned(16))) = {0,0,0,0}; |
444 vector float v_inner __attribute__((aligned(16))); | 445 vector float v_inner __attribute__((aligned(16))); |
445 vector float v_world[4] __attribute__((aligned(16))) = {{world_x, world_y, -world_z, 0}, | 446 vector float v_world[4] __attribute__((aligned(16))) = {{world_x, world_y, -world_z, 0}, |
446 {world_x, world_y, -world_z, 0}, | 447 {world_x, world_y, -world_z, 0}, |
447 {world_x, world_y, -world_z, 0}, | 448 {world_x, world_y, -world_z, 0}, |
448 {0, 0, 0, 0}}; | 449 {world_x, world_y, -world_z, 0}}; |
449 | 450 |
450 | 451 |
451 int light_rgb; | 452 int light_rgb; |
452 float inner_product; | 453 float inner_product; |
453 | 454 |