Search Unity

[RELEASED] DirectX 11 Grass Shader

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

  1. ReignOfDave

    ReignOfDave

    Joined:
    Oct 22, 2015
    Posts:
    51
    Yeah i am thinking about making it a mesh seems like the best idea. Sorry for being to harsh in that last comment haha
    I am testing it in 5.3.5 right now.
     
  2. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
     
  3. ReignOfDave

    ReignOfDave

    Joined:
    Oct 22, 2015
    Posts:
    51
    So i did the conversion to a mesh and now i am getting hit with gfx.waitforpresent when the shader is active.and that can take up to 20ms

    Runs at 60 fps in the editor and 50 in game :O

    Edit -

    managed to fix a few issues with the fps. But i noticed this "Bug" dunno if it is because of the settings i have but take a look at this



    You should notice when i jump it looks like the grass renders at the camera height when up close to a hill and in the distance it works fine.
     
    Last edited: May 26, 2016
  4. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Okay, the wait for present is just what the editor shows when the shader is rendering, so to reduce that you should do the normal stuff (increasing density falloff, reducing max density, etc.)

    That bug in the editor is extremely weird. Could you send me a unity package (via private message) with the terrain mesh and the grass material, so I can check out what's wrong there?
     
  5. ReignOfDave

    ReignOfDave

    Joined:
    Oct 22, 2015
    Posts:
    51


    okay sent you the package

    I think it is a bug in the material. i made another one and it fixed the issue.
     
  6. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi

    I am interested in your asset, but I am currently using terrains for my project. Now, you were talking about disadvantages if the grass is used with terrain.

    1. Grass popping. What does this mean? Because of LOD Stages? Why with terrain and not with other meshes? If it is because of the terrain geometry (LOD levels in the crappy Unity terrain tend to pop), I am using RTP, a system that improves that aspect of Unity terrain by tesselating them. There is no longer any popping while moving the camera around because RTP takes care of the Terrain LOD by smoothly tesselating the terrain on the fly.
    Would this help your grass system "pop" less?

    2. No painting of grass on the terrain: I think RTP also allows to extract the splats for a single layer as a black and white texture. Would that suffice as a weight map (so the "grass" texture layer would get grass rendered upon it by your shader)?


    Then I have some more questions concerning how configurable your shader is (sorry if I missed some FAQ): the grass looks very good, but is it also possible to mix multiple different grass textures (like what was done for the grass and flowers)? If yes, how many layers are supported?
    Is it somehow possible to "randomize" placement of these layers in a way that they cluster, and are not just mixed without any variation? I guess every time I move to a different location the grass in the location I was in gets unloaded, so the clustering/randomization might differ the next time I visit the exact location, thus probably not a good idea...

    Is it a better idea to place different Grass assets (speedtree, Unity grass) as "landmark grass" and use your shader to fill in and make the grass look more dense? how does your grass combine with more traditional Mesh grass?



    Regards

    Gian-Reto
     
  7. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi there, on a slightly different note, would you mind to share how /where you got your arm animations from, I'm looking for something similar, not the same, would you reveal your source? :)
     
  8. ReignOfDave

    ReignOfDave

    Joined:
    Oct 22, 2015
    Posts:
    51
    I Just got some arms off the asset store to prototype with :).
     
  9. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Is this Asset still supported? Or is this forum thread just not watched by the dev? I am waiting on a response to my questions sinced almost 2 weeks now.

    Regards

    Gian-Reto
     
  10. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    It's definitely still supported, but somehow the Unity forums have failed to send be notification mails lately. Sorry about that. If I fail to replay, just send me a support mail directly.

    Yes, it's because of the Unity terrains LOD system. The problem is that even if you turn down the error rate of the terrain as low as possible, it's still changing LOD levels at times. So except RTP completely replaces Unity terrain, you will have some slight popping issues (where grass suddenly appears out of nowhere, instead of being smoothed in).
    A easy solution is converting the terrain to a mesh and applying the grass material on it. You can still use the default terrain for your ground material.

    You can use a splat map for grass densities, so yes, that would work. The shader supports up to 4 grass types, so you could just combine 4 of these black and white textures into 1 RGBA texture, where each color channel represents the density of that grass type.

    Looks like I already answered that one. It supports 4 grass types, but theoretically you could get more by layering multiple materials.

    The shader itself can't automatically generate areas for each grass type, but you can use a splat map to define how dense each type is. You could generate that splat map in a script, if you want to go for procedural generation.

    I think that would be the best way of using it. Maybe mesh grass would be a bit redundant, I believe my shader fills that role quite well (as long as you have enough performance), but I think adding additional elements like trees and larger plants or bushes would lead to great results. The shader should play together with that very nicely, but if you're a perfectionist you should probably reduce grass densities around other objects, so they don't intersect.

    Just look at the trailer, I've put quite a few objects in the grass, for example the rocks in the first/last scene and the underwater scene in general.

    Again sorry for not answering! If you have any other questions, feel free to ask them.
     
  11. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Thanks for you Answer Nonakesh....

    sorry if I sound a little bit harsh when I don't get an answer in the Asset Store part of the Unity forum for a longer period, been burned before multiple times by devs that disappeared.
    Will definitely use mail the next time that happens.

    Let me elaborate a little bit more on RTP: this terrain shader does NOT replace Unity terrain, but revises it quite considerably.
    One of the newer additions is the dynamic tesselation of the terrain. Somehow the shader manages to prevent the LOD popping, by dynamically increasing/reducing tesselation for a patch.

    I guess, if your shader works with the underlying terrain, it might not help... and even if, that could just mean more LOD levels as the terrain now constantly re-tesselates.

    if you say "turn terrain to mesh and apply it... you mean create a mesh from the terrain, apply grass to it, hid the mesh, keep the grass and terrain?
    Also, given the Terrain shader is using tesselation to smooth the terrain, I guess the grass would still follow the unchanged physical colider of the terrain, not the tesselated mesh?
    Is there any way I could change the shader to better interface with the terrain (get rid of the popping, follow the tesselated surface and not the collider)? If there is coding involved, I don't care, could ask the dev of RTP for help on Terrain shader specific questions.

    The ability to mix grass layers with splats sound exciting though. Definitely what I had in mind. I think with the Terrain splats, some scripts for extracting them and randomizing placement a little bit I could write a procedural generator that applies the grass for me.


    Regards

    Gian-Reto
     
  12. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    When you apply the grass shader to a mesh, the floor will become invisible. You always need 2 terrains, or 2 meshes, depending on what you are using.

    Yes, I'd expect so. The grass does use tessellation itself, but it doesn't use any smoothing.

    I don't think you can get rid of the popping. Unity terrain isn't exactly great and it completely lacks the option of disabling LOD. But the popping isn't that bad. If you set the error rate of the terrain to the minimal value, it's barely noticeable.
    Following the tessellated surface would require knowing how RTP does it internally. You could try to look into their shader code. Unfortunately that's not something I can update, even if I had RTP, I couldn't include their code in mine and publish it. If you want to try it yourself, the interesting code is probably in the GrassTessellation.cginc file.

    If you are doing that, I'd recommend using the normal of the terrain for your calculations. You could easily prevent grass from growing on steep hillsides that way.
     
  13. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756

    Okay, I think I am getting an how that works. So, If I could export the Terrain into a properly tesselated mesh that includes SOME of the smoothing done dynamically by RTP (the mesh would exceed the 64'000 tris maximum (if that is still a thing in Unity 5), but I guess I could break it up into multiples else)

    Now, given that even without tesselations a 1024x1024 terrain would translate to a 2.1 million tris mesh, and even with tesselating every face once, that would go up to almost 10 million tris... how does your shader treat that mesh then during runtime?
    I guess the mesh does not get rendered, but what is the cost of having that large mesh in the scene at runtime? Is it purely RAM used to hold the mesh? Is your shader doing calculations that get more expensive the more vertices and tris a mesh has?
    Or to put it more bluntly, how would the performance be if your gras shader is using a mesh of 10+ million polygons (or the many meshes this mesh needed to be broken up if there is still a tris limitation in Unity 5) even though the mesh itself is not rendered?


    Regards

    Gian-Reto
     
  14. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    The shader takes the base mesh, tessellates it and takes every new vertex as a base for a blade of grass. In other words, it can't use a already tessellated mesh as basis, that would be extremely performance costly, but the grass would also be so dense no computer could handle it.

    Yes, the denser the base mesh, the denser the grass will be. The performance cost will increase with that.

    You shouldn't use a tessellated mesh as a basis at all, just use the base mesh, otherwise you will have horrible performance and it won't even look good.
    As I said previously, for the grass to work with the RTP terrain smoothing, you'd have to use the same smoothing code in my shader, so they both individually come to the same result.

    I know it's a bit annoying, but tessellation is the main reason why the shader is so fast, so it's to be expected that there are a few disadvantages as well.
     
  15. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Mmh, okay... that is actually not bad. Given I can find out how the smoothing is done in RTP, I could somehow change your shader to use the same smoothing algorithm...

    And given I will most probably want to split the terrain into 256x256 chunks anyway (because of GI mostly), that would make the output meshes most probably have an "okay" tris count.

    When we talk about performance, I guess you do some kind of "LOD"-ing in your shader, so you only render blades of grass close to the camera?


    Another question that just occured to me.... I am using a pseudo isometric viewpoint where the camera doesn't get too close to the ground. Can I somehow optimize your shader for that (e.g. render whole chunks of grass per vertex instead of a single blade, adjust the range in which grass should be visible and so on)?
     
  16. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Yes, the density of the grass and the polycount of each blade of grass reduces with distance.

    Well, to be honest, I made the shader for rendering single blades, so it doesn't look very good when you're combing multiple blades in one texture, but the shader does work when viewing is from above, just use the option "Improve viewing from above" (or similar, I don't remember how I called it exactly). That option improves some issues when you're having a isometric view.

    It really depends on what you're using it for, so I guess you'll have to try it out yourself to be entirely sure.
     
  17. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Given the price, that is exactly what I will do!
    Thanks for your patience with my questions, and have a nice day.


    Regards

    Gian-Reto
     
    Nonakesh likes this.
  18. blackant

    blackant

    Joined:
    Jun 18, 2009
    Posts:
    529
    Hi !
    Great shader i love it !
    I didn't used it to it's maximum capacity yet, but i'll do !

    for now here is a little thing i don't know if it can be resolved
    the is grass on top of my meshes, the light is drawing shadows of it, that's pretty cool, but were is the grass ?
    I tdisappear when the camera is showing backface.
    Screenshot at 2016-06-20 22 46 09.png
     
  19. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Can you post a few more screenshots of this? From the top maybe?
    Did the grass just disappear when the camera is at certain positions, or is it always like that?
     
  20. Dolzen

    Dolzen

    Joined:
    Mar 26, 2014
    Posts:
    90
    Hello!

    How can I get rid of this light reflection effect?



    Thanks!
     
  21. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    That should be quite simple: Just set the specular color to black, then the reflections should be gone. Or if you just don't want the reflections to be that intense, decrease the smoothness. To get the best result, you should play around with both smoothness and specular color until you have a look you like.
     
  22. Dolzen

    Dolzen

    Joined:
    Mar 26, 2014
    Posts:
    90
    Hello again! thanks for your help I'm having other issues now.

    If I move a mesh where I have the grass shader attached to the material, in local axis X or Z, grass inside the mesh starts going crazy changing his position randomly, I can fix that by enabling Object space mode setting available in the shader options but it does not work for grass shadows, shadows casted over other objects still going crazy changing his position randomly while I'm moving the mesh in X or Z axis (it does not happen if I move the mesh in Y axis) even if I have Object space mode option enabled.

    Do you know why I'm having this behavior? I will apreciate if you can help me with this issue thanks!

    (I don't have a very good english so if you don't understand something please let me know)
     
    Last edited: Jun 26, 2016
  23. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    That definitely sounds like a bug. I'll look into it! (I can't promise anything, but I'll probably get to it sometime next week!)
     
  24. Furax

    Furax

    Joined:
    Nov 20, 2013
    Posts:
    5
    Hi Nonakesh
    Does it works with unity 5.4 and Opengl 4 ?
     
    Last edited: Jun 29, 2016
  25. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Unfortunately it still doesn't work with OpenGL. As far as I know, right now it only works on Windows with DirectX 11 and PS4 (with some small code adjustments, I'll probably patch these sometime next week)
     
  26. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    It works with ps4 ? :) I did not realise this, good news.
     
  27. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Does the grass's height will always be neat? Or is there an option to randomize?

    Right now it looks like grasses from football field, which are properly tended to even heights.
     
  28. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Well, not yet and I haven't tested it myself, but it does seem like it should be possible with a few changes! As I said, I'll include that in my patch (probably) next week.

    Like a football field? There's definitely something wrong then. Having very short grass with the shader is almost impossible, at least in my experience.

    If you want to have randomized grass heights, just change the min and max-height parameters of the grass material!
     
    Last edited: Jul 2, 2016
    Gekigengar likes this.
  29. AurimasBlazulionis

    AurimasBlazulionis

    Joined:
    Aug 13, 2013
    Posts:
    209
    Hello, I looked into OpenGL (using glcore 4.5 in the editor), in this forum I saw no real success, but haven't seen something like this:

    0(8) : error C7618: OpenGL/ES does not allow input array declarations with size not equal to gl_MaxPatchVertices

    Maybe this could lead in some partial fix? I don't know, I know not much about shaders, only how to make an unlit cutout shader. Also, in the errors it says:

    use of potencially uninitialized variable (maxHeight)

    The same with minHeight, width, softness and something more I can not read.
     
  30. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    I believe (could be wrong) that all the problems in OpenGL right now, are because of the automatic HLSL to GLSL conversion, so it's up to Unity to fix it. There are a lot of problems like "swizzling on ... not allowed" which would make sense if I could change the OpenGL code itself, but like this, not so much.

    Still, thanks for the heads up, maybe something like this will lead to a solution.
     
  31. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello,

    Would this asset work with RTP asset from the Asset Store?

    Regards,
    Carlos
     
  32. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    It will, as with the default terrain shader you'll have to duplicate the terrain. There's a tutorial for that in the manual.
     
  33. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Hi gian-reto alig. Did you get anywhere with this method? I was thinking of trying something similar but if you've already figured it out and would be willing to share with the community that would be awesome.
     
  34. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Didn't had time until now to look into it. Had other things on my plate so this had to wait. If I get around to trying it out, will let you know here in this thread though.
     
    makeshiftwings likes this.
  35. Dolzen

    Dolzen

    Joined:
    Mar 26, 2014
    Posts:
    90
    Hello!

    any news on this?
     
  36. Meta-tron

    Meta-tron

    Joined:
    Oct 22, 2015
    Posts:
    19
    Was reading the manual on your grass shader. This looks like the way to go for grass. But I need to set the grass color and height based on your texture option. I don't understand how you will be able to get separate color and height without one or the other interacting. I need to set both independently. If your using the Alpha channel that would be perfect, but the manual says nothing about it.
     
  37. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Did anyone actually get this fixed?

    For clarity, this only happens on projects that are built, not in the editor

    WARNING: Shader Unsupported: 'Stix Games/Grass' - Pass 'FORWARD' has no vertex shader
    WARNING: Shader Unsupported: 'Stix Games/Grass' - Pass 'FORWARD' has no vertex shader
    WARNING: Shader Unsupported: 'Stix Games/Grass' - Pass 'SHADOWCASTER' has no vertex shader
    WARNING: Shader Unsupported: 'Stix Games/Grass' - All passes removed
    WARNING: Shader Unsupported: 'Stix Games/Grass' - Setting to default shader.


    Edit : After a couple reimports it seemed to fix itself, somehow a single reimport did not do the trick
     
    Last edited: Jul 24, 2016
  38. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    Unable to render grass? It worked on my old computer. Now I have NVIDIA Geforce GTX 960m video card an this is what I get. Please help.

    The web demo also has no grass rendered. I have run dxdiag and everything seems fine.
     

    Attached Files:

    Last edited: Jul 26, 2016
  39. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Hi and Ha! (I came here to talk about Terrain, RTP, popping, Gaia, etc)
    I have solutions to some of those things and wished to discuss a couple of ideas for fidelity & performance improvements.

    First, just to say great asset. Lovely effect. I used with Gaia, RTP, SpeedTrees, Scion Post FX, Amplify Motion, Sonic Ether's AO, Realistic Water, etc.

    One thing I notice is that the duplicated terrain renders beyond the furthest fade distance(s). A nice option would be whether to return single verticies *at all* for values beyond the max fade distance(s). When one does the "duplciate terrain & swap Material" trick, if you enable shadow-casting on the grass terrain, it produces yucky patches in the distance where 'Y-fighting' is occurring. With this new option, it wouldn't. Until then, one can ameliorate by moving the grass terrain down (y:-0.1) but (a) you're wasting [CG]PU and (b) it still causes some of the effect in the far far distance.

    Regarding 'popping', one also needs to increase the "Base Map Dist." value. I set it to the "Grass Fade End" value.

    In fact, for other users, here's what I found good for Terrain:
    • Terrain:
      • BaseMapDist: 120
      • Tree & Detail Objects: False (don't need since you already have the orignal terrain)
      • Remove the collider (you've got one on the original terrain)
    • DX11 Grass:
      • LOD Start: 10
      • LOD End: 50
      • Max LOD: 5
      • Grass Fade Start: 50
      • Grass Fade End: 120
      • Min Height: 0
    Regarding the Color map, here's my flow:
    1. use this script to get the splat map
    2. pull it into Gimp (or whatever layer-capable drawing program)
    3. extracted the green channel (whichever happens to your grass terrain layer)
    4. Use channel selector to turn channel to 'selection'
    5. Create a new layer
    6. Colour white over the whole image (with that selection set).
      Since the selection keeps an 'alpha' like value, your 'full white' colouring comes out as levels of white.
    7. Export as PNG and bring into Unity.
    8. Set as DX11 Grass Color Map.
    Obviously if you're using multiple grass types, you'll need to tweak but I'm sure the same process will work.

    HTH, Rupert.

    p.s. I just converted this to a blog post, updated a few bits and included a video of my results if you're interested:

    https://snwscf.wordpress.com/2016/07/30/terraingaia-learning-20160724/

    :)
     
    gian-reto-alig likes this.
  40. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Just FYI I'm doing all my stuff on a GTX 980M which works fine. Obviously the WebDemo failing has bad implications but, in case it gets you further along, did you pull everything into a completely clean Unity project?
     
  41. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    yes new scene and still the same issue.
    I get this in the console but even when I fix it the issue with rendering is not fixed.

    "This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.There are inconsistent line endings in the 'Assets/StixGames - DirectX 11 Grass Shader/GrassVertex.cginc' script. Some are Mac OS X (UNIX) and some are Windows."
     
  42. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Yeah, I get the line ending errors but wouldn't expect problems from that.

    You said ”new scene”. Do you mean ”new project with the asset freshly imported from the asset store, using the example scene provided”? If not, any chance you could try that in case something in your existing project is interfering with the asset?

    Also, I'm sure you've checked but your project will need to be set to use Windows' DirectX 11 renderer.

    Hope that might help? :confused:
     
  43. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    Tried with new project and made sure settings are using directx 11.

    Thanks for your help but I am beginning to think its just not going to work on my computer.
     
    Arkade likes this.
  44. tubbz0r

    tubbz0r

    Joined:
    May 24, 2014
    Posts:
    72
    Is it possible to use speedtree grass with this? I only want the circular displacer and apply it to all my speedtree grass! I've tried following the steps however no luck.
    I created a new layer called Grass, put my grass in that layer, also specified the grass layer is = Grass in the test sphere. the grass has a mesh colider.
    You say grass must have a UV map, where do I put this UV map? what do I do with it?
    I've added the texture adder class to the grass object.

    Still no luck, what else should I try?

    Edit: Just noticed I get this error:

    "Material doesn't have a texture property '_Displacement'.

    Even though I have "add Displacement" ticked in Grass Texture Adder
     
    Last edited: Aug 1, 2016
  45. Metatronic

    Metatronic

    Joined:
    Jan 25, 2015
    Posts:
    14
    How do you control Grass height and Grass color independantly? Do you use the alpha channel for height? Says it multiplies everything but if so then color would affect grass height.
     
  46. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    Fixed It.

    Set the Nvidia control panel, "Manage 3D settings" window to use Nvidia graphics card for unity and firefox (for the web demo). It was set to auto before, I never would have thought this to be an issue but what do I know. Thanks for your help.
     
    Arkade likes this.
  47. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Ok, so it seems since the new Forums were introduced, the whole notification system broke, so sorry for not noticing all of these posts.
    Does anybody know what the current situation is anyways? Didn't they plan to replace the old one?

    So.. are any of your questions still unsolved? Also if I ever don't reply for that long, please send an email to my support address!
     
  48. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The (lithium) forum upgrade did not go as planned so it got rolled back to this one, which will stay until such a time any upgrade would be non intrusive to users.
     
    Nonakesh likes this.
  49. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    Yes!
    Could you add an option to instruct whether to return single verticies *at all* for values beyond the max fade distance(s), please.

    It was above then I later detailed better in a blog post (search ”Reducing load and mucky shadows”).

    Feedback on this would be appreciated!

    Thx!
     
  50. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    576
    Well, it would be possible to not return any vertices at all in the geometry shader. It wouldn't improve geometry at all though. I actually thought I did that already for stuff out of range, but it might have only been for things that are set to be very small with a texture.

    I'll look into it.
     
    Arkade likes this.