1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-26 07:23:15 +00:00
Commit graph

30 commits

Author SHA1 Message Date
Emmanouil Papadeas
c928b7622e Add a Gradient layer effect
Alongside its image effect equivalent.
2025-02-11 00:06:40 +02:00
Emmanouil Papadeas
3fa0110614 Make the preview of the gradient dialog be more accurate with the result
Basically just pixelate the UVs to the canvas size.
2025-02-10 21:01:22 +02:00
Emmanouil Papadeas
93bbdb7c7b Unify the two gradient shaders into one 2025-02-10 20:51:06 +02:00
Emmanouil Papadeas
3e01247d95 Rename IndexMap's "alpha" uniform to "include_alpha" 2025-01-30 17:28:02 +02:00
Emmanouil Papadeas
722eb59b3a Group all of the color channel curves of the color curves layer effect
Making it consistent with its image effect counterpart. The code inside ShaderLoader.gd keeps getting uglier and uglier, it might be worth a refactor at some point.
2025-01-30 17:05:32 +02:00
Emmanouil Papadeas
5e2901971b Make RGBA bool uniforms in invert and desaturate buttons instead of checkboxes in layer effects
They are now consistent with their image effect counterparts.
2025-01-29 21:51:55 +02:00
Emmanouil Papadeas
048058bd35 Implement a color curves image effect
Massive thanks to Material Maker for the custom widget code. The color curves effect is still WIP, I need to make the tangent points visible (not yet sure why they aren't now), add some curve presets, and implement it as a layer effect as well.
2024-12-15 18:10:55 +02:00
Emmanouil Papadeas
1dcb696c35 Use texelFetch instead of texture for indexed mode shaders
Fixes various weird issues when palettes have empty slots, and removes unnecessary calculations.
2024-11-22 20:47:05 +02:00
Emmanouil Papadeas
2d28136449
Implement indexed mode (#1136)
* Create a custom PixeloramaImage class, initial support for indexed mode

* Convert opened projects and images to indexed mode

* Use shaders for RGB to Indexed conversion and vice versa

* Add `is_indexed` variable in PixeloramaImage

* Basic undo/redo support for indexed mode when drawing

* Make image effects respect indexed mode

* Move code from image effects to ShaderImageEffect instead

* Bucket tool works with indexed mode

* Move and selection tools works with indexed mode

* Brushes respect indexed mode

* Add color_mode variable and some helper methods in Project

Replace hard-coded cases of Image.FORMAT_RGBA8 with `Project.get_image_format()` just in case we want to add more formats in the future

* Add a helper new_empty_image() method to Project

* Set new images to indexed if the project is indexed

* Change color modes from the Image menu

* Fix open image to replace cel

* Load/save indices in pxo files

* Merging layers works with indexed mode

* Layer effects respect indexed mode

* Add an `other_image` parameter to `PixeloramaImage.add_data_to_dictionary()`

* Scale image works with indexed mode

* Resizing works with indexed mode

* Fix non-shader rotation not working with indexed mode

* Minor refactor of PixeloramaImage's set_pixelv_custom()

* Make the text tool work with indexed mode

* Remove print from PixeloramaImage

* Rename "PixeloramaImage" to "ImageExtended"

* Add docstrings in ImageExtended

* Set color mode from the create new image dialog

* Update Translations.pot

* Show the color mode in the project properties dialog
2024-11-20 14:41:37 +02:00
Emmanouil Papadeas
0d6b140dea Add border selection, fix some missing translation strings 2024-11-15 01:41:44 +02:00
Emmanouil Papadeas
dec698024c Implement selection expanding and shrinking via the Select menu 2024-11-14 17:59:53 +02:00
Emmanouil Papadeas
3bd7e94a59 Minor cleanups to some shader code 2024-09-11 17:01:44 +03:00
Emmanouil Papadeas
321102e8fe Add Gaussian Blur as an image effect 2024-09-08 03:13:55 +03:00
Emmanouil Papadeas
c2ce4a4a69 Change the pattern parameter node of the outline layer effect to an OptionButton
Consistent with the image effect
2024-09-08 02:40:55 +03:00
Emmanouil Papadeas
b3021ceb67 Add a gaussian blur layer effect 2024-09-08 02:40:28 +03:00
Emmanouil Papadeas
9cac98c941 Add an alpha uniform to the IndexMap shader
In case users don't want the effect to affect the alpha channel
2024-09-02 02:21:48 +03:00
Variable
a7f1486ec3
Index Map (#1093)
* Index Map

* Formatting

* improve description a bit.
2024-08-31 02:53:27 +03:00
Emmanouil Papadeas
cfbe851da5 Add a convolution matrix layer effect
Still WIP, could use some extra parameters such as RGBA channel, and I should also implement it as an image effect.
2024-08-16 04:24:43 +03:00
Emmanouil Papadeas
3113459224 Fix #1074 2024-08-11 11:05:02 +03:00
Emmanouil Papadeas
0ea0406233 Add an adjust brightness/contrast image effect
Thanks to https://godotshaders.com/shader/color-manipulator/

The shader has more options than just brightness and contrast though, but I didn't know how else to name the effect. "Adjust Brightness/Contrast" makes it immediately obvious as to what the effect is about.
2024-08-01 21:21:45 +03:00
Emmanouil Papadeas
4d26a6dd55 Fix warnings in some shaders 2024-08-01 15:51:46 +03:00
Emmanouil Papadeas
7d30aed62d Fix some image effects resulting in wrong colors when the image has non-opaque pixels 2024-07-30 18:29:01 +03:00
Emmanouil Papadeas
e15b207993 Pass a transformation matrix in CommonRotation shaders instead of an angle
This will allow us to implement shearing more easily. Also, for the non-SmearRotxel shaders, normalize their pivot in GDScript, before passing it to the script. Should probably be faster this way
2024-05-09 00:44:52 +03:00
Emmanouil Papadeas
25f7192573 Pass angles in radians in SmearRotxel
Should be a slight optimization, since angles are being converted to radians only once, and that calculation is done in the CPU
2024-05-08 23:31:03 +03:00
Emmanouil Papadeas
edf7b1f5e5 Set the selection texture's filter to nearest in shaders 2024-04-12 01:26:46 +03:00
Emmanouil Papadeas
1c9c8bf4e3 Add Palettize and Pixelize effects
Pixelize makes the image pixelated, and Palettize maps the color of the input to the nearest color in the selected palette. Useful for limiting color in pixel art and for artistic effects.
2024-04-10 01:20:28 +03:00
Emmanouil Papadeas
73e40ed127 Add a ShaderInclude file for common shader rotation code 2024-01-18 00:19:30 +02:00
Emmanouil Papadeas
768869b519 Limit outline width step to 1 and allow lesser/greater values for shader-generated sliders 2023-11-22 17:18:37 +02:00
Emmanouil Papadeas
08b03ae0e5
Implement layer effects (#940)
* Basic logic for layer effects

* Add an FX button and the ability to add effects, no way to remove or change properties of effects yet

* Basic and ugly UI for adding and removing effects, no property changing yet

* Swap effects

* Fix preload shader paths

* Change parameters for layer effects

* Change gradient parameter in layer effect shaders, and other fixes

* Use CollapsibleContainers for the shader properties

* Set the correct gradient interpolation mode and color space in the UI

* Make effects of group layers apply to children

* Change `apply_fx` to `apply_effects`, formatting, some extra doc comments

* Apply effects to other canvases, when merging layers and when exporting

* Display humanized names of the shader unifrms

* Some UI improvements to the LayerEffectsSettings

* Add an Enabled button in the layer effects window, and change checkboxes to checkbuttons

* Change BaseLayer.apply_effects() to take a cel as a parameter instead

* Make layer effect buttons be affected by the modulate icon color

* Add option in the View menu whether layer effects are displayed in the canvas or not

* Rename `apply_effects()` to `display_effects()`

* Add translation strings

* Add nearest filter to the gradient map

* Don't change Main.tscn

* Fix more translations

* Change the default cursor shape of the generated UI elements of the layer effects

* Add undo/redo and effect application (apply effect destructively)

There are some errors due to the usage of anonymous lambda methods in undo/redo, but it seems to be working well regardless.

* Make layer effect application work on all cels
2023-11-22 01:06:25 +02:00
Emmanouil Papadeas
79ff486c7b Put all of the image effect shaders in an Effects folder 2023-11-07 00:52:25 +02:00