Search Unity

[RELEASED] GPU Instancer

Discussion in 'Assets and Asset Store' started by LouskRad, May 3, 2018.

  1. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Camera.main issues calls to FindGameObjectsWithTag in the background, which would unnecessarily slow down the performance. It is always a better idea to cache Camera.main, this is why in the case of camera switching you need to issue a call to GPUI API to set the new camera.
     
  2. ivabibliocad

    ivabibliocad

    Joined:
    Jan 11, 2014
    Posts:
    68
    Thanks bro, I'll give it a try!
     
  3. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,116
    I don't agree completely with that, but thanks for the answer.
    BTW I have sent you a palm tree model showing the problems with nature soft occlusion shader, I told you.
     
  4. sarperdag

    sarperdag

    Joined:
    Apr 14, 2018
    Posts:
    1
    Hello, Thank you for the amazing asset. I've been experimenting with it for some time.

    Not sure what I'm doing wrong but if I have a GPU Instancer prefab manager on my scene and if I add a simple game object to my scene (not prototyped, just a simple prefab of a low poly car) I see a massive FPS drop in my game (from 60 fps to 30 on my iPhone X). If I don't have a GPU instancer prefab manager, there's no such issue and everything runs smooth.

    By the way, while I'm doing this, there are no other game objects in my scene... So this seems really weird. Any ideas about what I might be doing wrong?
     
  5. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,
    and thank you for supporting GPUI.

    Can you give us some more information so we can identify this issue:

    - Does the problem persist if you turn off Occlusion Culling?
    - Are there any prototypes defined on the manager when you have this issue? and if so, how many?
    - Do you see the instance counts as zero (since there is only the GameObject in your test scene) at runtime?
    - What components and scripts are there on the car GameObject?
    - Do you only see this problem after you build the test scene, or are you having it in the Unity editor as well?

    Can you please send us this information at support@gurbu.com? It would also help if you can send us some screenshots so we can understand the problem better.
     
  6. ivabibliocad

    ivabibliocad

    Joined:
    Jan 11, 2014
    Posts:
    68
    AMAZING_!!!!! just amazing........ With 200 000 asteroids and good Frame rate...
    I just saw your tutorials in YouTube and didn't found one for VR.... Is it the same implementation or does it require further tweaking?
     
  7. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    32
    I'm loving GPUI so far, but I'm really looking forward to Occlusion Culling for VR.
    Do you have any idea when you'll be releasing it?
     
  8. ArkadiuszR

    ArkadiuszR

    Joined:
    Jan 21, 2016
    Posts:
    20
    @LouskRad My console shows:
    nvnQueueFlush: Performance warning: Queue control memory is too small to process all pending commands submitted to the queue without stalling. This error can be avoided by increasing the queue control memory size using QueueBuilder::SetControlMemorySize, or by flushing the queue more often using Queue::Flush.

    Performance warning: Queue control memory is too small to process all pending commands submitted to the queue without stalling. This error can be avoided by increasing the queue control memory size using QueueBuilder::SetControlMemorySize, or by flushing the queue more often using Queue::Flush.

    I don't have idea how to fix it beacuse i have 20fps in my game :O
     
  9. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,116
    I´m trying to use the SetCamera method but I get the error: The name `SetCamera()' does not exist in the current context
    I don't find where is explained the correct use of the API.

    EDIT: Help received by email. Thanks.
     
    Last edited: Feb 18, 2019
  10. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Thanks :)

    No extra steps are necessary for VR, it works out of the box if you have a typical setup where a single camera is rendering for both eyes. For a complex, multiple camera setup, you would need to set up your MVPs manually and would require some coding.
     
  11. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Thank you and we're glad it is working out for you.

    We have a major update scheduled for release in the upcoming days. After this update, our plan is to work on this feature.
     
  12. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    can you try disabling the Initialize in Threads option and see if this solves the issue?

    You can also try disabling the Auto SP Cell Size and increase the value there to reduce the memory consumption.

    Please let us know if this solves the issue.
     
  13. ArkadiuszR

    ArkadiuszR

    Joined:
    Jan 21, 2016
    Posts:
    20
    I'm sorry. I forgot say it's on : GPUI Prefab Manager not details manager.I don't have that options there. I just build in runtime dungeon and spawn prefabs. Code is same like your demo for mobile with init so it should work good. BTW your demo works good and i don't get this warning on console :O

    Other thing is after uptade to HDRP i don't see prefabs - like transparent material. Before reinport shaders helps but in HDRP it not help :(
     
  14. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    82
    I am using SetCamera(Camera camera), in the main thread.
     
  15. ivabibliocad

    ivabibliocad

    Joined:
    Jan 11, 2014
    Posts:
    68
    Incredible!!... Congrats for this excellence asset!!
     
    LouskRad likes this.
  16. Da-Luk

    Da-Luk

    Joined:
    Apr 25, 2017
    Posts:
    30
    Hello ;)
    i have a problem building my project. Everything is working in editor playmode. But everytime i try to build i get these 3 errors.

    __________________________________________

    Shader error in 'Hidden/GPUInstancer/Nature/TreeProxy': Program 'frag', error X4530: pixel shader must minimally write all four components of COLOR0 (on d3d9)

    Shader error in 'Hidden/GPUInstancer/Nature/TreeProxy': Program 'vert', error X4541: vertex shader must minimally write all four components of POSITION (on d3d9)

    Shader error in 'Hidden/GPUInstancer/HiZOcclusionDebugger': D3D9 does not support separate Texture+SamplerState HLSL syntax (on texture sampler_MainTex+_MainTex) (on d3d9)

    ___________________________________________


    I only use the GPUI standard roughness Shader on Objects attached in the prefab manager.
    Im not using Nature Tree shaders at all.

    What im doing wrong?

    Thank you in advance
     
  17. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Do you see any warnings/errors in the Unity console? What does the profiler show to be the problem? If you could send us a screenshot of the profiler when the spike occurs, we might be able to identify the problem.
     
  18. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there, from the error logs it looks like you are building for the Direct3D 9 platform. You would not see these errors in the editor since Unity runs in DX11 mode. GPUI does not support Direct X 9 since GPU Instancing is not supported in that API. For a list of the minimum requirements, you can take a look at the documentation wiki.

    You can remove DX9 from player settings before building to resolve this issue.
     
  19. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Are you referencing the GPUInstancerAPI or are you directly calling the methods in the managers for initialization? If you do not use the GPUInstancerAPI, there can be unexpected problems in the initialization.

    For, the HDRP problem: are you using HDRP compatible shaders on your prefabs?

    I'm not sure if I understand you correctly; it could be better if you send us a screenshot of the problem or the relevant part of your script at support@gurbu.com.
     
  20. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    55
    Hi,
    I just bought GPUI and the demo scenes really rock . But I can't seem to make it work inside my own setups
    here are the stats am getting. the scene only has one object and one light.
    upload_2019-2-21_14-9-1.png
    upload_2019-2-21_14-9-45.png
    and this is what the object itself is like.
    upload_2019-2-21_14-10-18.png
    I am using a Unity standard material.
    unity version is 2018.2.18f1
    Can you please tell me what I am doing wrong?
     
  21. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    406
    LouskRad, any update on the next GPUI?
    GPUI is not friendly to version control (Perforce and perhaps to SVN and PlasticSCM as well) creates new files if it cannot write to the existing files.
    It is somewhat uncontrollable since I don't know what I need to checkout manually before I start working on it.

    To automatically check out, you will need something like this.

    Code (CSharp):
    1.          public static void Checkout(string path)
    2.           {
    3.              if (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive)
    4.              {
    5.                 var asset = UnityEditor.VersionControl.Provider.GetAssetByPath(path);
    6.                 if (asset == null)
    7.                    return;
    8.    
    9.                 if (UnityEditor.VersionControl.Provider.hasCheckoutSupport)
    10.                 {
    11.                     UnityEditor.VersionControl.Provider.Checkout(asset, UnityEditor.VersionControl.CheckoutMode.Both);
    12.                 }
    13.              }
    14.           }
    15.  
    Could you please add to checkout file before you write to it?

    Thanks.
     
  22. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,
    and thanks for supporting GPUI.

    From the looks of it, the main difference with the demo scene is the amount of triangles you use for the prototype mesh. It seems like you are being capped in GPU while drawing the geometry and the difference GPU instancing creates is thus not showing.

    Grass details are normally made of simpler meshes like quads or combinations of quads. A mesh with 5600 vertices for for a tuft is a bit overkill for use with grass - you can achieve similar results with simple geometry as shown in this image:



    If you wish to use a detailed mesh like yours, it is possible to have a setup where you make good use of LODs to render most instances as simpler versions to reduce the GPU load when rendering them.
     
  23. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    Thanks for the code snippet. We have recently submitted a new update (details will follow soon). However, it does not include this feature. We are planning to look into this for the next update.

    We have not used perforce before, so we are not familiar with it. However, we can implement a wrapper for the asset creation and update parts which could make use of a method like this. If you wish to collaborate in the development of this, you can send us a mail support@gurbu.com.
     
  24. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    55
    thanks for the reply.
    I did not knew there was a soft-cap on the amount of vertices a prototype can have. So judging by the demo scenes keeping objects under 1k verts is normally a good idea?
     
  25. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    33
    @mehrankan It depends on what platform you are targetting your project, what minimum specs. you want.
    It also depends from which distance you switch from mesh to billboard/LOD and how many objects you actually see in camera frustrum. If you disable shadows for objects, you can have objects with more verts, or if you drop shadow maps from 4 to 2 cascades, or how are distances distributed between cascades, ...also you can use lower LODs to use for object shadow casting, ...there is plenty of options and compromises how to speed up your game.
    In general, less polygons is better, especially if higher counts does not have visual benefits. You can use impostors, which are the best in terms of speed and visual quality.
     
    LouskRad likes this.
  26. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi everyone,

    GPUI version 1.0.0 is released on the asset store. This is a major version update and as usual it includes bug fixes, new features and some changes.

    First and foremost, if you are updating from a previous GPUI version, it is recommended to backup your project before downloading this update: we have added some features that will change the way GPUI uses shaders and the update will modify/move GPUI generated shaders and folder structure.

    To start with, we have revamped the GUI of our managers. They now support new features that will speed up your workflow:

    You can now Ctrl or Shift click on your prototypes to select multiple, and edit their settings, or delete the selection from the manager.


    You can now also change the prefab for Detail and Tree Manager prototypes by either clicking the "Edit" button next to the prototype or by dropping a new prefab there.


    Also, GPUI now uses its own system to show prototype previews - which should solve the problems that previously resulted in incorrect previews in various Unity Versions. You can also change preview background colors as you wish.


    You also have the option now to view the prototypes as a list of prefab names instead of their previews using the Text Mode button (which should help with managers with a lot of prototypes).


    Finally, all sections in the managers are now foldouts. You can use this feature to focus on specific sections in your managers.


    Next up, with this version GPUI now supports SpeedTree 8 out of the box. The top-down billboards for these trees will also automatically work, but you can optionally use the GPUI generated billboards with them if you wish to. SpeedTree8 support is existing in the project as an extra package, and GPUI will prompt you to use that package when you add a SpeedTree8 model to a manager.

    With this version, we also introduce the GPUI Preferences section that you can use to change global settings for GPUI. You can access these from Edit -> Preferences -> GPU Instancer.

    The v1.0.0 version will change the way GPUI uses its shaders. This version introduces the Shader Variant Collection system which will keep track of the shaders that are used by GPUI protoypes, and also reference their used variants. Switching to this method, GPUI now does not keep its shaders in the resources folder but adds the necessary shaders and their variants automatically to your builds.


    We also added a feature that will allow you to automatically use Floating Origin handling from your managers.


    For scenes where you switch cameras, we also included a helper component called GPUInstancerCameraHandler that you can attach to your cameras which will allow GPUI to automatically handle camera changes - without writing any additional code at all.

    We have also optimized the demo scene assets and this update reduces the package size considerably (to around 95 MBs.)

    If you download this update to a project with a previous GPUI version, GPUI will prompt you to proceed with an auto-update operation when you download this update. This will move the shader files out of the resources folder, remove shader variant materials and fix GPUI include paths for your generated shaders.

    These are the main highlights of this update. As for what is coming up, we are meanwhile actively working on the skinned mesh support. We have solidified a good code basis for this. The skinned mesh support will come in the form of an extension asset to GPU Instancer. We will be posting more on the technical details and the package contents in the upcoming days.

    We hope you enjoy the new version!

    The full v1.0.0 changelog is as follows:

    New: SpeedTree8 support with top-down billboards
    New: Editor multiple add/edit/remove option for Prototypes
    New: Edit function to Tree and Detail prototypes to change the prefabs
    New: GPU Instancer Preferences to personalize various editor behaviours
    New: Auto-update system for upgrading from previous GPUI versions
    New: Auto. generated Shader Variant Collection for including used shader variants in builds automatically
    New: Auto. Floating Origin handling option
    New: Instance count warning system for Prefab Managers
    New: CameraHandler component to manage camera switching automatically
    New: Text-Mode for prototype lists
    New: Custom Preview texture drawing system for prototypes

    Changed: Shaders moved out of Resources folder to reduce the amount of shaders included in builds
    Changed: Included shaders are modified according to new folder structure
    Changed: Tree Manager coroutine initialization is now optional
    Changed: Manager Editor sections changed to Foldouts
    Changed: Reduced asset package size considerably by optimizing demo assets

    Fixed: Dark preview icons for Unity 2018.3 versions on Linear color space
    Fixed: Tree Manager showing trees in wrong positions when terrain position is changed during initialization
    Fixed: Show Rendered Amount GUI not showing zero instance count when draw calls are disabled
    Fixed: Prefab manager adding incorrect rigidbodies to instances when disabled
     
    Last edited: Feb 23, 2019
    Bzuco, AthrunVLokiz and blacksun666 like this.
  27. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    194
    If we update ,do we need to do something?sorry i haven´t understood in case of update.In case we need to do something, can you explain a bit better?
    thanks
     
  28. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    We have made an automatic update system, so you don't need to do anything. We only recommend you to backup your project to be on the safe side since GPUI will make changes in its folders and files after you import the new version.

    If you face a problem, please contact us at support@gurbu.com and we can help you.
     
  29. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    114
    Hey there,
    I bought GPU instancer mainly for the mapmagic integration. But I cannot make it work correct in any of my projects.
    So, I started a blank project in Unity 2018.2, imported GPU instancer 1.0 and MapMagic 1.9.3. Then added the MM integration and imported my terrain data. When in playmode, I get an error and the performance drops drastically between 1-3 fps. Also, the tree billboards look very wrong and not scaled correctly.

    GPU instancer off


    GPU instancer on


    Any idea what´s wrong and how to fix it ?

    Thanks !
     
  30. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    6
  31. GurhanHazinedar

    GurhanHazinedar

    Joined:
    Apr 24, 2017
    Posts:
    160
    Hi there,

    Thank you for reporting the error. We found out that some of the compute shader operations we have added are causing issues on OpenGL. We are preparing a fix now and we will upload it to the asset store soon. Please send us an e-mail at support@gurbu.com if you wish to get the fix beforehand. Sorry for the inconvenience.

    About the coloring problem on the trees, can you please send us the Scale Factor - Main Color - Hue Color you have on your SpeedTree prefab, and the Color Space (Linear/Gamma) you use for your project, so that we can check it with similar settings.
    It is also possible that it can be solved just by clicking Regenerate Billboard button, if there has been a change on the color settings after the billboard textures was created.
     
  32. GurhanHazinedar

    GurhanHazinedar

    Joined:
    Apr 24, 2017
    Posts:
    160
    Hi there,
    Thank you for sending the video. From the error, it looks like the mesh data of the trees are changing at runtime. Do you have any third party tools in your project that manipulates the meshes?
     
  33. Ramulos

    Ramulos

    Joined:
    Feb 19, 2017
    Posts:
    49
    Hello,

    Congratulations on releasing version 1.0! It's been an amazing asset so far. there is nothing like GPUI out there and has helped massively with my VR games performance. I was wondering how the occlusion culling for VR is coming along?

    You mentioned in the post that you are now actively working on the skinned mesh support feature and that it'll be an extension asset. By that i assume you mean a separate asset to buy for that feature, which is great. Do you have an ETA on when that asset would be available? Is there a way I can pay for it now and get beta access to it to start integrating it into my game? Or any information on what that system will and will not support in a bit more detail, what we'll be able to do and the potential performance boost? Sorry for all the nosy questions.
     
  34. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there and thanks!
    Glad to hear it is working out for you.

    We are working on the VR occlusion culling feature. The problem there is that the depth textures we use for the Hi-Z implementation are different for each eye, and we need to handle cameras (for the left and right eyes) separately without compromising performance. We are currently testing out various methods to achieve the best results. We can't give an ETA on this feature, but it is currently one of our priorities.

    That's correct. The animation extension will be available as a separate asset on the Asset Store which will require GPUI to work. We are already planning to firstly publish a beta version (with a discounted price) of this asset that includes the most commonly used animation features (e.g. root motion, animator transitions, etc.). We will then keep adding more features with updates until the asset won't be considered beta anymore.

    Since this will be launched as a beta version already, we are not planning to give extra beta access through other means then the Asset Store.

    As for the release date, it is again quite hard for me to give you an exact launch date, but our plan is to launch on the Q2 of 2019.

    We will open a dedicated forum thread for this asset later on, but I can give you some technical details here. The asset will work by baking bone data to textures, and using those textures for instancing with the GPUI core. The animation data will come from the Unity Animator. We are also planning a "no-animator workflow" for simpler animated scenarios where you can take full control of your instances and evade the overhang that comes with the Animator component. This will also help with potentially using threading systems such as the new Job system.

    Our initial tests with the code base we have now while getting the animation data from the Animator are quite promising performance-wise; but the results you will be getting will of course vary depending on the vertex counts of your meshes, your instance counts, hardware, etc. We will be sharing various performance benchmarks in the forum that will be dedicated to this asset.
     
  35. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    194
    hi, the update is great.

    We have noticed that sometimes, adding a new tree prototype or doing something(we haven´t discover) the tree manager fails with the floating point.Is something similar to the bug i send sometime ago about the grass(detail manager).Deleting the managers and the prototypedata and creating again, doesn´t repait it.Only all works again uninstalling/installing the package again.I send you a video where you can see that moving the terrain,the detail manager works but the tree manager doesn´t.
     
  36. pahctek

    pahctek

    Joined:
    Feb 11, 2019
    Posts:
    13
    Can I use GPU Instancer with level streaming at the sametime?
    I'm trying to use SECTR and GPU Instancer at 2018.3.6f
     
  37. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    406
    Hi, I'm curious about that too.
    I'm sure GPUI will work great for the large environment but if you have a really large environment, dividing them will help. I'm using Sectr for both visibility and streaming. Do you have any advice on how to setup GPUI correctly to work with Sectr? If it cannot support Sector, what kind of advice can you give for the large environment, say 4km x 4km or bigger? Thanks.
     
  38. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    GPUI currently does not feature an integration with SECTR, so it would require additional coding to make them work together efficiently. If your environment is huge, and if you are using a streaming solution, I would advise to make use of the GPUI API. The API has manager features such as registering, initializing and removing instances - which you can use to integrate GPUI into your streaming system. You can also go for a no game-object workflow if you would not need colliders, physics, etc. in your world.
     
  39. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    406
    GPUI API is an interesting option. It looks like it can help optimize the usage if large world instancing becomes a bottleneck. But I would like to ask you if you can add Sectr integration down the road to make thing more streamlined.
    Thanks.
     
    LouskRad likes this.
  40. pahctek

    pahctek

    Joined:
    Feb 11, 2019
    Posts:
    13
    Hi, I think I found a minor bugs for devs using source control.

    When the GPUI builds and creates a custom shader, the GPUI fails to create and register the shader if the Readonly object is located in that path. If the obejct already exist as readonly, it should be better to override it after checking out, or to use the shaders after validation if its same.

    Thanks.
    But don't worry, it's a simple matter, so I'll fix it properly until it's updated.
     
  41. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there, and thanks for the feedback.

    We are aware of the version control issue, and we are currently investigating it. We will keep you updated about this.
     
    pahctek likes this.
  42. pahctek

    pahctek

    Joined:
    Feb 11, 2019
    Posts:
    13
    Thanks.
     
  43. Raystorm

    Raystorm

    Joined:
    Mar 28, 2016
    Posts:
    7
    unity just posted in their blog about SRP Batcher for HDRP & LWRP, does that have any effect for GPU instancer ?(further performance increase?)
     
  44. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    GPUI already uses GPU memory for keeping instance material information, so this should not change performance for its defined prototypes. Also, since GPUI uses its own rendering loop, using the SRP batcher in your scene should not effect GPUI's operations. In any case, we will investigate and test this and let you know.
     
  45. Mr-EmiR

    Mr-EmiR

    Joined:
    Dec 13, 2017
    Posts:
    3
    Burak bey merhaba, büyük bir ihtimal Türksünüz. GPU Instancter sisteminize yeni update ile SRP desteği eklemişsiniz bende hemen HDRP ile kullanayım dedim ama böyle bir hatayla karşılaşıyorum yardımcı olabilir misiniz acaba? Kameranın tepesine saçma mor bir cisim beliriyor üstelik ağaçlar ve diğer objeler renderlanmıyor. Not: Standart Pipeline'da herşey doğru çalışıyor.

    download.png
     
    torvald-mgt likes this.
  46. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Hi there,

    This looks like an incompatible shader issue. If you send us the details of the shader on the material of your prototype (at support@gurbu.com), we can help you identify the issue. (Emaili Türkçe yazabilirsiniz.)
     
  47. torvald-mgt

    torvald-mgt

    Joined:
    Jun 14, 2015
    Posts:
    7
    I have the same problems as the Mr-EmiR. I use HDRenderPipeline/Lit shader for trees.
    upload_2019-3-5_23-33-54.png
    This is the shader generated by gpui.
    upload_2019-3-5_23-35-36.png


    Tell me, then, what shader should I use for trees?
    And the second question: is there any support for grass in HDRP?
     
  48. LouskRad

    LouskRad

    Joined:
    Feb 18, 2014
    Posts:
    442
    Thank you for the feedback. Can you tell us what exactly is the error that is showing in your screenshot? Also, what is the HDRP version you are using?

    As for grass, GPUI Detail managers work in HDRP but currenly the GPUI foliage shader (default for grass) does not have a HDRP version. You can, however, use a custom material for the grass prototype.
     
  49. torvald-mgt

    torvald-mgt

    Joined:
    Jun 14, 2015
    Posts:
    7
    Thanks for the quick response. I am using hdrp version 4.10.0.

    About the error. I am not sure how to describe it. I showed a screenshot in the hope that you will have some ideas.
    As I understand, in the Shaders folder, the GPUI automatically creates shaders based on the ones used in the models. So when I select this generated shader, I see an error that I showed in the screenshot. I do not understand how shaders work, so I cannot describe the essence of the error in more detail.

    About the grass. Do you plan to create an HDRP version of your foliage shader? And is it possible to use the "HDRenderPipeline/Lit shader" in gpui, or should I use some other shader?
     
  50. GurhanHazinedar

    GurhanHazinedar

    Joined:
    Apr 24, 2017
    Posts:
    160
    Hi there,

    We checked for the cause of the error and it came out to be caused by the LOD Cross Fade feature. In HDRP Unity does not supply one of the required parameters used in cross-fading. If you disable LOD Cross Fade on your prototypes they should be rendered correctly.

    upload_2019-3-6_12-24-2.png

    We will look into this and provide a workaround, or disable cross-fading for HDRP in the next update. You can use the "HDRenderPipeline/Lit" shader with GPUI, but you will need to disable "LOD Cross Fade" for now.

    As for the foliage shader, we are working on adding HDRP and LWRP versions. They will be added to the package in the near future.