Fix shaders path

This commit is contained in:
ubkp 2023-09-14 21:40:06 -03:00
parent 8a1779b2ad
commit 0b08f37a69

View File

@ -63,13 +63,14 @@ int main(void)
Vector3 axis = Vector3Normalize((Vector3){ (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360), (float)GetRandomValue(0, 360) });
float angle = (float)GetRandomValue(0, 10)*DEG2RAD;
Matrix rotation = MatrixRotate(axis, angle);
transforms[i] = MatrixMultiply(rotation, translation);
}
// Load lighting shader
Shader shader = LoadShader(TextFormat("resources/shaders/glsl%i/lighting_instancing.vs", GLSL_VERSION),
TextFormat("resources/shaders/glsl%i/lighting.fs", GLSL_VERSION));
const char *applicationDir = GetApplicationDirectory();
Shader shader = LoadShader(TextFormat("%sresources/shaders/glsl%i/lighting_instancing.vs", applicationDir, GLSL_VERSION),
TextFormat("%sresources/shaders/glsl%i/lighting.fs", applicationDir, GLSL_VERSION));
// Get shader locations
shader.locs[SHADER_LOC_MATRIX_MVP] = GetShaderLocation(shader, "mvp");
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");