Zelda Breath of The Wild Toon Shader Graph - Unity Tutorial

  Рет қаралды 60,572

Binary Lunar

Binary Lunar

Күн бұрын

Пікірлер: 216
@BinaryLunar
@BinaryLunar 4 жыл бұрын
📝 The Ultimate 2D & 3D Shader Graph Course: tinyurl.com/3b5zac7c 🌎 Let us know what you think about this video, also feel free to chat with us on our Discord server: discord.com/invite/b6bXKSV ❤ Support us on Patreon www.patreon.com/BinaryLunar and gain access to all our tutorial projects. 📦 Check our Assets on Unity Assets Store: assetstore.unity.com/publishers/47136
@gryffin533
@gryffin533 4 жыл бұрын
Here from r/gamedev and this is exactly what i needed, Thank you so much
@BinaryLunar
@BinaryLunar 4 жыл бұрын
Welcome aboard!
@B.BiStudios
@B.BiStudios 2 жыл бұрын
Probably the most normal tutorial on Shader Graphics that I have met so far, it turned out to assemble the shader from the first time, there was no need to look at what this guy had done in the settings, everything is clear here, definitely like!
@brunomoreira5883
@brunomoreira5883 3 жыл бұрын
if you see in node: "invalid condition", open the code and change: #if SHADERGRAPH_PREVIEW" to #if defined(SHADERGRAPH_PREVIEW) in all. If does not work, maybe your Unity version is recently.
@bioinvasion_
@bioinvasion_ 3 жыл бұрын
Thanks, it worked!
@301unknown7
@301unknown7 3 жыл бұрын
ohhhh,It's great
@anthonyparisi8551
@anthonyparisi8551 3 жыл бұрын
You are a friend, kind sir.
@Backurio
@Backurio 3 жыл бұрын
Dumb me. Instead of reading the first comment, I wasted 30 minutes figuring this out myself... Btw. you can also write #ifdef instead of #if
@Rexmon
@Rexmon 3 жыл бұрын
thx
@yaarrghmematey
@yaarrghmematey 2 жыл бұрын
Love it! Awesome Tutorial, just one quick fix if you wish to have rim lighting affected by shadows, link the multiply node that multiplies the Shadow Atten and NDotL to the Rim Threshold Power Node.
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Thanks!
@ExploreImagineDefineCreate
@ExploreImagineDefineCreate 3 жыл бұрын
Honestly thanks for including the music in the description, it's amazing! I love scrub-a-dub the shader!
@AltairCoke
@AltairCoke 3 жыл бұрын
Great work converting this shader into a graph ! I am having a hard time to make it receive shadows though, but I am quite reassured to know that I am not the only one in this position.
@VezixHaikal
@VezixHaikal 3 жыл бұрын
same here, do you find the solution?
@VezixHaikal
@VezixHaikal 3 жыл бұрын
found the solution replace this line " ShadowAtten = mainLight.shadowAttenuation;" in the CustomLighting.hlsl , with those lines " ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData(); float shadowStrength = GetMainLightShadowStrength(); ShadowAtten = SampleShadowmap(shadowCoord, TEXTURE2D_ARGS(_MainLightShadowmapTexture, sampler_MainLightShadowmapTexture), shadowSamplingData, shadowStrength, false); "
@Arda-bj4ku
@Arda-bj4ku 3 жыл бұрын
@@VezixHaikal Thank you so much!
@AltairCoke
@AltairCoke 3 жыл бұрын
@@VezixHaikal Hey ! Sorry, my answer comes a bit late: I manage to get a satisfaying result with a PBR shader graph instead (toon aspect, shadows, even additional lights). Figured it was easier for me to use PBR but glad you found your way around with the Unlit shader graph ! :)
@UhGoomba
@UhGoomba 3 жыл бұрын
@@AltairCoke Hey, how did you do this?
@zurielbaxcajay2559
@zurielbaxcajay2559 Жыл бұрын
I got the shadow working. I kept the Custom Function node as "inherit" instead added to the Blackboard the keyword (Boolean)"_MAIN_LIGHT_SHADOWS" just enable it as default and it the shadows will work. If you want soft shadow then add the keyword (Boolean)"_SHADOWS_SOFT". Also thank you for the tutorial!
@neoturtle1753
@neoturtle1753 Жыл бұрын
Thank you so much! I've been stuck on this problem for a long time, and it's so nice to finally get it over with. Just ran into a problem though, it seems that the shadows are moving as I look around, and not staying in the same place. Any ideas?
@zurielbaxcajay2559
@zurielbaxcajay2559 Жыл бұрын
@@neoturtle1753 hmm it should only move with the direction of the sun. Maybe the directional light is moving with your player script. I would check if there is anything on the direction light.
@SafeZ0nee_
@SafeZ0nee_ Жыл бұрын
@@zurielbaxcajay2559 I'm still very new to Shader Graph and I'm having trouble adding the shadows. I took out the multiple and left it in "Inherit", then I added the _SHADOWS_SOFT keyframe and set it to default, but the shadows still didn't work. Do I have to add the keyframe somewhere and link it to something to activate it or something?
@ZurielDev
@ZurielDev Жыл бұрын
@@SafeZ0nee_ Hey I just upload a vid on how I did it. its the only video I have up atm
@dwaynebiggs
@dwaynebiggs Жыл бұрын
Great tut, cheers. If anyone else is getting an "invalid conditional" error when setting up the Custom Lighting function at the start, I fixed it by replacing all instances of #if SHADERGRAPH_PREVIEW with #if defined (SHADERGRAPH_PREVIEW) in the Custom Lighting hlsl script.
@bigtrouble1922
@bigtrouble1922 Жыл бұрын
Thank You Sir
@fruitdudetv
@fruitdudetv 4 жыл бұрын
took me now 3 hours to remake it cause unity is so freaking complex fml... but in the end i have a working shader now. thank you very much !
@BinaryLunar
@BinaryLunar 4 жыл бұрын
Good job!
@mikemiller0830
@mikemiller0830 3 жыл бұрын
I wish I had half of the knowledge you clearly do about shader graphs. Nonetheless, excellent tutorial. Thank you for sharing your knowledge and expertise!
@BinaryLunar
@BinaryLunar 3 жыл бұрын
You welcome! , knowledge come by studying and experimenting.
@frostcop6693
@frostcop6693 4 жыл бұрын
This is so high quality! Thanks a lot
@greebsta
@greebsta 4 жыл бұрын
Thank you for this. I wrote a shader for my Msc group project already but it was far more complex than this, with a less appealing result (it didn't even contain rim-shading). I have since rewritten the shader based on this tutorial, and the result is spectacular.
@Hyphen3372
@Hyphen3372 3 жыл бұрын
looks awesome m8 really loving it and your guys tutroials.
@athrehollakal2682
@athrehollakal2682 3 жыл бұрын
Great tutorial! very easy to follow! Love your work!
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Thanks!
@sidaodograu2950
@sidaodograu2950 4 жыл бұрын
Wow that's fantastic! Great job, really appreciate!
@juanmengual639
@juanmengual639 3 жыл бұрын
Amazing tutorial, thanks for all the effort!
@BinaryLunar
@BinaryLunar 3 жыл бұрын
You welcome!
@Tosmo
@Tosmo 3 жыл бұрын
Hey! Big thanks for this. I used this tutorial in making my most recent project and gave you a shout for this tutorial in the video
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Kind of you 😊
@uinferno
@uinferno 4 жыл бұрын
Wow this was a great tutorial, thank you!
@AndyxbecK
@AndyxbecK 2 жыл бұрын
Solution to shader not receiving shadows: Instead of multiplying the N dot L with ShadowAtten and then plugging into the Light Intensity Smoothstep, have the Multiply node AFTER the Light Intensity Smoothstep, multiplying with ShadowAtten. Make sure you then plug this Multiply into both nodes the Smoothstep led into. This solved the issue for me. Hope this helps.
@quentin6687
@quentin6687 2 жыл бұрын
Can you explain this please ? " Make sure you then plug this Multiply into both nodes the Smoothstep led into.", what is " Smoothstep led "?
@zakimuhammed4662
@zakimuhammed4662 Жыл бұрын
Hey Can you please Help me Here. Even After following your Steps the Shadows are not working. can you please hep me...??? Thanks.
@ganyu9348
@ganyu9348 Жыл бұрын
Your way doesn’t work, don’t follow this guy
@taxi.man9815
@taxi.man9815 Жыл бұрын
Cool tutorial! Unfortunately for me the light script doesn't work? Every tutorial I try has the same thing happen so idk what I've done wrong, its a standard URP project with shader graph installed. Any help would be MUCH appreciated
@Krechevskoy
@Krechevskoy 3 жыл бұрын
Thank you! This was absolutely amazing.
@olivergiddings8426
@olivergiddings8426 4 жыл бұрын
Easy to understand, Thank you very much!
@jjaylee6095
@jjaylee6095 Жыл бұрын
I connected according to your appearance, but in the end, no shadows appeared when the object blocked me
@ksatta_
@ksatta_ Жыл бұрын
same
@jonataslima8901
@jonataslima8901 3 жыл бұрын
The shadow is not working to me, i follow every steps, what could it be?
@VezixHaikal
@VezixHaikal 3 жыл бұрын
hmu if you solved it
@maxschmidt2897
@maxschmidt2897 3 жыл бұрын
Cannot manage to get my objects affected by shadows either. Pls help
@makoto_shibari
@makoto_shibari 3 жыл бұрын
Hi!! Great post but... I stuck in the begging xD the Custom Function Node show me the error "variable '_Customfuntion_616b783abda74489a59a6438b9bad9a_Direction_0' used without having been completely initialized" and I follow your step one by one. I'm using unoty version 2020.3.21f1. Sorry to bother you
@fabianf.2300
@fabianf.2300 Жыл бұрын
Hi there! I was struggling with this a lot too. right click in Assests - Create - Rendering - Create a HDRP Asset, then go to Edit - Project Settings - Graphics, go to 'Scriptable Render Pipeline Settings' and select the newly created script. From that point on, most issues will sort themselves out, the error will still show up but now you can create the shader. From what I understand, this will create a new Renderer that works with whatever you do in Shader Graph but don't take my word for it.
@7azDingo
@7azDingo 3 ай бұрын
I'm having issue with lighting. It seems this shader only "react" to one light source? I have multiple lights in my scene and other lights are ignored.
@aoliepung5692
@aoliepung5692 3 жыл бұрын
Amazing !!! Nice tutorial Shader Graph
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Thanks!
@mushfiq_iqbal
@mushfiq_iqbal 4 жыл бұрын
r/gamedev brought me here. Thanks for the tutorial.
@BinaryLunar
@BinaryLunar 4 жыл бұрын
You are very welcome!
@sasaramorinaga
@sasaramorinaga 3 жыл бұрын
Got stuck at the custom lighting part, I keep getting Shader error in 'hidden/preview/CustomFunction_E8D9DD8F': variable '_CustomFunction_E8D9DD8F_Direction_0' used without having been completely initialized at line 38 (on d3d11) Shader warning in 'hidden/preview/CustomFunction_E8D9DD8F': 'TransformObjectToWorld': implicit truncation of vector type at line 76 (on d3d11)
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Which Unity version you using?
@sasaramorinaga
@sasaramorinaga 3 жыл бұрын
@@BinaryLunar Unity 2019.4.21f1 (64-bit), I converted mats, created the shader but then I get stuck on that part and I dont know why, could it be the model or that I'm importing the script wrong? I drag the script inside my assets and it detects it when I try to add it in the custom function.
@BinaryLunar
@BinaryLunar 3 жыл бұрын
@@sasaramorinaga make sure you typed the custom function name "MainLight"
@sasaramorinaga
@sasaramorinaga 3 жыл бұрын
@@BinaryLunar God I must be blind I didn't see that, thanks doing that solved the issue, only problem I have now is my model requires tiling and offset in textures, since this shaders doesn't have it if I use it my model UV and textures get all glitched up and out of place ¿any easy way to add this? EDIT: Nevermind I think I figured it out, I created a Tiling and Offset node and linked the out to the Sample Texture 2D UV, then linked a Vector2 to the Tiling value and that fixed my textures, now the shader is working as I wanted to. ~
@LinLin-cd4qo
@LinLin-cd4qo 2 жыл бұрын
Thank you for your tutorial! I don't know how to make you receive the feedback. Several days ago, I found an asset that you made about this tutorial, so I paid for that . Hope that feedback helps you!
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Thanks! we will check soon
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Where did you wrote the feedback ?
@LinLin-cd4qo
@LinLin-cd4qo 2 жыл бұрын
@@BinaryLunar Sorry, maybe you misunderstand me, I don’t know if it’s a translation problem, I mean I bought your asset to support your tutorial.
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Kind of you! Thanks for your supprot.
@riccardocafagna6816
@riccardocafagna6816 3 жыл бұрын
Wow, amazing tutorial! Very useful!
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Kind of you!
@riccardocafagna6816
@riccardocafagna6816 3 жыл бұрын
@@BinaryLunar Could you help me with a little question? I'm using Unity 2019.4 and shadows aren't casting, I watched your tutorial almost 2-3 times and everything is right. Do you have any suggestion for me? Thank you in advance.
@brunomoreira5883
@brunomoreira5883 3 жыл бұрын
the cast shadows dont work to me...
@wite_1503
@wite_1503 9 ай бұрын
I'm struggling to have the shadows working. Any solutions?
@tejastjs9981
@tejastjs9981 7 ай бұрын
In Blackboard add the following 2 keywords (- Add(+) -> Keyword -> boolean) _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE In Graph inspector make sure the "default" checkbox is set to true for both keywords. This should make it work :)
@yuukitakemoto7183
@yuukitakemoto7183 3 жыл бұрын
it works on unity 2020.1.3f1 ? because shadows aren't working
@217tman3
@217tman3 3 жыл бұрын
Add three keyword can solve this problem _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT
@JamesHodge96
@JamesHodge96 3 жыл бұрын
@@217tman3 add the keywords to what exactly? thanks
@turbokaiser
@turbokaiser 3 жыл бұрын
​@@217tman3 mine doesnt recieve shadows from other objects do you have any solution for this?
@217tman3
@217tman3 3 жыл бұрын
@@JamesHodge96 you can refer to this:kzbin.info/www/bejne/iHScYqiuh7l8mpo
@217tman3
@217tman3 3 жыл бұрын
@@turbokaiser kzbin.info/www/bejne/iHScYqiuh7l8mpo
@zakimuhammed4662
@zakimuhammed4662 Жыл бұрын
Hey Can you please Help me Here. The Final Steps about Taking the Shadows of other Objects Doesnt work.
@faulty1106
@faulty1106 10 ай бұрын
the lighting script does not work with the current version of unity
@FransiscaAdis
@FransiscaAdis 3 жыл бұрын
Hello, thank you for this great tutorial! It helps a lot! but I'm stuck at shadow part. Mine still can't cast and received any shadow from other objects. I tried using keywords as I found from your comment section but still not working. Anyone can help? I appreciate a lot. Thank you.
@BinaryLunar
@BinaryLunar 3 жыл бұрын
discord.com/invite/b6bXKSV hiya, join us in the discord server, will refer you to the solution posted there.
@toehtetpotatoe7549
@toehtetpotatoe7549 2 жыл бұрын
Thank you for great tutorial...everything works but the last shadow does not work for me :(
@Nyx_z_
@Nyx_z_ 2 жыл бұрын
For me too, could you fix it?
@toehtetpotatoe7549
@toehtetpotatoe7549 2 жыл бұрын
@@Nyx_z_ No i couldn't :(
@NathanielPennington
@NathanielPennington 2 жыл бұрын
Not receiving shadows? In CustomLighting.hlsl Use this: ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData(); float shadowStrength = GetMainLightShadowStrength(); ShadowAtten = SampleShadowmap(shadowCoord, TEXTURE2D_ARGS(_MainLightShadowmapTexture, sampler_MainLightShadowmapTexture), shadowSamplingData, shadowStrength, false); Instead of this: ShadowAtten = mainLight.shadowAttenuation;
@jgalant
@jgalant Жыл бұрын
Awesome! Thank you!!
@inkofthedragon
@inkofthedragon 2 жыл бұрын
I just started this tutorial and right off the start I can't see any Vector1 options as shown in the video and there's an error in the shader graph "unterminated character constant at line 409"
@BinaryLunar
@BinaryLunar 2 жыл бұрын
It has been replaced by float.
@legendarywolf2372
@legendarywolf2372 Жыл бұрын
can use this tut for built-in render pipline?
@yadrocinema
@yadrocinema Жыл бұрын
not receive shadows. Unity 2021.3.14
@AminRaeisinia
@AminRaeisinia 2 жыл бұрын
Thank you so much for this great tutorial, just one question, is there any way to add a normal map to this unlit shader? btw I was looking for a good Toon Shader until I found this one, It helped me a lot.
@PrincessPotion
@PrincessPotion 2 жыл бұрын
I believe that you can replace the original Normal Vector node with a Texture 2D property for you normal map, plugged into a Sample 2D Texture node, into a Normal Strength node with a float property for the normal strength, into a Transform node going from Tangent -> World. At least, that's what I'm using with a similar unlit shader and it works.
@Michaentus
@Michaentus 3 жыл бұрын
Nice tutorial, except for the final part with the shadows that doesnt work as others said already. Tried with some Keywords but to no avail so far.
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
Did you sort it out? please let me know if so
@VezixHaikal
@VezixHaikal 3 жыл бұрын
@@SamDigiDraws same here do you guys sort it out?
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
@@VezixHaikal yes I did
@Arda-bj4ku
@Arda-bj4ku 3 жыл бұрын
@@SamDigiDraws Can anyone explain how to fix shadows?
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
@@Arda-bj4ku use pbr graph instead of unlit shader graph, and do the exact as he did except connect it to the Emission instead of base color
@DevilPork92ITA
@DevilPork92ITA 2 жыл бұрын
Well done man 👍
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Kind of you!
@LukmonAgboola
@LukmonAgboola Жыл бұрын
how can i change the direction of the light?
@vishnusugumar8999
@vishnusugumar8999 3 жыл бұрын
i cant add shows to it, i did as same as u said and the shadow is not appearing. plz help me iam stuck in this for a week now
@pedrovasconcellos3346
@pedrovasconcellos3346 3 жыл бұрын
I am receiving the following error message: "Shader error in 'hidden/preview/DotProduct_6e87caffbc3648b9b221cf858178ba6f': Invalid conditional expression. at Assets/Scripts/CustomLighting.hlsl(5)" Although I am following the tutorial closely. And I am using Unity 2020.2.2f1. Any idea as to what might be happening here?
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Use 2019.4 we didn't test this shader on 2020.2 which have radical changes to shader graph
@pedrovasconcellos3346
@pedrovasconcellos3346 3 жыл бұрын
@@BinaryLunar Thanks, that was indeed the problem!
@emmanuelguillot1
@emmanuelguillot1 3 жыл бұрын
Seems like you have to replace the: #if SHADERGRAPH_PREVIEW with #ifdef SHADERGRAPH_PREVIEW as well as the #if SHADOWS_SCREEN with #ifdef SHADOWS_SCREEN inside the CustomLighting.hlsl file Found it here: forum.unity.com/threads/if-shadergraph_preview-no-longer-works-in-2020-2-custom-functions.1026982/
@Moeren588
@Moeren588 3 жыл бұрын
@@emmanuelguillot1 just the answer I needed, thank you!
@RoroGames03
@RoroGames03 2 жыл бұрын
Hi, is there any place I could download the shader graph file? I went through the whole video the toon shading works but the Shadow part is not working for me, I tried doing it over and over again but still not working:(
@BinaryLunar
@BinaryLunar 2 жыл бұрын
Sure, you can download all projects files from Patreon : www.patreon.com/posts/44431213
@vishnusugumar8999
@vishnusugumar8999 3 жыл бұрын
I am getting rim shading on both sides. pls help me with this
@RolandStudios
@RolandStudios 2 жыл бұрын
whats the best way to add norm bump to this, can we do this without converting to lit shader
@conorokane
@conorokane 3 жыл бұрын
Thanks - really useful and clear.
@BinaryLunar
@BinaryLunar 3 жыл бұрын
You welcome!
@fahreziadha
@fahreziadha 2 жыл бұрын
what version of shader graph ur using? i cant see unlit graph option :'(
@tutulio9095
@tutulio9095 3 жыл бұрын
Hey, the shadows are not working, do you have any idea why? I had to change it to pbr to get shadows to work, but it doesn't look good =/
@AltairCoke
@AltairCoke 3 жыл бұрын
Have you tried reducing the smoothness and mettalic to 0 ? I haven't tried it yet, so I am not sure how it will affect the overall rendering but it should prevent light from diffusing around the specular and rim parts. Maybe that's the problem you are having atm.
@tutulio9095
@tutulio9095 3 жыл бұрын
@@AltairCoke I am using lit shader right now and setting the albedo to emission, render mode specular and settings specular to 0, it is working fine! but for the unlit shader, I had to type the keyworks in each material in debug mode
@AltairCoke
@AltairCoke 3 жыл бұрын
@@tutulio9095 OK thanks! Worth giving it a try this evening. 🙂
@geranmannberg
@geranmannberg 3 жыл бұрын
Where did you get the Link model shown in the end of the video? Did you create it? Looks awesome :)
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Link is in description
@arcadebox
@arcadebox 3 жыл бұрын
is that possible to make it react to other light than only directional ?
@ponzgamer8303
@ponzgamer8303 3 жыл бұрын
Can we create a full screen effect for cartoon look ? instead of applying a shader to each model ?
@duyphuong3639
@duyphuong3639 Жыл бұрын
awesome, thanks. I wonder how about the performance of the shader, can it works on mobile? Thanks again.
@yester8946
@yester8946 4 жыл бұрын
What do I add if I want tiling and offset to my textures?
@maxschmidt2897
@maxschmidt2897 3 жыл бұрын
@Binary Lunar For some reason now, Unity doesn't let me use negative numbers with power nodes. That makes the black to medium grey half part of my sphere appearing pink in my preview. Do you know any workaround for this issue ? Thanks a lot in advance. Max Here is the error : pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
@abdullahamjad3612
@abdullahamjad3612 3 жыл бұрын
how do I use it With a terrian with normal Map
@JungeDesignGaming
@JungeDesignGaming 3 жыл бұрын
Have Problems: Cant select Vector1 Are there any Problems with Unity Version 2020.3.10?
@BinaryLunar
@BinaryLunar 3 жыл бұрын
It is renamed to Float
@Hunty.
@Hunty. 3 жыл бұрын
which version of unity did you use for this? I get an error while trying to add the custom unity shader script. Would the shader only work with that specific version of unity since it would require their script to work? Or will I have to manually create a script that does the same thing theirs does?
@BinaryLunar
@BinaryLunar 3 жыл бұрын
That was tested on 2019.4 version
@Hunty.
@Hunty. 3 жыл бұрын
@@BinaryLunar oh.. then I guess I don't understand what I did wrong. I dragged and dropped the file from the zip, and when it imports it just gives me all kinds of errors.
@dragonrangeplay
@dragonrangeplay 3 жыл бұрын
Can it receive multiple lights?
@JRrz69
@JRrz69 4 жыл бұрын
You are amazing bro
@debjoybhowal1952
@debjoybhowal1952 2 жыл бұрын
My Ambient light is affecting the whole material and not just the shadow, I don't know where I'm going wrong
@SirDMX
@SirDMX 4 жыл бұрын
Thank you very much
@MnemoxJr
@MnemoxJr 3 жыл бұрын
Hello! First of all thank you so much for this tutorial, it's so nice and you explain all about the shader! But I have a problem that I hope someone can help and bright my life. For some reason, the last step doesn't work. I change the custom fuction to "half" on "precision" and put that last multiply node but shadows still don't cast on my models. What can make this doesn't works? Thank you all, I'll wait patiently.
@velvaraart1007
@velvaraart1007 2 жыл бұрын
Same here :( Did you find a solution?
@roukuo
@roukuo Жыл бұрын
same here. i did not find anything for now.
@raphaelgaming1303
@raphaelgaming1303 3 жыл бұрын
Shader error in 'hidden/preview/CustomFunction_ba3e08d572dc476b8c81f19020a0bc30': Invalid conditional expression. at Assets/Scripts/CustomLighting.hlsl(5) please help me , i stuck when creating a custom function node , my tex still purple and black
@tylersheehan9246
@tylersheehan9246 3 жыл бұрын
change #if SHADERGRAPH_PREVIEW to #ifdef SHADERGRAPH_PREVIEW
@proximalbeet9537
@proximalbeet9537 2 жыл бұрын
can this work in unity 2022?
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
I followed your tutorial exactly, everything worked completely fine, but the last part, I did the exact same but it was still not receiving the shadows . . . help, I need help here
@mohammadalinia8919
@mohammadalinia8919 3 жыл бұрын
Me too. Did you find the problem?
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
@@mohammadalinia8919 nope, but I've found the solution, did the same thing in pbr graph and it works just as amazing, just instead of color node, connect everything to emission
@VezixHaikal
@VezixHaikal 3 жыл бұрын
@@SamDigiDraws hello, what's a pbr graph?
@SamDigiDraws
@SamDigiDraws 3 жыл бұрын
@@VezixHaikal well it's available in unity 2020, but you can use urp lit shader graph aswell, i tried that and it works just the same
@gdog8170
@gdog8170 3 жыл бұрын
@@SamDigiDraws I don't have pbr graph option? there is no option that says pbr shader graph I am using unity 2021.1.11f1
@henbree8836
@henbree8836 3 жыл бұрын
when having multiple shadow cascades, the shadow is weird on the shader. How do I fix?
@MnemoxJr
@MnemoxJr 3 жыл бұрын
I fixed it just in the settings of the cascades, you have the option "split 1", try to play with that
@dmytrykarpov
@dmytrykarpov 4 жыл бұрын
Awesome tutorial. Do you know if this will work with hdrp?
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Yes it works
@andrewyang7163
@andrewyang7163 3 жыл бұрын
Anyone knows why I can't find Vector1 in the output? P.S. I'm using 2020.3
@dillonwaugh8750
@dillonwaugh8750 3 жыл бұрын
Its known as float now
@andrewyang7163
@andrewyang7163 3 жыл бұрын
@@dillonwaugh8750 Thank you!
@Firedfuture
@Firedfuture 3 жыл бұрын
How do you get the hlsl script to work? I just get Shader error in 'hidden/preview/CustomFunction_92b70e221edb478183ec27357a48560b': variable '_CustomFunction_92b70e221edb478183ec27357a48560b_Direction_0' used without having been completely initialized at line 149 (on metal)
@Amsoniac
@Amsoniac 3 жыл бұрын
You need to replace all instances of #if SHADERGRAPH_PREVIEW". (first occurance on line 6). So i use visual studio code so i highlight, right click then click 'replace occurances' and that changes all of those written to the new #if defined(SHADERGRAPH_PREVIEW). for future reference its 11/8/21 and my unity version is 2020.3.22f1 answer was provided by Bruno Moreira as pinned above
@pitifulrock630
@pitifulrock630 3 жыл бұрын
all the textures i set to my toon shader turn completely white
@fredericoc6234
@fredericoc6234 2 жыл бұрын
Hey I'm fairly new to all this, so my question is: is it possible to do this in a the 3D built in renderer in unity or do I need to start a new project with URP?
@BinaryLunar
@BinaryLunar 2 жыл бұрын
You can convert your builtin renderer to URP
@Usoland13
@Usoland13 3 жыл бұрын
Hi, this doesn't seem to work in Unity 2021, any help?
@ghostaspirine9784
@ghostaspirine9784 3 жыл бұрын
@Lilith Niniane thanks you you save me x)
@annabellepries4050
@annabellepries4050 3 жыл бұрын
Everything seems to be working fine until I add the dot product to the base color, then my preview turns into purple and black squares. I'm using Unity 2020.3.11f1
@Am3ricium
@Am3ricium 3 жыл бұрын
why would you do vector math with a color. dot product is supposed to be between two vectors. You probably not following the tutorial precisely
@annabellepries4050
@annabellepries4050 3 жыл бұрын
@@Am3ricium I figured it out, the problem was I had to change #in to #indef as stated in other comments
@inkofthedragon
@inkofthedragon 2 жыл бұрын
Can this still work with low poly models or will it be impossible to make smooth?
@BinaryLunar
@BinaryLunar 2 жыл бұрын
We believe it still can work , best way to know is to try.
@moonkxssxd
@moonkxssxd Жыл бұрын
From my experience the shading ends up looking noisy. You can manually edit the vertex normals of your models to rectify this but this only takes you so far before you have to add more polys to help the shader out. Finding the right balance depends on your needs
@maxschmidt2897
@maxschmidt2897 3 жыл бұрын
For some reason, everything was working fine until 2 weeks ago. I did not update anything in my Unity project or version, but suddenly the Custom Lighting Script causes an error and doesn't work anymore. Here is the error : Shader error in 'Master': undeclared identifier 'TransformWorldToShadowCoord' at Assets/Shaders/CustomLighting.hlsl(16) (on d3d11) If someone could help, I would be grateful to you since our future game depends on this shader.
@rodni3d674
@rodni3d674 3 жыл бұрын
hello, i have the same problem as yours, did you find a way to fix it?
@maxschmidt2897
@maxschmidt2897 3 жыл бұрын
@@rodni3d674 I couldn't find a solution to it, so I used a workaround and went on using the URP pipeline instead.
@maxschmidt2897
@maxschmidt2897 3 жыл бұрын
@@rodni3d674 You might need another light script for it to work in URP, so maybe check out for tutorials before.
@BenVhekith
@BenVhekith 2 жыл бұрын
well, I got "Invalid conditional expression," despite using the right variable types and the exact names from the script.
@BenVhekith
@BenVhekith 2 жыл бұрын
It fixed itself after I updated unity
@Elputokorky
@Elputokorky 3 жыл бұрын
is it possible to add normal map to it?
@BinaryLunar
@BinaryLunar 3 жыл бұрын
Yeah sure, why not.
@Elputokorky
@Elputokorky 3 жыл бұрын
@@BinaryLunar how would you implement that? c:
@roukuo
@roukuo Жыл бұрын
Everything works just fine for me, but the last step with the shadows just does not work. I made everything exactly the same, and it just does not work. Besides my problem with that, the tutorial was just awesome!
@zurielbaxcajay2559
@zurielbaxcajay2559 Жыл бұрын
I kept the Custom Function node as "inherit" and then added to the Blackboard the keyword (Boolean)"_MAIN_LIGHT_SHADOWS" just enable it as default and it the shadows will work.
@a74x
@a74x Жыл бұрын
@@zurielbaxcajay2559thanks you man!!
@ABlackbirdsTravels11
@ABlackbirdsTravels11 Жыл бұрын
@@zurielbaxcajay2559 Thank you so much, this worked!
@blackjackveteran
@blackjackveteran 4 жыл бұрын
thank you so much
@余虎-g2w
@余虎-g2w 2 жыл бұрын
I Love it
@LaMelon
@LaMelon 3 жыл бұрын
my character turns purple when I change the shader to Universal Render Pipeline/Unlit... Can you please help me out? also, when i make a new shader using the shader graph it does the same so there's probably something wrong with that.
@onewayroad3765
@onewayroad3765 3 жыл бұрын
Can you make genshin impact shader please?
@onewayroad3765
@onewayroad3765 3 жыл бұрын
How to make the shade soft?
@joziermaster3269
@joziermaster3269 3 жыл бұрын
Vector 1 and float are the same....idk bout y'all but I def didn't know
@Aethelvlad
@Aethelvlad 3 жыл бұрын
unity provided hlsl file is now deprecated beyond repair
@Amsoniac
@Amsoniac 3 жыл бұрын
You just create a text file, then add .hlsl to the end when you save it
@曹洪齐
@曹洪齐 3 жыл бұрын
You r my god,thank u
@rationalistfaith
@rationalistfaith 4 жыл бұрын
Allah Bless!!! Good stuff 🙏🏼
@エレダー
@エレダー 2 жыл бұрын
are you actually PepeG? you copy the function of full float into a function of half float, great, actually this will be a nother dislike from copy past without A LINK TO THE REAL THREAD
@chrisa9549
@chrisa9549 3 жыл бұрын
Hello! thanks for the video, I'm stuck, on my shader creating the custom node I get the error: 'hidden/preview/MainLightCustomFunction_00dc130f12ed425d88570522ff684787': undeclared identifier 'GetAdditionalLightsCount' at Project/Scripts/CustomLighting.hlsl(81) (on d3d11)
@easygamestudio2826
@easygamestudio2826 3 жыл бұрын
Nice tutorial, But it seems not work in HDRP , Can you tell how can I fix it, This is the error Shader error in 'Unlit Master': undeclared identifier 'EvalShadow_WorldToShadow' at Assets/toon/CustomLighting.hlsl(16) (on d3d11)
@DarkerCry
@DarkerCry 2 жыл бұрын
Need to use URP.
@cyrenadoe132
@cyrenadoe132 8 ай бұрын
I'm having problems with the Rim Light in plane faces, how can I fix it? It simply gives a fog on my asset
@cameronatkinson790
@cameronatkinson790 3 жыл бұрын
all the textures i set to my toon shader turn completely white
Making a Zelda-style Cel Shading Effect in Unity Shader Graph
13:19
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 38 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 69 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Zelda's Toon Shader in Unity
6:01
TNTC
Рет қаралды 62 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 1,3 МЛН
Moebius-style 3D Rendering | Useless Game Dev
8:12
Useless Game Dev
Рет қаралды 855 М.
Unlocking The Power Of Unity's Scriptable Render Pipeline
21:05
Game Dev Guide
Рет қаралды 225 М.
Dissolve effect in Shader Graph
19:23
PabloMakes
Рет қаралды 32 М.
Toon Shader Paint - Shader Graph Basics - Episode 38
23:07
Ben Cloward
Рет қаралды 19 М.
How Games Fake Water
22:52
Acerola
Рет қаралды 225 М.
Smart Sigma Kid #funny #sigma
00:33
CRAZY GREAPA
Рет қаралды 38 МЛН