From 0b08f37a69971bfec36ee2bc31d52f8a0e2b0e22 Mon Sep 17 00:00:00 2001 From: ubkp <118854183+ubkp@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:40:06 -0300 Subject: [PATCH] Fix shaders path --- examples/shaders/shaders_mesh_instancing.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/shaders/shaders_mesh_instancing.c b/examples/shaders/shaders_mesh_instancing.c index 7d603a6bf..d29b2b783 100644 --- a/examples/shaders/shaders_mesh_instancing.c +++ b/examples/shaders/shaders_mesh_instancing.c @@ -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");