惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
V
Visual Studio Blog
L
LangChain Blog
A
About on SuperTechFans
B
Blog
T
Tenable Blog
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
C
Check Point Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Latest news
Latest news
GbyAI
GbyAI
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
V2EX - 技术
V2EX - 技术
小众软件
小众软件
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed

博客园 - 华安

Unity 中区别,public 和 [SerializeField] Unity中 onCollisionEnter2D与OnTriggerEnter2D 区别 asp.netCore中给动态请求路径加客户端缓存 netCore中获取客户端真实的IP引起的思考 Unity 相机:正交 (Orthographic) vs 透视 (Perspective) unity中的button中的onclick控制面板中四个参数的意思分别是什么 微信小程序开发中触发 onshow的几种特殊情况 SQL Server备份心得 MYSQL 备份数据库 微信与支付支付功能开发 微信小程序中页面配置下拉刷新 unity中 相机没有视锥效果线框了,如何打开 JSONPath表达式 C# 中的操作JSON类 JObject cookie中的 HttpOnly 、Secure、SameSite 解释 Spring-boot 中基于 IP 的限流和自动封禁 Filter 登录 用 HMAC-SHA256 实现 TwoFA(二重验证)的坑 利用Spring Boot的 filter 结合ConcurrentHashMap 实现“同一IP每分钟最多允许300个404请求,超出后禁用30分钟访问” PixiJS中的 SplitBitmapText.chars中的每个 BitmapText的x值分析 legend隐藏不想显示的图例 spring-boot HttpServletResponse response.sendRedirect是会跳转到 http而不是https springboot获取post请求参数 Javascript如何判断是触摸屏还是PC端 JavaScript获取鼠标点一个元素,获取鼠标点击的元素内的位置 spring-boot中配置Mongodbd的问题小结 Rest Template中添加 PATCH请求。 CSS实现修改CheckBox样式 SpringBoot+Thyemleaf报错:Error resolving template Template might not exist or might not be accessible div display flex 如何出现横向滚动条
pixi-filters中的BackdropBlurFilter使用注意事项
华安 · 2026-01-13 · via 博客园 - 华安

最近在学习 PixiJS,发现 BackdropBlurFilter 官方给的案例没看到这个滤镜效果,但是各大博主说有效果。

如下是官网上的:https://filters.pixijs.download/main/examples/index.html?enabled=BackdropBlurFilter

image

 我看了很久也没看到 玻璃模糊的滤镜 效果。

然后我在AI里面问了很久,终于有一个 大神告诉了解决方法:

https://github.com/pixijs/filters/issues/506#event-20160523638

image

 最后改完后的代码如下:

import * as PIXI from 'pixi.js';
// v8 语法:从 pixi-filters 子模块导入
import { BackdropBlurFilter } from 'pixi-filters';

(async function () {

    const app = new PIXI.Application();
  await app.init({ 
    resizeTo: window, 
    preference: 'webgl', 
    useBackBuffer: true  // 这个属性很关键,如果没这个属性为true就没有效果
  });
  document.getElementById("pixi-container")!.appendChild(app.canvas);
  
  const texture = await PIXI.Assets.load('images/displacement_BG.jpg');
  const bg = PIXI.Sprite.from(texture);
  bg.width = app.screen.width;
  bg.height = app.screen.height;
  
  const overlay = PIXI.Sprite.from(PIXI.Texture.WHITE);
  overlay.width = app.screen.width / 2;
  overlay.height = app.screen.height / 2;
  overlay.anchor.set(0.5);
  overlay.x = app.screen.width / 2;
  overlay.y = app.screen.height / 2;
  overlay.alpha = 0.2;
  overlay.filterArea = new PIXI.Rectangle(
      -overlay.width/2,
    -overlay.height/2,
    overlay.width,
    overlay.height,
  );
  
const backdropBlurFilter=new BackdropBlurFilter();
backdropBlurFilter.strength=160;
backdropBlurFilter.quality=4;

  overlay.filters = backdropBlurFilter;
  
  app.stage.addChild(bg, overlay);

})();

运行的效果如下:

image

 具有玻璃模糊的效果了。

关于 pixi-filter.js的问题可以在这里进行提问 https://github.com/pixijs/filters/issues