Files
ProcessDesignSuite/sequence_diagram未lic/data/flutter_assets/shaders/stretch_effect.frag
T

408 lines
17 KiB
GLSL
Raw Normal View History

IPLR ì-Ø 6ÒÿÿÔ
 ü #
G GLSL.std.450main0G0G¸H¸#H¸#H¸# H¸#H¸#Gº!@Gº"GG!AG"!  /;/0+>€?+no¸ ¹¸;¹º» +»¼ ½ +ÂÃ+»Ì Í+»Ù+»ì ;  ;6ø=+0A½¾º¼=¿¾ˆÀ+¿QÅÀQÉÀAÍκÌ=ÏηoÐÏn÷ÕúÐÔØøØAÍÚºÙ=ÛÚùÕøÔùÕøÕõ:ÏÔÛØ ß:�à>߈á>àƒäá>÷éúÐèëøëAÍøºì=ùø÷qûÃ?ø?ºoA:n÷púABSøS¸oU:n÷oúUVmømùqøV¾o\Ån÷lú\]gøgƒi>á�kiÅùqø] ž.>Åù :…¢ ž�§>¢ˆ¨ŧƒ©á¨ƒª>©ùqølÿøoÿøB¼oEÅ>÷RúEFNøN�QäÅùqøFƒ|>Å �.>|ù…„:��ˆ>„ˆ‰|ˆƒŠá‰ùqøRÿøpÿøqõ
;ŠFQNª]kgÅmùéøèùéøéõ<Åè;q÷úÐøùøAÍ
ºì=
÷õûÃ̼̿oÅ:n÷ôúů׸׏oÙ:n÷óúÙÚñøñùõøÚ¾oàÉn÷ðúàáëøëƒí>á�ïíÉùõøá ".>É$:…&$"�+>&ˆ,É+ƒ-á,ƒ.>-ùõøðÿøóÿøÆ¼oÉÉ>÷ÖúÉÊÒøÒ�ÕäÉùõøÊƒ>É .>…:� >ˆ
 ć
ùõøÖÿøôÿøõõ
=ÊÕÒ.áïëÉñùøõ>=õÉPF<>=W!F>!ý8” $ $@Ô˜l@  u_interpolation_strength€ÿÿÿu_overscroll_y¨ÿÿÿu_overscroll_xÐÿÿÿu_max_stretch_intensityu_size1_RESERVED_IDENTIFIER_FIXUP_gl_DefaultUniformBlock   u_texturestretch_effect_fragment_main6àÿÿœ#version 300 es
precision mediump float;
precision highp int;
uniform highp vec2 u_size;
uniform highp float u_overscroll_y;
uniform highp float u_overscroll_x;
uniform highp float u_interpolation_strength;
uniform highp sampler2D u_texture;
uniform highp float u_max_stretch_intensity;
in highp vec2 _fragCoord;
layout(location = 0) out highp vec4 frag_color;
void main()
{
highp vec2 _189 = _fragCoord / u_size;
highp float _194 = _189.x;
highp float _198 = _189.y;
bool _204 = u_overscroll_y != 0.0;
highp float _210 = _204 ? u_overscroll_y : u_overscroll_x;
highp float _215 = 1.0 / (1.0 + abs(_210));
highp float _218 = _215 - 1.0;
highp float _560 = 0.0;
if (_204)
{
_560 = _194;
}
else
{
highp float _559 = 0.0;
do
{
if (_210 > 0.0)
{
if (_194 <= 1.0)
{
highp float _369 = 1.0 - _194;
_559 = _215 - (_369 / (1.0 + (_210 * mix(1.0, _369, u_interpolation_strength))));
break;
}
else
{
_559 = _218 + _194;
break;
}
break; // unreachable workaround
}
else
{
if (_210 < 0.0)
{
if (_194 >= 0.0)
{
_559 = 1.0 - (_215 - (_194 / (1.0 + ((-_210) * mix(1.0, _194, u_interpolation_strength)))));
break;
}
else
{
_559 = (1.0 - _215) + _194;
break;
}
break; // unreachable workaround
}
else
{
_559 = _194;
break;
}
break; // unreachable workaround
}
break; // unreachable workaround
} while(false);
_560 = _559;
}
highp float _562 = 0.0;
if (_204)
{
highp float _561 = 0.0;
do
{
if (_210 > 0.0)
{
if (_198 <= 1.0)
{
highp float _501 = 1.0 - _198;
_561 = _215 - (_501 / (1.0 + (_210 * mix(1.0, _501, u_interpolation_strength))));
break;
}
else
{
_561 = _218 + _198;
break;
}
break; // unreachable workaround
}
else
{
if (_210 < 0.0)
{
if (_198 >= 0.0)
{
_561 = 1.0 - (_215 - (_198 / (1.0 + ((-_210) * mix(1.0, _198, u_interpolation_strength)))));
break;
}
else
{
_561 = (1.0 - _215) + _198;
break;
}
break; // unreachable workaround
}
else
{
_561 = _198;
break;
}
break; // unreachable workaround
}
break; // unreachable workaround
} while(false);
_562 = _561;
}
else
{
_562 = _198;
}
frag_color = texture(u_texture, vec2(_560, _562));
}
X Ø”PêØÿÿ$ u_interpolation_strengthâØÿÿ( u_overscroll_y"Ùÿÿ( u_overscroll_x²Ùÿÿ$ u_max_stretch_intensityJÙÿÿ  u_texture:Ùÿÿ u_sizestretch_effect_fragment_mainþïÿÿØ8)#version 100
precision mediump float;
precision highp int;
uniform highp vec2 u_size;
uniform highp float u_overscroll_y;
uniform highp float u_overscroll_x;
uniform highp float u_interpolation_strength;
uniform highp sampler2D u_texture;
uniform highp float u_max_stretch_intensity;
varying highp vec2 _fragCoord;
void main()
{
highp vec2 _189 = _fragCoord / u_size;
highp float _194 = _189.x;
highp float _198 = _189.y;
bool _204 = u_overscroll_y != 0.0;
highp float _210 = _204 ? u_overscroll_y : u_overscroll_x;
highp float _215 = 1.0 / (1.0 + abs(_210));
highp float _218 = _215 - 1.0;
highp float _560 = 0.0;
if (_204)
{
_560 = _194;
}
else
{
highp float _559 = 0.0;
for (int spvDummy70 = 0; spvDummy70 < 1; spvDummy70++)
{
if (_210 > 0.0)
{
if (_194 <= 1.0)
{
highp float _369 = 1.0 - _194;
_559 = _215 - (_369 / (1.0 + (_210 * mix(1.0, _369, u_interpolation_strength))));
break;
}
else
{
_559 = _218 + _194;
break;
}
break; // unreachable workaround
}
else
{
if (_210 < 0.0)
{
if (_194 >= 0.0)
{
_559 = 1.0 - (_215 - (_194 / (1.0 + ((-_210) * mix(1.0, _194, u_interpolation_strength)))));
break;
}
else
{
_559 = (1.0 - _215) + _194;
break;
}
break; // unreachable workaround
}
else
{
_559 = _194;
break;
}
break; // unreachable workaround
}
break; // unreachable workaround
}
_560 = _559;
}
highp float _562 = 0.0;
if (_204)
{
highp float _561 = 0.0;
for (int spvDummy158 = 0; spvDummy158 < 1; spvDummy158++)
{
if (_210 > 0.0)
{
if (_198 <= 1.0)
{
highp float _501 = 1.0 - _198;
_561 = _215 - (_501 / (1.0 + (_210 * mix(1.0, _501, u_interpolation_strength))));
break;
}
else
{
_561 = _218 + _198;
break;
}
break; // unreachable workaround
}
else
{
if (_210 < 0.0)
{
if (_198 >= 0.0)
{
_561 = 1.0 - (_215 - (_198 / (1.0 + ((-_210) * mix(1.0, _198, u_interpolation_strength)))));
break;
}
else
{
_561 = (1.0 - _215) + _198;
break;
}
break; // unreachable workaround
}
else
{
_561 = _198;
break;
}
break; // unreachable workaround
}
break; // unreachable workaround
}
_562 = _561;
}
else
{
_562 = _198;
}
gl_FragData[0] = texture2D(u_texture, vec2(_560, _562));
}
h Ø”PÚèÿÿ$ u_interpolation_strengthÒèÿÿ( u_overscroll_yéÿÿ( u_overscroll_x¢éÿÿ$ u_max_stretch_intensity:éÿÿ  u_texture$ u_sizestretch_effect_fragment_main œÈ»// This SkSL shader is autogenerated by spirv-cross.
float4 flutter_FragCoord;
uniform vec2 u_size;
uniform float u_max_stretch_intensity;
uniform float u_overscroll_x;
uniform float u_overscroll_y;
uniform float u_interpolation_strength;
uniform shader u_texture;
uniform half2 u_texture_size;
vec4 frag_color;
vec2 FLT_flutter_local_FlutterFragCoord()
{
return flutter_FragCoord.xy;
}
float FLT_flutter_local_ease_in(float t, float d)
{
return t * d;
}
float FLT_flutter_local_compute_overscroll_start(float in_pos, float overscroll, float u_stretch_affected_dist, float u_inverse_stretch_affected_dist, float distance_stretched, float interpolation_strength)
{
float offset_pos = u_stretch_affected_dist - in_pos;
float param = offset_pos;
float param_1 = u_inverse_stretch_affected_dist;
float pos_based_variation = mix(1.0, FLT_flutter_local_ease_in(param, param_1), interpolation_strength);
float stretch_intensity = overscroll * pos_based_variation;
return distance_stretched - (offset_pos / (1.0 + stretch_intensity));
}
float FLT_flutter_local_compute_overscroll_end(float in_pos, float overscroll, float reverse_stretch_dist, float u_stretch_affected_dist, float u_inverse_stretch_affected_dist, float distance_stretched, float interpolation_strength, float viewport_dimension)
{
float offset_pos = in_pos - reverse_stretch_dist;
float param = offset_pos;
float param_1 = u_inverse_stretch_affected_dist;
float pos_based_variation = mix(1.0, FLT_flutter_local_ease_in(param, param_1), interpolation_strength);
float stretch_intensity = (-overscroll) * pos_based_variation;
return viewport_dimension - (distance_stretched - (offset_pos / (1.0 + stretch_intensity)));
}
float FLT_flutter_local_compute_streched_effect(float in_pos, float overscroll, float u_stretch_affected_dist, float u_inverse_stretch_affected_dist, float distance_stretched, float distance_diff, float interpolation_strength, float viewport_dimension)
{
if (overscroll > 0.0)
{
if (in_pos <= u_stretch_affected_dist)
{
float param = in_pos;
float param_1 = overscroll;
float param_2 = u_stretch_affected_dist;
float param_3 = u_inverse_stretch_affected_dist;
float param_4 = distance_stretched;
float param_5 = interpolation_strength;
return FLT_flutter_local_compute_overscroll_start(param, param_1, param_2, param_3, param_4, param_5);
}
else
{
return distance_diff + in_pos;
}
}
else
{
if (overscroll < 0.0)
{
float stretch_affected_dist_calc = viewport_dimension - u_stretch_affected_dist;
if (in_pos >= stretch_affected_dist_calc)
{
float param_6 = in_pos;
float param_7 = overscroll;
float param_8 = stretch_affected_dist_calc;
float param_9 = u_stretch_affected_dist;
float param_10 = u_inverse_stretch_affected_dist;
float param_11 = distance_stretched;
float param_12 = interpolation_strength;
float param_13 = viewport_dimension;
return FLT_flutter_local_compute_overscroll_end(param_6, param_7, param_8, param_9, param_10, param_11, param_12, param_13);
}
else
{
return (-distance_diff) + in_pos;
}
}
else
{
return in_pos;
}
}
}
void FLT_main()
{
vec2 uv = FLT_flutter_local_FlutterFragCoord() / u_size;
float in_u_norm = uv.x;
float in_v_norm = uv.y;
bool isVertical = u_overscroll_y != 0.0;
float overscroll_1 = isVertical ? u_overscroll_y : u_overscroll_x;
float norm_distance_stretched = 1.0 / (1.0 + abs(overscroll_1));
float norm_dist_diff = norm_distance_stretched - 1.0;
float _223;
if (isVertical)
{
_223 = in_u_norm;
}
else
{
float param_14 = in_u_norm;
float param_15 = overscroll_1;
float param_16 = 1.0;
float param_17 = 1.0;
float param_18 = norm_distance_stretched;
float param_19 = norm_dist_diff;
float param_20 = u_interpolation_strength;
float param_21 = 1.0;
_223 = FLT_flutter_local_compute_streched_effect(param_14, param_15, param_16, param_17, param_18, param_19, param_20, param_21);
}
float out_u_norm = _223;
float _246;
if (isVertical)
{
float param_22 = in_v_norm;
float param_23 = overscroll_1;
float param_24 = 1.0;
float param_25 = 1.0;
float param_26 = norm_distance_stretched;
float param_27 = norm_dist_diff;
float param_28 = u_interpolation_strength;
float param_29 = 1.0;
_246 = FLT_flutter_local_compute_streched_effect(param_22, param_23, param_24, param_25, param_26, param_27, param_28, param_29);
}
else
{
_246 = in_v_norm;
}
float out_v_norm = _246;
uv.x = out_u_norm;
uv.y = out_v_norm;
frag_color = u_texture.eval(u_texture_size * ( uv));
}