From 703071de1ce832613e0a15a469a6837da30c125e Mon Sep 17 00:00:00 2001 From: zzz <1638644816@qq.com> Date: Tue, 1 Jul 2025 18:33:27 +0800 Subject: [PATCH] 7.1 --- .../战斗编辑器/参考文章/3C需要处理事项.md | 9 + 2Areas/习惯养成/高功能控制欲.md | 37 +++ .../游戏开发/ProceduralToolkit-程序工具包.md | 282 ++++++++++++++++++ .../游戏开发/性能优化/Batch & DrawCall.md | 4 - 3Resources/游戏开发/性能优化/Batch.md | 1 - 3Resources/游戏开发/性能优化/DrawCall.md | 1 - .../性能优化/Mesh/2DMesh- PolyMesh.md | 6 + 3Resources/游戏开发/性能优化/卡片/Batch.md | 1 + 3Resources/游戏开发/性能优化/卡片/DrawCall.md | 1 + .../游戏开发/性能优化/卡片/SetPassCall.md | 1 + .../Unity3D之DrawCalls、Batches和SetPassCalls的关系.md | 19 ++ .../韩国Unity团队研发的demo分享—ProjectKaya.md | 7 + 3Resources/游戏开发/游戏工具包汇总.md | 6 + 3Resources/游戏开发/音效资源.md | 3 + 14 files changed, 372 insertions(+), 6 deletions(-) create mode 100644 1Project/战斗编辑器/参考文章/3C需要处理事项.md create mode 100644 2Areas/习惯养成/高功能控制欲.md create mode 100644 3Resources/游戏开发/ProceduralToolkit-程序工具包.md delete mode 100644 3Resources/游戏开发/性能优化/Batch & DrawCall.md delete mode 100644 3Resources/游戏开发/性能优化/Batch.md delete mode 100644 3Resources/游戏开发/性能优化/DrawCall.md create mode 100644 3Resources/游戏开发/性能优化/Mesh/2DMesh- PolyMesh.md create mode 100644 3Resources/游戏开发/性能优化/卡片/Batch.md create mode 100644 3Resources/游戏开发/性能优化/卡片/DrawCall.md create mode 100644 3Resources/游戏开发/性能优化/卡片/SetPassCall.md create mode 100644 3Resources/游戏开发/性能优化/卡片/Unity3D之DrawCalls、Batches和SetPassCalls的关系.md create mode 100644 3Resources/游戏开发/性能优化/韩国Unity团队研发的demo分享—ProjectKaya.md create mode 100644 3Resources/游戏开发/游戏工具包汇总.md create mode 100644 3Resources/游戏开发/音效资源.md diff --git a/1Project/战斗编辑器/参考文章/3C需要处理事项.md b/1Project/战斗编辑器/参考文章/3C需要处理事项.md new file mode 100644 index 0000000..6bca23e --- /dev/null +++ b/1Project/战斗编辑器/参考文章/3C需要处理事项.md @@ -0,0 +1,9 @@ +--- +原文发布链接: https://zhuanlan.zhihu.com/p/691516531 +tags: + - 3C + - 战斗系统 + - 技能编辑器 + - AI + - BUFF +--- diff --git a/2Areas/习惯养成/高功能控制欲.md b/2Areas/习惯养成/高功能控制欲.md new file mode 100644 index 0000000..9149276 --- /dev/null +++ b/2Areas/习惯养成/高功能控制欲.md @@ -0,0 +1,37 @@ +--- +原文发布链接: https://www.zhihu.com/question/1922850709898003625/answer/1923026763325367923 +tags: + - 控制欲 +--- +--- + + +# 问题 + - 对于无法掌握别人的情绪困境 + - 例如,如果对手出了一招妙手,自己不会愤怒,而队友如果没有做好,会感到愤怒 + - 对随机事件,我们倾向于做“外部、不可控”归因→情绪低。 + - 对队友失误,我们做“内部、可控”归因→愤怒、挫败感。 + +# 成因 +- 你把队友当成了自己,你的认知系统赋予他了: + - 意图(intention):他有目的、有动机 + - 选择(agency):他可以做或不做某件事 + - 责任(accountability):他对后果要负一定责任 +- 你不指望环境变量遵守规则,但你指望人能遵守基本合作逻辑。 + +# 建议 +- **专注你的目标,同样把队友当作环境变量的一种。** + - 战术上“预防风险而不是信任”。具体就是:这波他可能不丢烟,那我得准备好自己烟或者不能这么走位。这波他可能跟不上,我要喊他补枪或者节奏慢一点。你不是指望他做对,而是提前把他“做错”的路径算进你的风险模型里。这和你处理“老鼠可能蹲撤离点”这一问题一样,是风险处理,而非合作失误。 + - 事后复盘时也“剥离人责”。复盘时不要反复想“他怎么能这样”,而是:下次遇到这种打法我能怎么绕开?我是不是过于激进、没有等队友,没有二手准备?从“责人”切换到“系统优化”,就像工程师看bug一样看“队友行为”。 +- **把队友当环境**,不是看低他们,而是看高你自己。不是试图“控制世界”,而是开始**优化你自己与世界交互的方式**。 +- 也许你会说:我不和他们玩了,太菜了。也许这种短期上是可以的,但是这种行为会强化你的“控制队友”的认知。并且问你一个问题:“到底多菜才不算菜?”。如果你强化这种认知,逐渐会认为世界上绝大多数人不可交流,不可接触。那就彻底完蛋了,你就不接地气了,把自己玩成社达/精英主义了,你将**孤立无援**。 +- **保持你的清晰,但接纳世界的混乱。你尝试控制世界,那就不能让“控制”变成你与外部之间的屏障。** +- **成熟的控制,不是控制一切,而是在无法控制时依然保持秩序感。** +- 高功能控制欲是**竞争优势与情绪困境的一体两面**。真正的解决之道,并非消除控制本能,而是将其升维为**复杂系统管理能力**——像工程师调试机器般冷静**优化交互逻辑**,而非像指挥官**要求世界服从指令**。这既是对游戏队友的解脱,更是对自我认知的扩容。 + +--- + + 正如存在主义心理学家罗洛·梅所言:“成熟的控制欲,是用创造力在混沌中雕刻秩序,而非在秩序中窒息混沌。” + + + \ No newline at end of file diff --git a/3Resources/游戏开发/ProceduralToolkit-程序工具包.md b/3Resources/游戏开发/ProceduralToolkit-程序工具包.md new file mode 100644 index 0000000..3b033b3 --- /dev/null +++ b/3Resources/游戏开发/ProceduralToolkit-程序工具包.md @@ -0,0 +1,282 @@ +--- +原文发布链接: https://github.com/Syomus/ProceduralToolkit +tags: + - 工具包 +--- + +## Toolkit structure +### Runtime/ + +[](https://github.com/Syomus/ProceduralToolkit#runtime) + +- [ArrayE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/ArrayE.cs): Various Array and List extensions, such as looped getters/setters and flood fills. +- [CellularAutomaton](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/CellularAutomaton.cs): Generic cellular automaton for two-state rulesets. Common rulesets can be found in CellularAutomaton.Ruleset. +- [ClipperUtility](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/ClipperUtility.cs): Utility class for conversion of Clipper data from and to Unity format. +- [ColorE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/ColorE.cs): Color extensions, HTML colors, Gradient constructors. +- [ColorHSV](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/ColorHSV.cs): Serializable representation of color in HSV model. +- [CompoundMeshDraft](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/CompoundMeshDraft.cs): Helper class for mesh generation supporting large meshes and submeshes. +- [DebugE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/DebugE.cs): Collection of drawing methods similar to Debug.DrawLine. +- [Directions](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Directions.cs): Enum with direction flags along three axes. +- [Draw](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Draw.cs): Collection of generic vector drawing algorithms. +- [DrawRaster](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/DrawRaster.cs): Collection of generic raster drawing algorithms. +- [GizmosE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/GizmosE.cs): Collection of drawing methods similar to Gizmos. +- [GLE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/GLE.cs): Collection of GL drawing methods similar to Gizmos. +- [MeshDraft](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/MeshDraft.cs): Helper class for mesh generation. +- [MeshDraftPrimitives](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/MeshDraftPrimitives.cs): Constructors for MeshDraft primitives. +- [MeshE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/MeshE.cs): Mesh extensions. +- [PathClipper](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/PathClipper.cs) and [PathOffsetter](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/PathOffsetter.cs): [Clipper](http://www.angusj.com/delphi/clipper.php) library wrappers. +- [PTUtils](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/PTUtils.cs): Various useful methods and constants. +- [RandomE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/RandomE.cs): Class for generating random data. Contains extensions for arrays and other collections. +- [RendererProperties](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/RendererProperties.cs): Serializable Renderer properties, use Renderer.ApplyProperties extension to apply them to a target renderer. +- [Tessellator](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Tessellator.cs): [LibTessDotNet](https://github.com/speps/LibTessDotNet) library wrapper. +- [TextureE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/TextureE.cs): Texture extensions. +- [VectorE](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/VectorE.cs): Vector extensions. + +### Runtime/Buildings/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimebuildings) + +- [BuildingGenerator](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/BuildingGenerator.cs): The main generation class. Generates buildings based on input configuration and strategies, reusable. See examples for details. +- [ILayout](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/ILayout.cs), [ILayoutElement](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/ILayoutElement.cs), [IConstructible](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/IConstructible.cs), [Layout](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Layout.cs), [HorizontalLayout](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/HorizontalLayout.cs), [VerticalLayout](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/VerticalLayout.cs): Interfaces and classes used in facade layout generation. +- [IFacadePlanner](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/IFacadePlanner.cs), [IFacadeConstructor](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/IFacadeConstructor.cs), [IRoofPlanner](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/IRoofPlanner.cs), [IRoofConstructor](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/Interfaces/IRoofConstructor.cs): Interfaces for strategies controlling the details of the building generation process. +- [FacadePlanner](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/FacadePlanner.cs), [FacadeConstructor](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/FacadeConstructor.cs), [RoofPlanner](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/RoofPlanner.cs), [RoofConstructor](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/RoofConstructor.cs): Serializable wrappers for strategy interfaces. +- [ProceduralRoofs](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Buildings/ProceduralRoofs.cs): A collection of roof constructors for the building generator. + +### Runtime/Geometry/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimegeometry) + +See [this wiki page](https://github.com/Syomus/ProceduralToolkit/wiki/Geometry-algorithms) for a matrix of available algorithms. + +- [Circle2](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Circle2.cs), [Circle3](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Circle3.cs), [Sphere](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Sphere.cs), [Line2](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Line2.cs), [Line3](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Line3.cs), [Segment2](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Segment2.cs), [Segment3](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Segment3.cs): Representations of geometric primitives. +- [Geometry](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Geometry.cs): Utility class for computational geometry algorithms, contains various point samplers and helper methods. +- [Closest2D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Closest2D.cs), [Closest3D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Closest3D.cs): Collection of closest point(s) algorithms. +- [Distance2D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Distance2D.cs), [Distance3D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Distance3D.cs): Collection of distance calculation algorithms. +- [Intersect2D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Intersect2D.cs), [Intersect3D](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Intersect3D.cs): Collection of intersection algorithms. +- [IntersectionType](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/IntersectionType.cs): Enum used in intersection algorithms. +- [Intersections](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/Intersections) folder: Structures containing information about intersections. + +### Runtime/Geometry/StraightSkeleton/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimegeometrystraightskeleton) + +Classes used in [straight skeleton](https://en.wikipedia.org/wiki/Straight_skeleton) generation. + +- [StraightSkeletonGenerator](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/StraightSkeleton/StraightSkeletonGenerator.cs): A straight skeleton generator, computes a straight skeleton for the input polygon, reusable. The generation algorithm is loosely based on the work of Tom Kelly (2014) [Unwritten procedural modeling with the straight skeleton](http://www.twak.co.uk/2014/02/unwritten-procedural-modeling-with.html). +- [StraightSkeleton](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/StraightSkeleton/StraightSkeleton.cs): A straight skeleton representation. +- [Plan](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Geometry/StraightSkeleton/Plan.cs): Representation of the active plan during generation process. + +### Runtime/ClipperLib/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimeclipperlib) + +The [Clipper](http://www.angusj.com/delphi/clipper.php) library. Use [PathClipper](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/PathClipper.cs) and [PathOffsetter](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/PathOffsetter.cs) for seamless interoperability with Unity. + +### Runtime/LibTessDotNet/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimelibtessdotnet) + +The [LibTessDotNet](https://github.com/speps/LibTessDotNet) library. The recommended use is through the wrapper class [Tessellator](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Tessellator.cs). + +### Runtime/FastNoiseLib/ + +[](https://github.com/Syomus/ProceduralToolkit#runtimefastnoiselib) + +The [FastNoise](https://github.com/Auburns/FastNoise_CSharp) library. + +### Shaders/ + +[](https://github.com/Syomus/ProceduralToolkit#shaders) + +Depending on the installation type, the shader library can be used like this: + +```hlsl +#include "Packages/com.syomus.proceduraltoolkit/Shaders/SDF.cginc" +``` + +Or like this: + +```hlsl +#include "Assets/ProceduralToolkit/Shaders/SDF.cginc" +``` + +- [Common.cginc](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/Common.cginc): Collection of shaping and debug functions. +- [Easing.cginc](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/Easing.cginc): Normalized easing functions. +- [SDF.cginc](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/SDF.cginc): Collection of signed distance functions. +- [Transitions.cginc](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/Transitions.cginc): Collection of transition animations. +- [Gradient Skybox](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/Gradient%20Skybox.shader): Simple gradient skybox. +- [Debug](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/Debug) folder: Debug shaders for some of the most common mesh channels. +- [VertexColor](https://github.com/Syomus/ProceduralToolkit/blob/master/Shaders/VertexColor) folder: Textureless shaders for use with color information from the vertices. + +### Editor/ + +[](https://github.com/Syomus/ProceduralToolkit#editor) + +- [ColorHSVDrawer](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Editor/ColorHSVDrawer.cs): PropertyDrawer for ColorHSV. +- [MeshFilterExtension](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Editor/MeshFilterExtension.cs): Mesh saving utility available at .`MeshFilter context menu > Save Mesh` +- [ProceduralToolkitMenu](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Editor/ProceduralToolkitMenu.cs): Submenu with constructors for primitives at .`GameObject > Procedural Toolkit` +- [RulesetDrawer](https://github.com/Syomus/ProceduralToolkit/blob/master/Runtime/Editor/RulesetDrawer.cs): PropertyDrawer for CellularAutomaton.Ruleset. + +### Tests/ + +[](https://github.com/Syomus/ProceduralToolkit#tests) + +Tests for the library + +## Samples +### [Buildings](https://syomus.com/ProceduralToolkit/Buildings) + +[](https://github.com/Syomus/ProceduralToolkit#buildings) + +[![](https://camo.githubusercontent.com/735315a0fc2e06f029c69819b5458fddd3536a52c746e79c94966945f635243a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6275696c64696e67732e706e67)](https://camo.githubusercontent.com/735315a0fc2e06f029c69819b5458fddd3536a52c746e79c94966945f635243a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6275696c64696e67732e706e67) + +A fully procedural building generator, creates an entire mesh from scratch and paints it's vertices. Keep in mind that the generated mesh has no uv map so using it with Standard shader is pointless. + +- BuildingGeneratorComponent: A simple minimal example on how you can use BuildingGenerator +- BuildingGeneratorConfigurator: A configurator for BuildingGenerator with UI and editor controls. +- BuildingGeneratorReuse: An example on how you can reuse the same generator to generate multiple buildings. +- ProceduralFacadePlanner: A facade planning strategy, controls the layouts of the facades. +- ProceduralFacadeConstructor: A facade construction strategy, used in conjunction with ProceduralFacadePlanner. +- ProceduralRoofPlanner: A roof planning strategy, generates a roof description based on the input config. +- ProceduralRoofConstructor: A roof construction strategy, used in conjunction with ProceduralRoofPlanner. +- ProceduralFacadeElements: A collection of fully procedural facade panels for the building generator. +- PolygonAsset: A ScriptableObject container for vertices. +- BuildingGeneratorConfiguratorEditor: A custom inspector for BuildingGeneratorConfigurator. + +### [Chairs](https://syomus.com/ProceduralToolkit/Chairs) + +[![](https://camo.githubusercontent.com/26d9a87a3f912a162bda356d8000bcc052798f777f2752fa66450c051618a643/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6368616972732e706e67)](https://camo.githubusercontent.com/26d9a87a3f912a162bda356d8000bcc052798f777f2752fa66450c051618a643/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6368616972732e706e67) + +A fully procedural chair generator, creates an entire mesh from scratch and paints it's vertices. + +- ChairGenerator: Main generator class. Generates chairs based on input configuration. +- ChairGeneratorConfigurator: Configurator for ChairGenerator with UI and editor controls. +- ChairGeneratorConfiguratorEditor: Custom inspector for ChairGeneratorConfigurator. +- Armrests, Backs, Stretchers: Chair parts constructors. + +### [Low Poly Terrain](https://syomus.com/ProceduralToolkit/LowPolyTerrain) + +[](https://github.com/Syomus/ProceduralToolkit#low-poly-terrain) + +[![](https://camo.githubusercontent.com/3e29b07fce0d650233b9affb875a556b7671d09d9b553a150992dc505c047b8a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6c6f772d706f6c792d7465727261696e2e706e67)](https://camo.githubusercontent.com/3e29b07fce0d650233b9affb875a556b7671d09d9b553a150992dc505c047b8a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6c6f772d706f6c792d7465727261696e2e706e67) + +A simple low poly terrain generator based on fractal noise. Doesn't support chunking or anything like that, just an example of how you can use a noise function in a plane generation algorithm. + +- LowPolyTerrainGenerator: Main generator class. Generates terrain based on input configuration. +- LowPolyTerrainExample: Configurator for LowPolyTerrainGenerator with UI and editor controls. +- LowPolyTerrainExampleEditor: Custom inspector for LowPolyTerrainExample. + +### [Signed Distance Functions](https://syomus.com/ProceduralToolkit/SDF) + +[](https://github.com/Syomus/ProceduralToolkit#signed-distance-functions) + +[![](https://camo.githubusercontent.com/311818ba566f2959e4ede0d748979bcfa1b305b761b0aafdedb51e5b848e5ba6/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d7364662e706e67)](https://camo.githubusercontent.com/311818ba566f2959e4ede0d748979bcfa1b305b761b0aafdedb51e5b848e5ba6/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d7364662e706e67) + +A collection of shaders showing how you can utilise functions from the shader library. + +- StarPolygon: A simple shader that draws a star polygon and shows a difference between "normal" and "cheap" functions. +- Shapes: A demonstration of some of the available shapes. +- DistanceOperations: A square and a circle combined with different functions. +- Easing: All easing functions in one shader showing the ease curve and the easing motion. +- Transitions: An example showing the sequencing and animation techniques. +- Animation: A more complex example on how you can create patterns and animate them in shader. + +### [Cellular Automata](https://syomus.com/ProceduralToolkit/CellularAutomata) + +[](https://github.com/Syomus/ProceduralToolkit#cellular-automata) + +[![](https://camo.githubusercontent.com/44f7a508ab234ec52a9d44aa6e3268d7e1fe64da8473399fe9effd126d9565f6/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d63656c6c756c61722d6175746f6d6174612e706e67)](https://camo.githubusercontent.com/44f7a508ab234ec52a9d44aa6e3268d7e1fe64da8473399fe9effd126d9565f6/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d63656c6c756c61722d6175746f6d6174612e706e67) + +A demonstration of CellularAutomaton from the main library, draws the automaton simulation on a texture. Note that some of the rulesets need noise value different from the default setting. + +- CellularAutomatonConfigurator: Configurator for the automaton with UI controls. + +### [Mazes](https://syomus.com/ProceduralToolkit/Mazes) + +[](https://github.com/Syomus/ProceduralToolkit#mazes) + +[![](https://camo.githubusercontent.com/1dcb674041b0050154917acc828ab331eff24fe17d74a64363926805f4a73a02/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6d617a65732e706e67)](https://camo.githubusercontent.com/1dcb674041b0050154917acc828ab331eff24fe17d74a64363926805f4a73a02/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6d617a65732e706e67) + +A generic maze generator, draws the maze generation process on a texture. + +- MazeGenerator: Main generator class. Generates mazes based on input configuration. +- MazeGeneratorConfigurator: Configurator for MazeGenerator with UI controls. +- Maze: Maze graph representation. + +### [Noise](https://syomus.com/ProceduralToolkit/Noise) + +[](https://github.com/Syomus/ProceduralToolkit#noise) + +[![](https://camo.githubusercontent.com/a6f5362fe2188bfea2d55c99dcb8e5cfacebdf7b36ab7a1f760e2ba3ff234424/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6e6f6973652e706e67)](https://camo.githubusercontent.com/a6f5362fe2188bfea2d55c99dcb8e5cfacebdf7b36ab7a1f760e2ba3ff234424/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d6e6f6973652e706e67) + +An example demonstrating various noise types from the [FastNoise](https://github.com/Auburns/FastNoise_CSharp) library. + +### [Breakout](https://syomus.com/ProceduralToolkit/Breakout) + +[](https://github.com/Syomus/ProceduralToolkit#breakout) + +[![](https://camo.githubusercontent.com/e47c47ac4ed574bc9753587c59feb5274fbdb007b4ef224cabb442e5994a789f/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d627265616b6f75742e706e67)](https://camo.githubusercontent.com/e47c47ac4ed574bc9753587c59feb5274fbdb007b4ef224cabb442e5994a789f/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d627265616b6f75742e706e67) + +A [Breakout](https://en.wikipedia.org/wiki/Breakout_\(video_game\)) clone with procedurally generated levels. + +- Breakout: Game engine and level generator. +- BreakoutConfigurator: Configurator for the game with UI controls. +- Brick: Disables game object on collision. + +### [Characters](https://syomus.com/ProceduralToolkit/Characters) + +[](https://github.com/Syomus/ProceduralToolkit#characters) + +[![](https://camo.githubusercontent.com/fa720682ac1cee0566e794e176c567e632c22267c138016805d28b742d6e7f42/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d636861726163746572732e676966)](https://camo.githubusercontent.com/fa720682ac1cee0566e794e176c567e632c22267c138016805d28b742d6e7f42/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d636861726163746572732e676966) + +A simple 2D character generator. Sprites made by [Kenney](http://kenney.nl/). + +- Character: A container for sprite renderers +- CharacterGenerator: Generates a sprite set and a name for character. +- CharacterGeneratorConfigurator: Configurator for CharacterGenerator. +- NameGenerator: Generates a random name from a large array of names. + +### [Primitives](https://syomus.com/ProceduralToolkit/Primitives) + +[](https://github.com/Syomus/ProceduralToolkit#primitives) + +[![](https://camo.githubusercontent.com/a14cbae0a0009b6c2be38b5c3605be404902d5d65555a9b1ae01e4d3feb1392a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d7072696d6974697665732e706e67)](https://camo.githubusercontent.com/a14cbae0a0009b6c2be38b5c3605be404902d5d65555a9b1ae01e4d3feb1392a/68747470733a2f2f73796f6d75732e636f6d2f50726f6365647572616c546f6f6c6b69742f73637265656e73686f742d7072696d6974697665732e706e67) + +A demonstration of some of the available MeshDraft primitives. + +- Cylinder, Dodecahedron, FlatSphere, Hexahedron...: Mesh generators that can be configured via the inspector. + +### Drawing + +[](https://github.com/Syomus/ProceduralToolkit#drawing) + +Three identical shapes made with three different methods: DebugE, GLE and GizmosE. + +### Clipper + +[](https://github.com/Syomus/ProceduralToolkit#clipper) + +A simple example demonstrating the api's of PathClipper and PathOffsetter. + +### Tessellator + +[](https://github.com/Syomus/ProceduralToolkit#tessellator) + +An example showing the usage of Tesselator. + +### StraightSkeleton + +[](https://github.com/Syomus/ProceduralToolkit#straightskeleton) + +An StraightSkeletonGenerator example showing how you can generate a straight skeleton from a polygon and use the result. + +### Common + +[](https://github.com/Syomus/ProceduralToolkit#common) + +UI prefabs and the skybox material used in examples. + +- SkyBoxGenerator: Skybox generator, assuming that scene uses gradient skybox shader, animates transitions to new parameters every few seconds. +- ButtonControl, SliderControl, TextControl, ToggleControl: UI controls for generators. +- CameraRotator: Orbiting camera controller. +- ConfiguratorBase: Base class for configurators. \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/Batch & DrawCall.md b/3Resources/游戏开发/性能优化/Batch & DrawCall.md deleted file mode 100644 index fbbf1b8..0000000 --- a/3Resources/游戏开发/性能优化/Batch & DrawCall.md +++ /dev/null @@ -1,4 +0,0 @@ -https://zhuanlan.zhihu.com/p/68530142 Batch的前世今生 - -但是因为Pass不同 -透明度不同,可能需要半透明混合而另外一个不需要,就会形成两次[[DrawCall]]渲染层级不同等等原因 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/Batch.md b/3Resources/游戏开发/性能优化/Batch.md deleted file mode 100644 index 9c683da..0000000 --- a/3Resources/游戏开发/性能优化/Batch.md +++ /dev/null @@ -1 +0,0 @@ -一个Batch即为同一批材质的游戏对象 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/DrawCall.md b/3Resources/游戏开发/性能优化/DrawCall.md deleted file mode 100644 index a5e18fd..0000000 --- a/3Resources/游戏开发/性能优化/DrawCall.md +++ /dev/null @@ -1 +0,0 @@ -CPU调用一次GPU即为一次 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/Mesh/2DMesh- PolyMesh.md b/3Resources/游戏开发/性能优化/Mesh/2DMesh- PolyMesh.md new file mode 100644 index 0000000..bfd3bde --- /dev/null +++ b/3Resources/游戏开发/性能优化/Mesh/2DMesh- PolyMesh.md @@ -0,0 +1,6 @@ +--- +原文发布链接: https://github.com/UnityPatterns/PolyMesh/tree/master +tags: + - 网格 + - 2D +--- diff --git a/3Resources/游戏开发/性能优化/卡片/Batch.md b/3Resources/游戏开发/性能优化/卡片/Batch.md new file mode 100644 index 0000000..84bd239 --- /dev/null +++ b/3Resources/游戏开发/性能优化/卡片/Batch.md @@ -0,0 +1 @@ +把数据加载到显存,设置渲染状态,CPU调用GPU渲染的过程称之为一个Batch。这其实就是渲染流程的运用阶段,最终输出一个渲染图元(点、线、面等),再传递给GPU进行几何阶段和光栅化阶段的渲染显示。一个Batch必然会触发一次或多次DrawCal,目包含了该对象的所有的网格和顶点数据以及材质信息。把数据加载到显存是指把清染所蛋的数据从硬盘加载到内存(RAM),再将网格和纹理等加载到显卡 VRAM),这一步比较释时。设置清染状态就是设置场景中的网格的顶点 Verex)片元(Fragment)着色器,光源属性,材质等。Unitv提供的动态合批(Dvnamic Batching)合并的就是这一过程,将清染状态相同的对象合并成-个Batch,减少DrawCall。 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/卡片/DrawCall.md b/3Resources/游戏开发/性能优化/卡片/DrawCall.md new file mode 100644 index 0000000..6f2afe5 --- /dev/null +++ b/3Resources/游戏开发/性能优化/卡片/DrawCall.md @@ -0,0 +1 @@ +CPU每次调用图像编程接口 glDrawElements(0penGl日中的图元清染函数)或者 DrawIndexedPrimitive(Direct中的顶点绘制方法)命令GPU渲染的操作称为一次Draw Cal,Draw Cal就是一次渲染命令的调用,它指向一个需要被渲染的图元(primitive)列表,不包含任何材质信息,glDrawElements 或者 DrawIndexedPrimitive 函数的作用是将CPU准备好的顶点数据渲染出来. \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/卡片/SetPassCall.md b/3Resources/游戏开发/性能优化/卡片/SetPassCall.md new file mode 100644 index 0000000..66c0b64 --- /dev/null +++ b/3Resources/游戏开发/性能优化/卡片/SetPassCall.md @@ -0,0 +1 @@ +Shader脚本中一个Pass语义块就是一个完整的渲染流程,一个着色器可以包含多个Pass语义块,每当GPU运行-个Pass之前,就会产生一个SetPassCall,所以可以理解为一次完整的染流程次数。 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/卡片/Unity3D之DrawCalls、Batches和SetPassCalls的关系.md b/3Resources/游戏开发/性能优化/卡片/Unity3D之DrawCalls、Batches和SetPassCalls的关系.md new file mode 100644 index 0000000..f6569d0 --- /dev/null +++ b/3Resources/游戏开发/性能优化/卡片/Unity3D之DrawCalls、Batches和SetPassCalls的关系.md @@ -0,0 +1,19 @@ +--- +原文发布链接: https://blog.csdn.net/Wei_Yuan_2012/article/details/88677172?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase +tags: + - 性能优化 + - Batch + - DrawCall + - SetPassCall +--- + + - [[DrawCall]]:CPU每次调用图像编程接口 glDrawElements(0penGl日中的图元清染函数)或者 DrawIndexedPrimitive(Direct中的顶点绘制方法)命令GPU渲染的操作称为一次Draw Call,Draw Call就是一次渲染命令的调用,它指向一个需要被渲染的图元(primitive)列表,不包含任何材质信息,glDrawElements 或者 DrawIndexedPrimitive 函数的作用是将CPU准备好的顶点数据渲染出来.**在Unity FrameDebugger中每一项都是一个DrawCall** + + - [[Batch]]:把数据加载到显存,设置渲染状态,CPU调用GPU渲染的过程称之为一个Batch。这其实就是渲染流程的运用阶段,最终输出一个渲染图元(点、线、面等),再传递给GPU进行几何阶段和光栅化阶段的渲染显示。**一个Batch必然会触发一次或多次DrawCall,且包含了该对象的所有的网格和顶点数据以及材质信息。把数据加载到显存是指把清染所蛋的数据从硬盘加载到内存(RAM),再将网格和纹理等加载到显卡 VRAM)**,这一步比较释耗时。设置清染状态就是设置场景中的网格的顶点 Verex)片元(Fragment)着色器,光源属性,材质等。Unitv提供的动态合批(Dvnamic Batching)合并的就是这一过程,将清染状态相同的对象合并成一个Batch,减少DrawCall。 + + - [[SetPassCall]]:Shader脚本中一个Pass语义块就是一个完整的渲染流程,一个着色器可以包含多个Pass语义块,每当GPU运行一个Pass之前,就会产生一个SetPassCall,所以可以理解为一次完整的染流程次数。 + + +由此可见,一个Batch包含一个或多个DrawCall,都是产生是在CPU阶段,而目前普遍渲染的瓶颈恰恰就是CPU,GPU的处理速度比CPU快多了,Draw Call太高,CPU会把大量时间花费在处理Draw Call调用上,如果Batch太大,CPU需要频繁的从硬盘加载数据切换渲染状态,这个消耗要比DrawCall大,所以后面Unity才逐渐弱化了DrawCall的显示。 + +再提一下,优化的时候还要关注下Statistics窗口上的三角形数(Tris)和顶点数(Verts),这两个数据也是会影响到性能,比如**单个物体的顶点数最好不要超过900,不然会影响到Unity的动态合批**。Unity的Statistics窗口上的三角形数(Tris)和顶点数(Verts)并不仅仅是视链中的梯形内的三角形数和顶点数,而是Camera中 feld ofview所有取值下的三角形数和顶点数,也就是说,即使当前Gam视图中看不到这个 cube,只有 field ofview在1-179 范围内都看不到这个cube,stats面板才不会统计,GPU才不会渲染,否则都会渲染,而且Unity不会把模型四拆分,这个模型哪怕只有1个顶点需要渲染,Unity也会把整个模型都渲出来。 \ No newline at end of file diff --git a/3Resources/游戏开发/性能优化/韩国Unity团队研发的demo分享—ProjectKaya.md b/3Resources/游戏开发/性能优化/韩国Unity团队研发的demo分享—ProjectKaya.md new file mode 100644 index 0000000..31a46f7 --- /dev/null +++ b/3Resources/游戏开发/性能优化/韩国Unity团队研发的demo分享—ProjectKaya.md @@ -0,0 +1,7 @@ +--- +原文发布链接: https://zhuanlan.zhihu.com/p/444413015?utm_psn=1903740548596097377 +tags: + - 性能优化 + - URP +--- +- 基于安卓平台开发的。因此,你需要把编辑器的环境设置如上。在Command Line Arguments上输入`-force-vulkan`,让其作为vulkan api运行。 \ No newline at end of file diff --git a/3Resources/游戏开发/游戏工具包汇总.md b/3Resources/游戏开发/游戏工具包汇总.md new file mode 100644 index 0000000..8f77829 --- /dev/null +++ b/3Resources/游戏开发/游戏工具包汇总.md @@ -0,0 +1,6 @@ +--- +链接1: https://github.com/killop/anything_about_game +链接2: https://github.com/michidk/Unity-Script-Collection +tags: + - 工具包 +--- diff --git a/3Resources/游戏开发/音效资源.md b/3Resources/游戏开发/音效资源.md new file mode 100644 index 0000000..672445b --- /dev/null +++ b/3Resources/游戏开发/音效资源.md @@ -0,0 +1,3 @@ +--- +资源链接: https://sonniss.com/gameaudiogdc/ +---