├── .gitignore ├── Assets ├── 01_Compute_Texture.meta ├── 01_Compute_Texture │ ├── 01_1_Basic.meta │ ├── 01_1_Basic │ │ ├── ComputeUAVTexture.compute │ │ ├── ComputeUAVTexture.compute.meta │ │ ├── ComputeUAVTexture.cs │ │ ├── ComputeUAVTexture.cs.meta │ │ ├── ComputeUAVTexture.mat │ │ ├── ComputeUAVTexture.mat.meta │ │ ├── ComputeUAVTexture.unity │ │ └── ComputeUAVTexture.unity.meta │ ├── 01_2_FallingSand.meta │ ├── 01_2_FallingSand │ │ ├── ComputeUAVTexFlow.compute │ │ ├── ComputeUAVTexFlow.compute.meta │ │ ├── ComputeUAVTexFlow.cs │ │ ├── ComputeUAVTexFlow.cs.meta │ │ ├── ComputeUAVTexFlow.mat │ │ ├── ComputeUAVTexFlow.mat.meta │ │ ├── ComputeUAVTexFlow.unity │ │ ├── ComputeUAVTexFlow.unity.meta │ │ ├── Untitled-1.psd │ │ └── Untitled-1.psd.meta │ ├── 01_3_Fluid_2D.meta │ ├── 01_3_Fluid_2D │ │ ├── Fluid.compute │ │ ├── Fluid.compute.meta │ │ ├── Fluid.cs │ │ ├── Fluid.cs.meta │ │ ├── Fluid.mat │ │ ├── Fluid.mat.meta │ │ ├── Fluid.unity │ │ ├── Fluid.unity.meta │ │ ├── Obstacle.png │ │ ├── Obstacle.png.meta │ │ ├── SetSphereColor.cs │ │ ├── SetSphereColor.cs.meta │ │ ├── Sphere.mat │ │ └── Sphere.mat.meta │ ├── 01_4_Fluid_3D.meta │ ├── 01_4_Fluid_3D │ │ ├── Fluid3D.compute │ │ ├── Fluid3D.compute.meta │ │ ├── Fluid3D.cs │ │ ├── Fluid3D.cs.meta │ │ ├── Fluid3D.unity │ │ ├── Fluid3D.unity.meta │ │ ├── Plane.mat │ │ ├── Plane.mat.meta │ │ ├── Plane_Black.mat │ │ ├── Plane_Black.mat.meta │ │ ├── VolumeShader.mat │ │ ├── VolumeShader.mat.meta │ │ ├── VolumeShader.shader │ │ ├── VolumeShader.shader.meta │ │ ├── animation.meta │ │ └── animation │ │ │ ├── camera.anim │ │ │ ├── camera.anim.meta │ │ │ ├── camera.controller │ │ │ ├── camera.controller.meta │ │ │ ├── sphere.anim │ │ │ ├── sphere.anim.meta │ │ │ ├── sphere.controller │ │ │ └── sphere.controller.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── 02_StructuredBuffer.meta ├── 02_StructuredBuffer │ ├── 02_1_StructuredBufferNoCompute.meta │ ├── 02_1_StructuredBufferNoCompute │ │ ├── DragAndDrop.cs │ │ ├── DragAndDrop.cs.meta │ │ ├── StructuredBufferNoCompute.cs │ │ ├── StructuredBufferNoCompute.cs.meta │ │ ├── StructuredBufferNoCompute.mat │ │ ├── StructuredBufferNoCompute.mat.meta │ │ ├── StructuredBufferNoCompute_Builtin.unity │ │ ├── StructuredBufferNoCompute_Builtin.unity.meta │ │ ├── StructuredBufferNoCompute_Surf.shader │ │ ├── StructuredBufferNoCompute_Surf.shader.meta │ │ ├── StructuredBufferNoCompute_URP.mat │ │ ├── StructuredBufferNoCompute_URP.mat.meta │ │ ├── StructuredBufferNoCompute_URP.unity │ │ ├── StructuredBufferNoCompute_URP.unity.meta │ │ ├── StructuredBufferNoCompute_Unlit.shader │ │ ├── StructuredBufferNoCompute_Unlit.shader.meta │ │ ├── StructuredBufferNoCompute_Unlit_URP.shader │ │ ├── StructuredBufferNoCompute_Unlit_URP.shader.meta │ │ ├── sphere_Builtin.mat │ │ ├── sphere_Builtin.mat.meta │ │ ├── sphere_URP.mat │ │ └── sphere_URP.mat.meta │ ├── 02_2_ComputePaintTexture.meta │ ├── 02_2_ComputePaintTexture │ │ ├── ComputePaintTexture.compute │ │ ├── ComputePaintTexture.compute.meta │ │ ├── ComputePaintTexture.cs │ │ ├── ComputePaintTexture.cs.meta │ │ ├── ComputePaintTexture.mat │ │ ├── ComputePaintTexture.mat.meta │ │ ├── ComputePaintTexture.unity │ │ ├── ComputePaintTexture.unity.meta │ │ ├── ComputePaintTexture2.unity │ │ ├── ComputePaintTexture2.unity.meta │ │ ├── ComputePaintTexture3.unity │ │ ├── ComputePaintTexture3.unity.meta │ │ ├── DrawLine.cs │ │ ├── DrawLine.cs.meta │ │ ├── FollowMouse.cs │ │ ├── FollowMouse.cs.meta │ │ ├── sphere.mat │ │ └── sphere.mat.meta │ ├── 02_3_RotatingCircles.meta │ ├── 02_3_RotatingCircles │ │ ├── ComputePaintTexture_RotatingCircles.unity │ │ ├── ComputePaintTexture_RotatingCircles.unity.meta │ │ ├── RotatingCircles.cs │ │ └── RotatingCircles.cs.meta │ ├── 02_4_ComputePaintTexture_DFT.meta │ ├── 02_4_ComputePaintTexture_DFT │ │ ├── ComputePaintTexture_DFT.mat │ │ ├── ComputePaintTexture_DFT.mat.meta │ │ ├── ComputePaintTexture_DFT.shader │ │ ├── ComputePaintTexture_DFT.shader.meta │ │ ├── ComputePaintTexture_DFT.unity │ │ ├── ComputePaintTexture_DFT.unity.meta │ │ ├── DFTMain.cs │ │ ├── DFTMain.cs.meta │ │ ├── Epicycle.cs │ │ ├── Epicycle.cs.meta │ │ ├── Epicycle.prefab │ │ ├── Epicycle.prefab.meta │ │ ├── Note.jpg │ │ ├── Note.jpg.meta │ │ ├── QuadDraw.meta │ │ └── QuadDraw │ │ │ ├── QuadDraw.cs │ │ │ ├── QuadDraw.cs.meta │ │ │ ├── QuadDraw.mat │ │ │ ├── QuadDraw.mat.meta │ │ │ ├── QuadDrawCS.compute │ │ │ ├── QuadDrawCS.compute.meta │ │ │ ├── defaultBlack.png │ │ │ └── defaultBlack.png.meta │ ├── 02_5_ComputeParticlesDirect.meta │ ├── 02_5_ComputeParticlesDirect │ │ ├── ComputeParticlesDirect.compute │ │ ├── ComputeParticlesDirect.compute.meta │ │ ├── ComputeParticlesDirect.cs │ │ ├── ComputeParticlesDirect.cs.meta │ │ ├── ComputeParticlesDirect.mat │ │ ├── ComputeParticlesDirect.mat.meta │ │ ├── ComputeParticlesDirect.shader │ │ ├── ComputeParticlesDirect.shader.meta │ │ ├── ComputeParticlesDirect_Builtin.cs │ │ ├── ComputeParticlesDirect_Builtin.cs.meta │ │ ├── ComputeParticlesDirect_Builtin.unity │ │ ├── ComputeParticlesDirect_Builtin.unity.meta │ │ ├── ComputeParticlesDirect_URP.unity │ │ ├── ComputeParticlesDirect_URP.unity.meta │ │ ├── Feature_ComputeParticlesDirect.asset │ │ └── Feature_ComputeParticlesDirect.asset.meta │ ├── 02_6_ComputeSketch.meta │ ├── 02_6_ComputeSketch │ │ ├── ComputeSketch.compute │ │ ├── ComputeSketch.compute.meta │ │ ├── ComputeSketch.cs │ │ ├── ComputeSketch.cs.meta │ │ ├── ComputeSketch.mat │ │ ├── ComputeSketch.mat.meta │ │ ├── ComputeSketch.shader │ │ ├── ComputeSketch.shader.meta │ │ ├── ComputeSketch.unity │ │ ├── ComputeSketch.unity.meta │ │ ├── Plane.mat │ │ ├── Plane.mat.meta │ │ ├── RenderObjectsRT.renderTexture │ │ ├── RenderObjectsRT.renderTexture.meta │ │ ├── brush1.png │ │ ├── brush1.png.meta │ │ ├── brush2.png │ │ └── brush2.png.meta │ ├── 02_7_ShimmerSphere.meta │ ├── 02_7_ShimmerSphere │ │ ├── Plane.mat │ │ ├── Plane.mat.meta │ │ ├── Postprocessing.asset │ │ ├── Postprocessing.asset.meta │ │ ├── ShimmerSphere.cs │ │ ├── ShimmerSphere.cs.meta │ │ ├── ShimmerSphere.mat │ │ ├── ShimmerSphere.mat.meta │ │ ├── ShimmerSphere.shader │ │ ├── ShimmerSphere.shader.meta │ │ ├── ShimmerSphere_URP.unity │ │ ├── ShimmerSphere_URP.unity.meta │ │ ├── Sphere.mat │ │ ├── Sphere.mat.meta │ │ ├── SphereMovement.cs │ │ ├── SphereMovement.cs.meta │ │ ├── noise3.png │ │ └── noise3.png.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── 03_GPU_to_CPU.meta ├── 03_GPU_to_CPU │ ├── 03_1_StructuredBufferWithCompute.meta │ ├── 03_1_StructuredBufferWithCompute │ │ ├── StructuredBufferWithCompute.compute │ │ ├── StructuredBufferWithCompute.compute.meta │ │ ├── StructuredBufferWithCompute.cs │ │ ├── StructuredBufferWithCompute.cs.meta │ │ ├── StructuredBufferWithCompute_Builtin.unity │ │ ├── StructuredBufferWithCompute_Builtin.unity.meta │ │ ├── StructuredBufferWithCompute_URP.unity │ │ └── StructuredBufferWithCompute_URP.unity.meta │ ├── 03_2_AsyncGPUReadback.meta │ ├── 03_2_AsyncGPUReadback │ │ ├── AsyncGPUReadbackTest.cs │ │ ├── AsyncGPUReadbackTest.cs.meta │ │ ├── AsyncGPUReadbackTest.mat │ │ ├── AsyncGPUReadbackTest.mat.meta │ │ ├── AsyncGPUReadbackTest_Builtin.unity │ │ ├── AsyncGPUReadbackTest_Builtin.unity.meta │ │ ├── AsyncGPUReadbackTest_URP.mat │ │ ├── AsyncGPUReadbackTest_URP.mat.meta │ │ ├── AsyncGPUReadbackTest_URP.unity │ │ └── AsyncGPUReadbackTest_URP.unity.meta │ ├── 03_3_AsyncGPUReadbackTex.meta │ ├── 03_3_AsyncGPUReadbackTex │ │ ├── AsyncGPUReadbackTex.cs │ │ ├── AsyncGPUReadbackTex.cs.meta │ │ ├── AsyncGPUReadbackTex.mat │ │ ├── AsyncGPUReadbackTex.mat.meta │ │ ├── AsyncGPUReadbackTex.unity │ │ └── AsyncGPUReadbackTex.unity.meta │ ├── 03_4_AsyncGPUReadbackMesh.meta │ ├── 03_4_AsyncGPUReadbackMesh │ │ ├── AsyncGPUReadbackMesh.compute │ │ ├── AsyncGPUReadbackMesh.compute.meta │ │ ├── AsyncGPUReadbackMesh.cs │ │ ├── AsyncGPUReadbackMesh.cs.meta │ │ ├── AsyncGPUReadbackMesh_Builtin.unity │ │ ├── AsyncGPUReadbackMesh_Builtin.unity.meta │ │ ├── AsyncGPUReadbackMesh_URP.unity │ │ ├── AsyncGPUReadbackMesh_URP.unity.meta │ │ ├── Plane.mat │ │ ├── Plane.mat.meta │ │ ├── Plane_URP.mat │ │ ├── Plane_URP.mat.meta │ │ ├── Sphere.mat │ │ ├── Sphere.mat.meta │ │ ├── Sphere_URP.mat │ │ └── Sphere_URP.mat.meta │ ├── 03_5_AsyncGPUReadbackMesh_NewMeshAPI.meta │ ├── 03_5_AsyncGPUReadbackMesh_NewMeshAPI │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI.compute │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI.compute.meta │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI.cs │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI.cs.meta │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI_Builtin.unity │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI_Builtin.unity.meta │ │ ├── AsyncGPUReadbackMesh_NewMeshAPI_URP.unity │ │ └── AsyncGPUReadbackMesh_NewMeshAPI_URP.unity.meta │ ├── 03_6_PixelPercentage.meta │ ├── 03_6_PixelPercentage │ │ ├── New Material.mat │ │ ├── New Material.mat.meta │ │ ├── PixelPercentage.compute │ │ ├── PixelPercentage.compute.meta │ │ ├── PixelPercentage.cs │ │ ├── PixelPercentage.cs.meta │ │ ├── PixelPercentage.unity │ │ └── PixelPercentage.unity.meta │ ├── 03_7_ColorPalette.meta │ ├── 03_7_ColorPalette │ │ ├── ColorPalette.compute │ │ ├── ColorPalette.compute.meta │ │ ├── ColorPalette.cs │ │ ├── ColorPalette.cs.meta │ │ ├── ColorPalette.mat │ │ ├── ColorPalette.mat.meta │ │ ├── ColorPalette.unity │ │ ├── ColorPalette.unity.meta │ │ ├── Grid.mat │ │ ├── Grid.mat.meta │ │ ├── Original.mat │ │ ├── Original.mat.meta │ │ ├── Result.mat │ │ ├── Result.mat.meta │ │ ├── pic.png │ │ └── pic.png.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── 04_Indirect.meta ├── 04_Indirect │ ├── 04_1_IndirectCompute.meta │ ├── 04_1_IndirectCompute │ │ ├── IndirectCompute.compute │ │ ├── IndirectCompute.compute.meta │ │ ├── IndirectCompute.cs │ │ ├── IndirectCompute.cs.meta │ │ ├── IndirectCompute.unity │ │ └── IndirectCompute.unity.meta │ ├── 04_2_ComputeParticlesIndirect.meta │ ├── 04_2_ComputeParticlesIndirect │ │ ├── ComputeParticlesIndirect.compute │ │ ├── ComputeParticlesIndirect.compute.meta │ │ ├── ComputeParticlesIndirect.cs │ │ ├── ComputeParticlesIndirect.cs.meta │ │ ├── ComputeParticlesIndirect.mat │ │ ├── ComputeParticlesIndirect.mat.meta │ │ ├── ComputeParticlesIndirect.shader │ │ ├── ComputeParticlesIndirect.shader.meta │ │ ├── ComputeParticlesIndirect.unity │ │ └── ComputeParticlesIndirect.unity.meta │ ├── 04_3_ComputeParticlesIndirect_VFX.meta │ ├── 04_3_ComputeParticlesIndirect_VFX │ │ ├── ComputeParticlesIndirect_VFX.cs │ │ ├── ComputeParticlesIndirect_VFX.cs.meta │ │ ├── ComputeParticlesIndirect_VFX.unity │ │ ├── ComputeParticlesIndirect_VFX.unity.meta │ │ ├── ComputeParticlesIndirect_VFX.vfx │ │ └── ComputeParticlesIndirect_VFX.vfx.meta │ ├── 04_4_IndirectReflectedStar.meta │ ├── 04_4_IndirectReflectedStar │ │ ├── DrawIndirect.cs │ │ ├── DrawIndirect.cs.meta │ │ ├── DrawIndirect.shader │ │ ├── DrawIndirect.shader.meta │ │ ├── DrawIndirect_Builtin.mat │ │ ├── DrawIndirect_Builtin.mat.meta │ │ ├── DrawIndirect_URP.mat │ │ ├── DrawIndirect_URP.mat.meta │ │ ├── IndirectReflectedStar.cs │ │ ├── IndirectReflectedStar.cs.meta │ │ ├── IndirectReflectedStar_Builtin.unity │ │ ├── IndirectReflectedStar_Builtin.unity.meta │ │ ├── IndirectReflectedStar_URP.unity │ │ ├── IndirectReflectedStar_URP.unity.meta │ │ ├── ScrollingUV.cs │ │ ├── ScrollingUV.cs.meta │ │ ├── Sphere.mat │ │ ├── Sphere.mat.meta │ │ ├── SphereSun.mat │ │ ├── SphereSun.mat.meta │ │ ├── SphereSun_URP.mat │ │ ├── SphereSun_URP.mat.meta │ │ ├── Sphere_URP.mat │ │ ├── Sphere_URP.mat.meta │ │ ├── UniversalRenderPipelineAsset_IndirectReflectedStar.asset │ │ ├── UniversalRenderPipelineAsset_IndirectReflectedStar.asset.meta │ │ ├── material_plane.mat │ │ ├── material_plane.mat.meta │ │ ├── material_plane_URP.mat │ │ ├── material_plane_URP.mat.meta │ │ ├── noise.png │ │ ├── noise.png.meta │ │ ├── noiseNormal.png │ │ ├── noiseNormal.png.meta │ │ ├── star1.png │ │ ├── star1.png.meta │ │ ├── star2.png │ │ ├── star2.png.meta │ │ ├── star3.png │ │ └── star3.png.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── 05_Shader_to_CPU.meta ├── 05_Shader_to_CPU │ ├── 05_1_UAVInShader.meta │ ├── 05_1_UAVInShader │ │ ├── UAVInShader.cs │ │ ├── UAVInShader.cs.meta │ │ ├── UAVInShader.mat │ │ ├── UAVInShader.mat.meta │ │ ├── UAVInShader.shader │ │ ├── UAVInShader.shader.meta │ │ ├── UAVInShader.unity │ │ └── UAVInShader.unity.meta │ ├── 05_2_ShaderBakeToTexture.meta │ ├── 05_2_ShaderBakeToTexture │ │ ├── BindUAVTexRenderGraphFeature.cs │ │ ├── BindUAVTexRenderGraphFeature.cs.meta │ │ ├── Quad.mat │ │ ├── Quad.mat.meta │ │ ├── Quad.shader │ │ ├── Quad.shader.meta │ │ ├── ResultSphere.mat │ │ ├── ResultSphere.mat.meta │ │ ├── ResultSphereRotate.cs │ │ ├── ResultSphereRotate.cs.meta │ │ ├── ShaderBakeToTexture.cs │ │ ├── ShaderBakeToTexture.cs.meta │ │ ├── ShaderBakeToTextureRenderer.asset │ │ ├── ShaderBakeToTextureRenderer.asset.meta │ │ ├── ShaderBakeToTexture_URP.unity │ │ ├── ShaderBakeToTexture_URP.unity.meta │ │ ├── Sphere.mat │ │ ├── Sphere.mat.meta │ │ ├── Sphere_URP.shader │ │ └── Sphere_URP.shader.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── 06_Compute_Mesh.meta ├── 06_Compute_Mesh │ ├── 06_1_ComputeVertex.meta │ ├── 06_1_ComputeVertex │ │ ├── ComputeVertex.compute │ │ ├── ComputeVertex.compute.meta │ │ ├── ComputeVertex.cs │ │ ├── ComputeVertex.cs.meta │ │ ├── ComputeVertex.mat │ │ ├── ComputeVertex.mat.meta │ │ ├── ComputeVertex.shader │ │ ├── ComputeVertex.shader.meta │ │ ├── ComputeVertex.unity │ │ └── ComputeVertex.unity.meta │ ├── 06_2_ComputeVertexLit.meta │ ├── 06_2_ComputeVertexLit │ │ ├── ComputeVertexLit.compute │ │ ├── ComputeVertexLit.compute.meta │ │ ├── ComputeVertexLitPlane.cs │ │ ├── ComputeVertexLitPlane.cs.meta │ │ ├── ComputeVertexLit_Builtin.unity │ │ ├── ComputeVertexLit_Builtin.unity.meta │ │ ├── ComputeVertexLit_URP.unity │ │ ├── ComputeVertexLit_URP.unity.meta │ │ ├── PlaneLD.FBX │ │ ├── PlaneLD.FBX.meta │ │ ├── PlaneQD.FBX │ │ ├── PlaneQD.FBX.meta │ │ ├── StandardEdited.mat │ │ ├── StandardEdited.mat.meta │ │ ├── StandardEdited.shader │ │ ├── StandardEdited.shader.meta │ │ ├── StandardSphere.mat │ │ ├── StandardSphere.mat.meta │ │ ├── URPLitEdited.mat │ │ ├── URPLitEdited.mat.meta │ │ ├── URPLitEdited.shader │ │ ├── URPLitEdited.shader.meta │ │ ├── heightMapDebug.mat │ │ ├── heightMapDebug.mat.meta │ │ ├── normalMapDebug.mat │ │ ├── normalMapDebug.mat.meta │ │ ├── planeHD.fbx │ │ ├── planeHD.fbx.meta │ │ ├── sphere_URP.mat │ │ └── sphere_URP.mat.meta │ ├── 06_3_SkinnedMeshBuffer_SameMesh.meta │ ├── 06_3_SkinnedMeshBuffer_SameMesh │ │ ├── PlayAnimation.cs │ │ ├── PlayAnimation.cs.meta │ │ ├── SkinnedMeshBuffer.cs │ │ ├── SkinnedMeshBuffer.cs.meta │ │ ├── SkinnedMeshBuffer.shader │ │ ├── SkinnedMeshBuffer.shader.meta │ │ ├── SkinnedMeshBuffer_Arms.mat │ │ ├── SkinnedMeshBuffer_Arms.mat.meta │ │ ├── SkinnedMeshBuffer_Body.mat │ │ ├── SkinnedMeshBuffer_Body.mat.meta │ │ ├── SkinnedMeshBuffer_Legs.mat │ │ ├── SkinnedMeshBuffer_Legs.mat.meta │ │ ├── SkinnedMeshBuffer_sameMesh.unity │ │ ├── SkinnedMeshBuffer_sameMesh.unity.meta │ │ ├── StarterAssets.meta │ │ └── StarterAssets │ │ │ ├── ThirdPersonController.meta │ │ │ └── ThirdPersonController │ │ │ ├── Character.meta │ │ │ └── Character │ │ │ ├── Animations.meta │ │ │ ├── Animations │ │ │ ├── Jump--InAir.anim.fbx │ │ │ ├── Jump--InAir.anim.fbx.meta │ │ │ ├── Jump--Jump.anim.fbx │ │ │ ├── Jump--Jump.anim.fbx.meta │ │ │ ├── Locomotion--Run_N.anim.fbx │ │ │ ├── Locomotion--Run_N.anim.fbx.meta │ │ │ ├── Locomotion--Run_N_Land.anim.fbx │ │ │ ├── Locomotion--Run_N_Land.anim.fbx.meta │ │ │ ├── Locomotion--Run_S.anim.fbx │ │ │ ├── Locomotion--Run_S.anim.fbx.meta │ │ │ ├── Locomotion--Walk_N.anim.fbx │ │ │ ├── Locomotion--Walk_N.anim.fbx.meta │ │ │ ├── Locomotion--Walk_N_Land.anim.fbx │ │ │ ├── Locomotion--Walk_N_Land.anim.fbx.meta │ │ │ ├── Stand--Idle.anim.fbx │ │ │ ├── Stand--Idle.anim.fbx.meta │ │ │ ├── StarterAssetsThirdPerson.controller │ │ │ └── StarterAssetsThirdPerson.controller.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── M_Armature_Arms.mat │ │ │ ├── M_Armature_Arms.mat.meta │ │ │ ├── M_Armature_Body.mat │ │ │ ├── M_Armature_Body.mat.meta │ │ │ ├── M_Armature_Legs.mat │ │ │ └── M_Armature_Legs.mat.meta │ │ │ ├── Models.meta │ │ │ ├── Models │ │ │ ├── Armature.fbx │ │ │ └── Armature.fbx.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ ├── Armature_Arms_AlbedoTransparency.tif │ │ │ ├── Armature_Arms_AlbedoTransparency.tif.meta │ │ │ ├── Armature_Arms_MetallicSmoothness.tif │ │ │ ├── Armature_Arms_MetallicSmoothness.tif.meta │ │ │ ├── Armature_Arms_Normal.tif │ │ │ ├── Armature_Arms_Normal.tif.meta │ │ │ ├── Armature_Arms_RGB.tif │ │ │ ├── Armature_Arms_RGB.tif.meta │ │ │ ├── Armature_Body_AlbedoTransparency.tif │ │ │ ├── Armature_Body_AlbedoTransparency.tif.meta │ │ │ ├── Armature_Body_MetallicSmoothness.tif │ │ │ ├── Armature_Body_MetallicSmoothness.tif.meta │ │ │ ├── Armature_Body_Normal.tif │ │ │ ├── Armature_Body_Normal.tif.meta │ │ │ ├── Armature_Body_RGB.tif │ │ │ ├── Armature_Body_RGB.tif.meta │ │ │ ├── Armature_Legs_AlbedoTransparency.tif │ │ │ ├── Armature_Legs_AlbedoTransparency.tif.meta │ │ │ ├── Armature_Legs_MetallicSmoothness.tif │ │ │ ├── Armature_Legs_MetallicSmoothness.tif.meta │ │ │ ├── Armature_Legs_Normal.tif │ │ │ ├── Armature_Legs_Normal.tif.meta │ │ │ ├── Armature_Legs_RGB.tif │ │ │ └── Armature_Legs_RGB.tif.meta │ ├── 06_4_SkinnedMeshBuffer_DiffMesh.meta │ ├── 06_4_SkinnedMeshBuffer_DiffMesh │ │ ├── EndlessRunnerSampleGame.meta │ │ ├── EndlessRunnerSampleGame │ │ │ ├── Animation.meta │ │ │ ├── Animation │ │ │ │ ├── Cat.controller │ │ │ │ ├── Cat.controller.meta │ │ │ │ ├── Cat_HappyDance.fbx │ │ │ │ ├── Cat_HappyDance.fbx.meta │ │ │ │ ├── Cat_HitHighWall.fbx │ │ │ │ ├── Cat_HitHighWall.fbx.meta │ │ │ │ ├── Cat_HitWall1.fbx │ │ │ │ ├── Cat_HitWall1.fbx.meta │ │ │ │ ├── Cat_Idle1.fbx │ │ │ │ ├── Cat_Idle1.fbx.meta │ │ │ │ ├── Cat_IdleHappy.fbx │ │ │ │ ├── Cat_IdleHappy.fbx.meta │ │ │ │ ├── Cat_RunLong.fbx │ │ │ │ ├── Cat_RunLong.fbx.meta │ │ │ │ ├── Cat_RunShort.fbx │ │ │ │ ├── Cat_RunShort.fbx.meta │ │ │ │ ├── Dog.controller │ │ │ │ ├── Dog.controller.meta │ │ │ │ ├── Dog_Idle.fbx │ │ │ │ ├── Dog_Idle.fbx.meta │ │ │ │ ├── Dog_Run.fbx │ │ │ │ └── Dog_Run.fbx.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ │ ├── CatOrange.mat │ │ │ │ ├── CatOrange.mat.meta │ │ │ │ ├── Dog.mat │ │ │ │ └── Dog.mat.meta │ │ │ ├── Models.meta │ │ │ ├── Models │ │ │ │ ├── CatBase.fbx │ │ │ │ ├── CatBase.fbx.meta │ │ │ │ ├── Dog.FBX │ │ │ │ ├── Dog.FBX.meta │ │ │ │ ├── Materials.meta │ │ │ │ └── Materials │ │ │ │ │ ├── lambert1.mat │ │ │ │ │ └── lambert1.mat.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ │ ├── CatAlbedo.tif │ │ │ │ ├── CatAlbedo.tif.meta │ │ │ │ ├── DogAlbedo.tif │ │ │ │ └── DogAlbedo.tif.meta │ │ ├── ForDebug.meta │ │ ├── ForDebug │ │ │ ├── PrimitiveID.mat │ │ │ ├── PrimitiveID.mat.meta │ │ │ ├── PrimitiveID.shader │ │ │ ├── PrimitiveID.shader.meta │ │ │ ├── PrimitiveID.unity │ │ │ └── PrimitiveID.unity.meta │ │ ├── SkinnedMeshBuffer_DiffMesh.cs │ │ ├── SkinnedMeshBuffer_DiffMesh.cs.meta │ │ ├── SkinnedMeshBuffer_diffMesh.mat │ │ ├── SkinnedMeshBuffer_diffMesh.mat.meta │ │ ├── SkinnedMeshBuffer_diffMesh.shader │ │ ├── SkinnedMeshBuffer_diffMesh.shader.meta │ │ ├── SkinnedMeshBuffer_diffMesh.unity │ │ ├── SkinnedMeshBuffer_diffMesh.unity.meta │ │ ├── Triangle.obj │ │ └── Triangle.obj.meta │ ├── 06_5_VFXGraphMeshDeform.meta │ ├── 06_5_VFXGraphMeshDeform │ │ ├── URPLit.mat │ │ ├── URPLit.mat.meta │ │ ├── VFXGraphMeshDeform.compute │ │ ├── VFXGraphMeshDeform.compute.meta │ │ ├── VFXGraphMeshDeform.cs │ │ ├── VFXGraphMeshDeform.cs.meta │ │ ├── VFXGraphMeshDeform.mat │ │ ├── VFXGraphMeshDeform.mat.meta │ │ ├── VFXGraphMeshDeform.shader │ │ ├── VFXGraphMeshDeform.shader.meta │ │ ├── VFXGraphMeshDeform.unity │ │ ├── VFXGraphMeshDeform.unity.meta │ │ ├── VFXGraphMeshDeform.vfx │ │ └── VFXGraphMeshDeform.vfx.meta │ ├── Readme.txt │ └── Readme.txt.meta ├── Base.unity ├── Base.unity.meta ├── Concept.jpg ├── Concept.jpg.meta ├── _URPSettings.meta └── _URPSettings │ ├── DefaultVolumeProfile.asset │ ├── DefaultVolumeProfile.asset.meta │ ├── SceneRenderPipeline.cs │ ├── SceneRenderPipeline.cs.meta │ ├── SimpleSceneSwitch.cs │ ├── SimpleSceneSwitch.cs.meta │ ├── UniversalRenderPipelineAsset.asset │ ├── UniversalRenderPipelineAsset.asset.meta │ ├── UniversalRenderPipelineAsset_Renderer.asset │ ├── UniversalRenderPipelineAsset_Renderer.asset.meta │ ├── UniversalRenderPipelineGlobalSettings.asset │ └── UniversalRenderPipelineGlobalSettings.asset.meta ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── MultiplayerManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── ShaderGraphSettings.asset ├── TagManager.asset ├── TimeManager.asset ├── URPProjectSettings.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md └── READMEimages ├── 01_1_Basic.gif ├── 01_2_FallingSand.gif ├── 01_3_Fluid_2D.gif ├── 01_4_Fluid_3D.gif ├── 02_1_StructuredBufferNoCompute.gif ├── 02_2_ComputePaintTexture.gif ├── 02_3_RotatingCircles.gif ├── 02_4_ComputePaintTexture_DFT.gif ├── 02_5_ComputeParticlesDirect.gif ├── 02_6_ComputeSketch.gif ├── 02_7_ShimmerSphere.gif ├── 03_1_StructuredBufferWithCompute.gif ├── 03_2_AsyncGPUReadback.gif ├── 03_3_AsyncGPUReadbackTex.gif ├── 03_4_AsyncGPUReadbackMesh.gif ├── 03_6_PixelPercentage.gif ├── 03_7_ColorPalette.JPG ├── 04_1_IndirectCompute.gif ├── 04_2_ComputeParticlesIndirect.gif ├── 04_3_ComputeParticlesIndirect_VFX.gif ├── 04_4_IndirectReflectedStar.gif ├── 05_1_UAVInShader.gif ├── 05_2_ShaderBakeToTexture.gif ├── 06_1_ComputeVertex.gif ├── 06_2_ComputeVertexLit.gif ├── 06_3_SkinnedMeshBuffer_SameMesh.gif ├── 06_4_SkinnedMeshBuffer_DiffMesh.gif └── 06_5_VFXGraphMeshDeform.gif /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | Logs/ 38 | .vscode/settings.json 39 | UserSettings/ 40 | .idea/ 41 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc12f9ad99ac4a541bc9c6351ecec706 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b28ea959d074b433d982ce9061799b7c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel CSMain 3 | 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | RWTexture2D Result; 7 | 8 | [numthreads(8,8,1)] 9 | void CSMain (uint3 id : SV_DispatchThreadID) 10 | { 11 | float4 baseColor = float4(id.x & id.y, (id.x & 15)/15.0, (id.y & 15)/15.0, 1.0); 12 | float4 color = Result[id.xy]; 13 | 14 | //Rainbow color 15 | color.r += 0.01f; 16 | color.g += 0.005f; 17 | color.b += 0.008f; 18 | color = frac(color); 19 | 20 | Result[id.xy] = float4(color) + baseColor * 0.5f; 21 | } 22 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a57434a19e684c4f9a2fce939450922 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ComputeUAVTexture : MonoBehaviour 6 | { 7 | public ComputeShader shader; 8 | 9 | private int size = 128; 10 | private int _kernel; 11 | public Material _mat; 12 | 13 | void Start () 14 | { 15 | _kernel = shader.FindKernel ("CSMain"); 16 | 17 | RenderTexture tex = new RenderTexture (size, size, 0); 18 | tex.enableRandomWrite = true; 19 | tex.Create (); 20 | 21 | _mat.SetTexture ("_MainTex", tex); 22 | shader.SetTexture (_kernel, "Result", tex); 23 | } 24 | 25 | void Update() 26 | { 27 | shader.Dispatch (_kernel, Mathf.CeilToInt(size / 8f), Mathf.CeilToInt(size / 8f), 1); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 841f780a6deea4247a9171df36a42417 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5132356b01a678c43996deafd4f9b485 3 | timeCreated: 1485045315 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_1_Basic/ComputeUAVTexture.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f2ba23256a10664984befabb2475ddc 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 008414b8cf626e3449a0ad8d2d394164 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand/ComputeUAVTexFlow.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8c47d124ea89904c9b67bd7c487ff72 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand/ComputeUAVTexFlow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1373d184f9b2d3e4c8b3fe923314b26b 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand/ComputeUAVTexFlow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02436a58ce97ef74cb87bd76ce81369b 3 | timeCreated: 1485045315 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand/ComputeUAVTexFlow.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a896f6a5cc103804e9d306e51225579a 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_2_FallingSand/Untitled-1.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/01_Compute_Texture/01_2_FallingSand/Untitled-1.psd -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0c4d082ebcaddf49967257f5a8fb9af 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Fluid.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efe02d78b516a2a4d87925c8ea107b6a 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Fluid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b90ba81765b78124fb7a4a0b7379792f 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Fluid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8393e82893fc224cb84c0836b145c16 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Fluid.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdba5a77155922c44a481ecbfc5e1306 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Obstacle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/01_Compute_Texture/01_3_Fluid_2D/Obstacle.png -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/SetSphereColor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SetSphereColor : MonoBehaviour 6 | { 7 | public static Color color; 8 | public Material sphereMat; 9 | public Material planeMat; 10 | [Range(1f,20f)] public float timeSpeed = 10f; 11 | 12 | void FixedUpdate() 13 | { 14 | //Rainbow color 15 | color = Color.HSVToRGB( 0.5f*(Mathf.Sin( Time.time * Time.fixedDeltaTime * timeSpeed )+1f) , 1f, 1f); 16 | if(sphereMat != null) sphereMat.SetColor("_Color",color); 17 | if(planeMat != null) planeMat.SetColor("_Color",color); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/SetSphereColor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c651866c1f9bc5c4391d0e6c9dffc2dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_3_Fluid_2D/Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53e0ad3ce2019c544aa71891308d0939 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0182761c05e13b044b9eb7efba64948f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/Fluid3D.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2749508345658c04d986f1eda5cb2759 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/Fluid3D.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f5a835440f5bf64898aa5c593430fa2 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/Fluid3D.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5cb5814e9ba4c34f93e3e7a1766b51c 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e81c91c3c10ab4488bc39f50482f6ca 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/Plane_Black.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec380d35706468f489982726b465d3ee 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/VolumeShader.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 544390be0ab0c0440b3fec7800e96125 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/VolumeShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07be9de25220d5f4ba13da2121dce001 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d5ad4aae55eaba429338934208c98da 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/animation/camera.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c32f77958efe64145a749b3b74195051 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 7400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/animation/camera.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88875c88dd8827245a56befaea228c10 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/animation/sphere.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03e68785bedcd8d42826ef4bc4cb018f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 7400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/01_4_Fluid_3D/animation/sphere.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecd260b5ab36a7a4f8d57925c57d6709 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic: CPU instructs -> GPU write into texture -> Shader reads the texture for rendering 2 | 3 | Compute shaders write to the texture pixels on GPU side and shader can use the texture directly for rendering. 4 | -------------------------------------------------------------------------------- /Assets/01_Compute_Texture/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83747a95a1afdff46bda7b5db49cd8b0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ca94c76fa2885d48b669e4bd1d13edd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5aa64dfac46a3420a8927d20f7eff945 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/DragAndDrop.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DragAndDrop : MonoBehaviour 6 | { 7 | private Camera cam; 8 | private Vector3 lastPos; 9 | 10 | void Start() 11 | { 12 | cam = Camera.main; 13 | } 14 | 15 | private Vector3 GetPosition() 16 | { 17 | float camPlaneDistance = 13.99f; 18 | return cam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, camPlaneDistance)); 19 | } 20 | 21 | public void OnMouseDown() 22 | { 23 | lastPos = GetPosition(); 24 | } 25 | 26 | public void OnMouseDrag() 27 | { 28 | Vector3 delta = GetPosition()-lastPos; 29 | 30 | Vector3 pos = this.transform.position; 31 | pos.x += delta.x; 32 | pos.y += delta.y; 33 | this.transform.position = pos; 34 | 35 | lastPos = GetPosition(); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/DragAndDrop.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97440e196df61e74ba76dbbb96794b46 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class StructuredBufferNoCompute : MonoBehaviour 6 | { 7 | //The same struct in Shader 8 | struct myObjectStruct 9 | { 10 | public Vector3 objPosition; 11 | }; 12 | 13 | public Material Mat; 14 | private ComputeBuffer _computeBuffer; 15 | private myObjectStruct[] _mos; 16 | private static int _noOfObj; 17 | public Transform[] _myObjects; 18 | 19 | // Use this for initialization 20 | void Start () 21 | { 22 | _noOfObj = _myObjects.Length; 23 | 24 | _mos = new myObjectStruct[_noOfObj]; 25 | 26 | //Initiate buffer 27 | _computeBuffer = new ComputeBuffer(_noOfObj,12); //(3)*4bytes in myObjectStruct 28 | } 29 | 30 | // Update is called once per frame 31 | void Update () 32 | { 33 | RunShader(); 34 | } 35 | 36 | public void RunShader() 37 | { 38 | for (int i = 0; i < _noOfObj; i++) 39 | { 40 | _mos[i].objPosition = _myObjects[i].position; 41 | // Debug.Log(i+" "+_myObjects[i].position); 42 | } 43 | 44 | //Set buffer 45 | _computeBuffer.SetData(_mos); 46 | 47 | //Assign buffer to unlit shader 48 | Mat.SetBuffer("myObjectBuffer", _computeBuffer); 49 | } 50 | 51 | void OnDestroy() 52 | { 53 | //Clean Buffer 54 | _computeBuffer.Release(); 55 | } 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cceea4a996d921e49b3cf3a3881f973f 3 | timeCreated: 1494938569 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 906976ba9555ae14d866227a17a85906 3 | timeCreated: 1494939286 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7e48cc238262104cb26588cf497fb28 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_Surf.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57f45bdc1b1178c48929d61afd10a72a 3 | timeCreated: 1485861256 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bea03ba762c0784a88acd1ef5e5be93 3 | timeCreated: 1494939286 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ca723e72b75a4de0907320897374977 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_Unlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b249c4a0d86f74176a9644b30607f32f 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/StructuredBufferNoCompute_Unlit_URP.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a729ed32a8da53947a21b398a09ba655 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/sphere_Builtin.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37efa737ed889b04ca238f40800d6c12 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_1_StructuredBufferNoCompute/sphere_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84c0b0be38a49bd46bf873cba726055d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a34e4f0f4c7c05440aabff80ebe7a33c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9372dc3567ecb14eba1cf704660959c 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43fdca1faa3cb1841995a0fdc1c7335f 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87f2c445fb7abee43a9758ec4070c98a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad7d24503a8f2404f8e0cf267d865451 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture2.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02ed6105e931a9d4b977a142264c9620 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/ComputePaintTexture3.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 160a65963f26fa64dafc878f0316cc00 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/DrawLine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DrawLine : MonoBehaviour 6 | { 7 | public Transform target; 8 | private Vector3 pos; 9 | 10 | void OnDrawGizmos() 11 | { 12 | Gizmos.color = Color.grey; 13 | if (target != null) 14 | { 15 | pos = target.position; 16 | } 17 | else 18 | { 19 | pos = transform.position; 20 | pos.y = 0; 21 | } 22 | Gizmos.DrawLine(transform.position, pos); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/DrawLine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e02905f61cd9af4bb5cc5e69ea17db8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/FollowMouse.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class FollowMouse : MonoBehaviour 6 | { 7 | private Camera cam; 8 | void Start() 9 | { 10 | cam = Camera.main; 11 | } 12 | 13 | void Update() 14 | { 15 | RaycastHit hit; 16 | Ray ray = cam.ScreenPointToRay(Input.mousePosition); 17 | 18 | if (Physics.Raycast(ray, out hit)) 19 | { 20 | if (hit.collider != null) 21 | { 22 | transform.position = hit.point; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/FollowMouse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46425b26bc60f72419bf3d4d56c787dc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_2_ComputePaintTexture/sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 734988f2e43789b41aab072c7a877024 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_3_RotatingCircles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dabb68ce9195f624eb3ee1ab95d3c621 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_3_RotatingCircles/ComputePaintTexture_RotatingCircles.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a6ac6281a3cf7843837f973139bbdb4 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_3_RotatingCircles/RotatingCircles.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RotatingCircles : MonoBehaviour 6 | { 7 | public float frequency = 0f; 8 | public Transform tip_Par; 9 | public Transform tip; //for moving the child 10 | 11 | private static float repetition = 6f; 12 | 13 | void Start() 14 | { 15 | //Random 16 | tip.transform.localPosition = new Vector3( Random.Range( -1.5f, 1.5f ), 0 , 0); 17 | } 18 | 19 | void FixedUpdate() 20 | { 21 | //Follow the parent's tip position 22 | transform.position = tip_Par.position; 23 | 24 | //Self rotation 25 | Vector3 angle = transform.localRotation.eulerAngles; 26 | angle.y += (repetition * frequency + 1f) * Time.deltaTime * 1f/repetition * 100f ; 27 | transform.localRotation = Quaternion.Euler(0,angle.y, 0); 28 | } 29 | 30 | #if UNITY_EDITOR 31 | void OnDrawGizmos() 32 | { 33 | Gizmos.color = Color.grey; 34 | Vector3 from = Vector3.zero; 35 | Vector3 to = Vector3.zero; 36 | 37 | if (tip_Par != null && tip != null) 38 | { 39 | from = tip_Par.position; 40 | to = tip.position; 41 | } 42 | 43 | Gizmos.DrawLine(from, to); 44 | UnityEditor.Handles.DrawWireDisc(transform.position ,Vector3.up, Vector3.Distance(tip.localPosition , Vector3.zero)); 45 | } 46 | #endif 47 | } 48 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_3_RotatingCircles/RotatingCircles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca6576bd22a3aba4ca3427880e84b9db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d8d7892389d04b8c8cf47e068cb5a26 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/ComputePaintTexture_DFT.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afaedb57c08bd438689a2c9660364080 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/ComputePaintTexture_DFT.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/ComputePaintTexture_FS" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | _Multiplier ("Multiplier", Range(0,500)) = 2 7 | } 8 | SubShader 9 | { 10 | Tags { "RenderType"="Opaque" } 11 | 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | #include "UnityCG.cginc" 19 | 20 | struct appdata 21 | { 22 | float4 vertex : POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float2 uv : TEXCOORD0; 29 | UNITY_FOG_COORDS(1) 30 | float4 vertex : SV_POSITION; 31 | }; 32 | 33 | sampler2D _MainTex; 34 | float4 _MainTex_ST; 35 | float _Multiplier; 36 | 37 | v2f vert (appdata v) 38 | { 39 | v2f o; 40 | o.vertex = UnityObjectToClipPos(v.vertex); 41 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 42 | return o; 43 | } 44 | 45 | fixed4 frag (v2f i) : SV_Target 46 | { 47 | fixed4 col = tex2D(_MainTex, i.uv); 48 | return col * _Multiplier; 49 | } 50 | ENDCG 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/ComputePaintTexture_DFT.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61fa2d2c407c841f99d2431c2b10e68d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/ComputePaintTexture_DFT.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29a7cb85cd9004d4cbbc062b23ab7fa5 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/DFTMain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cda4fd6c188a9442ea55decae9763675 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/Epicycle.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Epicycle : MonoBehaviour 6 | { 7 | public float frequency = 0f; //the time to finish 1 cycle 8 | public float amplitude = 0f; 9 | public float phaseAngle = 0f; 10 | public Transform tip_Par; 11 | public Transform tip; //for moving the child 12 | 13 | void FixedUpdate() 14 | { 15 | //Follow the parent's tip position 16 | transform.position = tip_Par.position; 17 | 18 | //Self rotation 19 | Vector3 angle = transform.localRotation.eulerAngles; 20 | angle.y += frequency * DFTMain.timeSpeed; 21 | transform.localRotation = Quaternion.Euler(0,angle.y, 0); 22 | } 23 | 24 | #if UNITY_EDITOR 25 | void OnDrawGizmos() 26 | { 27 | Gizmos.color = Color.grey; 28 | Vector3 from = Vector3.zero; 29 | Vector3 to = Vector3.zero; 30 | 31 | if (tip_Par != null && tip != null) 32 | { 33 | from = tip_Par.position; 34 | to = tip.position; 35 | } 36 | 37 | Gizmos.DrawLine(from, to); 38 | UnityEditor.Handles.DrawWireDisc(transform.position ,Vector3.up, amplitude); 39 | } 40 | #endif 41 | } 42 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/Epicycle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c803bea4ea62c46fcaef2d5d3b23e898 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/Epicycle.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 841d86cffa0be4ef1a0669b2c48ee77d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/Note.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/Note.jpg -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e964318f38dbc4ae48b5eeaec16228ff 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/QuadDraw.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41799b6fec8984decb1fc15ec6aceed2 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/QuadDraw.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6887d0d16e3844a719aa6a413cfae12c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/QuadDrawCS.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | RWTexture2D Result; 4 | int _Size; 5 | float2 _MousePos; 6 | 7 | [numthreads(8,8,1)] 8 | void CSMain (uint3 id : SV_DispatchThreadID) 9 | { 10 | //draw 11 | int2 newPixelID = _MousePos*_Size; 12 | 13 | //so that the brush is thicker 14 | float dist = distance(float2(id.xy),float2(newPixelID)); 15 | if(dist < 1.5f) Result[id.xy] = float4(0,1,1,1); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/QuadDrawCS.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87aa6bfcc8fc2475b8cf8300dd985b7d 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/defaultBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/02_StructuredBuffer/02_4_ComputePaintTexture_DFT/QuadDraw/defaultBlack.png -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 990a65cbcdaf0924eaf1a25ee4889cd9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel main 2 | 3 | struct Particle 4 | { 5 | float3 position; 6 | }; 7 | RWStructuredBuffer particleBuffer; //has to be same name with rendering shader 8 | 9 | [numthreads(32,1,1)] 10 | void main (uint3 id : SV_DispatchThreadID) 11 | { 12 | float3 pos = particleBuffer[id.x].position; 13 | 14 | float a = 0.01f; 15 | 16 | float3x3 m = { 17 | 1, 0, 0, 18 | 0, cos(a), -sin(a), 19 | 0, sin(a), cos(a) 20 | }; 21 | 22 | particleBuffer[id.x].position = mul( m , pos ); 23 | } 24 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81e915cba4ca8bb4984b06d2486e64ad 3 | ComputeShaderImporter: 4 | currentAPIMask: 0 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6587d14559e6d5340ae28679d9c3d4e0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ComputeParticlesDirect 11 | m_Shader: {fileID: 4800000, guid: b8f80cdb38bbaed4bbe7c80dbed1ad65, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: [] 26 | m_Ints: [] 27 | m_Floats: 28 | - _pSize: 5 29 | m_Colors: 30 | - _Color: {r: 0, g: 1, b: 1, a: 0.3} 31 | - _Color1: {r: 1, g: 0, b: 0.14010859, a: 1} 32 | - _Color2: {r: 0.22352937, g: 0.80284387, b: 0.8862745, a: 1} 33 | - _SpeedColor: {r: 1, g: 0, b: 0, a: 0.3} 34 | m_BuildTextureStacks: [] 35 | m_AllowLocking: 1 36 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14fdcb5b257cd4a47a74d061cd105303 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.shader: -------------------------------------------------------------------------------- 1 | Shader "ComputeParticlesDirect" 2 | { 3 | Properties 4 | { 5 | _Color1("_Color1", color) = (1,1,1,1) 6 | _Color2("_Color2", color) = (1,1,1,1) 7 | _pSize("Particle Size",Range(1,5)) = 2 //seems only work for Metal :( 8 | } 9 | 10 | SubShader 11 | { 12 | Pass 13 | { 14 | Blend SrcAlpha OneMinusSrcAlpha 15 | 16 | CGPROGRAM 17 | #pragma target 5.0 18 | #pragma vertex vert 19 | #pragma fragment frag 20 | #include "UnityCG.cginc" 21 | 22 | struct Particle 23 | { 24 | float3 position; 25 | }; 26 | StructuredBuffer particleBuffer; //has to be same name with compute shader 27 | 28 | struct v2f 29 | { 30 | float4 color : COLOR; 31 | float4 position : SV_POSITION; 32 | float pSize : PSIZE; 33 | }; 34 | 35 | float4 _Color1; 36 | float4 _Color2; 37 | float _pSize; 38 | 39 | v2f vert (uint id : SV_VertexID, uint inst : SV_InstanceID) 40 | { 41 | v2f o; 42 | 43 | float4 pos = float4(particleBuffer[inst].position, 1); 44 | 45 | float f = inst / 320000.0f; 46 | 47 | o.position = UnityObjectToClipPos (pos); 48 | o.color.rgb = lerp( _Color1 , _Color2 , f ); 49 | o.color.a = 1; 50 | o.pSize = _pSize; 51 | 52 | return o; 53 | } 54 | 55 | float4 frag (v2f IN) : SV_Target 56 | { 57 | return IN.color; 58 | } 59 | 60 | ENDCG 61 | 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8f80cdb38bbaed4bbe7c80dbed1ad65 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect_Builtin.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ComputeParticlesDirect_Builtin : MonoBehaviour 5 | { 6 | struct Particle 7 | { 8 | public Vector3 position; 9 | }; 10 | 11 | public int warpCount = 5; 12 | public Material material; 13 | public ComputeShader computeShader; 14 | 15 | private const int warpSize = 32; 16 | private ComputeBuffer particleBuffer; 17 | private int particleCount; 18 | private Particle[] plists; 19 | 20 | void Start () 21 | { 22 | particleCount = warpCount * warpSize; 23 | 24 | // Init particles 25 | plists = new Particle[particleCount]; 26 | for (int i = 0; i < particleCount; ++i) 27 | { 28 | plists[i].position = Random.insideUnitSphere * 4f; 29 | } 30 | 31 | //Set data to buffer 32 | particleBuffer = new ComputeBuffer(particleCount, 12); // 12 = sizeof(Particle) 33 | particleBuffer.SetData(plists); 34 | 35 | //Set buffer to computeShader and Material 36 | computeShader.SetBuffer(0, "particleBuffer", particleBuffer); 37 | material.SetBuffer ("particleBuffer", particleBuffer); 38 | } 39 | 40 | void Update () 41 | { 42 | computeShader.Dispatch(0, warpCount, 1, 1); 43 | } 44 | 45 | void OnRenderObject() 46 | { 47 | material.SetPass(0); 48 | Graphics.DrawProceduralNow(MeshTopology.Points,1,particleCount); 49 | } 50 | 51 | void OnDestroy() 52 | { 53 | particleBuffer.Release(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect_Builtin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acd61f8461b5bed42932feffb7dfdc1a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26e96c7f8de773149a63daba6577c3b7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/ComputeParticlesDirect_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 863b2f68887b9a84093c35a56fe40fd7 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_5_ComputeParticlesDirect/Feature_ComputeParticlesDirect.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21193e499324dd943bbecc030abdddb9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10714d9de67be2e4a81415e97740e47d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct Particle 4 | { 5 | float2 position; 6 | float direction; 7 | float intensity; 8 | float4 color; 9 | }; 10 | RWStructuredBuffer particleBuffer; //has to be same name with rendering shader 11 | Texture2D texRef; 12 | uint texSizeX; 13 | uint texSizeY; 14 | 15 | #define STEP 20 16 | #define THRESHOLD 0.3 17 | 18 | [numthreads(32,1,1)] 19 | void CSMain (uint3 id : SV_DispatchThreadID) 20 | { 21 | uint2 uv = particleBuffer[id.x].position * uint2(texSizeX,texSizeY); 22 | float angle = particleBuffer[id.x].direction; 23 | float2 dir = float2( cos(angle) , sin(angle) ); 24 | float intensity = 0; 25 | 26 | for(int i=0; i= texSizeX || nuv.y >= texSizeY) 30 | { 31 | break; 32 | } 33 | 34 | float4 col = texRef[nuv]; 35 | float f = 1.0 - (col.r+col.g+col.b)/3.0; 36 | 37 | intensity += f; 38 | } 39 | 40 | particleBuffer[id.x].intensity = intensity; 41 | particleBuffer[id.x].color = texRef[uv]; 42 | } 43 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 412c8d8399a07e74dbdd28e0310d0f4f 3 | ComputeShaderImporter: 4 | currentAPIMask: 0 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b532f517ea0938b4cb13fab46bb89dc1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ComputeSketch 11 | m_Shader: {fileID: 4800000, guid: c3f3fc45562447e43bd17dec705aac0a, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BrushTex: 27 | m_Texture: {fileID: 2800000, guid: 73dae73d48966b9438b017e033589ca6, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _Star: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | m_Ints: [] 39 | m_Floats: 40 | - _MaxSize: 1.51 41 | - _Rotation: 0 42 | - _SampleDistance: 0.02 43 | - _Size: 0.092 44 | - _SizeX: 0.0174 45 | - _SizeY: 0.054 46 | - _Threshold: 1 47 | m_Colors: 48 | - _Color: {r: 1, g: 1, b: 1, a: 0.46666667} 49 | m_BuildTextureStacks: [] 50 | m_AllowLocking: 1 51 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c04653656eba3ba45ad42b40f40b508a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3f3fc45562447e43bd17dec705aac0a 3 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/ComputeSketch.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0737bc43d8499944db62e5096b9dfc96 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58a73b53dbc39d94d8cec32ea45dda07 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/RenderObjectsRT.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: RenderObjectsRT 10 | m_ImageContentsHash: 11 | serializedVersion: 2 12 | Hash: 00000000000000000000000000000000 13 | m_IsAlphaChannelOptional: 0 14 | serializedVersion: 6 15 | m_Width: 1024 16 | m_Height: 1024 17 | m_AntiAliasing: 1 18 | m_MipCount: -1 19 | m_DepthStencilFormat: 94 20 | m_ColorFormat: 8 21 | m_MipMap: 0 22 | m_GenerateMips: 1 23 | m_SRGB: 0 24 | m_UseDynamicScale: 0 25 | m_UseDynamicScaleExplicit: 0 26 | m_BindMS: 0 27 | m_EnableCompatibleFormat: 1 28 | m_EnableRandomWrite: 0 29 | m_TextureSettings: 30 | serializedVersion: 2 31 | m_FilterMode: 1 32 | m_Aniso: 0 33 | m_MipBias: 0 34 | m_WrapU: 1 35 | m_WrapV: 1 36 | m_WrapW: 1 37 | m_Dimension: 2 38 | m_VolumeDepth: 1 39 | m_ShadowSamplingMode: 2 40 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/RenderObjectsRT.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 051dd7f1b5c289e4189684936760d096 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 8400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/brush1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/02_StructuredBuffer/02_6_ComputeSketch/brush1.png -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_6_ComputeSketch/brush2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/02_StructuredBuffer/02_6_ComputeSketch/brush2.png -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48dd5b8eaf7956245a2f6b221a1b8d32 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dae34e743126f74ba16ee9e7e60e6ac 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/Postprocessing.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4db935c10a8239444a7c696386d17c83 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ShimmerSphere : MonoBehaviour 6 | { 7 | public Transform sphereParent; 8 | public Transform quad; 9 | public Material mat; 10 | 11 | //The same struct in Shader 12 | struct myObjectStruct 13 | { 14 | public Vector3 objPosition; 15 | public float objSize; 16 | }; 17 | 18 | private ComputeBuffer _computeBuffer; 19 | private myObjectStruct[] _mos; 20 | private static int _noOfObj; 21 | private Transform[] _myObjects; 22 | 23 | void Start () 24 | { 25 | _myObjects = sphereParent.GetComponentsInChildren(); 26 | _noOfObj = _myObjects.Length; 27 | _mos = new myObjectStruct[_noOfObj]; 28 | _computeBuffer = new ComputeBuffer(_noOfObj,16); //(4)*4bytes in myObjectStruct 29 | mat.SetBuffer("myObjectBuffer", _computeBuffer); 30 | 31 | Debug.Log("Number of objects: " + _noOfObj); 32 | } 33 | 34 | void Update () 35 | { 36 | mat.SetVector("objectCenter", quad.position); 37 | for (int i = 0; i < _noOfObj; i++) 38 | { 39 | _mos[i].objPosition = _myObjects[i].position; 40 | _mos[i].objSize = _myObjects[i].lossyScale.x; 41 | } 42 | _computeBuffer.SetData(_mos); 43 | } 44 | 45 | void OnDestroy() 46 | { 47 | _computeBuffer.Release(); 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83535e07e4f737144a138e19ee490bb6 3 | timeCreated: 1494938569 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ShimmerSphere 11 | m_Shader: {fileID: 4800000, guid: 1974fe074e4b6a74e986aaa391444fad, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 2d88e62a55a648f4eb2e78caa83e4cf9, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Ints: [] 31 | m_Floats: 32 | - _CoverPower: 1 33 | - _DepthDistance: -0.003 34 | - _Distance: 1 35 | - _DstBlend: 10 36 | - _EmissionDistance: -0.0028 37 | - _SrcBlend: 5 38 | - _ZTest: 8 39 | m_Colors: 40 | - _Color: {r: 1.9367496, g: 2.323212, b: 3.0871496, a: 1} 41 | - _EmissionColor: {r: 1, g: 0, b: 0, a: 1} 42 | m_BuildTextureStacks: [] 43 | m_AllowLocking: 1 44 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ab9b94a2c565b54fbdd22d78cc0b48f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1974fe074e4b6a74e986aaa391444fad 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/ShimmerSphere_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d30c72ffe5eaf5849a07028ef81bc62e 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92499eb34fee9324c81213a1d3a4a57b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/SphereMovement.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class SphereMovement : MonoBehaviour 6 | { 7 | public float moveTowardsCenter = 8f; 8 | private float originalSize; 9 | private float speed; 10 | private Vector3 originalPosition; 11 | private Vector3 directionToCenter; 12 | 13 | void Start() 14 | { 15 | speed = Random.Range(0.5f, 3f); 16 | originalSize = transform.localScale.x; 17 | originalPosition = transform.localPosition; 18 | directionToCenter = (Vector3.zero - originalPosition).normalized; 19 | } 20 | 21 | void FixedUpdate() 22 | { 23 | transform.localPosition = originalPosition + directionToCenter * (Mathf.Sin(Time.time * speed) * moveTowardsCenter); 24 | float wavingScale = (originalSize * (1f + Mathf.Sin(Time.time * speed) * 0.1f)); 25 | transform.localScale = Vector3.one * Mathf.Lerp(wavingScale * 0.5f , wavingScale, transform.localPosition.magnitude); 26 | transform.Rotate(Vector3.up, Time.deltaTime * speed* 50f); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/SphereMovement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7c079c9bfde7da4a9932be3f3fb4826 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/02_7_ShimmerSphere/noise3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/02_StructuredBuffer/02_7_ShimmerSphere/noise3.png -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic (02_1): CPU send data -> shader takes the data for rendering 2 | Traffic (other): CPU instructs -> GPU writes the data -> shader takes the data for rendering 3 | 4 | Instead of textures (which you can see it as an array of pixels values), it can be structured buffers (an array of custom set of values). -------------------------------------------------------------------------------- /Assets/02_StructuredBuffer/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5385aa745b7033438276340598ed08b 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bca56492b1ab6f41a337ce702e1d947 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f074a1dce6909470ea009d7a7e128a68 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute/StructuredBufferWithCompute.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel main 2 | 3 | struct Particle 4 | { 5 | float3 position; 6 | }; 7 | 8 | RWStructuredBuffer particleBuffer; 9 | 10 | [numthreads(32,1,1)] 11 | void main (uint3 id : SV_DispatchThreadID) 12 | { 13 | float spacingFactor = 0.5f; 14 | particleBuffer[id.x].position.x = particleBuffer[0].position.x + id.x * spacingFactor; 15 | 16 | float y = particleBuffer[id.x].position.y; 17 | y += sin(particleBuffer[id.x].position.x + y)*0.005f; 18 | 19 | particleBuffer[id.x].position.y = y; 20 | 21 | } -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute/StructuredBufferWithCompute.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fb68bc3ad2a98e419723128d7056cae 3 | ComputeShaderImporter: 4 | currentAPIMask: 0 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute/StructuredBufferWithCompute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 113d9c4ba2e696240a35d703bc183150 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute/StructuredBufferWithCompute_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8b6f78c8fdef504da7f244d1be2a9ac 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_1_StructuredBufferWithCompute/StructuredBufferWithCompute_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: daecd565e54524cccadba35f2ee5a110 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4c290f65303170448f3d3db5be6f96d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback/AsyncGPUReadbackTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed47bd43f5a679e498aca9e88a3b8563 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback/AsyncGPUReadbackTest.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fce824dea0a39c4a86c0d5b9e6606e9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback/AsyncGPUReadbackTest_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d71fba87391e324aa4e7aec5e34c051 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback/AsyncGPUReadbackTest_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 242c1865f5f2b744ca664fe17a05329e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_2_AsyncGPUReadback/AsyncGPUReadbackTest_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60e908919e0b24a7caad62786eb94915 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_3_AsyncGPUReadbackTex.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc9ef8d73a455447c9fcc8ec9d71d7e2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_3_AsyncGPUReadbackTex/AsyncGPUReadbackTex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62dfcda3e59b345d993956552d75fcf0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_3_AsyncGPUReadbackTex/AsyncGPUReadbackTex.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be2e0450091804ae6bf5ee664098f901 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_3_AsyncGPUReadbackTex/AsyncGPUReadbackTex.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95d7e59c232c643a4b03b5b4ea1eb63e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7a9ed78381326d409edf297b6c9d60f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/AsyncGPUReadbackMesh.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | RWStructuredBuffer vertexBuffer; 4 | 5 | float _Time; 6 | //uint _VertexCount; 7 | 8 | [numthreads(32,1,1)] 9 | void CSMain (uint3 id : SV_DispatchThreadID) 10 | { 11 | //Shortcut 12 | float3 pos = vertexBuffer[id.x]; 13 | 14 | //distance to center factor 15 | float dist = 6.0f-distance(pos.xz,float2(0,0)); 16 | 17 | pos.y = sin(_Time*2.0f + dist)*0.25f; 18 | //if(pos.y <0) pos.y *= 2.0f; 19 | 20 | //Assign back 21 | vertexBuffer[id.x].y = pos.y; 22 | } -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/AsyncGPUReadbackMesh.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8238a1bcddd020646932ab004c57deea 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/AsyncGPUReadbackMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c61ace1e9a83fd74a8829573874309a6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/AsyncGPUReadbackMesh_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12d43617bbeec424385cbb80e79dc3db 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/AsyncGPUReadbackMesh_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00225e31ec3d70b4b84d11b2e26949ed 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a10df3d576008a545844bac81bd3b871 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/Plane_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8fb710f8d59a3b4a8f0909dc70f1e6c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01a90afb4a5a956418a5b6b3f86e2576 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_4_AsyncGPUReadbackMesh/Sphere_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b05a9327a12cd6342a07b8cdf793a02e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e6da0635ec82dd4d83b6c588bdcd872 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI/AsyncGPUReadbackMesh_NewMeshAPI.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct VertexData 4 | { 5 | float3 pos; 6 | float3 nor; 7 | float2 uv; 8 | }; 9 | 10 | RWStructuredBuffer vertexBuffer; 11 | 12 | float _Time; 13 | //uint _VertexCount; 14 | 15 | [numthreads(32,1,1)] 16 | void CSMain (uint3 id : SV_DispatchThreadID) 17 | { 18 | //Shortcut 19 | float3 pos = vertexBuffer[id.x].pos; 20 | 21 | //distance to center factor 22 | float dist = 6.0f-distance(pos.xz,float2(0,0)); 23 | 24 | pos.y = sin(_Time*2.0f + dist)*0.25f; 25 | //if(pos.y <0) pos.y *= 2.0f; 26 | 27 | //Assign back 28 | vertexBuffer[id.x].pos.y = pos.y; 29 | } -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI/AsyncGPUReadbackMesh_NewMeshAPI.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1901fe3279b3f145a4569e089e31822 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI/AsyncGPUReadbackMesh_NewMeshAPI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7a67a3a8e46c254ca5790a0591581a6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI/AsyncGPUReadbackMesh_NewMeshAPI_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 706a906aaa3f7d84487a4b258545ddf6 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_5_AsyncGPUReadbackMesh_NewMeshAPI/AsyncGPUReadbackMesh_NewMeshAPI_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3c96eb219a2eec4bbf5d7453836300a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f0b3219912f3924b8d8644486dfa65c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage/New Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43cc03dd77d176f4c9055226bceadda8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage/PixelPercentage.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel KernelDraw 2 | #pragma kernel KernelPercentage 3 | 4 | RWTexture2D Result; 5 | Texture2D ResultForPercentage; 6 | 7 | float2 _MousePos; 8 | int _MouseMode; 9 | 10 | struct PixelPercentageData 11 | { 12 | uint filledCount; 13 | uint processedCount; 14 | }; 15 | RWStructuredBuffer data; 16 | 17 | [numthreads(8,8,1)] 18 | void KernelDraw (uint3 id : SV_DispatchThreadID) 19 | { 20 | int2 newPixelID = _MousePos; 21 | float dist = distance(float2(id.xy),float2(newPixelID)); 22 | if(dist < 5.0f) 23 | { 24 | if( _MouseMode == 0) //Draw 25 | { 26 | Result[id.xy] = float4(1,1,1,1); 27 | } 28 | else if( _MouseMode == 1) //Erase 29 | { 30 | Result[id.xy] = float4(0,0,0,1); 31 | } 32 | } 33 | } 34 | 35 | [numthreads(8,8,1)] 36 | void KernelPercentage (uint3 id : SV_DispatchThreadID) 37 | { 38 | float4 col = ResultForPercentage[id.xy]; 39 | if(col.r >= 1) 40 | { 41 | InterlockedAdd(data[0].filledCount,1); //Interlocked prevents race condition 42 | } 43 | InterlockedAdd(data[0].processedCount,1); 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage/PixelPercentage.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe5d3aff13f09b74088b12faf078f652 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage/PixelPercentage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c073a541f68afa342a4a0cad4988564b 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_6_PixelPercentage/PixelPercentage.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7e89e479f8eede4794b4683309282cd 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ff529fc008d5ca4a8508f44dfcf23c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/ColorPalette.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7ac118f701d0943a8159695915440f 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/ColorPalette.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a85e4f24a8aa16b4da224e18e8cf3375 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/ColorPalette.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f02be7350ed817048a3dd3b41c0c33ec 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/ColorPalette.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f78974875a81ef4abafa7a19acd31dd 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/Grid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d42dddf47cffa2a47af9d21ab20b4c1d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/Original.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d335532d6a987f0478f18b077975b318 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/Result.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b77812cd8bcc6643802eb3bf89f6538 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/03_7_ColorPalette/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/03_GPU_to_CPU/03_7_ColorPalette/pic.png -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic: CPU instructs -> GPU writes the data -> CPU take the data for doing other stuff 2 | 3 | Instead of textures (which you can see it as an array of pixels values), it can be structured buffers (an array of custom set of values). 4 | 5 | 6 | -------------------------------------------------------------------------------- /Assets/03_GPU_to_CPU/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46fa16c9b0771784da7abf87aff58038 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/04_Indirect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3087aaf36d609b242ae64b5cd01e6753 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_1_IndirectCompute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1898e440696e39f41a2e613c41203004 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_1_IndirectCompute/IndirectCompute.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMainDirect 2 | #pragma kernel CSMainIndirect 3 | 4 | AppendStructuredBuffer pointBufferOutput; //Filtered data 5 | RWStructuredBuffer pointBuffer; //Result data 6 | float _Filter; 7 | float _Time; 8 | 9 | [numthreads(1,1,1)] 10 | void CSMainDirect(uint3 id : SV_DispatchThreadID) //Doing Filter 11 | { 12 | if ((int)id.x < _Filter) 13 | { 14 | pointBufferOutput.Append(100); //id.x 15 | } 16 | } 17 | 18 | [numthreads(1, 1, 1)] 19 | void CSMainIndirect(uint3 id : SV_DispatchThreadID) //Called by Indirect 20 | { 21 | pointBuffer[id.x] += _Time; 22 | } 23 | 24 | 25 | //======================old stuff 26 | //ByteAddressBuffer InputCountBuffer; 27 | //Structure count at 0 address 28 | //uint cnt = InputCountBuffer.Load(0); -------------------------------------------------------------------------------- /Assets/04_Indirect/04_1_IndirectCompute/IndirectCompute.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d191706da837ab748920b2c9d7153ac5 3 | timeCreated: 1485031816 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentAPIMask: 4 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_1_IndirectCompute/IndirectCompute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8017da76de02e2a41a3656a2de7e854a 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_1_IndirectCompute/IndirectCompute.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9252618d4c859429bb078dc64994a59d 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea6f231e02e19394abcf027f056d5d8d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel main1 2 | 3 | struct Particle 4 | { 5 | float3 position; 6 | uint idx; 7 | float4 color; 8 | }; 9 | AppendStructuredBuffer particleFiltered; //Filtered index 10 | RWStructuredBuffer particleBuffer; //has to be same name with rendering shader 11 | float _Time; 12 | 13 | float3 myrotate(float3 pos, float a) 14 | { 15 | float3x3 m = { 16 | 1, 0, 0, 17 | 0, cos(a), -sin(a), 18 | 0, sin(a), cos(a) 19 | }; 20 | 21 | return mul( m , pos ); 22 | } 23 | 24 | [numthreads(1,1,1)] 25 | void main1 (uint3 id : SV_DispatchThreadID) 26 | { 27 | //take the actual particle id in array 28 | uint idx = particleBuffer[id.x].idx; 29 | 30 | //Move the particles 31 | float3 pos = particleBuffer[idx].position; 32 | pos = myrotate(pos,0.01f); 33 | particleBuffer[idx].position = pos; 34 | 35 | //Moving filter 36 | float f = sin(_Time)*4; 37 | 38 | //only want the filtered ones 39 | if (pos.x <= f) 40 | { 41 | particleFiltered.Append(idx); 42 | } 43 | } -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 907c6626b2b284f55a14caacd1163ff7 3 | ComputeShaderImporter: 4 | currentAPIMask: 0 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf89ad4b4108042e389641b6d3bd6261 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ComputeParticlesIndirect 11 | m_Shader: {fileID: 4800000, guid: e2771bfb1191542d0b55a580654e35ff, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: [] 26 | m_Ints: [] 27 | m_Floats: 28 | - _pSize: 5 29 | m_Colors: 30 | - _Color: {r: 0, g: 1, b: 1, a: 0.3} 31 | - _Color1: {r: 1, g: 0, b: 0.14010859, a: 1} 32 | - _Color2: {r: 0.22352937, g: 0.80284387, b: 0.8862745, a: 1} 33 | - _SpeedColor: {r: 1, g: 0, b: 0, a: 0.3} 34 | m_BuildTextureStacks: [] 35 | m_AllowLocking: 1 36 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd40caeb3a28f3741b107c5178593669 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.shader: -------------------------------------------------------------------------------- 1 | Shader "ComputeParticlesIndirect" 2 | { 3 | Properties 4 | { 5 | _pSize("Particle Size",Range(1,5)) = 2 //seems only work for Metal :( 6 | } 7 | 8 | SubShader 9 | { 10 | Pass 11 | { 12 | Blend SrcAlpha OneMinusSrcAlpha 13 | 14 | CGPROGRAM 15 | #pragma target 5.0 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | #include "UnityCG.cginc" 19 | 20 | struct Particle 21 | { 22 | float3 position; 23 | uint idx; 24 | float4 color; 25 | }; 26 | StructuredBuffer particleBuffer; //has to be same name with compute shader 27 | StructuredBuffer particleResult; //has to be same name with compute shader 28 | 29 | struct v2f 30 | { 31 | float4 color : COLOR; 32 | float4 position : SV_POSITION; 33 | float pSize : PSIZE; 34 | }; 35 | 36 | float _pSize; 37 | 38 | v2f vert (uint inst : SV_InstanceID) 39 | { 40 | v2f o; 41 | 42 | uint id = particleResult[inst]; 43 | 44 | float4 pos = float4(particleBuffer[id].position, 1); 45 | o.position = UnityObjectToClipPos (pos); 46 | o.color.rgb = particleBuffer[id].color.rgb; 47 | o.color.a = 1; 48 | o.pSize = _pSize; 49 | 50 | return o; 51 | } 52 | 53 | float4 frag (v2f IN) : SV_Target 54 | { 55 | return IN.color; 56 | } 57 | 58 | ENDCG 59 | 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2771bfb1191542d0b55a580654e35ff 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_2_ComputeParticlesIndirect/ComputeParticlesIndirect.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d7b6fbe1c7b0ae41b11aefa59d49916 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_3_ComputeParticlesIndirect_VFX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e305cd2a9fed3f48b3d16a2aaa55bb5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_3_ComputeParticlesIndirect_VFX/ComputeParticlesIndirect_VFX.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0f10587399da0e4ab6d32b98d70317d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_3_ComputeParticlesIndirect_VFX/ComputeParticlesIndirect_VFX.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce7f609e7cb2497448e77a84fbc627f5 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_3_ComputeParticlesIndirect_VFX/ComputeParticlesIndirect_VFX.vfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abc1f41527e618b4d8accab009c5c5af 3 | VisualEffectImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de5c41947aa73bf4d9426aaaa68746e3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f15752b057354e4fb16ae70c98a7640 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: 6 | - ds: {fileID: 2800000, guid: b47ee867b2bd6754ab8b6840c7f312f6, type: 1} 7 | - cs: {fileID: 7200000, guid: 7853baba9cd678d4a8fca0ea08928b9d, type: 1} 8 | - rtout0: {instanceID: 0} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42d49d658806a284aaa75026dd16dd65 3 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect_Builtin.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: DrawIndirect_Builtin 11 | m_Shader: {fileID: 4800000, guid: 42d49d658806a284aaa75026dd16dd65, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 1 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: 3000 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BlitTexture: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _Sprite: 35 | m_Texture: {fileID: 2800000, guid: 88349cfbeb03cd04082f6f4786e9e35f, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _Star: 39 | m_Texture: {fileID: 2800000, guid: 132c3f39f185e9745a2e965503d3862a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | m_Ints: [] 43 | m_Floats: 44 | - _MaxSize: 0.29 45 | - _Rotation: 0.36 46 | - _SampleDistance: 0 47 | - _Size: 0.115 48 | - _Threshold: 5.4 49 | m_Colors: 50 | - _Color: {r: 0.27843142, g: 0.3711969, b: 0.94509804, a: 1} 51 | - _Rotation: {r: 1, g: 0, b: 1, a: 0} 52 | - _Up: {r: 1, g: 0, b: 0, a: 0.1} 53 | m_BuildTextureStacks: [] 54 | m_AllowLocking: 1 55 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect_Builtin.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8cc792199490254496f13a5c81c1ce9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect_URP.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: DrawIndirect_URP 11 | m_Shader: {fileID: 4800000, guid: 42d49d658806a284aaa75026dd16dd65, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 1 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: 3000 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BlitTexture: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _MainTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _Sprite: 35 | m_Texture: {fileID: 2800000, guid: 88349cfbeb03cd04082f6f4786e9e35f, type: 3} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _Star: 39 | m_Texture: {fileID: 2800000, guid: 132c3f39f185e9745a2e965503d3862a, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | m_Ints: [] 43 | m_Floats: 44 | - _MaxSize: 0.119 45 | - _Rotation: 0.411 46 | - _SampleDistance: 0 47 | - _Size: 0.036 48 | - _Threshold: 23 49 | m_Colors: 50 | - _Color: {r: 0.27843142, g: 0.3711969, b: 0.94509804, a: 1} 51 | - _Rotation: {r: 1, g: 0, b: 1, a: 0} 52 | - _Up: {r: 1, g: 0, b: 0, a: 0.1} 53 | m_BuildTextureStacks: [] 54 | m_AllowLocking: 1 55 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/DrawIndirect_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 088c80d8e606a724daeba427a0900942 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/IndirectReflectedStar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ab32bb8002ed2149bce226a6aceca10 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/IndirectReflectedStar_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d71a7b16266eace49a9e447a41bcc685 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/IndirectReflectedStar_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04f2d743f4a47564db46164bb9b1dae5 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/ScrollingUV.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class ScrollingUV : MonoBehaviour 4 | { 5 | public Vector2 speed; 6 | public Material material; 7 | public string propname = "_BaseMap"; 8 | 9 | private Vector2 _uvOffset = Vector2.zero; 10 | private float _timeIterator = 0; 11 | 12 | void Update() 13 | { 14 | _uvOffset.x += speed.x * Time.deltaTime; 15 | _uvOffset.y += speed.y * Mathf.Sin(_timeIterator) * Time.deltaTime; 16 | material.SetTextureOffset(propname,_uvOffset); 17 | 18 | _timeIterator += Time.deltaTime; 19 | _timeIterator = Mathf.Repeat(_timeIterator, 2f*Mathf.PI); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/ScrollingUV.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 606716dd5fb6d5b44ad3b68e7e72ccdf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ff925ee3f3fe9f46ad1672c64edbbc2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/SphereSun.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9562bf72791483419938119c4f0219d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/SphereSun_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fca7094bcb735247be6a7c49f489215 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/Sphere_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c828ec9f6ab9bd4792bbac5ad25ac4c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/UniversalRenderPipelineAsset_IndirectReflectedStar.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 976d2629bd4a767429dee2fe998a2e60 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/material_plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 74693b8afc062ca44a5edda8b6e7228d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/material_plane_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d28cfc695ce11046957945d1bcb29c4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/04_Indirect/04_4_IndirectReflectedStar/noise.png -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/noiseNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/04_Indirect/04_4_IndirectReflectedStar/noiseNormal.png -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/star1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/04_Indirect/04_4_IndirectReflectedStar/star1.png -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/star2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/04_Indirect/04_4_IndirectReflectedStar/star2.png -------------------------------------------------------------------------------- /Assets/04_Indirect/04_4_IndirectReflectedStar/star3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/04_Indirect/04_4_IndirectReflectedStar/star3.png -------------------------------------------------------------------------------- /Assets/04_Indirect/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic: CPU instructs (tell what maximum workload is) -> GPU filters the work based on some conditions -> GPU perform only on the filtered work -> Shader takes the data for rendering 2 | 3 | This way the data never need to go back to CPU, and GPU doesn't always need to do expensive maths on all of the data, so it's fast. -------------------------------------------------------------------------------- /Assets/04_Indirect/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfeb87b68497ed44d98e5faef433d302 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3817fe9b9dfcc944b53eb56121faa5d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8596577ccf8b7054c812ad061e6b288a 3 | folderAsset: yes 4 | timeCreated: 1497617726 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class UAVInShader : MonoBehaviour 5 | { 6 | public Material mat; 7 | public TextMesh text; 8 | 9 | private int targetID = 6; //match with shader "register(u6)" 10 | private ComputeBuffer fieldbuf; 11 | private float[] fdata = new float[3]; 12 | 13 | void OnEnable() 14 | { 15 | Setup(); 16 | } 17 | 18 | void OnDisable() 19 | { 20 | Graphics.ClearRandomWriteTargets(); //this prevent crash 21 | if (fieldbuf != null) 22 | { 23 | fieldbuf.Release(); 24 | fieldbuf.Dispose(); 25 | fieldbuf = null; 26 | } 27 | } 28 | 29 | void Setup() 30 | { 31 | if (fieldbuf == null) 32 | { 33 | fieldbuf = new ComputeBuffer(3, sizeof(float), ComputeBufferType.Default); 34 | } 35 | } 36 | 37 | void OnRenderObject() 38 | { 39 | Graphics.ClearRandomWriteTargets(); 40 | Setup(); 41 | mat.SetPass(0); 42 | mat.SetBuffer("Field", fieldbuf); 43 | Graphics.SetRandomWriteTarget(targetID, fieldbuf); 44 | 45 | fieldbuf.GetData(fdata); 46 | text.text = "From shader, the RGB value of rainbow color \n"; 47 | for (int i = 0; i < fdata.Length; i++) 48 | { 49 | text.text += i + ": " + fdata[i] + "\n"; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37178fda717a86843a1d487625700ffc 3 | timeCreated: 1462997485 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d723e64b88c6edc43897d564cae036d8 3 | timeCreated: 1497617961 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.shader: -------------------------------------------------------------------------------- 1 | Shader "UAVTest/VertFrag" 2 | { 3 | Properties 4 | { 5 | _MainTex("_MainTex (RGBA)", 2D) = "white" {} 6 | _Speed("_Speed",Range(0,0.5)) = 0.5 7 | } 8 | SubShader 9 | { 10 | Tags{ "RenderType" = "Opaque" } 11 | 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | #pragma target 5.0 18 | 19 | #include "UnityCG.cginc" 20 | 21 | struct appdata 22 | { 23 | float4 vertex : POSITION; 24 | float2 uv : TEXCOORD0; 25 | }; 26 | 27 | struct v2f 28 | { 29 | float2 uv : TEXCOORD0; 30 | float4 vertex : SV_POSITION; 31 | }; 32 | 33 | sampler2D _MainTex; 34 | float4 _MainTex_ST; 35 | 36 | float _Speed; 37 | 38 | #ifdef UNITY_COMPILER_HLSL 39 | RWStructuredBuffer Field : register(u6); //match with C# script "targetID" 40 | #endif 41 | 42 | v2f vert(appdata v) 43 | { 44 | v2f o; 45 | o.vertex = UnityObjectToClipPos(v.vertex); 46 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 47 | 48 | return o; 49 | } 50 | 51 | fixed4 frag(v2f i) : SV_Target 52 | { 53 | //Rainbow color 54 | float3 c; 55 | c.r = frac(sin(_Time.x*_Speed)); 56 | c.g = frac(sin(_Time.z*_Speed)); 57 | c.b = frac(sin(_Time.w*_Speed)); 58 | 59 | #ifdef UNITY_COMPILER_HLSL 60 | Field[0] = c.r; 61 | Field[1] = c.g; 62 | Field[2] = c.b; 63 | #endif 64 | 65 | float4 col = tex2D(_MainTex, i.uv); 66 | col.rgb *= c; 67 | return col; 68 | } 69 | ENDCG 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 414f9fd6d487b8841a35ffa5e3fe7f84 3 | timeCreated: 1462997492 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_1_UAVInShader/UAVInShader.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1fd244de4303924f9bfcd55058b72aa 3 | timeCreated: 1497618072 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b00d9aec7cd642a4e9501f298906f699 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/BindUAVTexRenderGraphFeature.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f78d623ba618a1c4ca2337ca3e48266f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/Quad.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbff5f25200139c4b8f467c3553f498c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/Quad.shader: -------------------------------------------------------------------------------- 1 | Shader "05_2_ShaderBakeToTexture/Quad" 2 | { 3 | Properties 4 | { 5 | } 6 | SubShader 7 | { 8 | Tags { "RenderType"="Opaque" } 9 | 10 | Pass 11 | { 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #pragma target 4.5 //UAV needs 4.5+ 16 | 17 | #include "UnityCG.cginc" 18 | 19 | struct appdata 20 | { 21 | float4 vertex : POSITION; 22 | float2 uv : TEXCOORD0; 23 | }; 24 | 25 | struct v2f 26 | { 27 | float2 uv : TEXCOORD0; 28 | float4 vertex : SV_POSITION; 29 | }; 30 | 31 | RWTexture2D Result : register(u6); //match with C# script "targetID" 32 | uint _Size; 33 | 34 | v2f vert (appdata v) 35 | { 36 | v2f o; 37 | o.vertex = UnityObjectToClipPos(v.vertex); 38 | o.uv = v.uv; 39 | return o; 40 | } 41 | 42 | fixed4 frag (v2f i) : SV_Target 43 | { 44 | float2 id = float2(i.uv * _Size); 45 | float4 col = Result[id.xy]; 46 | return col; 47 | } 48 | ENDCG 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/Quad.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ee4484d64b029f41a9133219d5a381a 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ResultSphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88cb4a7ac316fc5488831f96280f5516 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ResultSphereRotate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class ResultSphereRotate : MonoBehaviour 4 | { 5 | public float speed = 1.0f; 6 | 7 | void FixedUpdate() 8 | { 9 | transform.Rotate(Vector3.up, speed); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ResultSphereRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 230d0878ae94daa4ebf0e8bc558a5785 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ShaderBakeToTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dca924618e6b8ce4d91eddd48ac99bf7 3 | timeCreated: 1485035677 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ShaderBakeToTextureRenderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcc6adcb5ce0b2040807e2c48ebc10c1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/ShaderBakeToTexture_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc372576688b5554fbfc6501332eb540 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f431ba0399fb7314e935c54cf10d667b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/05_2_ShaderBakeToTexture/Sphere_URP.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca45ca10de2b3f246b3439c83b26da79 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic: CPU instructs -> Shader does rendering also writes the data -> CPU reads the data for doing other stuff 2 | 3 | Not only compute shaders let CPU to read it's data, normal shader can also do that. 4 | If you use SRP, you can use the ShaderDebugPrint feature. I have a sample here: https://github.com/cinight/CustomSRP/tree/master/Assets/SRP0406_ShaderDebugPrint 5 | 6 | -------------------------------------------------------------------------------- /Assets/05_Shader_to_CPU/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76f026cfd68633b46a05b9e0f5e772fd 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49015072d43183a40895fac98811e57b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 683851916ab78b74e8b9b61a2a648cca 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct VertexData 4 | { 5 | uint id; 6 | float4 pos; 7 | float3 nor; 8 | float2 uv; 9 | float4 col; 10 | 11 | float4 opos; 12 | float3 velocity; 13 | }; 14 | 15 | RWStructuredBuffer vertexBuffer; 16 | float _Time; 17 | uint _VertexCount; 18 | 19 | [numthreads(1,1,1)] 20 | void CSMain (uint3 id : SV_DispatchThreadID) 21 | { 22 | //Real id 23 | uint rid = vertexBuffer[id.x].id; 24 | 25 | //Prev / next id 26 | uint rid_prev = rid - 1; if(rid_prev < 0) rid_prev = _VertexCount-1; 27 | uint rid_next = rid + 1; if(rid_prev >= _VertexCount) rid_next = 0; 28 | 29 | //Positions for knowing which is the first vertex 30 | float4 pos0 = vertexBuffer[0].pos; 31 | float4 pos = vertexBuffer[rid].pos; 32 | float dist = distance(pos,pos0); 33 | 34 | //color animation 35 | if(rid == 0 || dist < 0.01f) 36 | { 37 | //Rainbow color for the first vertex 38 | float3 c; 39 | c.r = frac(sin(_Time + vertexBuffer[rid].velocity.x)); 40 | c.g = frac(sin(_Time + vertexBuffer[rid].velocity.y)); 41 | c.b = frac(sin(_Time + vertexBuffer[rid].velocity.z)); 42 | 43 | vertexBuffer[rid].col = float4(c,1); 44 | } 45 | else 46 | { 47 | vertexBuffer[rid].col = vertexBuffer[rid_prev].col; 48 | } 49 | 50 | //Vertex animation 51 | vertexBuffer[rid].pos.xz = vertexBuffer[rid].opos.xz * (1 + sin(_Time + vertexBuffer[rid].opos.y * 3.0f) * 0.3f); 52 | } -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6030de18e28290f45910dc7da616dfb6 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2e55ba9f19dc464ab9316449d6f6b70 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ComputeVertex 11 | m_Shader: {fileID: 4800000, guid: 1023dac58a20c324c8ccd75ec6289c96, type: 3} 12 | m_ShaderKeywords: USEDISCARD_ON 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _MainTex: 23 | m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | m_Floats: 27 | - UseDiscard: 1 28 | - _CullMode: 2 29 | - _Length: 1 30 | - _Steps: 1 31 | - _TessEdge: 2 32 | - _VDist: 0.1 33 | - _WireThickness: 414 34 | m_Colors: 35 | - _Color: {r: 1, g: 1, b: 1, a: 1} 36 | - _FillColor: {r: 1, g: 1, b: 1, a: 1} 37 | - _LineColor: {r: 1, g: 0, b: 0, a: 1} 38 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 202501e7c49cd394f831b9a6549c3a88 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.shader: -------------------------------------------------------------------------------- 1 | Shader "ComputeVertex" 2 | { 3 | Properties 4 | { 5 | _MainTex ("_MainTex (RGBA)", 2D) = "white" {} 6 | _Color ("_Color", Color) = (1,1,1,1) 7 | } 8 | SubShader 9 | { 10 | Pass 11 | { 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | 16 | #include "UnityCG.cginc" 17 | 18 | // Same with the one with compute shader & C# script 19 | struct vertexData 20 | { 21 | uint id; 22 | float4 pos; 23 | float3 nor; 24 | float2 uv; 25 | float4 col; 26 | 27 | float4 opos; 28 | float3 velocity; 29 | }; 30 | StructuredBuffer vertexBuffer; 31 | 32 | struct v2f 33 | { 34 | float4 vertex : SV_POSITION; 35 | float2 uv : TEXCOORD0; 36 | fixed4 color : COLOR; 37 | }; 38 | 39 | sampler2D _MainTex; 40 | float4 _MainTex_ST; 41 | float4 _Color; 42 | 43 | v2f vert (uint id : SV_VertexID) 44 | { 45 | v2f o; 46 | 47 | uint realid = vertexBuffer[id].id; 48 | 49 | o.vertex = UnityObjectToClipPos(vertexBuffer[realid].pos); 50 | o.uv = TRANSFORM_TEX(vertexBuffer[realid].uv, _MainTex); 51 | o.color = vertexBuffer[realid].col; 52 | return o; 53 | } 54 | 55 | fixed4 frag (v2f i) : SV_Target 56 | { 57 | fixed4 col = tex2D(_MainTex, i.uv); 58 | col.rgb *= i.color.rgb; 59 | return col*_Color; 60 | } 61 | ENDCG 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1023dac58a20c324c8ccd75ec6289c96 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_1_ComputeVertex/ComputeVertex.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8be9485dde719b41987e730d9674e5e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/ComputeVertexLit.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1447ce5d27642174f9fbc1b3e669d299 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/ComputeVertexLitPlane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 114b393bf97f36045aae3a481a6f33f6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/ComputeVertexLit_Builtin.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86d92d3659681104a98207a89d5cb7b8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/ComputeVertexLit_URP.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2307b2e0966f0d14d80ea0b60be37f65 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/PlaneLD.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_2_ComputeVertexLit/PlaneLD.FBX -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/PlaneQD.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_2_ComputeVertexLit/PlaneQD.FBX -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/StandardEdited.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcae1039e7074f542a1fae1245b93648 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/StandardEdited.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7b754c9f4019c64391f189e3f2d9217 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/StandardSphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc289566f4b6c34f94745a6bea32394 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/URPLitEdited.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5305b779673b204ebd62dc255f55e10 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/URPLitEdited.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa7f4cd0397d4344d8d57ed2d6490791 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/heightMapDebug.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bd66e09fbd75ab4b874fc6cb51de40a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/normalMapDebug.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c78c28c606bab3d47944e57961b1b8d5 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/planeHD.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_2_ComputeVertexLit/planeHD.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_2_ComputeVertexLit/sphere_URP.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1e3b04539064574683e744b674e18ab 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5450de9b2dc5ba0419f803103c834ef7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/PlayAnimation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class PlayAnimation : MonoBehaviour 6 | { 7 | public Animator animator; 8 | public string state; 9 | 10 | void Start() 11 | { 12 | animator.Play(state); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/PlayAnimation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f0923775aa93004c9fad1f879a5db49 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209fa598c1feff34ea9f71fdde25bbea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecda955fd05b957439f3e60f23ca78f7 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Arms.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SkinnedMeshBuffer_Arms 11 | m_Shader: {fileID: 4800000, guid: ecda955fd05b957439f3e60f23ca78f7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: c6dc62700fa06274b9608a9fce8ed21b, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Ints: [] 31 | m_Floats: 32 | - _Progress: 0.5 33 | m_Colors: 34 | - _ByteAddressOffset_Nor: {r: 40, g: 0, b: 0, a: 0} 35 | - _ByteAddressOffset_Pos: {r: 40, g: 0, b: 0, a: 0} 36 | - _Color: {r: 0.4745098, g: 0.90588236, b: 1, a: 1} 37 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 38 | - _Test1: {r: 40, g: 0, b: 0, a: 0} 39 | m_BuildTextureStacks: [] 40 | m_AllowLocking: 1 41 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Arms.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5035fee117516646b5508a7f64d982c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Body.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SkinnedMeshBuffer_Body 11 | m_Shader: {fileID: 4800000, guid: ecda955fd05b957439f3e60f23ca78f7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: 28d78c5517421f047b88352f3b18e8e7, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Ints: [] 31 | m_Floats: 32 | - _Progress: 0.5 33 | m_Colors: 34 | - _ByteAddressOffset_Nor: {r: 40, g: 0, b: 0, a: 0} 35 | - _ByteAddressOffset_Pos: {r: 40, g: 0, b: 0, a: 0} 36 | - _Color: {r: 0.4764151, g: 0.9058916, b: 1, a: 1} 37 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 38 | - _Test1: {r: 40, g: 0, b: 0, a: 0} 39 | m_BuildTextureStacks: [] 40 | m_AllowLocking: 1 41 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Body.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9938ef8d49e26044eaeff3faff614f46 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Legs.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SkinnedMeshBuffer_Legs 11 | m_Shader: {fileID: 4800000, guid: ecda955fd05b957439f3e60f23ca78f7, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _MainTex: 27 | m_Texture: {fileID: 2800000, guid: c444e3d02d2fcff4d9fe5211d67652a0, type: 3} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Ints: [] 31 | m_Floats: 32 | - _Progress: 0.5 33 | m_Colors: 34 | - _ByteAddressOffset_Nor: {r: 40, g: 0, b: 0, a: 0} 35 | - _ByteAddressOffset_Pos: {r: 40, g: 0, b: 0, a: 0} 36 | - _Color: {r: 0.4745098, g: 0.90588236, b: 1, a: 1} 37 | - _Offset: {r: 0, g: 0, b: 0, a: 0} 38 | - _Test1: {r: 40, g: 0, b: 0, a: 0} 39 | m_BuildTextureStacks: [] 40 | m_AllowLocking: 1 41 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_Legs.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdb60a70d894c0747b8e6ef011344eaa 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/SkinnedMeshBuffer_sameMesh.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb28c04b7ac15bc4ba95fe3e40129c23 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27539f4591358784aaf839c26149e723 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54b90d7f60b179e4e9909cd127aa060d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 135db69c43c47ee4e97c7c6b13621056 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 478ef75e2d9612043ad9e092df040fea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Jump--InAir.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Jump--InAir.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Jump--Jump.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Jump--Jump.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_N.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_N.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_N_Land.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_N_Land.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_S.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Run_S.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Walk_N.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Walk_N.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Walk_N_Land.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Locomotion--Walk_N_Land.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Stand--Idle.anim.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/Stand--Idle.anim.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Animations/StarterAssetsThirdPerson.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40db3173a05ae3242b1c182a09b0a183 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a0e91532ce93274fb01919ee0dda264 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Materials/M_Armature_Arms.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 766fd3ff04aab4745a764d33daac86fa 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Materials/M_Armature_Body.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43714b68324cc2c409d534d9874f2a2b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Materials/M_Armature_Legs.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b25e99361ac31d4e9ae83c46aee69ea 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f99c02f4392c29d4dad06bad32b0bfb1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Models/Armature.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Models/Armature.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 940251fa621540241ab6a33c87cc8b7e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_AlbedoTransparency.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_AlbedoTransparency.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_MetallicSmoothness.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_MetallicSmoothness.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_Normal.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_Normal.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_RGB.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Arms_RGB.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_AlbedoTransparency.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_AlbedoTransparency.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_MetallicSmoothness.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_MetallicSmoothness.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_Normal.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_Normal.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_RGB.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Body_RGB.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_AlbedoTransparency.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_AlbedoTransparency.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_MetallicSmoothness.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_MetallicSmoothness.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_Normal.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_Normal.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_RGB.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_3_SkinnedMeshBuffer_SameMesh/StarterAssets/ThirdPersonController/Character/Textures/Armature_Legs_RGB.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 658cdfa2d067c4a49a08660406e39b2d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a0c84350d5469b41a4595f246dc37ad 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a49827f6c32e1094cba504319a3dddff 3 | folderAsset: yes 4 | timeCreated: 1457110892 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b91ad727f72720543b8022f3be07905d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HappyDance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HappyDance.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HitHighWall.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HitHighWall.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HitWall1.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_HitWall1.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_Idle1.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_Idle1.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_IdleHappy.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_IdleHappy.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_RunLong.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_RunLong.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_RunShort.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Cat_RunShort.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Dog.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95ced8965b305f449b71d2cd09eda52b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Dog_Idle.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Dog_Idle.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Dog_Run.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Animation/Dog_Run.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2735a7f2e279e8a4cb978d6264e030c7 3 | folderAsset: yes 4 | timeCreated: 1449069265 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Materials/CatOrange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb89294923508294fa35d858834725f7 3 | timeCreated: 1456762715 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Materials/Dog.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77b24526fea2ba6409c54ea3e9a43332 3 | timeCreated: 1464703765 4 | licenseType: Store 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93a0bf8c2a2823e43be6d58b20a1d607 3 | folderAsset: yes 4 | timeCreated: 1449069251 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/CatBase.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/CatBase.fbx -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/Dog.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/Dog.FBX -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 739a69b97517056448c676763518be7e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Models/Materials/lambert1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8d0a6b79fdd8dc4989dd6b67b58d8d7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d962a5370fda194e926e10981428816 3 | folderAsset: yes 4 | timeCreated: 1448984337 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/CatAlbedo.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/CatAlbedo.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/CatAlbedo.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dde8fb2f7d6df74a84e5967afe3417a 3 | timeCreated: 1465567508 4 | licenseType: Store 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/DogAlbedo.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/DogAlbedo.tif -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/EndlessRunnerSampleGame/Textures/DogAlbedo.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cf912fd861e20c41a5f98f4aa5edb95 3 | timeCreated: 1464703759 4 | licenseType: Store 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 976f1b9160460b3499f8664c43cc9cab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug/PrimitiveID.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: PrimitiveID 11 | m_Shader: {fileID: 4800000, guid: e0c220143bab8314e8504242f607d4b7, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _MainTex: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | m_Ints: [] 27 | m_Floats: 28 | - _tid: 5 29 | m_Colors: [] 30 | m_BuildTextureStacks: [] 31 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug/PrimitiveID.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a44f02e8fc2ef5a49907c60b09450ac4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug/PrimitiveID.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/PrimitiveID" 2 | { 3 | Properties 4 | { 5 | _tid ("TriangleID", Int) = 0 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType"="Opaque" } 10 | 11 | Pass 12 | { 13 | CGPROGRAM 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | 17 | #include "UnityCG.cginc" 18 | 19 | struct appdata 20 | { 21 | float4 vertex : POSITION; 22 | float2 uv : TEXCOORD0; 23 | }; 24 | 25 | struct v2f 26 | { 27 | float2 uv : TEXCOORD0; 28 | float4 vertex : SV_POSITION; 29 | }; 30 | 31 | uint _tid; 32 | 33 | v2f vert (appdata v) 34 | { 35 | v2f o; 36 | o.vertex = UnityObjectToClipPos(v.vertex); 37 | o.uv = v.uv; 38 | return o; 39 | } 40 | 41 | fixed4 frag (v2f i, uint triangleID: SV_PrimitiveID) : SV_Target 42 | { 43 | fixed4 col = 1; 44 | 45 | if(triangleID == _tid) 46 | { 47 | col = float4(1,0,0,1); 48 | } 49 | 50 | return col; 51 | } 52 | ENDCG 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug/PrimitiveID.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0c220143bab8314e8504242f607d4b7 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/ForDebug/PrimitiveID.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8f4532232c8c0f4f8f38ceeef3e81d5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/SkinnedMeshBuffer_DiffMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 866db6c2439a54a41b7aed4ac82b207f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/SkinnedMeshBuffer_diffMesh.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 344fc49d8e3e44428982b117d2724360 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/SkinnedMeshBuffer_diffMesh.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fdbd62aa2ae64c1bac342ee0266643c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/SkinnedMeshBuffer_diffMesh.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1105acd185fcd204c8f3522523f72c5d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_4_SkinnedMeshBuffer_DiffMesh/Triangle.obj: -------------------------------------------------------------------------------- 1 | # ProBuilder 5.0.3 2 | # https://unity3d.com/unity/features/worldbuilding/probuilder 3 | # 8/30/2021 6:18:35 PM 4 | 5 | mtllib ./Triangle.mtl 6 | o Triangle 7 | 8 | g Plane 9 | v 0.3299377 0.0001 -0.6896315 10 | v 0.3299377 0.0001 0.3103685 11 | v -0.6700623 0.0001 -0.6896315 12 | 13 | vt -0.3299377 -0.6896315 14 | vt -0.3299377 0.3103685 15 | vt 0.6700623 -0.6896315 16 | 17 | vn 0 1 0 18 | 19 | usemtl ProBuilderDefault 20 | f 3/3/1 2/2/1 1/1/1 21 | 22 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe7ddaaf923fa034b9f2f399950d44e8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/URPLit.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a19cc10241ac9704d8102f993e9904cd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct VertexData 4 | { 5 | uint id; 6 | float3 pos; 7 | float3 nor; 8 | float2 uv; 9 | float4 col; 10 | }; 11 | 12 | RWStructuredBuffer vertexBuffer; 13 | ByteAddressBuffer attributeBuffer; 14 | 15 | [numthreads(1,1,1)] 16 | void CSMain (uint3 id : SV_DispatchThreadID) 17 | { 18 | // On ProjectView select the VFX Graph asset and click on small triangle to see the subAssets, double click on the "bla bla Update Particle" compute shader to open it 19 | // Reference to attributeBuffer and struct VFXAttributes{} in the compute shader 20 | // float3 position = asfloat(attributeBuffer.Load3(((instanceIndex * 0x6DDD00) + (index * 0x8 + 0x1B7740)) << 2)); 21 | // float3 direction = asfloat(attributeBuffer.Load3(((instanceIndex * 0x6DDD00) + (index * 0x8 + 0x1B7744)) << 2)); 22 | // uint particleId = (attributeBuffer.Load(((instanceIndex * 0x6DDD00) + (index * 0x1 + 0x64B540)) << 2)); 23 | 24 | float3 position = asfloat(attributeBuffer.Load3( ((id.x * 0x8 + 0x1B7740)) << 2 )); 25 | float3 direction = asfloat(attributeBuffer.Load3(((id.x * 0x8 + 0x1B7744)) << 2 )); 26 | 27 | //Assign data to vertex buffer 28 | vertexBuffer[id.x].pos = position; 29 | vertexBuffer[id.x].nor = direction; 30 | vertexBuffer[id.x].col = float4(direction,1); 31 | } -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9cab0c67879dbb48afa3a32a62e4581 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 457295128802dab44b211c299c3d0a84 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: VFXGraphMeshDeform 11 | m_Shader: {fileID: 4800000, guid: 5614bd7b72f99a245b81677352b5a585, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: 16 | - USEDISCARD_ON 17 | m_LightmapFlags: 4 18 | m_EnableInstancingVariants: 0 19 | m_DoubleSidedGI: 0 20 | m_CustomRenderQueue: -1 21 | stringTagMap: {} 22 | disabledShaderPasses: [] 23 | m_LockedProperties: 24 | m_SavedProperties: 25 | serializedVersion: 3 26 | m_TexEnvs: 27 | - _MainTex: 28 | m_Texture: {fileID: 10309, guid: 0000000000000000f000000000000000, type: 0} 29 | m_Scale: {x: 10, y: 10} 30 | m_Offset: {x: 0, y: 0} 31 | m_Ints: [] 32 | m_Floats: 33 | - UseDiscard: 1 34 | - _CullMode: 2 35 | - _Length: 1 36 | - _Steps: 1 37 | - _TessEdge: 2 38 | - _VDist: 0.1 39 | - _WireThickness: 414 40 | m_Colors: 41 | - _Color: {r: 1, g: 1, b: 1, a: 1} 42 | - _FillColor: {r: 1, g: 1, b: 1, a: 1} 43 | - _LineColor: {r: 1, g: 0, b: 0, a: 1} 44 | m_BuildTextureStacks: [] 45 | m_AllowLocking: 1 46 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 082affa01296430428a6746391521d52 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5614bd7b72f99a245b81677352b5a585 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb8d545472f591743a855ab30ead482c 3 | timeCreated: 1485045104 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/06_5_VFXGraphMeshDeform/VFXGraphMeshDeform.vfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27528079423f67f488ac4690f3fef140 3 | VisualEffectImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/Readme.txt: -------------------------------------------------------------------------------- 1 | Traffic (06_1 & 06_2): CPU instructs -> GPU writes the data -> Shader uses this data instead of original vertex buffer from MehsRenderer 2 | Traffic (other): CPU instructs -> shader is able to read the skinned vertex buffer from other meshes, do something with it and use it instead of it's original vertex buffer from MehsRenderer 3 | 4 | You can treat these vertex buffers as structured buffers. -------------------------------------------------------------------------------- /Assets/06_Compute_Mesh/Readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 782792f13ee4bac4588fe0e48fc601f0 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Base.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08d0f975260ac51448a6a5e5cfc12fa1 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Concept.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/Assets/Concept.jpg -------------------------------------------------------------------------------- /Assets/_URPSettings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9583bf729c7a0f4fb7e96c4f29b5e89 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_URPSettings/DefaultVolumeProfile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b40f8c1f15d49f4d92f9c6a2e148a70 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_URPSettings/SceneRenderPipeline.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Experimental.Rendering; 4 | using UnityEngine.Rendering; 5 | 6 | [ExecuteInEditMode] 7 | public class SceneRenderPipeline : MonoBehaviour 8 | { 9 | public RenderPipelineAsset renderPipelineAsset; 10 | 11 | void OnEnable() 12 | { 13 | GraphicsSettings.defaultRenderPipeline = renderPipelineAsset; 14 | } 15 | 16 | void OnValidate() 17 | { 18 | GraphicsSettings.defaultRenderPipeline = renderPipelineAsset; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/_URPSettings/SceneRenderPipeline.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 292b213ce8e74fe4e9a8e69f91ae8356 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_URPSettings/SimpleSceneSwitch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b7e63e224e873640aa32ed1db3d93f1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/_URPSettings/UniversalRenderPipelineAsset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec5e8c4073d23524c9ff3a452c8d3129 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_URPSettings/UniversalRenderPipelineAsset_Renderer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64a77c5f310f65841845837405a89bdc 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_URPSettings/UniversalRenderPipelineGlobalSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24705214c6b83174e9ef8a9a3dfcc793 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/MultiplayerManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!655991488 &1 4 | MultiplayerManager: 5 | m_ObjectHideFlags: 0 6 | m_EnableMultiplayerRoles: 0 7 | m_StrippingTypes: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 6000.0.30f1 2 | m_EditorVersionWithRevision: 6000.0.30f1 (62b05ba0686a) 3 | -------------------------------------------------------------------------------- /ProjectSettings/ShaderGraphSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | shaderVariantLimit: 128 16 | customInterpolatorErrorThreshold: 32 17 | customInterpolatorWarningThreshold: 16 18 | customHeatmapValues: {fileID: 0} 19 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 3 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | m_RenderingLayers: 45 | - Default 46 | - Light Layer 1 47 | - Light Layer 2 48 | - Light Layer 3 49 | - Light Layer 4 50 | - Light Layer 5 51 | - Light Layer 6 52 | - Light Layer 7 53 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 9 16 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} 7 | m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} 8 | m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} 9 | m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} 10 | m_EmptyShader: {fileID: 4800000, guid: 33a2079f6a2db4c4eb2e44b33f4ddf6b, type: 3} 11 | m_RenderPipeSettingsPath: 12 | m_FixedTimeStep: 0.016666668 13 | m_MaxDeltaTime: 0.05 14 | m_MaxScrubTime: 30 15 | m_MaxCapacity: 100000000 16 | m_CompiledVersion: 7 17 | m_RuntimeVersion: 38 18 | m_RuntimeResources: {fileID: 11400000, guid: bc10b42afe3813544bffd38ae2cd893d, type: 2} 19 | m_BatchEmptyLifetime: 300 20 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /READMEimages/01_1_Basic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/01_1_Basic.gif -------------------------------------------------------------------------------- /READMEimages/01_2_FallingSand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/01_2_FallingSand.gif -------------------------------------------------------------------------------- /READMEimages/01_3_Fluid_2D.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/01_3_Fluid_2D.gif -------------------------------------------------------------------------------- /READMEimages/01_4_Fluid_3D.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/01_4_Fluid_3D.gif -------------------------------------------------------------------------------- /READMEimages/02_1_StructuredBufferNoCompute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_1_StructuredBufferNoCompute.gif -------------------------------------------------------------------------------- /READMEimages/02_2_ComputePaintTexture.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_2_ComputePaintTexture.gif -------------------------------------------------------------------------------- /READMEimages/02_3_RotatingCircles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_3_RotatingCircles.gif -------------------------------------------------------------------------------- /READMEimages/02_4_ComputePaintTexture_DFT.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_4_ComputePaintTexture_DFT.gif -------------------------------------------------------------------------------- /READMEimages/02_5_ComputeParticlesDirect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_5_ComputeParticlesDirect.gif -------------------------------------------------------------------------------- /READMEimages/02_6_ComputeSketch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_6_ComputeSketch.gif -------------------------------------------------------------------------------- /READMEimages/02_7_ShimmerSphere.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/02_7_ShimmerSphere.gif -------------------------------------------------------------------------------- /READMEimages/03_1_StructuredBufferWithCompute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_1_StructuredBufferWithCompute.gif -------------------------------------------------------------------------------- /READMEimages/03_2_AsyncGPUReadback.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_2_AsyncGPUReadback.gif -------------------------------------------------------------------------------- /READMEimages/03_3_AsyncGPUReadbackTex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_3_AsyncGPUReadbackTex.gif -------------------------------------------------------------------------------- /READMEimages/03_4_AsyncGPUReadbackMesh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_4_AsyncGPUReadbackMesh.gif -------------------------------------------------------------------------------- /READMEimages/03_6_PixelPercentage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_6_PixelPercentage.gif -------------------------------------------------------------------------------- /READMEimages/03_7_ColorPalette.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/03_7_ColorPalette.JPG -------------------------------------------------------------------------------- /READMEimages/04_1_IndirectCompute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/04_1_IndirectCompute.gif -------------------------------------------------------------------------------- /READMEimages/04_2_ComputeParticlesIndirect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/04_2_ComputeParticlesIndirect.gif -------------------------------------------------------------------------------- /READMEimages/04_3_ComputeParticlesIndirect_VFX.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/04_3_ComputeParticlesIndirect_VFX.gif -------------------------------------------------------------------------------- /READMEimages/04_4_IndirectReflectedStar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/04_4_IndirectReflectedStar.gif -------------------------------------------------------------------------------- /READMEimages/05_1_UAVInShader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/05_1_UAVInShader.gif -------------------------------------------------------------------------------- /READMEimages/05_2_ShaderBakeToTexture.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/05_2_ShaderBakeToTexture.gif -------------------------------------------------------------------------------- /READMEimages/06_1_ComputeVertex.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/06_1_ComputeVertex.gif -------------------------------------------------------------------------------- /READMEimages/06_2_ComputeVertexLit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/06_2_ComputeVertexLit.gif -------------------------------------------------------------------------------- /READMEimages/06_3_SkinnedMeshBuffer_SameMesh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/06_3_SkinnedMeshBuffer_SameMesh.gif -------------------------------------------------------------------------------- /READMEimages/06_4_SkinnedMeshBuffer_DiffMesh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/06_4_SkinnedMeshBuffer_DiffMesh.gif -------------------------------------------------------------------------------- /READMEimages/06_5_VFXGraphMeshDeform.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cinight/MinimalCompute/9cc6b9888e0bdeb3a48c226773aea574c948f5ad/READMEimages/06_5_VFXGraphMeshDeform.gif --------------------------------------------------------------------------------