diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index e125584c..e6dbde67 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -429,6 +429,10 @@ int WINAPI QERApp_LoadShadersFromDir( const char *path ){ continue; } + // - proceed if shader script base name is + // for example: "scripts/eerie.shader" with "eerie" path + // - proceed if shader script base name is and shader path starts with "textures/" + // for example: "scripts/eerie.shader" providing "textures/eerie/blackness" with "eerie" path if ( strstr( pShader->getShaderFileName(), around ) != NULL || g_str_has_prefix( pShader->getName(), prefix ) ) { count++; #ifdef _DEBUG @@ -467,6 +471,11 @@ bool WINAPI QERApp_IsDirContainingShaders( const char *path ){ for ( int i = 0; i < nSize; i++ ) { CShader *pShader = reinterpret_cast < CShader * >( g_Shaders[i] ); + + // - returns true if shader script basename is and shader path starts with "textures/" + // for example: "scripts/rockyvalley.shader" with "rockyvalley" path providing "textures/amethyst7/rockyvalley/rockyvalley_skybox/" + // - returns true if shader startswith "textures/" + // for example: "scripts/eerie.shader" with "eerie" path providing "textures/eerie/blackness" if ( ( strstr( pShader->getShaderFileName(), around ) != NULL && g_str_has_prefix( pShader->getName(), "textures/" ) ) || g_str_has_prefix( pShader->getName(), prefix ) ) { g_free(around); g_free(prefix);