Files
netease-modsdk-wiki/docs/mcdocs/1-ModAPI/接口/后处理/模糊.md
2025-03-17 13:24:39 +08:00

101 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebarDepth: 1
---
# 模糊
## CheckGaussianBlurEnabled
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.postProcessControlComp.PostProcessComponent
- 描述
检测是否开启了高斯模糊效果。
- 参数
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | True为已开启False为已关闭。 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreatePostProcess(levelId)
comp.CheckGaussianBlurEnabled()
```
## SetEnableGaussianBlur
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.postProcessControlComp.PostProcessComponent
- 描述
设置是否开启高斯模糊效果,开启后玩家屏幕周围被模糊,可通过高斯模糊其他接口设置效果参数。
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| enable | bool | 是否开启高斯模糊效果True为开启False为关闭。 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreatePostProcess(levelId)
comp.SetEnableGaussianBlur(True)
```
## SetGaussianBlurRadius
<span style="display:inline;color:#7575f9">客户端</span>
method in mod.client.component.postProcessControlComp.PostProcessComponent
- 描述
设置高斯模糊效果的模糊半径,半径越大,模糊程度越大,反之则模糊程度越小。
- 参数
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- | :--- |
| radius | float | 模糊半径大小,值的范围为[0,10]小于或大于这个范围的值将被截取为边界值0或10 |
- 返回值
| <div style="width: 4em">数据类型</div> | 说明 |
| :--- | :--- |
| bool | 设置是否成功 |
- 示例
```python
import mod.client.extraClientApi as clientApi
comp = clientApi.GetEngineCompFactory().CreatePostProcess(levelId)
# 调整高斯模糊半径为3
comp.SetGaussianBlurRadius(3)
```