Shader Code in Universal Render Pipeline | Unity Basics

  Рет қаралды 26,806

Daniel Ilett

Daniel Ilett

Күн бұрын

Пікірлер: 34
@VRwithAndrew
@VRwithAndrew 3 жыл бұрын
Great work! There really needs to be more content like this available. :)
@pulkit.guglani
@pulkit.guglani 3 жыл бұрын
I really like how game developers and content creator support each other.
@erlendsol
@erlendsol 3 жыл бұрын
Thank you so much! I've been trying to learn to code shaders for a little while, but its been so difficult to find good and easily understandable guides and information. This was really helpful!
@danielilett
@danielilett 3 жыл бұрын
Glad it helped! I'd be interested in doing more like videos like this for absolute beginners to code shaders at some point :)
@CodemasterJamal
@CodemasterJamal 2 жыл бұрын
Excellent tutorial. This took me in the right direction for completing the shaders for my hair materials.
@giovannimurru
@giovannimurru 2 жыл бұрын
Thank you. You gave me a good start point to convert my shader.
@emagiannu
@emagiannu 3 жыл бұрын
I really don't understand why there are so many tools available for any programming language out there and when it comes to shader code you have to be thankful when get syntax highlighting. :(
@ciankiwi7753
@ciankiwi7753 3 жыл бұрын
it seems tools like shadergraph are trying to replace shader code eventually, so not much effort is put into making shader code a better experience. i would still love to see tools for improving the shader code experience because shadergraph isnt universal. working with OpenGL requires shader code, and other game engines might not have a graph tool.
@CaptainJeoy
@CaptainJeoy 3 жыл бұрын
@@ciankiwi7753 i just hope unity doesn't totally replace writing shader code with shader graph, they can and should both exist side by side, y'know, with some folks like myself that flow best when writing actual shader code, the visual noding stuffs really infuriates the hell outta me.
@pokemnfan1
@pokemnfan1 3 жыл бұрын
The video I didn't know I needed.
@icon8391
@icon8391 3 жыл бұрын
thx for the tutorial keep up the good work
@Playeroth
@Playeroth Ай бұрын
my material is invisible..? why? i can follow the exact same thing as the tutorial but regardless it will be transparent. I searched and if i set the queue to + 2501 then it will appear but that doesnt really explain anything. Using URP
@DonDisainer
@DonDisainer 3 жыл бұрын
what a nice tutorial!!! tnx!
@mangonetic2279
@mangonetic2279 2 жыл бұрын
Thank you ! This was so helpful 😍
@gaschneidr
@gaschneidr 3 жыл бұрын
It's been a pain finding some good resources on writing shader code for the new rendering pipelines and your video was perfect for me! When it comes to writing shader code for HDRP, is it the same way as to URP? I cant find anything about it in the documentation
@danielilett
@danielilett 3 жыл бұрын
The documentation is unfortunately a bit lacking, but the process is largely similar I believe. HDRP also uses HLSL rather than Cg - as far as I'm aware, the main differences are that you might need to #include different files, and HDRP supports different tags than URP. Keijiro Takahashi's GitHub is usually great for things like this. Here's a relatively basic shader file - it should give you some idea of what to expect from HDRP shader coding, and you can check out the other shaders in the project: github.com/keijiro/Kino/blob/master/Packages/jp.keijiro.kino.post-processing/Resources/Utility.shader
@gaschneidr
@gaschneidr 3 жыл бұрын
@@danielilett thank you so much! I figured the package import would be different and I tried changing the names but it wasn't recognizing. Too bad there's not much docs on this from Unity. Now from the link you sent me I figured out what was going on. Also, is there any shader reference specific to the new pipelines? I found one in the user manual but its fairly incomplete. So many things missing. Anyways, thanks for the help and nice work you're doing on your channel!
@danielilett
@danielilett 3 жыл бұрын
For the includes, I'm not aware of there being an official reference for the new pipelines - the best I can find is this site (for URP only!) which lets you at least read through the included shader files online: xibanya.github.io/URPShaderViewer/ You can also read the shader include files directly. If you go to the Project View, they're all in the Packages folder. The core library is under "Packages/Core RP Library/ShaderLibrary", and the HDRP versions are under "Packages/High Definition RP/Runtime/ShaderLibrary", I think. It's a bit of a shame it takes so much digging to figure everything out because some of these files are quite big and full of macros, but it's useful to know where they all are! Otherwise, unless I'm missing something, the documentation for *actually writing shader code in HDRP* is really lacking unfortunately!
@gaschneidr
@gaschneidr 3 жыл бұрын
@@danielilett that's very helpful, thank you. I wanted to use HDRP for a stylized game project because of the better lighting out of the box, but I'm considering sticking to URP since there's a lot more resources available and tutorials. Maybe in the future they will implement volumetric lights and all the other stuff, or I'll figure out how to implement it myself.
@Lantertronics
@Lantertronics 3 жыл бұрын
It's impossible to overstate how helpful this discussion is! The following statements are both true: (a) Unity is the best documented of any game engine, and (b) Unity's documentation is a total mess. ;)
@valentin_bunin
@valentin_bunin 10 ай бұрын
Thank you!
@marly1017
@marly1017 3 жыл бұрын
May I ask if you are using any plugin that makes the writing easier(like autocomplete)? Or do you just write everything yourself
@xr_xharprazoraxtra5428
@xr_xharprazoraxtra5428 Жыл бұрын
Question : how to get Camera and pixel distance ? I am trying to make a shader such that when I walk to it, it will fade in, and it will fade out when I leave
@shadowxgaming4247
@shadowxgaming4247 2 жыл бұрын
Question: I did everything in the tutorial, but for some reasons any mesh I apply this material to become semi-transparent?? How do I fix this?
@shadowxgaming4247
@shadowxgaming4247 2 жыл бұрын
Oh my bad, it only appears semi-transparent in editor haha
@pinkeHelga
@pinkeHelga 2 жыл бұрын
Getting properly setup some array properties seems to be a serious problem in URP shaders. How can we do so? Pro: Would be nice to get it work in the inspector without an Editor class, e.g. by some PropertyDrawer.
@FunkyFrag
@FunkyFrag 2 жыл бұрын
is this also working for HDRP? Want to get started with shader programming with out shader graphs, cause I like to code stuff
@danielilett
@danielilett 2 жыл бұрын
Coding shaders in HDRP can be quite a bit more difficult than URP and built-in, just because it's doing a lot more under the hood. Even the Unity docs don't really recommend it. For that reason, I've kind of shied away from doing HDRP code shaders. The syntax and general structure is the same, but as far as I can tell, HDRP uses many different include files, passes and stuff like that. So if your question is whether you can use the exact shader in this video in HDRP, I don't know if it would work, but it wouldn't be far off something that works. At the very least, you'd need to change the RenderPipeline tag and the include files. But it'll probably get quite a lot more difficult to make anything more complicated.
@onewayroad3765
@onewayroad3765 3 жыл бұрын
I'm more confuse when to use add, multiply, and divide
@marly1017
@marly1017 3 жыл бұрын
ok im just asking Im not complaining but is it weird that my editor dont auto complete my lines like in when writing in c# or is it just how it is in shaders?(also if it is is theres a solution for that?)
@marly1017
@marly1017 3 жыл бұрын
like i mean its just outrageous why wouldn't it exist it is such a basic thing exist it speeds up things so much
@danielilett
@danielilett 3 жыл бұрын
Support for Visual Studio, which is the default for Unity, isn't great - it's mostly just syntax highlighting, and even that's a bit basic. However, if you use Visual Studio Code, there's a plugin that's great for shader languages. It won't autocomplete the Unity-specific stuff, but it'll help you a lot in pure HLSL, which is most of what you'll be writing: marketplace.visualstudio.com/items?itemName=slevesque.shader. Hope that's what you're looking for!
@marly1017
@marly1017 3 жыл бұрын
@@danielilett thank you very much I appreciate the quick response
@王震宇-e7x
@王震宇-e7x 3 жыл бұрын
liked!:D
Unlocking The Power Of Unity's Scriptable Render Pipeline
21:05
Game Dev Guide
Рет қаралды 225 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 9 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Break Down Of A Basic Unity Unlit Shader - Intro To Shaders
19:07
Benjamin Swee - Custom Unity Shaders
Рет қаралды 13 М.
10 Shaders in 10 Minutes - Unity Shader Graph
9:38
Daniel Ilett
Рет қаралды 108 М.
Impossible Geometry with Stencil Shaders in Unity URP
7:02
Daniel Ilett
Рет қаралды 50 М.
Why Unreal Engine 5.5 is a BIG Deal
12:11
Unreal Sensei
Рет қаралды 1,5 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 749 М.
Unity Job System - A Practical Code Example
13:50
Infallible Code
Рет қаралды 83 М.
Building code-free shaders in Unity with Shader Graph
30:02
AdamCYounis
Рет қаралды 75 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 9 МЛН