This commit is contained in:
parent
93a67417b3
commit
d2cd2a0152
7 changed files with 18 additions and 8 deletions
|
@ -61,7 +61,7 @@ int main(void)
|
|||
{
|
||||
Matrix translation = MatrixTranslate((float)GetRandomValue(-50, 50), (float)GetRandomValue(-50, 50), (float)GetRandomValue(-50, 50));
|
||||
Vector3 axis = Vector3Normalize((Vector3){ (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360) });
|
||||
float angle = (float)GetRandomValue(0, 10)*DEG2RAD;
|
||||
float angle = (float)GetRandomValue(0, 180)*DEG2RAD;
|
||||
Matrix rotation = MatrixRotate(axis, angle);
|
||||
|
||||
transforms[i] = MatrixMultiply(rotation, translation);
|
||||
|
@ -73,7 +73,6 @@ int main(void)
|
|||
// Get shader locations
|
||||
shader.locs[SHADER_LOC_MATRIX_MVP] = GetShaderLocation(shader, "mvp");
|
||||
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
|
||||
shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocationAttrib(shader, "instanceTransform");
|
||||
|
||||
// Set shader value: ambient light level
|
||||
int ambientLoc = GetShaderLocation(shader, "ambient");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue