1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Bugfix: Duplicate Shader in ShaderImageEffect before modifiying its code (#630)

* Fixed issues with Shading tool Saturation and Value not always being right in Hue Shading mode

* Shading tool hue shifting fixes and tweaks

* Duplicate shader resource before modifying its code

* added line before comment

Co-authored-by: MrTriPie <MrTriPie>
This commit is contained in:
mrtripie 2022-01-06 18:49:22 -05:00 committed by GitHub
parent 5bf82fb3fd
commit f0fbca8b5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,8 @@ signal done
func generate_image(img: Image, shader: Shader, params: Dictionary, size: Vector2) -> void:
img.unlock()
# duplicate shader before modifying code to avoid affecting original resource
shader = shader.duplicate()
shader.code = shader.code.replace("unshaded", "unshaded, blend_premul_alpha")
var vp := VisualServer.viewport_create()
var canvas := VisualServer.canvas_create()