Тёмный

Stylized Geometry Grass Shader for Universal Render Pipeline Unity [Pt. 3] 

AJTech
Подписаться 8 тыс.
Просмотров 5 тыс.
50% 1

A fully functional grass shader that's made for the Universal Render Pipeline, it works without Unity's terrain system and comes with a bunch of features such as lighting, shadows, tesselation! This is the system I will be using in my open world game which I am developing on this channel as well, we will be coding everything ourselves so that you can understand from the base up how everything works.
PROJECT FILES (TEXTURES & MODELS) + COMPLETED PROJECT :
☢ github.com/AJTech2002/Grass-S...
☁ In this video we begin our journey by creating the third of the 3 vertex sections, the Fragment Shader. It will contain the lighting and texturing of the grass that will serve as the ground work for its animation and painting in the next episode.
* NEWS : Welcome to the community!! I want to congratulate everyone on reaching 4,100 subscribers, this is a collective accomplishment and I thank you all for your support. *
Some exciting news is that I finished my schooling and I am free to upload on a more consistent schedule so I will be doing that from now, so expect the next video within the week.
❤ 2020 calls for more social media & interaction with you guys so check me out on, also I hope everyone is safe during this time ❤ :
====================================================
✄ / codewithajay ✄ [TWITTER]
- Daily Game Development Content, tips, motivation, updates on the game & just about my very 'interesting' life.
====================================================
----- LETS TRY AND HIT : 40 LIKES ✌ ---------
★ Upcoming Videos :
- Grass Shader Part 3 ❤
- Open World Series Part 6 ❤
◕‿◕ The next part is even better and in order for you to see it you have to subscribe and tap that bell icon to be notified :
►► / subscription_. . ◄◄
☾ Stay tuned for the next episode, I will be releasing new videos once every 5 to 6 weeks discussing what I have done over the course of the weeks, always giving you some good entertainment with some knowledge on how you can tackle complex challenges in your own games! (◕‿-)
I'll see you next time ✌
✄ IMPORTANT LINKS YOU SHOULD CHECK OUT ✄ :
1. roystan.net/articles/grass-sh... (Grass Shader Blog)
2. gist.github.com/phi-lira/225c... (URP Sample Shader)
3. kenney.nl/assets/foliage-sprites (Grass and Leaf Textures)
OTHER VIDEOS
DEV LOG PART 1
☢ • Video
DEV LOG PART 2
☢ • Video
DEV LOG PART 3
☢ • Video
♬ MUSIC ♬ :
☮ Wayr - Follow the light
If any of these videos or music belong to you and you wish for them to be taken down, please email me at : ajays.workemail@gmail.com
Thank you, for watching guys :)
Intro: (0:00)
Normal Setup: (0:53)
Lighting: (3:57)
Translucency of Grass: (8:29)
Self Shadowing: (14:38)
Applying Shadows: (17:29)
Applying Fog: (20:44)
Outro: (21:51)
#unity #shaders #openworld #stylized

Наука

Опубликовано:

 

25 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 19   
@mrforgetable1
@mrforgetable1 3 года назад
For anyone who doesn't want to spend 30 minutes figuring out why the shadows weren't working as I did, remember to go into your render pipeline settings and make sure you're using at least 2 shadow cascades. If you have no cascades the part that calculates the cascade index of the fragment will not work (returns 0 I think) and if the value for your shadowCoordinate is 0, then your GetMainLight function call will effectively not do anything. Anyway, thanks for the tutorials man, super helpful!
@batchprogrammer108
@batchprogrammer108 3 года назад
Ah, this is a major oversight on my part, thanks for clearing this up :)
@mrforgetable1
@mrforgetable1 3 года назад
@@batchprogrammer108 ehhh I wouldn't call it a huge oversight, I think 9/10 times once people see you calculating something based on shadow cascades, they'll go make sure they have them turned on. I just happened to forget hahahah.
@defonotme2476
@defonotme2476 2 года назад
very late question. I have 4 cascades and they don't work? it only works with 1 cascade. Is there a reason?
@jurikiin
@jurikiin 2 года назад
I tried your suggestions but they don't seem to be working. I've following along well with the tutorial.. so I'm wondering if its some sort of setup in Unity / URP that I've missed? Everything looks to be the same I'm not sure..
@Eric-mz6of
@Eric-mz6of Год назад
@@defonotme2476 It also happens to me
@cjsimmons6535
@cjsimmons6535 3 года назад
Yesssss!
@meLokeshRawat
@meLokeshRawat 3 года назад
how your highschool over in november bro but happy for you now you can upload more and more:)
@timurkhilyamov1594
@timurkhilyamov1594 3 года назад
maybe he lives in Australia? their seasons are opposite to the northern hemisphere
@KDSBestGameDev
@KDSBestGameDev 3 года назад
There is IIRC FacingSign and you can multiply your normal with that instead of the if clause. If is very slow on fragment shader. Google it you will find it.
@armandpansegrouw6302
@armandpansegrouw6302 3 года назад
Your Awsome
@assassin2017
@assassin2017 2 года назад
Hey There AJTech Im not sure youll see this, as this was posted quite a while ago. I am having an issue with URP wherein when following this tutorial series if i use the Tag {"RenderPipeline"="UniversalPipeline"}. It makes all the generated planes completely transparent however you can see there wireframes in the wireframe mode showing that they are in fact being rendered by the Shader. Im quite lost. Any tips?
@thesianglider2894
@thesianglider2894 3 года назад
I am having trouble with the shader at night in my game where the grass is not being affected by the light.
@linusilbratt7548
@linusilbratt7548 3 года назад
Does this work with HDRP?
@jurikiin
@jurikiin 2 года назад
Can you confirm this still works in 2022? I've followed along exactly, and even following the comment about cascades, I'm still not receiving shadows or fog to the grass. Perhaps something changed in a newer version of URP?
@jurikiin
@jurikiin 2 года назад
Honestly not sure what I changed.. but it is working now. I wish I could be more specific in case anyone else is running into my issue lol
@_hallowed_
@_hallowed_ Год назад
For some reason, the shadows weren't working for me, I read the comments and saw about shadow cascades, I already had multiple cascades and it wasn't working. I managed to fix it though by adding 1 line of code into the .shader file: #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE I then turned off receive shadows for the ground material and everything looked alright. Hopefully this helps.
@murilochayel
@murilochayel Год назад
Huge thanks, finally works \0/
@devacharya3892
@devacharya3892 3 года назад
Imagine going to a valedictory and idk.
Далее
Procedural Destroy in Unity - Lazy Tutorial
1:01
Просмотров 100 тыс.
Unity procedural animation tutorial (10 steps)
1:05
Просмотров 402 тыс.
Unity URP | Tessellation + Interactive Grass
6:12
Просмотров 40 тыс.
iPhone socket cleaning #Fixit
0:30
Просмотров 15 млн
iPhone, Galaxy или Pixel? 😎
0:16
Просмотров 1,2 млн