当前位置:网站首页>three.js blur glass effect
three.js blur glass effect
2022-08-10 12:06:00 【Jedi Hongbin】
Creates a lens blur effect The properties of the following materials are mainly used 以及 MeshPhysicalMaterial 材质
const params = {
color: 0xffffff,
//Similar to transparency
transmission: 0.9,
opacity: 1,
//金属度
metalness: 0,
//粗糙
roughness: 0,
//折射率
ior: 1.52,
//厚度 The degree of blurring through which objects are seen
thickness: 0.8,
//镜面强度
specularIntensity: 1,
//镜面颜色
specularColor: new Color("#ffffff"),
//光强度
lightIntensity: 1
};
Ordinary wine glass
const params = {
color: 0xffffff,
"transmission": 0.9,
"opacity": 1,
"metalness": 0,
"roughness": 0,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}
const glassMaterial = new MeshPhysicalMaterial({
side: DoubleSide,
specularColor: new Color("#ffffff"),
...params,
});
metal wine glass
{
"color": 0xffffff,
"transmission": 0.9063505503810331,
"opacity": 0.9713801862828112,
"metalness": 0.7329381879762913,
"roughness": 0,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}
{
"color": 0xffffff,
"transmission": 0.7329381879762913,
"opacity": 1,
"metalness": 0.9063505503810331,
"roughness": 0.5812023708721422,
"ior": 1.209822184589331,
"thickness": 1.4049110922946655,
"specularIntensity": 1.0364098221845894
}
Frosted wine glass
参数
{
"color": 0xffffff,
"transmission": 0.9063505503810331,
"opacity": 0.9713801862828112,
"metalness": 0,
"roughness": 0.45114309906858596,
"ior": 1.52,
"thickness": 0.8,
"specularIntensity": 1
}
gui调试
for (const key of Object.keys(params)) {
gui.add(params, key, 0, 2).onChange((v) => {
glassMaterial[key] = v;
});
}
gui.add(
{
log: () => {
console.log(params);
},
},
"log"
);
边栏推荐
- 3款不同类型的自媒体免费工具,有效提高创作、运营效率
- Pulling drills - 56 Finding the right interval
- Not just running away, but saving the guy who mishandled rm -rf /*
- Licking Exercise - 63 Find all anagrams in a string
- LeetCode 86. 分隔链表
- 从源码角度分析UUID的实现原理
- Buckle exercise - rectangular area does not exceed the maximum value of K and (hard)
- Licking Exercise - 58 Verifying Binary Search Trees
- Redis常用命令
- HDU 4135: Co-prime (the principle of inclusion and exclusion)
猜你喜欢
gpu-admission 源码分析
OPNsense安装配置Zenarmor
LeetCode50天刷题计划(Day 19—— 在排序数组中查找元素的第一个和最后一个位置(9.10-10.40)
Do self-media monthly income tens of thousands?Several self-media tools that bloggers are using
Where can I view the version record of WeChat applet submission review history?
2016,还是到了最后
How many constants and data types do you remember?
英特尔推送20220809 CPU微码更新 修补Intel-SA-00657安全漏洞
制品库是什么?
Database management tool: dynamic read-write separation
随机推荐
An enhanced dynamic packet buffer management.论文核心部分
孩子自律性不够?猿辅导:计划表要注意“留白”给孩子更多掌控感
配置druid数据源「建议收藏」
Interviewer: How are Dao, Service, Controller, Util, and Model divided in the project?
推荐6个自媒体领域,轻松易上手
Buckle exercise - rectangular area does not exceed the maximum value of K and (hard)
gpu-admission 源码分析
LeetCode 21. 合并两个有序链表
Can CLIP also do segmentation tasks?The University of Göttingen proposed a model CLIPSeg that uses text and image prompts to perform three segmentation tasks at the same time, draining CLIP capabiliti
彩色图和深度图转点云
技术人必看!数据治理是什么?它对数据中台建设重要吗?
LeetCode 61. 旋转链表
Stroke Practice - 62 Valid Sudokus
一文详解 implementation api embed
【Redis】内存回收策略
模块九 - 设计电商秒杀系统
LeetCode 237. 删除链表中的节点
OPNsense安装配置Zenarmor
Apple bucks the trend and expands iPhone 14 series stocking, with a total of 95 million units
VSCode remote connection server error: Could not establish connection to "xxxxxx" possible error reasons and solutions