Open HeroesGrave opened 10 years ago
Maybe this could also be implemented as a tool.
Some notes on this: Make it an Image-Effect. It should only modify the selected layer (+selection).
I think a good name for this would be 'Pixel-Shader Effect'.
As for Scripting-Languages, have a list:
Also, the User has to be able to easely add in new scripts. Probably a small 'PixelShader Effect Manager' dialog that allows to add/remove/modify scripts?
Decisions, Decisions...
GLSL, or at least a simplified reimplementation of it.
I was thinking probably just a custom DSL similar to GLSL, just the relevant bits. Real nice series of articles about DSLs and Java
So you guys think this should be a feature? I'll get started on it if so.
For 2.0, yes.
Probably time to make another milestone.
I also really need to get around to pushing out 1.0
Cool, I'll probably make an 'experimental' branch or something on my fork, so it doesn't get mixed in with the regular dev
Sounds good to me.
We should make a basic version of this a top l and allow more complicated scrpts to be written.
The purpose of this is to allow 'scripted' effects, so someone with a small amount of programming knowledge could create custom effects without having to make a plugin.
Sorry about the previous comments... My idea is to do something like Photoshop... Have a relatively simple customizable shader with a ui, and allow for advanced shaders using a scripting language.
The point was to allow for powerful and customisable effects. I'm not sure if ease-of-use goes well with that.
Most simple effects will be eventually achieved through 'official' plugins.
I agree with @HeroesGrave , I intended the shaders for custom stuff, applicable to the advanced users. That being said, if we eventually include a set of standard shaders with the program to augment the effects/plugins, so be it.
Ok I get it... So shader plugins are just going to be written in the shader language that we come up with then; and the core program doesn't need any.
They can but they don't have to be. Effects will still be able to be added through plugins.
Yeah but the plugins will basically be shader code snippets right?
No. The plugins are more than just scripts. Take a look at the auto-updater plugin the @HeroesGrave has.
The plugins that add effects would be, in essence, shader code snippets right? Or do they just ignore the shader code and write their own?
They could be, or they could be like the current built-in effects. Refer to heroesgrave/paint/effects
Suggested by BurntPizza. I apologise if this isn't what you meant in the first place, but this seems like a cool idea regardless.
Basically we take something like GLSL fragment shaders, and implement them as custom effects.
Simple:
Input: Pixel coordinates and optionally the old pixel colour Output: New pixel colour.
Then when the effect is applied, just iterate over all the pixels (or selected pixels if there is a selection), and send them to the 'fragment shader', which does operations and stuff and returns a new pixel colour.
More advanced:
Allow sampling from other pixels and multiple stages.