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
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!
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 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!
@@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.
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!
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!
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.
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!!
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!
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!
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.
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! ❤
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
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!
@@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'.
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
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).
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!!!
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
🚨 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?
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!
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 :).
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!
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!
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
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!
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.
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).
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.
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
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
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.
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"?
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?
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?
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?
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?
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
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.
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!
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.
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.
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...
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.
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.
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.
@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.
@@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.
@@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.
@@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!
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.
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
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
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!
That's high praise, thank you! I knew if I was going to do this, I needed to do it right.
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.
Thank you for watching! That is great timing, I hope this helps you out!
@@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!
@@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.
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!
I'm really glad to hear that! Shouldn't be too long until part two!
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!
I want to thank all the patrons too. This is the stuff we need tutorials on. Really insightful stuff.
Yes, thank you again patrons! And thank you for the kind words!
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.
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!!
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!
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!
Hi, thank you, that's really nice to hear. Thank you for watching!
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.
Thank you! Yeah, I thought those attributes were nice. Macros are very cool, I’d like to do a deeper video on them sometime.
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! ❤
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.
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
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
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!
@@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'.
@@fuggerfly485 Thank you for that! I will make a note of it in the video description.
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
Thank you! That’s definitely a hard transition to make. Even if you stick with shader graph, knowing HLSL will help with custom functions!
@@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
@@tylerdelange5959 😄 Great to hear. Thanks for watching!
Always when you find good tutorials the creator is MIA. Pls come back and finish this series ._.
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).
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!!!
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.
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
Thank you for the kind words! I'm glad this helped you out!
Thanks a lot for taking this initiative. Looking forward to Part 2!
🚨 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?
You are a godsend
I've never been able to fully understand shaderlab until now
Thank you so much
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!
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!
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 :).
That is the best tutorial about jumping into shaders I have saw. Awesome work!
Thank you, I appreciate the kind words!
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 !
Thank you! I definitely agree, which is why I decided to make these. Thanks for watching!
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!
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!
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
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!
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!
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.
Очень круто! Спасибо большое за подробные инструкции!
Great explanations Ned! Really appreciate the time you took to make this video
These are some really good tutorials ... thank you so much for the written and the spoken formats ...
Absolutely the best shader content
Thank you for watching! I'm glad to hear that!
the best shader tutorial EVER!
Hey thank you! I appreciate it
Yeah this video definitely gave me some issues but in the end once I got it working, this is a really really good tutorial
Exceptionally well made and useful, looking forward to watching more.
Thank you! I hope you enjoy future parts!
Ned, you are a genius! Thanks for sharing this knowledge!
You're too kind! Thank you for watching!
Another great production
Thank you! I’m proud of the end product!
If this series continues as per your other videos on here, i am gonna be keen to see it ready hehehe
Oh yes, I have the other eight parts all researched and scripted. They’re definitely happening!
@@NedMakesGames BIg Yay! Hehe
cannot wait to see it, really thanks!
Thank you for watching! I'm planning to release the next video in early August!
Wow amazing, exactly what i was looking for!
Great to hear that! I hope you enjoy
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).
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.
As always, great info! 👍
Thank you! Thanks for watching
Your are awesome. You have done a lot of work. Keep it up. Good work!
Thank you, I really appreciate it!
this helped me so much, thanks!
Thank you so much Ned, for this tutorial.
You’re welcome! Thanks for watching
Great video. Concepts are explained clearly.
Thanks, I'm glad to hear that! I went through many script drafts!
Amazing, thank you!
Thanks a lot for the amazing compilation of valuable informations 🙏
Thank you for watching!
Impressive, thank you for the explanation.
Thank you, glad it helped!
finally... i'm waiting this vidoe.
Thanks! I hope it lives up to expectations 😄
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
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!
AMAZING tutorial!
You are a hero
Glad to help! Thank you for watching
You should teach how to do Per-Vertex lighting too
Very thanks for this content.
You're welcome! Thank you for watching
So good, props to you!
Thanks for watching!
Love it so much
Glad to hear it! Thank you for watching!
amazing!
Thank you!
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
Thank you for the feedback! It's definitely a balancing act to get speed and usability correct.
@@NedMakesGames No problem! Oh BTW, will you go over environment light probe integration? Would love to know how to integrate that in script format.
@@aeliusdawn Yes, light probes are planned for part 5!
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.
Any idea when the next one will come out, I enjoyed this on SO much!
Thank you, I'm glad! It will be out early August!
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"?
THIS IS TOP TOP TOP
Glad to hear, thanks for watching!
What a great tutorial
Thank you!
What is the benefit of writing shaders instead of using graph? In practice.
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.
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?
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?
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?
thank you very veyr much but, where is the next part? :(
I'm editing it right now actually! Should be live early August.
Thank U
Thanks for watching!
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?
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
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.
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!
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.
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.
Can i use this shader for mobile?? I want optimized pbr custom shader for mobiles.
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...
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.
@@Shineglow hi. Yes I do have programming experience
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.
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.
@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.
@@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.
@@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.
I get to ruclips.net/video/KVWsAL37NGw/видео.html and my material is invisible, I got no errors any ideas?
got it fixed, looks like I was using the wrong asset in my project settings! Great tutorial!
@@Mr_Teviel Thank you! Glad to hear you fixed it
@@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!
It also happens to me too, do you still remember how you fixed it?
but for what?
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.
@@NedMakesGames oh, I understood, its like restrictions of blueprints\bolt, right? thx
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