📝 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
@gryffin5334 жыл бұрын
Here from r/gamedev and this is exactly what i needed, Thank you so much
@BinaryLunar4 жыл бұрын
Welcome aboard!
@B.BiStudios2 жыл бұрын
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!
@brunomoreira58833 жыл бұрын
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_3 жыл бұрын
Thanks, it worked!
@301unknown73 жыл бұрын
ohhhh,It's great
@anthonyparisi85513 жыл бұрын
You are a friend, kind sir.
@Backurio3 жыл бұрын
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
@Rexmon3 жыл бұрын
thx
@yaarrghmematey2 жыл бұрын
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.
@BinaryLunar2 жыл бұрын
Thanks!
@ExploreImagineDefineCreate3 жыл бұрын
Honestly thanks for including the music in the description, it's amazing! I love scrub-a-dub the shader!
@AltairCoke3 жыл бұрын
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.
@VezixHaikal3 жыл бұрын
same here, do you find the solution?
@VezixHaikal3 жыл бұрын
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-bj4ku3 жыл бұрын
@@VezixHaikal Thank you so much!
@AltairCoke3 жыл бұрын
@@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 ! :)
@UhGoomba3 жыл бұрын
@@AltairCoke Hey, how did you do this?
@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 Жыл бұрын
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 Жыл бұрын
@@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_ Жыл бұрын
@@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 Жыл бұрын
@@SafeZ0nee_ Hey I just upload a vid on how I did it. its the only video I have up atm
@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 Жыл бұрын
Thank You Sir
@fruitdudetv4 жыл бұрын
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 !
@BinaryLunar4 жыл бұрын
Good job!
@mikemiller08303 жыл бұрын
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!
@BinaryLunar3 жыл бұрын
You welcome! , knowledge come by studying and experimenting.
@frostcop66934 жыл бұрын
This is so high quality! Thanks a lot
@greebsta4 жыл бұрын
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.
@Hyphen33723 жыл бұрын
looks awesome m8 really loving it and your guys tutroials.
@athrehollakal26823 жыл бұрын
Great tutorial! very easy to follow! Love your work!
@BinaryLunar3 жыл бұрын
Thanks!
@sidaodograu29504 жыл бұрын
Wow that's fantastic! Great job, really appreciate!
@juanmengual6393 жыл бұрын
Amazing tutorial, thanks for all the effort!
@BinaryLunar3 жыл бұрын
You welcome!
@Tosmo3 жыл бұрын
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
@BinaryLunar3 жыл бұрын
Kind of you 😊
@uinferno4 жыл бұрын
Wow this was a great tutorial, thank you!
@AndyxbecK2 жыл бұрын
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.
@quentin66872 жыл бұрын
Can you explain this please ? " Make sure you then plug this Multiply into both nodes the Smoothstep led into.", what is " Smoothstep led "?
@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 Жыл бұрын
Your way doesn’t work, don’t follow this guy
@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
@Krechevskoy3 жыл бұрын
Thank you! This was absolutely amazing.
@olivergiddings84264 жыл бұрын
Easy to understand, Thank you very much!
@jjaylee6095 Жыл бұрын
I connected according to your appearance, but in the end, no shadows appeared when the object blocked me
@ksatta_ Жыл бұрын
same
@jonataslima89013 жыл бұрын
The shadow is not working to me, i follow every steps, what could it be?
@VezixHaikal3 жыл бұрын
hmu if you solved it
@maxschmidt28973 жыл бұрын
Cannot manage to get my objects affected by shadows either. Pls help
@makoto_shibari3 жыл бұрын
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 Жыл бұрын
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.
@7azDingo3 ай бұрын
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.
@aoliepung56923 жыл бұрын
Amazing !!! Nice tutorial Shader Graph
@BinaryLunar3 жыл бұрын
Thanks!
@mushfiq_iqbal4 жыл бұрын
r/gamedev brought me here. Thanks for the tutorial.
@BinaryLunar4 жыл бұрын
You are very welcome!
@sasaramorinaga3 жыл бұрын
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)
@BinaryLunar3 жыл бұрын
Which Unity version you using?
@sasaramorinaga3 жыл бұрын
@@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.
@BinaryLunar3 жыл бұрын
@@sasaramorinaga make sure you typed the custom function name "MainLight"
@sasaramorinaga3 жыл бұрын
@@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-cd4qo2 жыл бұрын
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!
@BinaryLunar2 жыл бұрын
Thanks! we will check soon
@BinaryLunar2 жыл бұрын
Where did you wrote the feedback ?
@LinLin-cd4qo2 жыл бұрын
@@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.
@BinaryLunar2 жыл бұрын
Kind of you! Thanks for your supprot.
@riccardocafagna68163 жыл бұрын
Wow, amazing tutorial! Very useful!
@BinaryLunar3 жыл бұрын
Kind of you!
@riccardocafagna68163 жыл бұрын
@@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.
@brunomoreira58833 жыл бұрын
the cast shadows dont work to me...
@wite_15039 ай бұрын
I'm struggling to have the shadows working. Any solutions?
@tejastjs99817 ай бұрын
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 :)
@yuukitakemoto71833 жыл бұрын
it works on unity 2020.1.3f1 ? because shadows aren't working
@217tman33 жыл бұрын
Add three keyword can solve this problem _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _SHADOWS_SOFT
@JamesHodge963 жыл бұрын
@@217tman3 add the keywords to what exactly? thanks
@turbokaiser3 жыл бұрын
@@217tman3 mine doesnt recieve shadows from other objects do you have any solution for this?
@217tman33 жыл бұрын
@@JamesHodge96 you can refer to this:kzbin.info/www/bejne/iHScYqiuh7l8mpo
Hey Can you please Help me Here. The Final Steps about Taking the Shadows of other Objects Doesnt work.
@faulty110610 ай бұрын
the lighting script does not work with the current version of unity
@FransiscaAdis3 жыл бұрын
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.
@BinaryLunar3 жыл бұрын
discord.com/invite/b6bXKSV hiya, join us in the discord server, will refer you to the solution posted there.
@toehtetpotatoe75492 жыл бұрын
Thank you for great tutorial...everything works but the last shadow does not work for me :(
@Nyx_z_2 жыл бұрын
For me too, could you fix it?
@toehtetpotatoe75492 жыл бұрын
@@Nyx_z_ No i couldn't :(
@NathanielPennington2 жыл бұрын
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 Жыл бұрын
Awesome! Thank you!!
@inkofthedragon2 жыл бұрын
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"
@BinaryLunar2 жыл бұрын
It has been replaced by float.
@legendarywolf2372 Жыл бұрын
can use this tut for built-in render pipline?
@yadrocinema Жыл бұрын
not receive shadows. Unity 2021.3.14
@AminRaeisinia2 жыл бұрын
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.
@PrincessPotion2 жыл бұрын
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.
@Michaentus3 жыл бұрын
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.
@SamDigiDraws3 жыл бұрын
Did you sort it out? please let me know if so
@VezixHaikal3 жыл бұрын
@@SamDigiDraws same here do you guys sort it out?
@SamDigiDraws3 жыл бұрын
@@VezixHaikal yes I did
@Arda-bj4ku3 жыл бұрын
@@SamDigiDraws Can anyone explain how to fix shadows?
@SamDigiDraws3 жыл бұрын
@@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
@DevilPork92ITA2 жыл бұрын
Well done man 👍
@BinaryLunar2 жыл бұрын
Kind of you!
@LukmonAgboola Жыл бұрын
how can i change the direction of the light?
@vishnusugumar89993 жыл бұрын
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
@pedrovasconcellos33463 жыл бұрын
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?
@BinaryLunar3 жыл бұрын
Use 2019.4 we didn't test this shader on 2020.2 which have radical changes to shader graph
@pedrovasconcellos33463 жыл бұрын
@@BinaryLunar Thanks, that was indeed the problem!
@emmanuelguillot13 жыл бұрын
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/
@Moeren5883 жыл бұрын
@@emmanuelguillot1 just the answer I needed, thank you!
@RoroGames032 жыл бұрын
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:(
@BinaryLunar2 жыл бұрын
Sure, you can download all projects files from Patreon : www.patreon.com/posts/44431213
@vishnusugumar89993 жыл бұрын
I am getting rim shading on both sides. pls help me with this
@RolandStudios2 жыл бұрын
whats the best way to add norm bump to this, can we do this without converting to lit shader
@conorokane3 жыл бұрын
Thanks - really useful and clear.
@BinaryLunar3 жыл бұрын
You welcome!
@fahreziadha2 жыл бұрын
what version of shader graph ur using? i cant see unlit graph option :'(
@tutulio90953 жыл бұрын
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 =/
@AltairCoke3 жыл бұрын
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.
@tutulio90953 жыл бұрын
@@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
@AltairCoke3 жыл бұрын
@@tutulio9095 OK thanks! Worth giving it a try this evening. 🙂
@geranmannberg3 жыл бұрын
Where did you get the Link model shown in the end of the video? Did you create it? Looks awesome :)
@BinaryLunar3 жыл бұрын
Link is in description
@arcadebox3 жыл бұрын
is that possible to make it react to other light than only directional ?
@ponzgamer83033 жыл бұрын
Can we create a full screen effect for cartoon look ? instead of applying a shader to each model ?
@duyphuong3639 Жыл бұрын
awesome, thanks. I wonder how about the performance of the shader, can it works on mobile? Thanks again.
@yester89464 жыл бұрын
What do I add if I want tiling and offset to my textures?
@maxschmidt28973 жыл бұрын
@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
@abdullahamjad36123 жыл бұрын
how do I use it With a terrian with normal Map
@JungeDesignGaming3 жыл бұрын
Have Problems: Cant select Vector1 Are there any Problems with Unity Version 2020.3.10?
@BinaryLunar3 жыл бұрын
It is renamed to Float
@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?
@BinaryLunar3 жыл бұрын
That was tested on 2019.4 version
@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.
@dragonrangeplay3 жыл бұрын
Can it receive multiple lights?
@JRrz694 жыл бұрын
You are amazing bro
@debjoybhowal19522 жыл бұрын
My Ambient light is affecting the whole material and not just the shadow, I don't know where I'm going wrong
@SirDMX4 жыл бұрын
Thank you very much
@MnemoxJr3 жыл бұрын
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.
@velvaraart10072 жыл бұрын
Same here :( Did you find a solution?
@roukuo Жыл бұрын
same here. i did not find anything for now.
@raphaelgaming13033 жыл бұрын
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
@tylersheehan92463 жыл бұрын
change #if SHADERGRAPH_PREVIEW to #ifdef SHADERGRAPH_PREVIEW
@proximalbeet95372 жыл бұрын
can this work in unity 2022?
@SamDigiDraws3 жыл бұрын
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
@mohammadalinia89193 жыл бұрын
Me too. Did you find the problem?
@SamDigiDraws3 жыл бұрын
@@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
@VezixHaikal3 жыл бұрын
@@SamDigiDraws hello, what's a pbr graph?
@SamDigiDraws3 жыл бұрын
@@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
@gdog81703 жыл бұрын
@@SamDigiDraws I don't have pbr graph option? there is no option that says pbr shader graph I am using unity 2021.1.11f1
@henbree88363 жыл бұрын
when having multiple shadow cascades, the shadow is weird on the shader. How do I fix?
@MnemoxJr3 жыл бұрын
I fixed it just in the settings of the cascades, you have the option "split 1", try to play with that
@dmytrykarpov4 жыл бұрын
Awesome tutorial. Do you know if this will work with hdrp?
@BinaryLunar3 жыл бұрын
Yes it works
@andrewyang71633 жыл бұрын
Anyone knows why I can't find Vector1 in the output? P.S. I'm using 2020.3
@dillonwaugh87503 жыл бұрын
Its known as float now
@andrewyang71633 жыл бұрын
@@dillonwaugh8750 Thank you!
@Firedfuture3 жыл бұрын
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)
@Amsoniac3 жыл бұрын
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
@pitifulrock6303 жыл бұрын
all the textures i set to my toon shader turn completely white
@fredericoc62342 жыл бұрын
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?
@BinaryLunar2 жыл бұрын
You can convert your builtin renderer to URP
@Usoland133 жыл бұрын
Hi, this doesn't seem to work in Unity 2021, any help?
@ghostaspirine97843 жыл бұрын
@Lilith Niniane thanks you you save me x)
@annabellepries40503 жыл бұрын
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
@Am3ricium3 жыл бұрын
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
@annabellepries40503 жыл бұрын
@@Am3ricium I figured it out, the problem was I had to change #in to #indef as stated in other comments
@inkofthedragon2 жыл бұрын
Can this still work with low poly models or will it be impossible to make smooth?
@BinaryLunar2 жыл бұрын
We believe it still can work , best way to know is to try.
@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
@maxschmidt28973 жыл бұрын
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.
@rodni3d6743 жыл бұрын
hello, i have the same problem as yours, did you find a way to fix it?
@maxschmidt28973 жыл бұрын
@@rodni3d674 I couldn't find a solution to it, so I used a workaround and went on using the URP pipeline instead.
@maxschmidt28973 жыл бұрын
@@rodni3d674 You might need another light script for it to work in URP, so maybe check out for tutorials before.
@BenVhekith2 жыл бұрын
well, I got "Invalid conditional expression," despite using the right variable types and the exact names from the script.
@BenVhekith2 жыл бұрын
It fixed itself after I updated unity
@Elputokorky3 жыл бұрын
is it possible to add normal map to it?
@BinaryLunar3 жыл бұрын
Yeah sure, why not.
@Elputokorky3 жыл бұрын
@@BinaryLunar how would you implement that? c:
@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 Жыл бұрын
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 Жыл бұрын
@@zurielbaxcajay2559thanks you man!!
@ABlackbirdsTravels11 Жыл бұрын
@@zurielbaxcajay2559 Thank you so much, this worked!
@blackjackveteran4 жыл бұрын
thank you so much
@余虎-g2w2 жыл бұрын
I Love it
@LaMelon3 жыл бұрын
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.
@onewayroad37653 жыл бұрын
Can you make genshin impact shader please?
@onewayroad37653 жыл бұрын
How to make the shade soft?
@joziermaster32693 жыл бұрын
Vector 1 and float are the same....idk bout y'all but I def didn't know
@Aethelvlad3 жыл бұрын
unity provided hlsl file is now deprecated beyond repair
@Amsoniac3 жыл бұрын
You just create a text file, then add .hlsl to the end when you save it
@曹洪齐3 жыл бұрын
You r my god,thank u
@rationalistfaith4 жыл бұрын
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
@chrisa95493 жыл бұрын
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)
@easygamestudio28263 жыл бұрын
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)
@DarkerCry2 жыл бұрын
Need to use URP.
@cyrenadoe1328 ай бұрын
I'm having problems with the Rim Light in plane faces, how can I fix it? It simply gives a fog on my asset
@cameronatkinson7903 жыл бұрын
all the textures i set to my toon shader turn completely white