Search Unity

[RELEASED] DirectX 11 Grass Shader

Discussion in 'Assets and Asset Store' started by Nonakesh, Aug 17, 2015.

  1. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    157
    Hi, thanks for your reply.

    Using the forward only version of the shader is exactly what I have decided to do, and it seems to work well. I'm not too concerned about the performance issues, since I am targeting high-end systems (and I am quite some time from release).

    Are there any other disadvantages to using forward only? Would deferred rendering look better visually, if I used the second approach?

    I am quite happy with the look of the grass now, so I'm not too worried, but I am just trying to decide if I *should* be using deferred rendering or not?
     
  2. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    442
    The only advantage of deferred rendering is better performance with many lights. With forward rendering the grass material has to be rendered for each light source, which can be quite performance costly for a high end shader like this. In deferred the grass is rendered into a texture once, then the lighting is calculated with that information.

    Deferred makes it impossible to use custom lighting effects, that's why the grass looks so dark, it's treated like a solid material, instead of thin blades of grass.
     
  3. unity_c1ndWE1Nn46iPg

    unity_c1ndWE1Nn46iPg

    Joined:
    Jan 13, 2019
    Posts:
    149
    Hi. I can't seem to to do anything with grass painter
     
  4. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    442
  5. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    199
    hi @Nonakesh

    May I ask if this works for LWRP or Forward rendering? :)

    Thank you!
     
  6. pagnotmf

    pagnotmf

    Joined:
    May 20, 2016
    Posts:
    23
    Nonakesh,

    I am still very much enjoying your shader. (Legacy version) I have made small advances monthly and it keeps looking better and better. I have an issue that I am having trouble solving. I am seeing dark flashing along my grass textures in game. It happens with shadows ON and OFF on the mesh. It is more obvious with certain textures.

    I am using a PSD file as a texture atlas with a proper alpha, defringing, and have tested wrap modes "Clamp" and "Repeat" with no change in results. I feel that this is not a texture related issue. I am thinking this is either a Unity problem or something with the shader modes?

    Any suggestions would be appreciated. Video of flashing issue is below. Starts with material settings in case you might notice an issue.
     
    Last edited: Sep 24, 2019
  7. ILoveMyDada

    ILoveMyDada

    Joined:
    Apr 30, 2014
    Posts:
    2
    Whenever I go to the Material, it shows it as pink. And your shader gets filed under Not Supported. Is there something I'm doing wrong? Any help would be great.
     
  8. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    442
    It doesn't support LWRP yet, but it does support forward rendering! I will add support for the different render pipelines in a future version.

    It looks like there are multiple textures in the same position. This could be a problem I fixed during development of the 2.0 update. Can you try using the new version? Make a backup first, of course. I've created a short upgrade guide here: http://stixgames.com/grassshader/documentation/upgrade-to-version-2

    Which version and platform are you on? Are you sure that you deleted any old versions before importing? Have you tried reimporting the asset, or import it into an empty project?
     
    indieDoroid likes this.
  9. webjeff

    webjeff

    Joined:
    Mar 11, 2015
    Posts:
    31
    Any ETA on a LWRP (URP) version? Would love to see that, this is the only thing holding my project from going to URP at the moment.

    Thanks!
     
  10. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    10
    @Nonakesh hi, i updated from an old build (1.x something i don't recall) to the latest version.
    I splittet my terrain into a mesh by using the now deprecated tool (previously it was not). Now i have the issue that i can't use the grass painter at all.. it say to select a grass object but when i select a SubTerrain object it just deselect its right away. Any ideas?

    EDIT: Never mind, apparently the setup changed, while it still rendered the "old" setup just fine, it just did not recognized the grass elements without all components.

    BTW i love this grass.. by faar the best grass solution i tried yet
     
    Last edited: Oct 11, 2019
  11. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    442
    I've been working on another asset lately, which is in its final stage of development, but in that case I will try to look into it sometime next week. Let's hope there aren't any major problems while porting.

    I can't make any promises though, last time I tried to port it to the HDRP it looked like it would require a fairly intense journey through their shader code...

    Yes, it's necessary to switch to the new workflow, which helped me clean up the code a lot. I think it's both more useable and less error prone now. If you still need some help porting, I've written a really short guide: https://stixgames.com/grassshader/documentation/upgrade-to-version-2

    Also I'm happy you like my asset! If you have any other problems with using it, you can always post here!
     
    macish and webjeff like this.