Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the blurring effect of FaceU frame by github

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "github how to realize FaceU border blur effect". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Frame blur effect in FaceU

Analysis of Frame Blur Effect

Let's split it into two parts: the inner display and the outer border blur.

The internal display content is compared with the Full mode, and it can be obtained that the internal image is a complete display image, which is a scaled original input image.

The outer border, we can see by careful comparison, is also obtained by blurring the input image.

Implementation of border and content bar

The implemented fragment shader is as follows:

precision mediump float;

uniform sampler2D inputTexture; //original image

uniform sampler2D blurTexture; //Gaussian blurred image

varying vec2 textureCoordinate;

uniform float blurOffsetX; // x axis border blur offset value

uniform float blurOffsetY; //y-axis border blur offset value

void main() {

// uv coordinates

vec2 uv = textureCoordinate.xy;

vec4 color;

//The middle is the original image, which needs to be reduced.

if (uv.x >= blurOffsetX && uv.x = blurOffsetY && uv.y

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report