Fix incorrect uniform setting in examples/gpu
This commit is contained in:
parent
3ee89602fa
commit
3fa354313e
@ -167,8 +167,8 @@ void renderFrame()
|
|||||||
|
|
||||||
//setup lighting (this is specific to our shader)
|
//setup lighting (this is specific to our shader)
|
||||||
vect3Df_s lightDir=vnormf(vect3Df(cos(lightAngle), -1.0f, sin(lightAngle)));
|
vect3Df_s lightDir=vnormf(vect3Df(cos(lightAngle), -1.0f, sin(lightAngle)));
|
||||||
GPU_SetUniform(SHDR_GetUniformRegister(shader, "lightDirection", 0), (u32*)(float[]){0.0f, -lightDir.z, -lightDir.y, -lightDir.x}, 4);
|
GPU_SetUniform(SHDR_GetUniformRegister(shader, "lightDirection", 0), (u32*)(float[]){0.0f, -lightDir.z, -lightDir.y, -lightDir.x}, 1);
|
||||||
GPU_SetUniform(SHDR_GetUniformRegister(shader, "lightAmbient", 0), (u32*)(float[]){0.7f, 0.4f, 0.4f, 0.4f}, 4);
|
GPU_SetUniform(SHDR_GetUniformRegister(shader, "lightAmbient", 0), (u32*)(float[]){0.7f, 0.4f, 0.4f, 0.4f}, 1);
|
||||||
|
|
||||||
//initialize projection matrix to standard perspective stuff
|
//initialize projection matrix to standard perspective stuff
|
||||||
gsMatrixMode(GS_PROJECTION);
|
gsMatrixMode(GS_PROJECTION);
|
||||||
|
Loading…
Reference in New Issue
Block a user