MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ resolve_shader_path()

std::optional< std::filesystem::path > MayaFlux::Portal::Graphics::ShaderFoundry::resolve_shader_path ( const std::string &  filepath) const
private

Definition at line 355 of file ShaderFoundry.cpp.

356{
357 namespace fs = std::filesystem;
358
359 fs::path path(filepath);
360
361 if (path.is_absolute() || fs::exists(filepath)) {
362 return path;
363 }
364
365 std::vector<std::string> search_paths = {
366 Core::SHADER_BUILD_OUTPUT_DIR,
367 Core::SHADER_INSTALL_DIR,
368 Core::SHADER_SOURCE_DIR,
369 "./shaders",
370 "../shaders"
371 };
372
373 for (const auto& search_path : search_paths) {
374 fs::path full_path = fs::path(search_path) / filepath;
375 if (fs::exists(full_path)) {
376 return full_path;
377 }
378 }
379
380 return std::nullopt;
381}

Referenced by detect_source_type().

+ Here is the caller graph for this function: