appleseed icon indicating copy to clipboard operation
appleseed copied to clipboard

Assume a default (lowest priority) search path for OSL shaders

Open dictoon opened this issue 5 years ago • 5 comments

Internally, appleseed should assume that there's always a default, lowest priority search path pointing to the shaders/ directory when looking for OSL shaders.

Plugins should then qualify shader names with the right subdirectory, e.g. max/as_max_bump_map.oso.

dictoon avatar Mar 31 '19 09:03 dictoon

hello,I'm Gsoc aspirant here, I want to contribute to Appleseed by fixing this issue. Can u help me out

Ramanathi avatar Mar 06 '20 09:03 Ramanathi

@Ramanathi Let's talk about this in #dev on our discord.

oktomus avatar Mar 06 '20 17:03 oktomus

We can use the resource paths for this. Each app / plugin could add the path with the default shaders to it. One easy way to locate resources is to dlopen / LoadLibrary appleseed's lib and ask the OS for the path to it

est77 avatar Mar 06 '20 18:03 est77

Looks fairly similar to issue #2732

Mango-3 avatar Mar 08 '20 20:03 Mango-3

Tripped on this today as well; had to add symlink in $HOME which points to shaders directory of system-wide appleseed installation as a quick'n'dirty fix.

I see this Application::initialize_resource_search_paths() method in src/appleseed.shared/application/application.cpp which does exactly that, i.e. sets default search path to root_path / "shaders", yet it does not end up on the project's list of paths at the time of the rendering.

danfe avatar Mar 11 '21 05:03 danfe