Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-issue: osltoy features and fixes #1862

Open
1 of 6 tasks
lgritz opened this issue Sep 10, 2024 · 2 comments
Open
1 of 6 tasks

Meta-issue: osltoy features and fixes #1862

lgritz opened this issue Sep 10, 2024 · 2 comments
Labels
Dev Days ASWF Dev Days suitable project devdays24 Dev Days 2024 enhancement Improvement of existing/working features. feature request good first issue Good one-day project for beginners without much knowledge of the code base help wanted A task that is desired, but needs somebody to commit the effort to implement it.

Comments

@lgritz
Copy link
Collaborator

lgritz commented Sep 10, 2024

Master list of osltoy feature requests

osltoy is a small example program loosely inspired by shadertoy -- a Qt application that lets you load or type in an OSL shader, which is then used to evaluate a color for each pixel in the display window of the app, and to interactively change the controls. Unlike the real Shadertoy, it's just meant to be a local app, not a web service. But it's a great way to tinker with OSL shaders, but it hasn't gotten a lot of development love lately.

We will use this issue to collect individual suggestions or feature requests for osltoy. Please comment/reply on this ticket to request that items be added (or if you're on the TSC or have permissions to edit this description, feel free to do so.

Comment/reply to say "hey, I want to do task X" so that multiple people don't independently attempt the same tasks (if it's something where only one can really be accepted); we don't want anybody's work time to be wasted.

Good First Issues

These are small tasks ideal for newcomers to the project, suitable for Dev Days. They don't really require knowledge of how OSL itself is implemented under the covers, but some experience making C++ Qt GUI applications may be helpful, and it probably wouldn't hurt if you've fooled around a bit with the real Shadertoy to get inspiration for some things to add.

Tasks

Preview Give feedback

Bigger projects

These might require more extensive experience, planning complex features, or making big design decisions. Or maybe they will be fast? I'm only guessing.

Tasks

Preview Give feedback
@lgritz lgritz added feature request enhancement Improvement of existing/working features. good first issue Good one-day project for beginners without much knowledge of the code base help wanted A task that is desired, but needs somebody to commit the effort to implement it. Dev Days ASWF Dev Days suitable project labels Sep 10, 2024
@maxwelliverson
Copy link
Contributor

I too am participating in dev days, and I'm going to be tackling the following task:

way to set search path for headers?

@rydrman
Copy link

rydrman commented Sep 27, 2024

hello, I'm going to be looking at this one for dev days!

editor improvement: can we make the tab stops 4 spaces each?

@lgritz lgritz added the devdays24 Dev Days 2024 label Sep 27, 2024
lgritz pushed a commit that referenced this issue Oct 2, 2024
… paths (#1876)

For Dev Days

#1862 

Addressing a osltoy feature request, I've added the ability to specify custom search paths. 
The changes consist of the following:

- Added a command line option `-I <path>` to specify search paths (`OIIO::ArgParse` unfortunately can't mirror `OSLCompiler`'s `-Ipath` syntax)
- OSLToyMainWindow now stores an array of `OSLCompiler` options alongside a flag indicating whether or not they should be regenerated before compilation. The only option currently able to be specified is `-Ipath`, but this should ease any future extension.
- Added a GUI component consiting of a window with a mutable list of the current set of search paths. This list is initially populated with any paths passed via the command line, but any modifications to the list will be reflected when the shader is next recompiled. Modifying this list does not currently force recompilation.
- Added an entry to the Tools menu to open the new GUI component.
- Added a line of output to the error window indicating what options the compiler was invoked with. I've defaulted to having it print for every run, but this may want to only print on failure.

## Tests

I did not add any automated tests for this feature, as is consistent with the rest of osltoy. I did, however, do some manual testing to make sure the functionality works as expected.

Shaders that failed to `#include` some file instead succeeded when the parent directory of that file was added to the list of search paths via both the command line and the GUI component. Respectively, when said search path is then removed via
the GUI component, any subsequent compilation attempts fail again. The GUI component otherwise behaves as expected.


---------

Signed-off-by: Maxwell Iverson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Days ASWF Dev Days suitable project devdays24 Dev Days 2024 enhancement Improvement of existing/working features. feature request good first issue Good one-day project for beginners without much knowledge of the code base help wanted A task that is desired, but needs somebody to commit the effort to implement it.
Projects
None yet
Development

No branches or pull requests

3 participants