Перейти к содержимому

Intro to Compute Shaders in Unity URP! Replace Geometry Shaders ✔️ 2020.3 | Game Dev Tutorial

Ned Makes Games

0:00 / 0:00

Intro to Compute Shaders in Unity URP! Replace Geometry Shaders ✔️ 2020.3 | Game Dev Tutorial

31 635 просмотров · 5 лет назад
Ned Makes Games
16,7 тыс. подписчиков
31 635 просмотров · 5 лет назад
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3 🩹 Fixes: ► Make sure your source mesh has read/write enabled in it's asset importer inspector. Compute Shaders are scripts that run on the GPU! They're very powerful, allowing you to leverage the GPU's unique abilities and generate meshes to draw procedurally. There's not a lot of information on using them, so I hope to demystify them and add another wrench to your game development toolbox. Specifically, I convert a geometry shader to a compute shader, increasing compatibility and efficiency. 👋 Subscribe for weekly game development videos! https://www.youtube.com/c/nedmakesgam... 👑 Join my Patreon for extra influence over topics, early access to videos, and downloadable project files! ►   / nedmakesgames   🔗 Check out my website for a searchable list of tutorials! ► https://nedmakesgames.github.io 🔴 Twitch ►   / nedmakesgames   🐦 Twitter ►   / nedmakesgames   🎮 Discord ► https://discordapp.com/invite/ubxSVBK 📸 Instagram ►   / nedmakesgames   👽 Reddit ►   / nedmakesgames   🎶 TikTok ►   / nedmakesgames   ☕ Ko-fi ► https://ko-fi.com/nedmakesgames 🎬 Previous videos ► Introduction to graphics shaders:    • Geometry Shaders Made Easy In Unity URP! F...   ✨Follow up videos ► Using compute shaders to generate meshes:    • Generate a Mesh Asset Using Compute Shader...   ► Layered grass:    • Endless Fields of Grass in URP with a Comp...   ► Procedural blade grass:    • Grass Fields in Unity URP! Generate Blades...   📜 Required scripts ► NMGPyramidComputeHelpers.hlsl: https://gist.github.com/NedMakesGames... ► NMGPyramidGraphicsHelpers.hlsl: https://gist.github.com/NedMakesGames... 📚 Reference scripts ► PyramidFaces.compute: https://gist.github.com/NedMakesGames... ► PyramidFaces.shader: https://gist.github.com/NedMakesGames... ► PyramidFaces.hlsl: https://gist.github.com/NedMakesGames... ► ProceduralPyramidRenderer.cs: https://gist.github.com/NedMakesGames... ► TriCountToVertCount.compute: https://gist.github.com/NedMakesGames... ⏲️ Timestamps: 0:00 Intro 1:02 Theory 3:00 The compute shader 7:00 The graphics shader 9:42 The C# renderer 16:11 Fixing vertex count 17:42 Wrap up and credits 🎖️ Credits and references: • Documentation: Unity Technologies - https://docs.unity3d.com/ScriptRefere... • Noise Ball: Keijiro Takahashi - https://github.com/keijiro/NoiseBall2 • URP Lens Flares: Sam Driver - https://github.com/Anatta336/bright-s... • Compute Shader: TotallyRonja - https://www.ronja-tutorials.com/2020/... • MarchingCubesGPU: DuncanF - https://gist.github.com/DuncanF/35350... • TransformBounds: benblo - https://answers.unity.com/questions/3... • Paper texture: freepik - https://www.freepik.com/premium-vecto... • Music: sawquerenoise "RottenMage SpaceJacked OST" - https://freemusicarchive.org/music/sa... • Compute Shaders: Jasper Flick- https://catlikecoding.com/unity/tutor... • Binary sphere: Openclipart - https://publicdomainvectors.org/en/fr... #GameDev #IndieDev #Unity