commit
49c293e8bf
@ -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);
|
||||||
|
@ -59,7 +59,7 @@ typedef struct{
|
|||||||
DVLB_s* SHDR_ParseSHBIN(u32* shbinData, u32 shbinSize);
|
DVLB_s* SHDR_ParseSHBIN(u32* shbinData, u32 shbinSize);
|
||||||
void SHDR_UseProgram(DVLB_s* dvlb, u8 id);
|
void SHDR_UseProgram(DVLB_s* dvlb, u8 id);
|
||||||
void SHDR_FreeDVLB(DVLB_s* dvlb);
|
void SHDR_FreeDVLB(DVLB_s* dvlb);
|
||||||
s8 SHDR_GetUniformRegister(DVLB_s* dvlb, char* name, u8 programID);
|
s8 SHDR_GetUniformRegister(DVLB_s* dvlb, const char* name, u8 programID);
|
||||||
|
|
||||||
void DVLP_SendCode(DVLP_s* dvlp);
|
void DVLP_SendCode(DVLP_s* dvlp);
|
||||||
void DVLP_SendOpDesc(DVLP_s* dvlp);
|
void DVLP_SendOpDesc(DVLP_s* dvlp);
|
||||||
|
@ -56,7 +56,7 @@ DVLB_s* SHDR_ParseSHBIN(u32* shbinData, u32 shbinSize)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
s8 SHDR_GetUniformRegister(DVLB_s* dvlb, char* name, u8 programID)
|
s8 SHDR_GetUniformRegister(DVLB_s* dvlb, const char* name, u8 programID)
|
||||||
{
|
{
|
||||||
if(!dvlb || !name)return -1;
|
if(!dvlb || !name)return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user