Skip to content

Commit b2a4b9d

Browse files
committed
feat: more particle
1 parent b022b74 commit b2a4b9d

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

Assets/UnityBox/AvatarSecuritySystem/Editor/ASS_TechnicalDoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ Inactive ──(IsLocal && TimeUp)──→ Active
739739
- Animator 参数名 (`PARAM_PASSWORD_CORRECT`, `PARAM_TIME_UP`, `PARAM_IS_LOCAL`, `PARAM_GESTURE_LEFT/RIGHT`)
740740
- 层名称 (`LAYER_LOCK`, `LAYER_PASSWORD_INPUT`, `LAYER_COUNTDOWN`, `LAYER_AUDIO`, `LAYER_DEFENSE`)
741741
- GameObject 名称 (`GO_UI`, `GO_AUDIO_WARNING`, `GO_AUDIO_SUCCESS`, `GO_DEFENSE_ROOT`)
742-
- VRChat 组件上限 (`PHYSBONE_MAX_COUNT=256`, `CONTACT_MAX_COUNT=256`, `CONSTRAINT_MAX_COUNT=2000`, `PHYSBONE_COLLIDER_MAX_COUNT=256`, `PHYSBONE_COLLIDER_CHECK_MAX_COUNT=10000`, `RIGIDBODY_MAX_COUNT=256`, `CLOTH_MAX_COUNT=256`, `ANIMATOR_MAX_COUNT=256`, `POLY_VERTICES_MAX_COUNT=2560000`, `PARTICLE_MAX_COUNT=2147483647`, `PARTICLE_SYSTEM_MAX_COUNT=256`, `LIGHT_MAX_COUNT=256`, `MATERIAL_MAX_COUNT=256`, `MESH_PARTICLE_MAX_POLYGONS=2147483647`, `TOTAL_CLOTH_VERTICES_MAX=2560000`)
742+
- VRChat 组件上限 (`PHYSBONE_MAX_COUNT=256`, `CONTACT_MAX_COUNT=256`, `CONSTRAINT_MAX_COUNT=2000`, `PHYSBONE_COLLIDER_MAX_COUNT=256`, `PHYSBONE_COLLIDER_CHECK_MAX_COUNT=10000`, `RIGIDBODY_MAX_COUNT=256`, `CLOTH_MAX_COUNT=256`, `ANIMATOR_MAX_COUNT=256`, `POLY_VERTICES_MAX_COUNT=2560000`, `PARTICLE_MAX_COUNT=2147483647`, `PARTICLE_SYSTEM_MAX_COUNT=355`, `LIGHT_MAX_COUNT=256`, `MATERIAL_MAX_COUNT=256`, `MESH_PARTICLE_MAX_POLYGONS=2147483647`, `TOTAL_CLOTH_VERTICES_MAX=2560000`)
743743

744744
---
745745

Assets/UnityBox/AvatarSecuritySystem/Editor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static class Constants
4848
public const int ANIMATOR_MAX_COUNT = 256;
4949
public const int POLY_VERTICES_MAX_COUNT = 2560000;
5050
public const int PARTICLE_MAX_COUNT = 2147483647;
51-
public const int PARTICLE_SYSTEM_MAX_COUNT = 256;
51+
public const int PARTICLE_SYSTEM_MAX_COUNT = 355;
5252
public const int LIGHT_MAX_COUNT = 256;
5353
public const int MATERIAL_MAX_COUNT = 256;
5454
public const int MESH_PARTICLE_MAX_POLYGONS = 2147483647;

Assets/UnityBox/AvatarSecuritySystem/Editor/Defense.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,15 @@ private static Material CreateMaterial(int seed, RenderTexture[] texturePool)
318318

319319
private static RenderTexture CreateRenderTexture(int seed)
320320
{
321-
var rt = new RenderTexture(1024, 1024, 0, RenderTextureFormat.ARGB32);
321+
var rt = new RenderTexture(4096, 4096, 32, RenderTextureFormat.ARGBFloat);
322322
rt.name = $"ASS_RT_{seed}";
323323
rt.useMipMap = true;
324-
rt.autoGenerateMips = false;
325-
rt.filterMode = FilterMode.Bilinear;
324+
rt.autoGenerateMips = true;
325+
rt.filterMode = FilterMode.Trilinear;
326+
rt.anisoLevel = 16;
326327
rt.wrapMode = TextureWrapMode.Repeat;
327-
rt.Create();
328+
rt.antiAliasing = 8;
329+
rt.enableRandomWrite = true;
328330
return rt;
329331
}
330332

Assets/UnityBox/AvatarSecuritySystem/Editor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Shader 使用反向投影→正向投影方式确保 VR 下正确渲染:
391391
| **GPU** | Rigidbody + Collider | 2 | Rigidbody 256,Collider 1024 |
392392
| **GPU** | Cloth | 2 | 填充到上限 256 |
393393
| **GPU** | 高面数 Mesh + 防御材质 | 2 | 2,560,000 顶点 + 256 个携带 RenderTexture 的材质 |
394-
| **GPU** | 粒子系统 | 2 | 最大粒子数 × 256 系统(自适应 Mesh 面数) |
394+
| **GPU** | 粒子系统 | 2 | 最大粒子数 × 355 系统(自适应 Mesh 面数) |
395395
| **GPU** | 光源 | 2 | 256 个实时光源 |
396396
397397
#### 防御等级
@@ -411,9 +411,9 @@ Shader 使用反向投影→正向投影方式确保 VR 下正确渲染:
411411
- Rigidbody: 256,Collider: 1024,Cloth: 256
412412
- 高面数 Mesh: 2,560,000 顶点,分散到多个 Mesh(避免单 Mesh 65k 限制)
413413
- 防御 Shader: GPU 密集(分形、路径追踪、流体模拟、光线步进等),参数名混淆
414-
- 粒子: MAX_INT 粒子 × 256 系统(自适应 Mesh:当粒子数与三角面数预算接近时使用最小三角扇面,实现 1:1 粒子-三角面映射;预算充裕时自动提升 Mesh 复杂度)
414+
- 粒子: MAX_INT 粒子 × 355 系统(自适应 Mesh:当粒子数与三角面数预算接近时使用最小三角扇面,实现 1:1 粒子-三角面映射;预算充裕时自动提升 Mesh 复杂度)
415415
- 光源: 256
416-
- 材质: 256 个,每个携带 16 张 1024×1024 RenderTexture
416+
- 材质: 256 个,每个携带 16 张 4096×4096 ARGBFloat RenderTexture(8×MSAA)
417417
418418
> 调试模式(Play Mode)下会生成同类型防御,但使用最小参数值(每类 1 个)以便测试。
419419

Assets/UnityBox/AvatarSecuritySystem/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "top.sealoong.unitybox.avatar-security-system",
33
"displayName": "Avatar Security System",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"description": "A VRChat avatar editor tool for protecting avatars with gesture-based password security system.",
66
"unity": "2022.3",
77
"author": {

0 commit comments

Comments
 (0)