Skip to content

Commit

Permalink
✨ Laser Eyes: Add flare_width double parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
xurei committed Aug 21, 2024
1 parent 02bbd0b commit b17a6cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/effects/filters/face_detection_laser_eyes/main.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ uniform float audio_threshold_low;
uniform float audio_threshold_high;
uniform float eye_intensity_ratio;
uniform float intensity;
uniform float flare_width;
uniform float audio_impact;
uniform bool no_effect_if_no_sound;
//----------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -411,8 +412,8 @@ float4 EffectLinear__step3(float2 uv) {
float2 positionR = (fd_reye_1 + fd_reye_2) / 2.0;

float intensityOfLaser = (
laserIntensity(uv, fd_leye_1, fd_leye_2, 0.7, distance(positionL, positionR), 50.0)
+ laserIntensity(uv, fd_reye_1, fd_reye_2, 0.7, distance(positionL, positionR), 50.0)
laserIntensity(uv, fd_leye_1, fd_leye_2, flare_width, distance(positionL, positionR), 30.0 * sqrt(flare_width/0.3))
+ laserIntensity(uv, fd_reye_1, fd_reye_2, flare_width, distance(positionL, positionR), 30.0 * sqrt(flare_width/0.3))
+ 0.5 * laserIntensity(uv, fd_leye_1, fd_leye_2, 0.6, distance(positionL, positionR), 1.7)
+ 0.5 * laserIntensity(uv, fd_reye_1, fd_reye_2, 0.6, distance(positionL, positionR), 1.7)
);
Expand Down
10 changes: 10 additions & 0 deletions data/effects/filters/face_detection_laser_eyes/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@
"default": 10.0,
"step": 0.01
},
{
"name": "flare_width",
"label": "Flare Width",
"type": "double",
"slider": true,
"min": 0,
"max": 2.0,
"default": 0.3,
"step": 0.01
},
{
"name": "eye_intensity_ratio",
"label": "Eyes Intensity",
Expand Down

0 comments on commit b17a6cb

Please sign in to comment.