fix
This commit is contained in:
parent
3a332f6c2f
commit
d0f9cf24dc
3 changed files with 4 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ vec4 PhongShading(void)
|
|||
vec3 L = normalize(gl_LightSource[0].position.xyz-vPos.xyz);
|
||||
|
||||
if(gl_LightSource[0].position.w < 0.5){
|
||||
L = -normalize(gl_LightSource[0].position.xyz);
|
||||
L = normalize(gl_LightSource[0].position.xyz);
|
||||
}
|
||||
|
||||
vec4 ambient = gl_FrontLightProduct[0].ambient;
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ GSClient GSClientCreate(GSEngine engine) {
|
|||
client->light0[2] = 0;
|
||||
client->light0[3] = 1;
|
||||
|
||||
client->light0[0] = -1;
|
||||
client->light0[1] = -1;
|
||||
client->light0[0] = 1;
|
||||
client->light0[1] = 1;
|
||||
client->light0[2] = 0;
|
||||
client->light0[3] = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ GSBool GSGLShadowBeforeMapping(GSGL gl) {
|
|||
GSVector3 n;
|
||||
int i;
|
||||
|
||||
for(i = 0; i < 3; i++) n[i] = -gl->engine->client->light0[i];
|
||||
for(i = 0; i < 3; i++) n[i] = gl->engine->client->light0[i];
|
||||
|
||||
GSMathNormalize3(n);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue