The Graphics Pipeline and You | Writing Unity URP Code Shaders Tutorial [1/9] ✔️ 2021.3

Поділитися
Вставка
  • Опубліковано 4 сер 2024
  • Play Kitty Cat Squash ► store.steampowered.com/app/18...
    ✔️ Tutorial tested in 2020.3 and 2021.3
    🚨 Edits: If you create your project from a template, ensure "Depth Priming Mode" is set to "Disabled" in your URP settings asset. To find this asset, open Project Settings, navigate to Graphics, and select the renderer asset at the top of the window.
    Would you like to start writing shaders but don’t know where to start? Or, have you encountered a limitation of URP’s Shader Graph you need to overcome? In this tutorial series, I’ll walk you through writing a fully featured, general purpose shader for Unity’s Universal Render Pipeline - exclusively in code. Don't know HLSL or ShaderLab? No problem.
    Tutorial series:
    📰 Article version ► / writing-unity-urp-shad...
    🔀 Playlist ► • Writing URP Code Shade...
    1️⃣ The Graphics Pipeline ► You're watching it!
    2️⃣ Lighting and Shadows ► • Let There Be Light (An...
    3️⃣ Transparency ► • Transparent and Crysta...
    4️⃣ PBR Materials ► • Mapping Our Way to PBR...
    5️⃣ Advanced Lighting ► Coming soon
    6️⃣ Advanced URP Features ► Coming soon
    7️⃣ Custom Lighting Models ► Coming soon
    8️⃣ Vertex Animation ► Coming soon
    9️⃣ Interacting with C# ► Coming soon
    👑 Join my Patreon to access tutorials early, download project files, vote on future topics, and more! Thank you so much!
    ► / nedmakesgames
    🔗 Check out my website for a searchable list of tutorials!
    ► nedmakesgames.github.io
    2️⃣ 2nd Channel ► / nedmakesgames2
    🔴 Twitch ► / nedmakesgames
    🐦 Twitter ► / nedmakesgames
    🎮 Discord ► discordapp.com/invite/ubxSVBK
    📸 Instagram ► / nedmakesgames
    👽 Reddit ► / nedmakesgames
    🎶 TikTok ► / nedmakesgames
    ☕ Ko-fi ► ko-fi.com/nedmakesgames
    📚 Reference scripts
    ► Flat white: gist.github.com/NedMakesGames...
    ► Flat color: gist.github.com/NedMakesGames...
    ► Textures: gist.github.com/NedMakesGames...
    ⏲️ Timestamps:
    0:00 Intro
    0:53 Ad
    1:26 Tutorial scope
    2:58 Project set up
    4:50 ShaderLab
    7:02 Intro to HLSL
    8:52 The Graphics Pipeline
    9:34 The Input Assembler
    11:09 The Vertex Stage
    12:40 Spaces
    15:45 The Rasterizer
    16:04 The Fragment Stage
    15:52 Hello World
    18:54 Properties in ShaderLab
    21:34 Properties in HLSL
    22:31 Texture Properties
    23:46 Macros
    25:16 Sampling a Texture
    26:35 What Are UVs
    27:12 UVs in the Vertex Function
    29:06 Interpolation
    30:22 Hello Textures
    31:26 Wrap up and credits
    🎖️ Credits, references and further reading:
    • Unity Technologies: Shader Calibration Scene - assetstore.unity.com/packages...
    • shedmon: Wooden Slingshot - sketchfab.com/3d-models/woode...
    • Martijn Vaes: DAE - Bilora Bella 46 Camera - Game Ready Asset - sketchfab.com/3d-models/dae-b...
    • tonyflanagan: Thailand Girl - Animated - sketchfab.com/3d-models/thail...
    • Kelvin Valerio: Brown Cat with Green Eyes - www.pexels.com/photo/brown-ca...
    • owowowsam: Mini Earth - www.cgtrader.com/free-3d-mode...
    • Tom Patterson: Natural Earth III - www.shadedrelief.com/natural3/...
    • W3schools: CSS RGB Colors - www.w3schools.com/css/css_col...
    Music: www.purple-planet.com
    #GameDev #IndieDev #Unity
  • Наука та технологія

КОМЕНТАРІ • 150

  • @victovicto8172
    @victovicto8172 Рік тому

    I can't believe I found this video. It's simply amazing! You helped me a lot, dude, thank you so much. I was strugling a lot with shaders. I'm a beginner on shader coding, and it feels so hard to find help online. It's so good to have everything so well explained in one single video. I'll definitely check your other tutorials, your way of teaching is clear and effective (at least for me lol).

  • @frankerzed973
    @frankerzed973 Рік тому +5

    Sire, I cant thank you enough for these videos. The effort you put in with the script, the visuals, the consise explanation. Everything is top notch. I would pay good money for a content of this quality. Thank you for sharing it

  • @abraiyan7984
    @abraiyan7984 2 роки тому +2

    Thanks a lot for taking this initiative. Looking forward to Part 2!

  • @moddingdudes7055
    @moddingdudes7055 Рік тому

    This is underrated. Great tutorial! I was really struggling reading the Unity docs on shader lab and HLSL, your editing and explanation of the render pipeline clarified everything! Thank you

    • @NedMakesGames
      @NedMakesGames  Рік тому

      Thank you for the kind words! I'm glad this helped you out!

  • @JoaoPaulo-mk8ro
    @JoaoPaulo-mk8ro 2 роки тому +5

    Thank you so much, Ned! With your explanation i finally could understand the core structure of a shader, and now those structure makes a lot more Sense ! Looking forward for the next Episode!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      I'm really glad to hear that! Shouldn't be too long until part two!

  • @tojynick
    @tojynick 2 роки тому

    I have some experience writing shaders both with Shader Graph and HLSL and yet it’s so refreshing to watch your tutorials. Thank you so much for making such high quality content!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Hi, thank you, that's really nice to hear. Thank you for watching!

  • @paulamorillasalonso1927
    @paulamorillasalonso1927 8 місяців тому

    The way you explain everything makes it look so easy and achievable! I'm so thankful for these tutorials, as of today it looks like you stopped uploading them but if you read this I hope you know you did a great job, thanks! ❤

    • @NedMakesGames
      @NedMakesGames  7 місяців тому

      Hi, I'm glad this is helpful! I've had a heck of a busy year but I'm still working on these. Hopefully I can finish the next part over the holidays.

  • @georgegonzalez5322
    @georgegonzalez5322 Рік тому

    I want to thank all the patrons too. This is the stuff we need tutorials on. Really insightful stuff.

    • @NedMakesGames
      @NedMakesGames  Рік тому

      Yes, thank you again patrons! And thank you for the kind words!

  • @paladinrose
    @paladinrose 2 роки тому +2

    Great and wonderful tutorial, as always. I learned a lot, Ned! The unity MainColor and MainTexture properties and macros, in particular, were entirely new to me. Thanks for the phenomenal work.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you! Yeah, I thought those attributes were nice. Macros are very cool, I’d like to do a deeper video on them sometime.

  • @MegaCevapcic
    @MegaCevapcic 3 місяці тому

    God bless you man, amazing tutorial :D
    I'm fairly familiar with shaders, but now how to use them in Unity and this has been the most straight forward tutorial I have found, definitely finishing the series!

  • @lexalot8337
    @lexalot8337 Рік тому

    You are a godsend
    I've never been able to fully understand shaderlab until now
    Thank you so much

  • @DFeargrieve
    @DFeargrieve 2 роки тому +5

    This might be the best shader tutorial I've ever seen purely for the depth of information that many tutorial author's skip over. Thank you for delving into the detail!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      That's high praise, thank you! I knew if I was going to do this, I needed to do it right.

  • @Qwertinator212
    @Qwertinator212 Рік тому

    Great explanations Ned! Really appreciate the time you took to make this video

  • @ConcerninglyWiseAlligator
    @ConcerninglyWiseAlligator 2 роки тому

    Even though I already knew everything about this topic, I decided to watch this just to evaluate if it is a resource worth pointing people to (it is). And I ended up learning URP some specific stuff. Just the kind of things you manage to do by being so thorough. An amazing job. Thank you!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Thank you, I really appreciate that! It was a lot of work, but hearing things like this make me feel like it was worth it. Thank you for watching!

  • @8-wolves
    @8-wolves 2 роки тому +21

    Your tutorials have been amazing so far (absolutely love how you also have written versions). I've been working on learning HLSL so this has come at the perfect time.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +3

      Thank you for watching! That is great timing, I hope this helps you out!

    • @ParkingLotStudioGames
      @ParkingLotStudioGames Рік тому

      @@NedMakesGames for someone that was stuck writing BIRP shaders because with the level of control they provide I was outperforming the LWRP and early URP iterations (at the time), and I wasn't willing to write custom LW/URP shaders because of the lackluster shader documentation (I was also away for a couple of years, so I hope their docs are better now, at least the shader ones, but yeah), I'm now migrating to URP thanks to all your videos!

    • @NedMakesGames
      @NedMakesGames  Рік тому

      @@ParkingLotStudioGames Thank you again! I'm glad to hear that! Unfortunately, the documentation is still extremely lacking, but after this series, you should be set for most common forward-lit shaders.

  • @MarekNijaki
    @MarekNijaki Рік тому

    That is the best tutorial about jumping into shaders I have saw. Awesome work!

  • @jussirautiainen3784
    @jussirautiainen3784 8 місяців тому

    These are some really good tutorials ... thank you so much for the written and the spoken formats ...

  • @curkas
    @curkas 2 роки тому

    I know that these must take a lot of work to create, so I'm really grateful and I'm really hoping that you're able to keep it up. I'm eagerly waiting for the next videos!

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you for watching! I have been working on this series since December! 😁 But, I enjoy most of it. Thankfully, the other videos won't take as long, since I've already got the scripts written.

  • @feathorix8778
    @feathorix8778 9 місяців тому

    Wow, you explained everything sooo well! Thanks for this awesome tutorial series, I finally wanted to know how these weird looking shader files actually work :).

  • @rocketshader2699
    @rocketshader2699 2 роки тому

    I just discovered this amazing channel today. Starting a new series is amazing becoz there's so many videos in the channel idk where to start :D lets goo

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Thanks, that’s really nice of you to say! I have some playlists in my channel page if you’d like to narrow things down!

  • @tal5552
    @tal5552 4 місяці тому

    Ned your content is awsome! Very helpful info on a topic that is very hard to find on youtube. pleasssseee finish the series, if you have time for it

  • @nullumamare8660
    @nullumamare8660 2 роки тому +1

    I can't express the imense gratitute I'm feeling towards you at the moment. I was bashing my head against the keyboard trying to learn shader programming in unity (especially using the URP because its documentation is incomplete/hard to read).
    I'm an experienced software developer and I was so annoyed that this experience didn't translate at all to knowing how to do stuff with shaders. You have filled 90% of the gaps I needed to go forward with my project. Thank you so much! Continue this series please!!

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      That's high praise, thank you! I made the series mostly to help fill in the gaps in Unity's documentation, so I'm glad it helped in that regard. Part two will be live in early August!

  • @tylerdelange5959
    @tylerdelange5959 2 роки тому +3

    Have loved all you're previuous shader tutorials, and am really looking forward to diving into this tutorial. Was exactly what I was hoping to find when tryig to bridge the gap between shadergraph and HLSL

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Thank you! That’s definitely a hard transition to make. Even if you stick with shader graph, knowing HLSL will help with custom functions!

    • @tylerdelange5959
      @tylerdelange5959 2 роки тому

      @@NedMakesGames Yeah, definitely a scary challenge, though much less so after finishing this first episode lol. Can't wait to watch/read the next one

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      @@tylerdelange5959 😄 Great to hear. Thanks for watching!

  • @BeanMonsterr
    @BeanMonsterr Рік тому

    Exceptionally well made and useful, looking forward to watching more.

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      Thank you! I hope you enjoy future parts!

  • @peplms
    @peplms 2 роки тому

    Wow this is so cool. There is a big lack of ressources about writing shaders in URP. Thank you so much for that. Can't wait for the next !

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you! I definitely agree, which is why I decided to make these. Thanks for watching!

  • @tuxedoblackfoot
    @tuxedoblackfoot 11 місяців тому +1

    I just spend about a day and a half figuring out why my texture was shading my entire object with one color selected at a point on the texture instead of just showing the texture. I know it was doing this because I could get Unity to offset the texture, and the object would change it's color. But the entire object was one color.
    After creating a new shader, re-doing the code slowly so that I remake it entirely as was shown in this tutorial, I could not, for the life of me, break my code in the way as my initial shader.
    Copy-pasting code, line by line, I finally found it. TEXCOORD0 was misspelled as TEXTCOORD0. It did not produce any error, at least while using JetBrains.

  • @adamodimattia
    @adamodimattia 2 роки тому

    Another great production

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you! I’m proud of the end product!

  • @StiekemeHenk
    @StiekemeHenk Рік тому

    Absolutely the best shader content

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      Thank you for watching! I'm glad to hear that!

  • @CaptainKilmar
    @CaptainKilmar Рік тому

    Ned, you are a genius! Thanks for sharing this knowledge!

  • @therealtroy8275
    @therealtroy8275 Рік тому

    AMAZING tutorial!

  • @zichaoye1274
    @zichaoye1274 2 роки тому

    cannot wait to see it, really thanks!

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you for watching! I'm planning to release the next video in early August!

  • @stephapie1612
    @stephapie1612 2 роки тому

    As always, great info! 👍

  • @Memeieli
    @Memeieli 2 роки тому

    Wow amazing, exactly what i was looking for!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Great to hear that! I hope you enjoy

  • @jayshippey6772
    @jayshippey6772 Рік тому

    Yeah this video definitely gave me some issues but in the end once I got it working, this is a really really good tutorial

  • @carlwong1919
    @carlwong1919 2 роки тому

    Great video. Concepts are explained clearly.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thanks, I'm glad to hear that! I went through many script drafts!

  • @CymruCreator
    @CymruCreator 2 роки тому +1

    Thank you so much for this walkthrough. I've followed a few tutorials lately about shaders and they don't really explain anything. I'm only familiar with C# and shaders have always been confusing to me. Now I understand so much better. I may finally have a chance at fixing one of my shaders that is misbehaving. Maybe I can get my motivation back and resume work on my game!

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      That's great to hear, I hope it goes smoothly! I do think many graphics programmers forget what it was like to learn shaders in the first place, so I try to put myself in a beginner's shoes. Thanks for watching!

  • @roughdolphdolph
    @roughdolphdolph Рік тому

    the best shader tutorial EVER!

  • @stefanwszyszynski1405
    @stefanwszyszynski1405 2 роки тому

    Your are awesome. You have done a lot of work. Keep it up. Good work!

  • @supersaiyan9616
    @supersaiyan9616 2 роки тому

    Thank you so much Ned, for this tutorial.

  • @green8026
    @green8026 Рік тому

    this helped me so much, thanks!

  • @aykcavusyan2001
    @aykcavusyan2001 Рік тому

    Thanks a lot for the amazing compilation of valuable informations 🙏

  • @ffs55
    @ffs55 Рік тому

    Amazing, thank you!

  • @thebravelittletoaster5395
    @thebravelittletoaster5395 2 роки тому

    So good, props to you!

  • @PixelDough
    @PixelDough Рік тому +3

    For anyone having troubles where the shader is invisible in 2021.3, it could be because your render pipeline asset is either set to Deferred, or set to auto/forced with the depth pre-pass option. Changing the "LightMode" = "UniversalForward" to "LightMode" = "UniversalForwardOnly" seems to do the trick with deferred. I'll update this if I find out how to fix it with the depth pre-pass option enabled. Disabling depth pre-pass would fix it but that's not really a solution to the issue

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      Thanks for this note!
      Did your project start with those options enabled? I did not mention them since my test projects defaulted to ForwardLit mode and no depth prepass (and also to avoid information overload!)
      Depth prepass breaks this shader because it doesn't have a depth pass, currently. We will be adding this in part 6. However, I won't cover deferred mode in this series. Maybe I will have to follow up with that!

    • @fuggerfly485
      @fuggerfly485 Рік тому +1

      @@NedMakesGames if you create the project with the '3D (URP)' template, it defaults your Depth Priming Mode to 'Auto' which doesn't work with the shader in the video. have to set it to 'Disabled'.

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      @@fuggerfly485 Thank you for that! I will make a note of it in the video description.

  • @nyscersul42
    @nyscersul42 2 роки тому

    If this series continues as per your other videos on here, i am gonna be keen to see it ready hehehe

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Oh yes, I have the other eight parts all researched and scripted. They’re definitely happening!

    • @nyscersul42
      @nyscersul42 2 роки тому

      @@NedMakesGames BIg Yay! Hehe

  • @Andrashh
    @Andrashh 8 місяців тому

    Hey Ned!
    Sorry to see that this series in unfinished and also that maybe the viewcount is the culprit on why you stopped making this series. If you worried about viewcount, keep in mind that people won't follow through a series if it's unfinished I think.
    I'm going to watch them anyways and going to check in after a few months to see for more parts.
    c: Thanks for the videos!!!

    • @NedMakesGames
      @NedMakesGames  7 місяців тому +1

      Hi, thank you! I still plan to finish the series, I've just had a super busy year. I'm hoping I'll have the time over the holidays.

  • @Mega-13
    @Mega-13 3 місяці тому

    Always when you find good tutorials the creator is MIA. Pls come back and finish this series ._.

  • @diegoduarte187
    @diegoduarte187 2 роки тому

    Impressive, thank you for the explanation.

  • @toowin1986
    @toowin1986 3 місяці тому

    Очень круто! Спасибо большое за подробные инструкции!

  • @cleandust530
    @cleandust530 2 роки тому

    finally... i'm waiting this vidoe.

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thanks! I hope it lives up to expectations 😄

  • @trell_7842
    @trell_7842 Рік тому

    Very thanks for this content.

  • @enzobarbon4501
    @enzobarbon4501 Рік тому

    You are a hero

  • @aidenwang1009
    @aidenwang1009 2 роки тому

    Love it so much

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Glad to hear it! Thank you for watching!

  • @hibiscusbear
    @hibiscusbear 2 роки тому

    amazing!

  • @tombuben
    @tombuben 2 роки тому

    What a great tutorial

  • @nazarremerchant
    @nazarremerchant Рік тому +1

    This is a great tutorial -- very appreciative of the thoroughness of your presentation. One small issue I had with the tutorial (I used the one you posted to Medium, which looks identical to youtube), is that when hooking up the material to the shader I used your variable name "_ColorMap". This led to the error message in Unity of "Shader does not have a MainTex variable". I simply changed _ColorMap to _MainTex and everything worked, so it looks like Unity now requires that specific name (I'm using 2022.2.0b8).

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      Ah enforced property names are one of my pet-peeves 😅 Thanks for letting me know though. I will check it out whenever I amend these tutorials for 2022.
      For now, there's no harm in renaming _ColorMap to _MainTex. Just make sure you also rename _ColorMap_ST to _MainTex_ST.

  • @benjamindreyer9884
    @benjamindreyer9884 Рік тому

    Your explanation is so good! The only thing I'm a bit confused about is what the each fragment's interpolated value at 30:15 represents? It can't be the UV coordinate right? since that is a 2d vector, but the interpolated values are just numbers.

  • @mohammadebrahim4038
    @mohammadebrahim4038 2 роки тому

    thanks for the video, waiting for the next one. it was a little hard to follow the code while just watching the video because i think it's better that you show us the code while you are typing and then switch to unity to see the the result instead of showing snapshot of the code after each change

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      Hi! Thank you for the feedback, and I'm glad you enjoyed it. I'm looking to improve the script sections for the next section!

  • @SigmaZer0
    @SigmaZer0 2 роки тому

    Any idea when the next one will come out, I enjoyed this on SO much!

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      Thank you, I'm glad! It will be out early August!

  • @siavashaliyari8567
    @siavashaliyari8567 2 роки тому

    Thank U

  • @Purpbatboi
    @Purpbatboi Рік тому

    You should teach how to do Per-Vertex lighting too

  • @quadriproduction
    @quadriproduction 2 роки тому

    THIS IS TOP TOP TOP

  • @thvk98
    @thvk98 Рік тому

    Can i use this shader for mobile?? I want optimized pbr custom shader for mobiles.

  • @huseyinpehlivan6072
    @huseyinpehlivan6072 3 місяці тому

    Hi ned i am writing same code but i am using CGPROGRAM but its take me a error "redefiniton of _Time " how can i fix that and what different using CG and HLSL its like nearly same programing language
    AND EVERYWHERE I REPLACE IT WITH CGINCLUDE INSTEAD OF CGPROGRAM, THE CODE STARTS WORKING AGAIN. WHAT IS THE REASON AND WHAT ARE THE DIFFERENCES?

  • @malxon1
    @malxon1 Рік тому

    At 27.40, did you mean to say "The Attribute struct is not available in the fragment stage" instead of The Attribute struct is not available in the vertex stage"?

  • @hldfgjsjbd
    @hldfgjsjbd 6 місяців тому

    What is the benefit of writing shaders instead of using graph? In practice.

  • @warblingpants6712
    @warblingpants6712 Рік тому +1

    My material is always invisible unless I set the render queue to 3000 or higher, and I don't know why... I wrote my own code but when it wasn't working I copy/pasted from your Medium article, and the issue still persists, any ideas why that could happen? I am on a newer version of unity (2022.2.13) but I can't imagine it's that much different. I also have all of the hlsl inside of the .shader file within the HLSLPROGRAM/ENDHLSL tags but I also don't think that should make a difference
    edit: found a solution, deleted every urp default PipelineAsset, and made my own and set it up with that one. seems like some default setting was messing with the shaders?

    • @PixelDough
      @PixelDough Рік тому

      I'm also having this issue. Disabling the depth pre-pass in the render pipeline settings seems to fix it. However I really would not like to disable that, as I've had issues with it being disabled before. So finding a real solution would be preferred

  • @jakemarcus9999
    @jakemarcus9999 Рік тому

    I don't know if it's the Mac version of the visual studio or what but I cannot Unity.RenderPipeLine.Unversal.ShaderLibrary or any of those other files under my packages folder in the solution explorer. Only a couple of .json files.

    • @NedMakesGames
      @NedMakesGames  Рік тому +1

      Hmm I don't have a Mac to test myself. Try enabling different options in the Preferences -> External Tools window. Maybe for Mac they're placed in a different csproj file.

  • @noirlavender6409
    @noirlavender6409 2 роки тому

    thank you very veyr much but, where is the next part? :(

    • @NedMakesGames
      @NedMakesGames  2 роки тому

      I'm editing it right now actually! Should be live early August.

  • @Shineglow
    @Shineglow 5 місяців тому +1

    Please help. Materials that use my shader are absolutly transparent. I'm pretty sure the shader is error-free. My unity version is 2021.3.1f1.

    • @Shineglow
      @Shineglow 5 місяців тому

      I found a solution:
      If I add "Queue"="AlphaTest+51" to the Pass section tags the object starts to be rendered.
      Is there a normal solution to this issue?

    • @Shineglow
      @Shineglow 5 місяців тому

      I tried creating a new project using the standard URP files and just set DeapthPrimingDisabled - it worked. The reason for this behavior is a mystery to me. Is this kind of tambourine dancing necessary in newer versions of Unity?

  • @nikitazuev3331
    @nikitazuev3331 2 роки тому

    Thank you)) if you have a time, would be very interesting, how to read ShaderGraph and Amplify Shader Editor HLSL auto-generated code. For example, i've made a shader in node-editor... i know HLSL base.... but in a couple moments i dont understand how to combine some effects. In Legacy render, i can open auto-generated .shader-file and see how it works. It is not a beautiful code, ofcourse... but still readable. Opposite in URP. When you opening .shadergraph-file it's unreadeable.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      That's a really interesting idea for a video! I think that Shader Graph generated code is almost two convoluted to use, but Amplify's isn't too bad.
      Thanks for watching!

  • @CymruCreator
    @CymruCreator 2 роки тому

    Hey man, I'm tired and I'm dyslexic.... I was very confused for a while since it looked like you were telling us to include two functions named Vertex. Which seemed problematic to me. eventually, I realised you had changed your datatype of your Vertex function from void to interpolators. can you please tell us things like this. it can get very frustrating. Thanks anyhow.

    • @CymruCreator
      @CymruCreator 2 роки тому

      hmm.. looks like you kinda did do that.... i guess what confused me is that you didn't show it being changed and it got me in a confused state. Tutorials are hard work and I appreciate your effort. please keep in mind that conflicting information like this can be incredibly confusing and debilitating for some viewers.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +2

      @Triadne Hey, thank you for the feedback! I appreciate hearing your point of view.
      I've had a little difficulty figuring out the best way to convey script changes in these videos. Maybe having both versions visible would be nice? Anyway, this is definitely something I can work on.

    • @CymruCreator
      @CymruCreator 2 роки тому

      @@NedMakesGames thanks for your reply, I have noticed that on some tutorials more at your level, they sometime show the actual typing of the changes. I do know though, that is a large amount of extra work. I have my own tutorial in the works so I know how complex it can be. I think your idea of showing both versions is a great one!, but also, I really love how you show the greyed out bits of code when you're highlighting stuff because it adds context. In that particular part, it looked like new code because I could not see the attributes struct. I think that if you'd also included that struct above the interpolation struct then it would have acted as an anchor to clue me in to where in the code I was looking at.
      Tha k you so much for reading, it makes me feel a lot better to be listened to, as it can be lonely with such an invisible disability.

    • @NedMakesGames
      @NedMakesGames  2 роки тому +1

      @@CymruCreator Hey, no problem! Thank you again for the feedback!
      I had tried typing out everything in a previous tutorial, but I kept making errors and having trouble keeping my voice in sync 😆 Maybe, at some point, I can create a script to automate this. In the meantime, I'll be conscious about providing better context.

  • @aeliusdawn
    @aeliusdawn Рік тому

    Great tutorial! It's quite hard to follow along on the code parts, especially like at 15:05 where the code to write is shown for a split second. Great stuff nonetheless

    • @NedMakesGames
      @NedMakesGames  Рік тому

      Thank you for the feedback! It's definitely a balancing act to get speed and usability correct.

    • @aeliusdawn
      @aeliusdawn Рік тому

      @@NedMakesGames No problem! Oh BTW, will you go over environment light probe integration? Would love to know how to integrate that in script format.

    • @NedMakesGames
      @NedMakesGames  Рік тому

      @@aeliusdawn Yes, light probes are planned for part 5!

  • @daryladhityahenry
    @daryladhityahenry Рік тому

    Is this really part 1? Why am I feel this is so hard? I mean, yes I don't know anything about everything what's been told in this video. Is there any kind of big outline about this before dive into these details?
    To be fair, I really at zero point for this topic... So... Yeah, quite hard to concentrate in minute 14 because I don't know anything. lol.. Do you have any suggestion?
    Or must I just continue watching, and rewatching till I got it?
    Thanks...

    • @Shineglow
      @Shineglow 5 місяців тому

      do you have any programming experience? If not, start learning C# and Unity. Shaders are part of so much more and without understanding the basics it will be very difficult to start here.

    • @daryladhityahenry
      @daryladhityahenry 5 місяців тому

      @@Shineglow hi. Yes I do have programming experience

  • @Mr_Teviel
    @Mr_Teviel Рік тому +1

    I get to ua-cam.com/video/KVWsAL37NGw/v-deo.html and my material is invisible, I got no errors any ideas?

    • @Mr_Teviel
      @Mr_Teviel Рік тому

      got it fixed, looks like I was using the wrong asset in my project settings! Great tutorial!

    • @NedMakesGames
      @NedMakesGames  Рік тому

      @@Mr_Teviel Thank you! Glad to hear you fixed it

    • @jadonmullinex9389
      @jadonmullinex9389 Рік тому +2

      @@Mr_Teviel I know this was a long time ago, but do you remember how you fixed this? It's happening to me too. What did you mean by "I was using the wrong asset in my project settings"? Thanks!

    • @bytepillow
      @bytepillow Рік тому +1

      It also happens to me too, do you still remember how you fixed it?

  • @kensteelyhuntergames484
    @kensteelyhuntergames484 2 роки тому +1

    but for what?

    • @NedMakesGames
      @NedMakesGames  2 роки тому +2

      For the love of shaders, of course!
      If you mean why write code shaders instead of using the Shader Graph? I go into it a bit in the video, but there are some things Shader Graph just can't do. With code, you'll have complete control.

    • @kensteelyhuntergames484
      @kensteelyhuntergames484 2 роки тому

      @@NedMakesGames oh, I understood, its like restrictions of blueprints\bolt, right? thx

  • @NedMakesGames
    @NedMakesGames  2 роки тому +4

    🚨 Edits: If you create your project from a template, ensure "Depth Priming Mode" is set to "Disabled" in your URP settings asset. To find this asset, open Project Settings, navigate to Graphics, and select the renderer asset at the top of the window.
    Hi everyone! Thanks for watching!
    And thank you again Kitty Cat Squash for sponsoring this video. Play it here: store.steampowered.com/app/1814110/Kitty_Cat_Squash/
    Join my Discord for some free keys too! discord.com/invite/ubxSVBK
    Why do you all want to learn to write URP shaders in code?

  • @abdulmaliqjinad1244
    @abdulmaliqjinad1244 Рік тому

    Hi Ned, thank you for this awesome tutorial but I have one error that I have spent the last 4 hours debugging. I have checked through the comment section and couldn't find any solution or comment about it.
    Error Message: Shader error in 'Unlit/MyLitShader': syntax error: unexpected token 'PositionInputs' at /Documents2/Unity/Github/Projects/Shaders001/Library/PackageCache/com.unity.render-pipelines.core@12.1.10/ShaderLibrary/Common.hlsl(1180) (on d3d11)
    The error is from the unity package and I don't know how to solve it. Would appreciate if you can take me through solving the error. Thanks