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

RFE: Simplify user properties UI by getting rid of the "Use Effect File" option by using the filename extension. #10

Open
skeletonbow opened this issue May 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@skeletonbow
Copy link
Owner

OBS Shaderfilter by default uses a built in template for ALL loaded shader files which includes a default vertex shader, technique, sampler types and uniform variables etc. If you wish to supply your own vertex shader or modify what is in the internal template, then you have to enable the checkbox "Use Effect File (.effect)" which disables the use of the built-in convenience template, and supply everything yourself in your shader file.

There is a convention that the file extension ".shader" is used for shaders that use the built in template, while ".effect" files specify everything themselves and need to bypass the built in template, however the user is required to manually check the checkbox to tell the plugin which type of shader the given shader file is. So the extension of the files is just a mental convention not actually observed by the plugin itself.

Forcing the user to manually check this checkbox requires more knowledge from the user concerning this convention, and makes it much more likely that an end user who is not a shader developer will get confused and not know what the checkbox is for or when to click it.

It is bad user interface design to present options to users that they must choose the correct choice to get the correct result in the software, if the software has the ability to determine this on its own, and then remove the option and present a simplified user interface to the user.

As such I posit that the plugin should not just suggest the file extensions as a convention, but actually enforce it by removing the "Use Effect File (.effect)" checkbox entirely, and using the filename extension of the shader it's been given to determine whether or not to use the built in template.

For shaders that are included with the plugin, they will just automatically work without having to check the checkbox and get it right, and for 3rd party shaders developed for Shaderfilter which do use the same naming convention, they will continue to work as well. The only problem case is if someone has a shader file named something other than .shader or .effect, or if the contents of the file do not match the convention for how Shaderfilter expects them to be named.

Possible solutions to this are:

  1. Have the plugin installer or plugin itself look inside of the shader files and attempt to intelligently rename the file extension to the correct thing and/or determine it from the contents of the file.
  2. Issue an error to the log file if a file has the wrong extension or can't be determined.
  3. Just enforce the file naming convention with code, and leave it up to developers and/or users to rename the files correctly themselves going forward.

Unknown: If there are any commonly available shaders or shader packs for OBS Shaderfilter in widespread distribution that misuse the file naming convention, or use alternative extensions altogether.

Ideally, whichever gives end users the best experience by not breaking their setups or requiring manual intervention by them, is likely the better choice to go with.

@skeletonbow skeletonbow added the enhancement New feature or request label May 17, 2022
@skeletonbow skeletonbow added this to the 2.0 Alpha Test Release 1 milestone May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant