mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Remove affect_selection and has_selection checks from Shaders
This commit is contained in:
parent
2da5b1e944
commit
63759d3607
|
@ -6,8 +6,6 @@ uniform bool blue;
|
|||
uniform bool green;
|
||||
uniform bool alpha;
|
||||
uniform sampler2D selection;
|
||||
uniform bool affect_selection;
|
||||
uniform bool has_selection;
|
||||
|
||||
float stolChannel(float x) {
|
||||
return (x < 0.04045) ? (x / 12.92) : pow((x + 0.055) / 1.055, 2.4);
|
||||
|
@ -54,12 +52,7 @@ void fragment() {
|
|||
blue ? lum : lin.b);
|
||||
vec3 stdPrime = linearToStandard(des);
|
||||
|
||||
vec3 output;
|
||||
if(affect_selection && has_selection) {
|
||||
output = mix(original_color.rgb, stdPrime, selection_color.a);
|
||||
} else {
|
||||
output = stdPrime;
|
||||
}
|
||||
vec3 output = mix(original_color.rgb, stdPrime, selection_color.a);
|
||||
|
||||
if (alpha) {
|
||||
COLOR = vec4(output.rgb, ltosChannel(lum));
|
||||
|
|
|
@ -6,8 +6,6 @@ uniform float hue_shift_amount : hint_range(-1, 1);
|
|||
uniform float sat_shift_amount : hint_range(-1, 1);
|
||||
uniform float val_shift_amount : hint_range(-1, 1);
|
||||
uniform sampler2D selection;
|
||||
uniform bool affect_selection;
|
||||
uniform bool has_selection;
|
||||
|
||||
vec3 rgb2hsb(vec3 c){
|
||||
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||
|
@ -61,11 +59,6 @@ void fragment() {
|
|||
|
||||
|
||||
col = hsb2rgb(hsb);
|
||||
vec3 output;
|
||||
if(affect_selection && has_selection)
|
||||
output = mix(original_color.rgb, col, selection_color.a);
|
||||
else
|
||||
output = col;
|
||||
vec3 output = mix(original_color.rgb, col, selection_color.a);
|
||||
COLOR = vec4(output.rgb, original_color.a);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ uniform bool blue;
|
|||
uniform bool green;
|
||||
uniform bool alpha;
|
||||
uniform sampler2D selection;
|
||||
uniform bool affect_selection;
|
||||
uniform bool has_selection;
|
||||
|
||||
|
||||
void fragment() {
|
||||
|
@ -24,11 +22,6 @@ void fragment() {
|
|||
if (alpha)
|
||||
col.a = 1f - col.a;
|
||||
|
||||
vec4 output;
|
||||
if(affect_selection && has_selection)
|
||||
output = mix(original_color.rgba, col, selection_color.a);
|
||||
else
|
||||
output = col;
|
||||
|
||||
vec4 output = mix(original_color.rgba, col, selection_color.a);
|
||||
COLOR = output;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue