Making Zelda: Breath of the Wild Stylised Grass in Unity URP

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • เกม

ความคิดเห็น • 131

  • @coreyreagan5006
    @coreyreagan5006 หลายเดือนก่อน +5

    This is the best video I've ever seen in my entire life

  • @jarred7721
    @jarred7721 3 ปีที่แล้ว +11

    Man you do some fantastic work! I have been looking for a video like this forever. I would love to see more videos on shaders in the style of breath of the wild!

    • @danielilett
      @danielilett  3 ปีที่แล้ว +4

      I'll have to spread them out so that I don't exhaust my audience with Breath of the Wild tutorials, but games like that are an absolute gold mine for new effects to discover. There's a very high chance I'll be coming back to it for tutorials for a while!

    • @jarred7721
      @jarred7721 3 ปีที่แล้ว

      @@danielilett I'm looking forwards to it

  • @BravosChannel
    @BravosChannel 3 ปีที่แล้ว +6

    Such a well done video, I've always loved the grass in this game and how insanely optimized things can be these days. Thank you for sharing!

  • @nix3l_
    @nix3l_ 2 ปีที่แล้ว +4

    i cannot believe how little attention this has gotten. def deserves way more gj man

  • @danielilett
    @danielilett  3 ปีที่แล้ว +1

    Here I'll post any notes or clarifications on the tutorial!
    I forgot to mention the directives required to make the tessellation shader work (though they're included in the GitHub code). In the same place as '#pragma geometry geom', you'll need to put '#pragma hull hull'
    and '#pragma domain domain'. And in the same vein as '#pragma require geometry', you'll need to put '#pragma require tessellation tessHW'!

  • @GetDaved
    @GetDaved 2 ปีที่แล้ว +8

    In your demo project you are applying two materials to meshes that only have one submesh. This is less performant than adding a pass that does something simple like apply a base texture with diffuse shading, or something like that to create the visual of the dirt underneath the grass. If this technique is not used then the mesh itself appears transparent when it is viewed through the gaps in the grass. Would it be possible to make a modified version of this that has an additional render pass to apply a base texture to the ground?

  • @koyomojo
    @koyomojo 3 ปีที่แล้ว

    Nice!
    Hope you'll talk about the camera work on the grass bending aswell

  • @HassanKhan-qq3ob
    @HassanKhan-qq3ob ปีที่แล้ว +5

    A year late, but its not working for me. Either Its completely transparent or there's no grass at all. Nothing visible

  • @evenprime1658
    @evenprime1658 2 ปีที่แล้ว

    Lol i was praying to god there's a link to this in the description.. thxx!

  • @joshuamcmillan6390
    @joshuamcmillan6390 2 ปีที่แล้ว +4

    Following along with this tutorial on MacOS, on an older MacBook Pro. I'm also getting the "Shader not supported by this gpu" error that some others have received. However, I did find a workaround. By going to Player Settings and changing the rendering API from Metal to Open GLCore, I'm seeming to have better results so far into the tutorial. Still am having trouble rendering the triangles, but at least the shader is supported.

  • @duyvo1258
    @duyvo1258 ปีที่แล้ว +4

    Thank you for this amazing grass tutorials! I recently started my journey with shader just because I want to replicate this.
    But I have one question. How do we use it on terrain??

  • @gilleswalther5964
    @gilleswalther5964 ปีที่แล้ว

    Brilliant, thanks a lot!!

  • @spikebor
    @spikebor 3 ปีที่แล้ว +4

    The final looks are so good! Btw to think a Switch which has much weaker hardware than today phone can show us a field full of grass, is just too impressive in terms of optimization.

    • @danielilett
      @danielilett  3 ปีที่แล้ว +2

      Agreed - I got my Switch on launch day along with BotW and I was blown away by how it looked in handheld mode. I'm not actually sure what techniques they used to optimise the grass but they did a great job.

    • @spikebor
      @spikebor 3 ปีที่แล้ว +1

      @@danielilett the grass and the sky, omg the sky is chef’s kiss 💋

    • @milkyfingers567
      @milkyfingers567 2 ปีที่แล้ว

      @@danielilett im pretty sure they added a picture onto a plane and made it move around or smth but i may be wrong

    • @obscure045
      @obscure045 5 หลายเดือนก่อน

      ​@@danielilett One of the technique is frustrum culling and LODs. Acerola explained those in a detail in his video. You should check that out.

  • @sebastianschindler2475
    @sebastianschindler2475 2 ปีที่แล้ว +7

    I absolutely love this video! Getting into grass shaders currently and I love the application here! I do want to mention an issue I don't super understand. The grass seems to receive shadows only when Cascade Count is set to 1 in the URP settings. I am currently using Unity 2021.1.16f1 and URP 11.0.0. Any pointers would be great!

    • @tdawghh
      @tdawghh ปีที่แล้ว +4

      Changing the """#ifdef _MAIN_LIGHT_SHADOWS""" in the fragment shader to """#if defined(_MAIN_LIGHT_SHADOWS) || defined(_MAIN_LIGHT_SHADOWS_CASCADE)""" worked for me

  • @Fluppr
    @Fluppr 2 ปีที่แล้ว +1

    This doesn't seem to be affected by my directional light in URP 2021.3.1f1.
    Setting cascade count to 1 lets it receive shadows, but the grass itself doesn't seem to react to lights.
    Any idea why?

  • @livelively3845
    @livelively3845 2 ปีที่แล้ว +5

    how would go about making this work with lighting?
    Edit: I also found that its not very friendly on performance :(

  • @siavashaliyari8567
    @siavashaliyari8567 2 ปีที่แล้ว +1

    Is there a way to add this into a shader that i made using shader graph for my terrain ?
    Btw really nice work, looks pretty neat.

  • @chrisreeder6585
    @chrisreeder6585 ปีที่แล้ว

    Can you apply a geometry shader to a generated mesh from an empty object? (generating grass) I tried with just creating the vertices, then adding triangles and I still get nothing. I feel like this should work but maybe its not passing a direction for the generated triangle or something?

  • @nathanbarraud
    @nathanbarraud ปีที่แล้ว +1

    Thank you ! Very nice tutorial !
    Just one thing, how would you do to use this type of grass on a unity terrain ?

    • @rncstuff9480
      @rncstuff9480 ปีที่แล้ว

      In my scenario, I am generating terrain using noise applied to a height map, which is then applied to a terrain chunk. I then make a copy of that height map and create a mesh out of it, and then assign the grass material to this mesh, and assign the height map to the grass material instance on that mesh. For my scenario, this works out so that grass is only present on terrain that is of a certain height or higher, which is how I wanted it. Performance wise I'm running a few million blades of grass on about six visible chunks and getting over 200FPS on a 1660, so it's working for me. To note, there is chunkloading being utliized to improve FPS. This is in URP 2021.3.8f1. There are no doubt better ways, but this worked for me so you might give it a try.

  • @aliengarden
    @aliengarden 2 ปีที่แล้ว +1

    Instant subscribe

  • @StarkTech47
    @StarkTech47 10 วันที่ผ่านมา

    Very good video, well explained and very detailed!
    The only problem I see with this method is the fact that the grass is based on a mesh. It means that you need a plane or whatever other mesh to show grass on top of it and it uses a material for the grass. So it means that if I have a terrain that I want to cover with grass, I can't, unless I cover it with another mesh that follows the terrain deformation which double the number of vertices.
    Maybe there is another solution to this or I missed something, if that is the case, let me know a good way to do this, I would appreciate it.

  • @viva-la-baz1458
    @viva-la-baz1458 11 หลายเดือนก่อน +3

    Awesome shader, but how can we make it lit?

  • @DwightPotvin
    @DwightPotvin 2 ปีที่แล้ว +2

    Any clue why the grass shader acts extremely weird if added to the same scene as unity terrain? It will start bouncing around and snapping to the edges of the terrain "visually" despite its location remaining static?

    • @hyperbatata
      @hyperbatata 7 หลายเดือนก่อน

      I hade the same problem, I was able to fix it by changing the code on the shader. There is a problem when converting world coordinates to Object coordinates and vice-versa. I fixed it by making it convert back and forth to world/object space coordinates.

  • @user-sv9sd4nq8t
    @user-sv9sd4nq8t 11 หลายเดือนก่อน

    when the screen bottom edge is placed just between the top of grass and its original mesh surface, it seems unity does not render that mesh so the grass just disappear suddenly. Is there any solution for that?

  • @Shir0dev_
    @Shir0dev_ ปีที่แล้ว +3

    I've got the shader fully working, but is anyone else having a problem with the geometry not lining up with the game objects selection outline? for example if i move the gameobject 10m in the X direction, the grass ends up at 20m. No idea why 🤔

    • @user-tc5zs2ls3w
      @user-tc5zs2ls3w 8 หลายเดือนก่อน

      found any solution for this?

  • @bokutachinicecreators
    @bokutachinicecreators ปีที่แล้ว +1

    Hope you recreate this vid for new Unity

  • @LM-cc7qz
    @LM-cc7qz ปีที่แล้ว +4

    PLEASE PIN THIS : IF HAVING ISSUES WITH SHADER POPPING TO DIFFERENT LOCATION DEPENDING ON ANGLE
    First make sure in the inspector your Shader is set to Geometry for the queue. Then go to your current renderer settings (In my case URP-HighFidelity) which can be found in Assets/Settings. There is an option below renderer (Make sure renderer is set to forward) and make sure "Depth priming mode" is set to disabled. This fixed the issue for me.
    When I created another material using the same shader the issue reappeared and this was how I solved it:
    when using multiple materials that do this effect you have to set them on different render layers as in since it's geometry the first one would be 2000, second 2001, 2002, 2003, etc. This is because when they are on the same layer they mess each others calculations up.

    • @Moyi0v0
      @Moyi0v0 ปีที่แล้ว

      Hey, dude. Thx for your enlightenment, XD. My grass still telepotated after disabled depth prime mode and set queue to higher values. But it is such a drama that it works after I set its queue to a lower value like 1999. I guess it does work with the render queue that may store past cache and then calculate up with the new. However, Im such a freshman to figure out what happens behind the engine and renderer. Hope my measure could help others alot.

    • @thiagocarreiro7155
      @thiagocarreiro7155 ปีที่แล้ว

      @@Moyi0v0 And in my case it worked with a higher geometry queue. I used Geometry+10 and it's all good now

  • @neoline5831
    @neoline5831 ปีที่แล้ว

    Hey! Good job man! I'm wondering if this works on HDRP though

  • @Th3GameDev
    @Th3GameDev ปีที่แล้ว

    Can you show how we could cut the grass?

  • @mythomaniac9903
    @mythomaniac9903 2 ปีที่แล้ว +3

    Do you have any idea how to increase the performance of this? It maxes out my R9 290X and gets me 15 FPS when I add a little more grass.

    • @nikoart1561
      @nikoart1561 ปีที่แล้ว

      You can't because it's using every single vertices on the mesh you could decrease vert but It Will help a little bit

  • @Redsam121
    @Redsam121 2 ปีที่แล้ว

    Is there a way to use this with Unity's terrain painter tools. Like paint the shader onto the terrain.

  • @Jc-vh7zm
    @Jc-vh7zm 2 ปีที่แล้ว +1

    Hi Daniel, I tried to run your project in my unity, it showed "Custom/BotWGrass shader is not supported on this GPU (none of subshaders/fallbacks are suitable)", and the grass material turned pink. Plz help!

    • @danielilett
      @danielilett  2 ปีที่แล้ว

      Strange - which Unity version and render pipeline are you on? Sometimes certain subshaders don't work on certain hardware so it also could be related to the computer you're using or which platform you're building for. Not all platforms support geometry or tessellation shaders (which this effect uses quite heavily).

  • @charleskelly5899
    @charleskelly5899 ปีที่แล้ว

    Hey any idea why it's not supported? I'm on a 2019 MacBook Pro, maybe an M1 will support it

  • @bluezamx814
    @bluezamx814 ปีที่แล้ว

    As a beginner on shaders, this tutorial is quite confusing... It would've helped a lot to see the entire code file once every while, and how to apply the shader (I created a new material at 5:14, dragged it onto a plane and got a different result than you have, but without the main code file overview I don't exactly know where it went wrong). Of course the Git link is there, but that's the final product and not the learning steps. I'll go watch some more beginner-friendly tutorials and then come back to this one!

  • @adravis6704
    @adravis6704 3 ปีที่แล้ว +1

    It is normal that the shadow dont work even on the git project

  • @gr8siddhesh
    @gr8siddhesh 2 ปีที่แล้ว +1

    When I slapped the material on a plane it directly became invisible any idea what may have caused that ??

    • @blockhead7168
      @blockhead7168 2 ปีที่แล้ว

      you have to make the object have 2 materials so it dosent become invisible

  • @user-yl3yp4kp9v
    @user-yl3yp4kp9v 11 หลายเดือนก่อน

    Hi ! How can i paint that grass on my map please ?

  • @JuliXR525
    @JuliXR525 3 ปีที่แล้ว +1

    I go to assist, thanks men.

  • @williamjthebest
    @williamjthebest ปีที่แล้ว

    Why does my grass still wreegling when the object is moving ?

  • @onewayroad3765
    @onewayroad3765 3 ปีที่แล้ว

    Can you make subsurface scattering in urp tutorial? please

    • @danielilett
      @danielilett  3 ปีที่แล้ว +1

      I might do one day - subsurface scattering is something I've never really done before, but I think it'd be interesting.

  • @Deadpool-wh9lv
    @Deadpool-wh9lv 2 ปีที่แล้ว +1

    Shadows don't seem to work in URP 12+, just as an FYI.

  • @Fuzzietomato1
    @Fuzzietomato1 2 ปีที่แล้ว

    Anyone test the performance with this method in an open world setting? Wondering if it’s viable to use on a real game

    • @trashcaster
      @trashcaster ปีที่แล้ว

      It can be, but it gets better performance if you load your world in chunks, to prevent rendering things way off in the distance that shouldn't be so detailed. Additionally, you can make an LOD controller component that adjusts the material used by the object (to lower quality variations) based on the distance from the camera

  • @chrisserrano7897
    @chrisserrano7897 3 ปีที่แล้ว

    Did the latest Unity update kill this method?

  • @bounzerus4676
    @bounzerus4676 2 ปีที่แล้ว +1

    Hi, so i dont know why but the tesselation shader is using a huge amount of the gpu if its set to 0.01, even though there is no gras rendered. Is there a way to better the performence because i cant use the shader with this performance. An answer would be great! Best regards :)

    • @bounzerus4676
      @bounzerus4676 2 ปีที่แล้ว

      ok so i tested it and the reason is probably that the tesselation is done on the whole map, which is far to big. So is there a way to do the tesselation only near player distance?

    • @bounzerus4676
      @bounzerus4676 2 ปีที่แล้ว

      okay nvmd, i finally did it!!!! Holy moly after 1 month i finally got it to work. Awesome! Thanks to your ground work ofc, Thanks!!

    • @nikoart1561
      @nikoart1561 ปีที่แล้ว

      @@bounzerus4676 can you share how did you solved this, please.

  • @mehmedcavas3069
    @mehmedcavas3069 11 หลายเดือนก่อน +1

    could u make the samething with shader graph?

    • @danielilett
      @danielilett  11 หลายเดือนก่อน +1

      You can't make *exactly* the same thing because Shader Graph does not support geometry shaders.
      There are other techniques for making large fields of grass like this one, although I'm unsure if Shader Graph supports them.

  • @shiyo969
    @shiyo969 3 ปีที่แล้ว +4

    any hope of seeing this compatible with unity terrain?

    • @harrison3783
      @harrison3783 2 ปีที่แล้ว

      Hi! Do you solve this problem? I found the shader has a display error when there is a unity terrain in the project

  • @HaniSharif
    @HaniSharif 2 ปีที่แล้ว

    Great video! How performant is this? Is it a good idea to use this on mobile devices where optimization is trivial?

    • @Hietakissa
      @Hietakissa 2 ปีที่แล้ว +2

      I know this is a late reply but it's not very performant. I myself don't know much about shaders but I do know one thing, Geometry Shaders are slow, so using them for something like grass is guaranteed to be very bad for performance. The youtuber Acerola has a couple of videos on how he made a performant grass shader (not a step by step by any means but maybe you can make sense of it)

    • @HaniSharif
      @HaniSharif ปีที่แล้ว

      @@Hietakissa thanks. Really appreciate it.

  • @jmas2593
    @jmas2593 2 ปีที่แล้ว

    Do we need to download something

  • @EnergeticSpaceCore
    @EnergeticSpaceCore ปีที่แล้ว

    For some reason the grass is completely invisible on my computer (using the GitHub source). Tested on newer versions of Unity as well as the project version, on URP and Built-in.
    The issue occurs specifically when the Geometry shader is activated (geometry is still visible when the #pragma is commented out, and vanishes when it is uncommented). The wireframe disappears too, but the orange Edit Mode selection does not.
    Does anyone have any idea why this is happening? My working theory is that it's something with GPU compatibility, or the geometry is being placed outside of the clip space, but I'm not skilled enough with shaders to figure this one out.

    • @vitor-a12
      @vitor-a12 ปีที่แล้ว +1

      Hi, maybe you grass is not in the world origin (0, 0, 0). I discovered that the object with this shader needs to be at the origin, if you move this object you will see that the position and rotation is a bit off. At the current time i'm trying to solve this myself, but no progress until now.

    • @agrolordikk5637
      @agrolordikk5637 ปีที่แล้ว

      @@vitor-a12 same problem, did you solve it?

  • @stormer268
    @stormer268 ปีที่แล้ว

    Sorry for the noob question. How can I write shader code in URP? I only know that shader graph in URP. (Create->Shader Graph->Lit...)

    • @Michael-fp9rl
      @Michael-fp9rl ปีที่แล้ว +1

      your creating a shader graph, while you need a just a shader. Create->Shader->Unlit Shader

    • @stormer268
      @stormer268 ปีที่แล้ว

      @@Michael-fp9rl Thank you :)

  • @nikitapanfilov9601
    @nikitapanfilov9601 ปีที่แล้ว

    the bottom of my grass is invisible do i need to creat a second plane?

    • @danielilett
      @danielilett  ปีที่แล้ว

      I attached a second material to the grass mesh for the 'ground'. You could create a second plane but it's probably far easier to just use a second material.

  • @TheGameInstinct
    @TheGameInstinct 2 ปีที่แล้ว

    you should make a video about cutting the grass like in botw

    • @danielilett
      @danielilett  2 ปีที่แล้ว +3

      Cutting grass is an interesting effect for sure. You can probably implement it using this existing shader if you were to update the grass visibility map at runtime by detecting where you are swinging your sword, making the texture black at that location, and then spawning a few grass blade particles at the same position.

  • @bitmammothOG
    @bitmammothOG 2 ปีที่แล้ว +2

    Seems like this won't work with webgl : Custom/BotWGrass shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
    Sad :/
    great tutorial anyway.

    • @danielilett
      @danielilett  2 ปีที่แล้ว

      Ahh that's a shame. Unless I'm mistaken, I don't think WebGL supports geometry or tessellation shaders at all? I'd be interested in revisiting this effect with a different approach which would work with WebGL, but I'm not sure when I'll get round to it.

  • @vrictor
    @vrictor ปีที่แล้ว

    HELP pls, when using this and upgrading it to unity 2022.2.18 for some reason the grass displaces to a diferent location than the objects one. for example if the object with the material is at X=0 and Y=0 the grass is at X=0 Y=0 but if I move the object to X=2 Y=0 the grass moves to X=4 Y=0 and so on and on. this makes the grass unusable because when the objects get a little bit away from the center of the scene (lets say 12 meters) the grass moves super away (24 meters) because for some reason it multiplies the distance by two in all axis. if someone can tell my why it does this ill be veryu thankfull :D
    ps: sorry for writing a full byble paragraph xd

    • @Bankoru
      @Bankoru ปีที่แล้ว +1

      I'll be making my ork of this soon, I had made a more robust version for the built-in renderer and now I have the tools to make it work on URP.

    • @alexanderlebedev2976
      @alexanderlebedev2976 ปีที่แล้ว

      Hi, haven't found a solution to this problem yet?

  • @IvanRodriguez-cd7yp
    @IvanRodriguez-cd7yp 2 ปีที่แล้ว

    Any idea why when using in the same scene as a terain the grass and the plane offsets?

    • @danielilett
      @danielilett  2 ปีที่แล้ว

      Honestly, no clue! I noticed this while making the shader and I'm completely mystified as to how something like that even happens.

    • @SteveJstone
      @SteveJstone 2 ปีที่แล้ว

      @@danielilett Ah, I came here to ask the same question. It's so strange. 😅

    • @zuccanium
      @zuccanium 2 ปีที่แล้ว

      same

  • @PRodi_
    @PRodi_ 3 ปีที่แล้ว +1

    Is it possible to recreate this with Only Shader Graph?

    • @danielilett
      @danielilett  3 ปีที่แล้ว +1

      Unfortunately not with this approach - Shader Graph doesn't support geometry shaders at all, and tessellation support only recently got added to HDRP, but not URP. Maybe in the future this will be possible, but geometry shaders don't appear to be on the planned feature list: portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/tabs/7-shader-graph

  • @xXTheivesGuildXx
    @xXTheivesGuildXx 3 ปีที่แล้ว

    Should this work in HDRP?

    • @danielilett
      @danielilett  3 ปีที่แล้ว

      You would probably need to change a couple of things - HDRP isn't my strong suit so I'm unsure how much would need tweaking, but certainly in the Tags section of the shader file you'll need to change the "RenderPipeline" from "UniversalPipeline" to, I think, "HDRenderPipeline". But yes, I think this would work with HDRP!

  • @Asier0070
    @Asier0070 2 ปีที่แล้ว +3

    This shader works really well but i think ps4 doesnt support it because the grass turns like a plane pink

    • @danielilett
      @danielilett  2 ปีที่แล้ว +2

      Yeah, geometry and tessellation shader support across different platforms seems a bit shaky. Generally, I only test these shaders on desktop PC platforms so I'm unsure how to get this working on PS4 I'm afraid!

  • @LinhNguyen-zt3mg
    @LinhNguyen-zt3mg 2 ปีที่แล้ว +1

    Great Bro! Can you upgrade for mobile, it's not working on mobile ( android device)

    • @danielilett
      @danielilett  2 ปีที่แล้ว +1

      I had a quick look and not all mobile platforms support geometry and/or tessellation shaders, so you might need to use an entirely different approach for mobile. I'm not sure if that's the problem you're facing exactly, but I'd certainly be interested in revisiting this effect using an alternative method that would work on mobile.

    • @LinhNguyen-zt3mg
      @LinhNguyen-zt3mg 2 ปีที่แล้ว

      @@danielilett yes, thank you for replay.

  • @mythomaniac9903
    @mythomaniac9903 2 ปีที่แล้ว +3

    I can get the grass perfectly, but I can't get my plane to have a solid color beneath it. It's just air.
    Any ideas?

    • @danielilett
      @danielilett  2 ปีที่แล้ว

      Unfortunately, URP doesn't support multiple geometry-rendering passes inside a single shader. What I did instead is apply two materials to the same mesh: one which draws the grass, and the other draws the ground underneath.

    • @mythomaniac9903
      @mythomaniac9903 2 ปีที่แล้ว

      @@danielilett Also, is this supposed to be extremely slow? At even just a little more grass than you show, I get about 15-30 FPS and it maxes out my R9 290X.
      Sorry for the many questions.

  • @milankiele2304
    @milankiele2304 2 ปีที่แล้ว +1

    It is amazing but I dont know how to use it xD. I mean how to draw it on terrain or something xD

  • @amir._.nazarpour
    @amir._.nazarpour 3 ปีที่แล้ว

    Best

  • @joziermaster3269
    @joziermaster3269 3 ปีที่แล้ว +1

    As a beginner I'm super confused....like do I have to add grass mesh from blender???or what?

    • @danielilett
      @danielilett  3 ปีที่แล้ว +1

      Nope! The geometry shader I'm describing is taking vertices from a plane mesh (Unity's default one) and using those as kind of 'origin points' to build the grass blade meshes. The grass blades themselves are created manually inside the for-loop partway through. In that entire process, the original plane is removed (because I don't add its original triangles back to the triangle stream).
      The tessellation shader is taking that same plane mesh and adding extra vertices between the existing ones without modifying the shape of the mesh. This runs before the geometry shader, so the result is that we get much thicker grass because there's more of those 'origin points'.
      PS: geometry and tessellation shaders are rarely used at the beginner level, but this video is intended in part to kind of just mention they exist and give a brief overview of what they do. They are a lot more technical than vertex and fragment shaders so this might be a video to come back to once you've got a bit more experience!

    • @joziermaster3269
      @joziermaster3269 3 ปีที่แล้ว

      @@danielilett Thank you 100 senpai

  • @appdata8476
    @appdata8476 3 ปีที่แล้ว +1

    Still here xd

  • @tranceemerson8325
    @tranceemerson8325 2 ปีที่แล้ว

    you said this would be a shader graph tutorial in the thumbnail. :(

    • @danielilett
      @danielilett  2 ปีที่แล้ว

      Yeah my bad, thanks for letting me know. I change the thumbnails around occasionally and sometimes make mistakes like that get through.

  • @PapaTheodore
    @PapaTheodore 3 ปีที่แล้ว +8

    47 hours later...

    • @luphaestus
      @luphaestus 8 หลายเดือนก่อน +1

      2 years later

  • @Jono1982
    @Jono1982 3 ปีที่แล้ว

    is this too advance for beginners?

    • @danielilett
      @danielilett  3 ปีที่แล้ว

      It might be a bit advanced if this is your very first shader, but the overall technique might be interesting to you!

    • @Jono1982
      @Jono1982 3 ปีที่แล้ว

      @@danielilett could you also make a follow up tutorial on how to make the grass from Genshin Impact?

    • @danielilett
      @danielilett  3 ปีที่แล้ว

      The grass in Genshin Impact (which I haven't played) looks very similar to BotW, so honestly you could probably use this tutorial for that! There's quite a few properties you can tweak if you need it to look a bit different.

  • @LM-cc7qz
    @LM-cc7qz ปีที่แล้ว +1

    ALSO PLEASE PIN THIS : FIX CONSTANT REGENERATION OF GRASS PLACEMENT ON OBJECT MOVE:
    replace #pragma geomVertex geomVert
    with : #pragma vertex vert
    and make it so the original vertex just returns v and nothing else, as in don't assign to it.

  • @mediocredono
    @mediocredono 3 ปีที่แล้ว

    Это потрясающе! Но я нихуя не понял как ты это сделал.

  • @rrsoup9143
    @rrsoup9143 ปีที่แล้ว +1

    Does anyone experience an error with this shader where when you view the surface at some combination of a certain angle (around 30 - 45 deg) and a certain minimum distance the grass effect gets culled completely? Running on Unity 2020.3.14f1 URP...
    EDIT: Im just noticing now that the grass isn't actually culled but rendered at a completely different position than it is supposed to be, and can be seen way off in the distance.. Here is an image if interested @Daniel Ilett drive.google.com/file/d/17l43Rl5v7M2Sue8jBB8FOTI21ZXtZlBf/view?usp=sharing

    • @LM-cc7qz
      @LM-cc7qz ปีที่แล้ว +1

      I'm having the exact same issue, Even weirder if I move a VFX graph I have in the scene it moves with that graph after the culling/teleporting issue. If I delete my VFX from the scene it disappears completely. I am trying to figure out why this is, I have been researching forever but can't find anything on the topic. It got to the point where I was copying his github code to use in my proj and it still happened. Also also in his code he sets the Queue to "Geometry" and in order for my shader to render it has to be set to transparent in the inspector, even though the Queue in code says Geometry. I think it may have something to do with my SRP that generates Outlines on all objects before transparents are rendered and it may be messing with it's UV or Normals. I will post an update comment if I figure anything out.

    • @LM-cc7qz
      @LM-cc7qz ปีที่แล้ว

      Ok, I figured it out, First make sure in the inspector your Shader is set to Geometry for the queue. Then go to your current renderer settings (In my case URP-HighFidelity) which can be found in Assets/Settings. There is an option below renderer (Make sure renderer is set to forward) and make sure "Depth priming mode" is set to disabled. This fixed the issue for me.

    • @LM-cc7qz
      @LM-cc7qz ปีที่แล้ว

      As an addendum to this when using multiple materials that do this effect you have to set them on different render layers as in since it's geometry the first one would be 2000, second 2001, 2002, 2003, etc. This is because when they are on the same layer they mess each others calculations up.

    • @rrsoup9143
      @rrsoup9143 ปีที่แล้ว

      @@LM-cc7qz Thanks!! Changing the render queue for each material using this shader solved the bug for me.