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

Add explicit premultiplied / straight setting #65

Open
MennoVink opened this issue May 14, 2021 · 1 comment
Open

Add explicit premultiplied / straight setting #65

MennoVink opened this issue May 14, 2021 · 1 comment

Comments

@MennoVink
Copy link
Collaborator

There should be a setting where plugins can inform the host whether they work with premultiplied or with straight colors. Currently hosts are free to do as they please and plugins would need to know which host they're running in and what their behaviour is in order to function correctly.
For example when running in resolume as a source a plugin needs to output straight colors. When running as an effect or mixer however their inputs will be premultiplied and their output needs to be premultiplied as well.
If a plugin would have a STRAIGHT or PREMULTIPLIED setting the host can respect that and provide inputs and treat outputs as the plugin sais what it is. To prevent having to bump the major api version we could have a LEGACY setting which could be the default and which makes use of the host behaviour prior to incrementing the minor api version.

@MennoVink
Copy link
Collaborator Author

For now i've made Resolume (7.4) look at the api version that the plugin is using. If the plugin uses api version 2.3 Resolume will provide premultiplied inputs and treat outputs as premultiplied as well. Plugins using 2.2 will show the behaviour as described in the issue description.

So:

  • If you dont care about premultiplication: Report that you're using api version 2.3. This will bypass an internal premultiplication pass if your plugin is a source.
  • If you care about premultiplication and can use Resolume 7.4 as minimum version: Use api version 2.3 and expect premultiplied inputs and provide premultiplied outputs.
  • If you care about premultiplication and need to support older Resolume versions: Use api version 2.2 and output straight if your plugin is a source and premultiplied if your plugin is an effect/mixer. Also expect premultiplied inputs if your plugin is an effect or mixer. You could also use api version 2.3 and look at the host info to see what kind of behaviour you should expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant