Search Unity

CTS - Complete Terrain Shader - Deprecated

Discussion in 'Assets and Asset Store' started by AdamGoodrich, Jun 19, 2017.

  1. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    632
    I am not going to get drawn into a direct fight, and i feel that it is pointless and serves no one, in the end.

    So are you saying that Adam was " misrepresentation " the amount of hours worked ? Did he " misrepresentation "
    that he gets paid less for selling one " unit " on the asset store then he would get if he charged you for an hour
    of his private time to write code for one single buyer ? He did not misrepresent any Facts* , he simply stated
    what was true, that is not a " misrepresentation " or misleading.

    The fact is that the developers are here in part for what ever reason have decided to try and support them selves
    and their families though the asset store. I am not privy as to the nature of what the deal is. But there seem to be two
    types of developers .. Ones here that make stuff and support them, and the others that " take the money and run "
    For the good developers it means support after the fact as well.. and a reputation to uphold.

    A wilful " misrepresentation " is an act meant to deceive, and I don't believe that was the intent.

    Having people talk about supporting one product over another in some one else's forum when they are
    trying to make money " just as any another other developer here " then that is not fair because it "could " impact sales that they are relying on. If i have a question as to why an asset is better then X asset , I send a PM or a mail
    to the developer, only because i think for myself that is a rude question to put in their forum.

    But for the sake of argument and openness, a single question as to why a developers asset maybe better
    then X asset in their forum I think is not unreasonable, since if it can not be answered in a clear concise way,
    then perhaps you are doing a people a favor.. if the question can not stand the light of day.
     
    Last edited: Aug 10, 2017
    TeagansDad likes this.
  2. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    If you talk about snow / rain effects than CTS does only draw water / snow effects on terrain textures not on objects / meshes. For that you need another Shader.

    Three come in my mind:
    Dynamic Nature: https://www.assetstore.unity3d.com/en/#!/content/79388 (Speedtrees supported)
    UBER: https://www.assetstore.unity3d.com/en/#!/content/39959 (No Speedtree support right now)
    LUX: https://www.assetstore.unity3d.com/en/#!/content/16000 (Free. Don't know about Speedtrees)

    Normaly weather systems like Enviro etc. can change the object / billboard colors for specific seasons if they are spawned as Prefabs. Except for Vegetation studio which will be able to that completely.

    Cheers
    Ronny
     
    AdamGoodrich and claudius_I like this.
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I believe what I said was abundantly clear and needs no further explanation.
     
  4. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    632
    misrepresentation is pretending to help some one then going behind their back, is one example.
    Original idea's always get copy cat when they are good.

    the whole situation as i understand it, makes me sick.. and yeah for me I said my piece it speaks for itself as you said in your last comment.

    The people involved know, and that's all that counts for now. Its just sickening is all.
     
    Last edited: Aug 10, 2017
    S4G4N likes this.
  5. claudius_I

    claudius_I

    Joined:
    May 28, 2017
    Posts:
    254
    Thanks.

    maybe i am wrong, but Dynamic Nature only include trees and grass for winter (don't include textures for fall)?
     
  6. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    This is such a wild thread +1
     
    S4G4N likes this.
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yeap - this thread has been one hell of a ride. Rofl! :)
     
    Mohamed-Anis, S4G4N and buttmatrix like this.
  8. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    774
    The signal to noise ratio has dropped dramatically in the last few days though, so I'll say this once, and then shut up. Please, people, can we get back to discussing CTS? I really don't have time to read through pages of bickering looking for a handful of useful on-topic comments, and I'm sure @AdamGoodrich and @NatureManufacture don't either. So please, do us all a favor, and stay on topic. :rolleyes:
     
  9. f1ac

    f1ac

    Joined:
    May 23, 2016
    Posts:
    65
    Was playing with CTS + WC for an hour, noticed some issues:

    1. Triplanar shading stretches textures on vertical surfaces with specific rotation around Y axis
    cts_triplanar_stretch.png

    2. CTS needs proper integration with WC. As soon as I modify textures/rebuild/etc in WC, CTS often stops working properly, producing white/black terrain, or texturing just does not update. Sometimes baking does not help, the only solution is to recreate CTS components anew. When I change textures to substances, even if CTS still works and 'regen on bake' is set, I need to manually reassign albedo/normal which gets changed to values from WS.

    UPD:
    3. CTS can accept smoothess/roughness textures, but does not populate them when importing substances. Usually smoothness data is in alpha channel of basecolor or metallic textures.
     
    Last edited: Aug 11, 2017
  10. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    CTS checks the reported substance content and will assign them if they are there. It uses Unity API to check the type of the texture and auto assigns appropriately.

    I don't use WC. CTS works fine on standard terrain. Sounds like WC changing things in some odd way.

    Bart will comment on this.
     
  11. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I fixed some stuff in new version anyway every layer behave in such way at this place? Also unity terrain have some problems with so sharp construction. I would rather say its my bug in this layer.
     
  12. f1ac

    f1ac

    Joined:
    May 23, 2016
    Posts:
    65
    I've tried with two layers, both were stretched horizontally.
     
  13. f1ac

    f1ac

    Joined:
    May 23, 2016
    Posts:
    65
    In my case smoothness data was in alpha channel of metallic texture, I'll try to check if this case is reported somehow.

    Ok, one more Unity-style problem for me :)
     
  14. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Hey everyone - I just launched my new web site!!

    http://www.procedural-worlds.com/

    If you would like to get access to special monthly newsletters - for subscribers only - then please sign up on the home page (and don't for get to also say yes to the email that is sent as a confirmation).

    The plan is to share special information and treats that wont be shared here. I will also be adding forums so that the information accumulated in this thread doesn't get lost as it currently does here.

    Please feel free to share your thoughts and I will incorporate what I can.
     
  15. f1ac

    f1ac

    Joined:
    May 23, 2016
    Posts:
    65
    My findings do far:
    - smoothness texture is generated only if substance uses standard shader with specular setup. However if 'generate all outputs' checkbox is checked, everything is generated.
    - alpha channel of metallic/specular texture contains smoothness data in either case.
    - CTS does not use metallic nor specular texture, so it misses input data in either case.

    Question: which PBR setup is used by CTS shader? Is it specular or metallic? The shader looks like it is automatically generated and is hard to analyze.
     
  16. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    You can supply (per terrain texture) Albedo, Normal, Ambient Occlusion, Height / displacement, Smoothness / roughness.

    On top of this CTS will then mix in Snow, Geo, Global Normals, Detail Normals, and in the next release Color Maps.

    Unity terrain uses specular workflow and assumes that smoothness / gloss is baked into the alpha channel of your albedo.

    To maximise compatibility with existing textures, if no smoothness or roughness is supplied then CTS will assume its already been supplied in the alpha channel of the albedo.

    However, if smoothness / gloss is supplied it will be baked into the alpha channel of the albedo, otherwise if roughness is supplied it will be inverted and baked into the alpha channel of the albedo.
     
  17. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    @AdamGoodrich

    The standalone will have a sync tool for both Unity and UE4 and as it is it can save out the heat-maps for each texture

    Deadlyapples did this tutorial for UE4 but you can see at around 12-13 min (if I remember rightly) where he's exporting the heat-map/mask for each texture, having a mask slot for somit like that could be real helpful

     
  18. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    So it was my mistake, that snow works fine in MapMagic and CTS integration, the problem is unistorm, when using CTS with Unistorm the weather manager doesnt really work, the only think that works is the snow slider in weather manager, but that doesn't affect the snow amount of the CTS profile. Also the Season slider doesn't move when seasons change in Unistorm. So I would like to ask for your attention on this integration when spawning the Weather Manager in runtime because of MapMagic :)
     
  19. pccross

    pccross

    Joined:
    Jun 20, 2015
    Posts:
    106
    Super newbie here, and trying to figure out a couple things.
    First, as I go through the CTS Tutorial, it mentions dragging texture from 'GameTexturesDotCom' into the 'Texture Settings' inspector Height field. I'm not seeing any Height field in mine though. 'Smoothness' and 'Roughness' appear there in my instance compared to tutorial. Was it relocated in most recent update?

    Also, I'm finding that anytime I change Shader Type to 'Advanced', it causes Unity to crash completely. Not sure if it's because I didn't 'Bake Textures' before I tried to switch. It's pretty consistent though.
    I'm running on 2017.1, with a GTX 1050ti.
     
  20. f1ac

    f1ac

    Joined:
    May 23, 2016
    Posts:
    65
    I'm having constant crashes when using Substances too.
     
  21. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So updating splat/control maps via the terrain api at runtime has always been a really heavy operation. So this time around I was looking at doing it at the shader level. The basic idea is give the shader a secondary splat control map to act as an override. And apply it in the shader surface function.

    I'm assuming this would work, if not someone speak up:) If it will work, then the next question is CTS specific. What is the correct point in the pipeline to change the albedo and normal? It looks like a ton of generated code in the shader, hard to tell at first glance what would be the best/correct place to do this in the surface function.
     
  22. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Hmmm, so I'm thinking in the context of CTS it would probably be simpler to keep that secondary map external from CTS, and modify the CTS maps directly at runtime?
     
  23. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I have exposed the splats as properties per terrain in the latest release. You will be able to override them via script if you want to change them.

    We are just calling standard Unity API's. I have not experienced crashes myself, but I suspect that some substances might have issues. Unfortunately there is not much we can do about this.
     
  24. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    No, same place as ever - you need to use the advanced or tessellated shader to get access to heights.

    Quite possibly. I would bake and save first. In latest release we are changing the approach slightly to basking textures, and perhaps this might help.

    In general I have found the latest few releases to be less stable, but at same time its been about a month since I last saw a crash.

    New release progressing nicely. I hope to be sharing it with rest of beta group either tonight or tomorrow and later this week to release if all goes well. A lot of re-work has been done on the texture and material handling.
     
  25. pccross

    pccross

    Joined:
    Jun 20, 2015
    Posts:
    106
    Great! Looking forward to the next release.
    I played around a bit more and found some additional details. I decided to open the project in latest 2017.2 (beta), but gave up since I was getting strange errors, and also found the 'Gaia Session Manager' wasn't appearing in the drop-down menu at top, and the one time it did show up in the menu and I launched it, Gaia didn't recognize Enviro and Aquas were installed.
    I then re-imported that project back into 2017.1, and saw a couple Enviro errors in the console. Subsequently, I deleted the Enviro asset, and the issues I had with Unity crashes when dragging textures into the height field went away. So not sure if it was conflict with Enviro, or the act of importing into 2017.2 and then back into 2017.1 magically resolving things.
     
  26. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Using CTS with MegaScans textures and I'm confused. The terrain looks great in light, but looks strange in shadow. It seems reflective for some reason. Any idea why?

     
  27. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yes. The alpha channel of the albedo texture needs to contain the specular / gloss / smoothness texture.

    As megascans does not do this for you, CTS has added a convenience feature to sort this for you.

    Grab the relevant megascans texture and drop it in the smoothness slot. Alternatively if you have a roughness texture then drop it in the roughness slot.

    Rebake - problem solved :)
     
  28. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    The difficulty is identifying what goes where. For example, some textures have an ambient occlusion map, and I am not certain which field AO goes into.

    In the case of MegaScans, I have a gloss, specular, AO, and displacement maps (2, actually). Not sure where they go.

     
  29. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Hey everyone -

    As you probably know I have been investing significantly in my web site - and am working on lifting my game across the board.

    Bart and I monitor these forums but often don't get notified of posts - and as people have said - there is just too much here to wade through.

    So - if you want support please go to https://proceduralworlds.freshdesk.com/support/home and log a request. These are tracked and wont fall though the cracks. I am also building up a knowledge base on the support system so chances are the solution to your issue will appear here.

    I have also set up a forum system at http://www.procedural-worlds.com/forums/. It's not public in the navigation yet and still needs some theming and tidy up. This will be far more useful than these forums as we can create threads rather than having one big long stream of consciousness as we do here.

    I have also created a new mailing list signup on the home page here : http://www.procedural-worlds.com/. This will be a very cool subscribers only news, reviews, tips n tricks & freebies source.

    Please take a moment to have a look..
     
  30. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    I read with interest the CTS shader rewrites. I'm currently testing the CTS shaders with a beta test group of 110 beta testers of my game and for the most part it's going ok. However, we have some users (on ATI cards) where the performance with CTS is just through the floor, whilst Nvidia users on a similar capability hardware my be getting 45-50 fps the ATI users are reporting 4 fps. This is of course a concern for us as it means a proportion of our user base just won't be able to use the new scene we are developing using the CTS shaders. Any thoughts on why this might be happening and any clues on when the new shaders will be published as I have to take a decision on whether we can use CTS at all and of course this hinges upon whether I can resolve this problem before our next release window.
     
  31. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    If I were the developer I would probably want to know which ATI cards your users with 4fps have.
     
  32. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    I can find out - the very same users can run a standard unity terrain without the same kind of problems. It's varying from scene to scene as some scenes are bigger than others but where they are getting a useable frame rate they are suffering with stutter and it won't run smooth. Where as the exact same scene without CTS will run perfectly well. I absolutely don't want this to come across as a 'CTS has awful performance' type post as this does appear to be a fairly isolated set of users having the problem, I love the way it looks and works and for the majority of our testers it's working fine. I believe the guy getting the most issues is running a Radeon 200X series card.
     
  33. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Hello guys. I'm having some trouble getting my desired FPS in VR to work with CTS. To be honest I'm not sure if it's related to CTS or to something else that is simple that I'm missing and is related to VR.

    While not in VR my FPS is around 300(3-4ms), but as soon as I put on the headset I drop to about 45(20ms). I'm trying to keep the game above 90FPS. This is really odd because I'm using a very simple 1k terrain I built in GAIA and then CTS stacked on top. I'm using the Advanced CTS shader. If I switch it to basic I do get 90 (barely) but I still think is a lot less than I should be expecting considering all I have is a terrain in the scene. No vegetation models, scripts etc just a terrain... The polys on the terrain are quite low as well I've smoothed it down several times. I've also tried forward/deferred lighting and neither seem to make a difference. My profiler shows that 90% of my MS delay is coming from VR.WaitForGPU() which really isn't very helpful.

    My rig i7 1060 32gb ram.
     
  34. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Producing natural scenes that are suitable for a VR performance benchmark can take a lot of work. I would suggest doing some more research regarding how to best optimize vegetation and terrain data for realtime rendering. In most cases, if you are using terrain data instead of a low poly mesh for your terrain, you're going to be spending *a lot* of draw calls if your pixel error is not high enough. Additionally, whenever possible, batch your static meshes beforehand to save some of the overhead on Unity's part. Texture atlas as much as you can, and of course, be cognizant of your tree LODs, if you are using them. Finally, don't trust the Unity profiler. Pull one of the many FPS counter scripts available online (or FRAPS) and frequently benchmark your scene outside of Unity [inside the headset] to get a more accurate reading on your rendering overhead. Manage your shadow cascade quality to suit your performance needs, and check if Vsync is on / off. VR.WaitForGPU() is the CPU waiting for the GPU to return, so check your GPU usage; you're always going to see this if profiling in the Editor, especially if game view is not maximized. Also, check your post processing stack, and make sure single pass stereo rendering is enabled in Player settings. Hope this helps.
     
    syscrusher, AdamGoodrich and Mark_01 like this.
  35. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yeap at my game unity shows me 40-60 fps but at build I had 160....I spent weeks after i discover that unity fps mesure at editor for vr is....... .... .... Anyway new cts version will be a lot lot faster :) we had to jump over few unity terrain bugs but it was worth of it.
     
    Last edited: Aug 17, 2017
    Mark_01 likes this.
  36. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Hey yeah I think it does. It's just a bit unfortunate. I don't think this is a CTS issue. After doing some digging I found that unitys built in shaders had roughly the same FPS as CTS . It's more of a "Wow holy crap Terrains in Unity/VR are really expensive issue". (Unless I'm missing something which I very well could be). I was just surprised to see my fps drop from 300 no vr to 45 in vr with only a small simple terrain and no vegetation, no post processing , no scripts etc. . I think in general Unity's built in terrains aren't as optimized as UE4 for some reason. I was able to fairly easily get a steady frame rate of 90 FPS in a very large sized terrain in UE4 (4k terrain around 4 million polys versus the 1k terrain with 3-400k polys I have here.

    Thanks for the other tips you mentioned as well, I've been doing a bit of reaserch but I somehow missed the single pass stereo which now seemed to have given me a 3-4 FPS increase. :D

    P.S. I tried this in a build and got roughly the same FPS with the same debug as in the editor.
     
    Last edited: Aug 17, 2017
  37. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Maybe I'll give another build a shot now that I have single pass stereo update setting corrected in. BRB :D
     
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    New cts version will be 1st pass so huge amount of drawcalls from unity terrain will gone. Just wait few days.
     
    Mark_01, TeagansDad and nxrighthere like this.
  39. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    @NatureManufacture Dude you're a wizard. I've been having trouble with large Unity terrains and their draw calls for years. If you manage to reduce Unity terrains built in overhead that would be epic.
     
  40. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352

    do you have your scene view open while in play mode? if you have editor split into scenview and game view and your scene view is open while in play mode, try to close the scene view, or open something else in that tab like asset store, or animator, anything but the scene view. having a scene view open while playing in editor drops my fps to half usually
     
  41. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    This is the info I was after, are we really looking at just a few days as I've got a group of 100 beta testers on standby at the moment waiting for me to fix the frame rates. I don't want exact info (we are all developers and 'are we there yet' posts are the worst). I just need a bit of a time frame so I can at least update the testers and give them an idea as to when the updated shaders are coming and whilst waiting they can test other stuff.
     
  42. seanybaby2

    seanybaby2

    Joined:
    May 17, 2013
    Posts:
    120
    Hey thanks for the tip. Unfortunately yeah I have tried that. I have tried making a standalone build/maximizing in play/closing the scene view etc. Still crazy to me how my FPS is dropping from 250-300 to 45 in vr. Still working on this lol, I must be missing something the drop is too high.

    EDIT: Hmm what I think is really interesting is that it only occurs when I am very close to the ground. If I keep my player 30 feet in the air above the terrain my fps stays around 130 in VR in editor, I think I'm getting closer to the root of the issue.
     
    Last edited: Aug 17, 2017
  43. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    176
    Sounds like the detail texture rendering to me.
     
  44. MarcAudouy2

    MarcAudouy2

    Joined:
    Aug 9, 2017
    Posts:
    6
    Hey guys,

    We are currently testing the game on a PS4 devkit and the terrain shaders have some errors on them. I am not sure if you ever had the opportunity to test on PS4.

    Shader error in 'CTS Terrain Shader Advanced': Program 'frag_surf', ambiguous call to 'lerp'. Found 3 possible candidates: at line 1347 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced': Program 'vert', ambiguous call to 'lerp'. Found 3 possible candidates: at line 1347 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced': Program 'vert_surf', ambiguous call to 'lerp'. Found 3 possible candidates: at line 1347 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced LOD': Program 'frag', ambiguous call to 'lerp'. Found 4 possible candidates: at line 533 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced LOD': Program 'frag_surf', ambiguous call to 'lerp'. Found 4 possible candidates: at line 533 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced LOD': Program 'vert', ambiguous call to 'lerp'. Found 4 possible candidates: at line 533 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced LOD': Program 'vert_surf', ambiguous call to 'lerp'. Found 4 possible candidates: at line 533 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced Tess': Program 'frag_surf', not enough registers available for the entire program. In order to permit spilling to memory please either disable this error via '#pragma warning (disable:7203)' or reduce it to a warning via '#pragma warning (default:7203)' (on ps4)
    Shader error in 'CTS Terrain Shader Advanced Tess': Program 'frag', incompatible argument list for call to 'vertexDataFunc'. Found 1 possible candidates: at line 2842 (on ps4)
    Shader error in 'CTS Terrain Shader Advanced Tess': Program 'vert', incompatible argument list for call to 'vertexDataFunc'. Found 1 possible candidates: at line 2842 (on ps4)

    some errors seem to be caused by the stricter compiler, I have managed to fix them locally, e.g.:

    in CTS Terrain Shader Advanced:1346

    float3 layeredBlend7722 = ( lerp( lerp( lerp( lerp( 0.0 , Normal_1569 , layeredBlendVar7722.x ) , Normal_23361 , layeredBlendVar7722.y ) , Normal_33452 , layeredBlendVar7722.z ) , Normal_43519 , layeredBlendVar7722.w ) );

    ->

    float3 layeredBlend7722 = ( lerp( lerp( lerp( lerp( (float3)0.0 , (float3)Normal_1569 , (float3)layeredBlendVar7722.x ) , (float3)Normal_23361 , (float3)layeredBlendVar7722.y ) , (float3)Normal_33452 , (float3)layeredBlendVar7722.z ) , (float3)Normal_43519 , (float3)layeredBlendVar7722.w ) );

    in CTS Terrain Shader Advanced Tess:2835

    v2f vert( appdata_full v )

    ->

    v2f vert( appdata v )

    in CTS Terrain Shader LOD:532

    float4 layeredBlend6518 = ( lerp( lerp( lerp( lerp( 0.0 , ( pow( Texture_1_H , temp_cast_1 ) * _Texture_1_Heightmap_Depth ) , layeredBlendVar6518.x ) , ( _Texture_2_Heightmap_Depth * pow( Texture_2_H , temp_cast_2 ) ) , layeredBlendVar6518.y ) , ( _Texture_3_Heightmap_Depth * pow( Texture_3_H , temp_cast_3 ) ) , layeredBlendVar6518.z ) , ( _Texture_4_Heightmap_Depth * pow( Texture_4_H , temp_cast_4 ) ) , layeredBlendVar6518.w ) );
    float2 appendResult4399 = float2( ( 1.0 / _Texture_5_Tiling ) , ( 1.0 / _Texture_5_Tiling ) );

    ->

    float4 layeredBlend6518 = ( lerp( lerp( lerp( lerp( (float4)0.0 , ( pow( Texture_1_H , temp_cast_1 ) * _Texture_1_Heightmap_Depth ) , layeredBlendVar6518.x ) , ( _Texture_2_Heightmap_Depth * pow( Texture_2_H , temp_cast_2 ) ) , layeredBlendVar6518.y ) , ( _Texture_3_Heightmap_Depth * pow( Texture_3_H , temp_cast_3 ) ) , layeredBlendVar6518.z ) , ( _Texture_4_Heightmap_Depth * pow( Texture_4_H , temp_cast_4 ) ) , layeredBlendVar6518.w ) );
    float2 appendResult4399 = float2( ( (float)1.0 / _Texture_5_Tiling ) , ( (float)1.0 / _Texture_5_Tiling ) );


    not sure if the fixes are correct, I know nothing about shaders, but it seems consistent.

    one thing I cannot fix though is the memory issues:
    Shader error in 'CTS Terrain Shader Advanced Tess': Program 'frag_surf', not enough registers available for the entire program. In order to permit spilling to memory please either disable this error via '#pragma warning (disable:7203)' or reduce it to a warning via '#pragma warning (default:7203)' (on ps4)
    it occurs on Advanced, Advanced Tess and Basic.

    at the moment we have disabled the shaders on PS4 (#pragma exclude_renderers ps4) as we continue our development, as trying to rebuilid them everytime I prepare a build for the PS4 is a pain.

    Is there some plan to support PS4 at one point and is there a timeline?

    thanks,

    Marc
     
  45. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I just got in a state where I can reliably crash unity with CTS. I changed the max size of all the textures currently in CTS. Now whenever I try to rebake, unity crashes.
     
  46. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Actually even a new profile with those textures crashes. And even after I changed the size back to 2048.
     
  47. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    removed the textures from the terrain. Added them back. Now creating a profile doesn't crash.
     
  48. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    632
    Last edited: Aug 17, 2017
    AdamGoodrich likes this.
  49. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Wonder what was going on there - sounds like your old profile somehow got into a bad state.

    No unfortunately. Bart is the shader guy - hopefully he can offer some suggestions.

    We jumped the shader count from 3 to 6 in the next release and the new terrain optimizations meant that I needed to make a significant change to the way we manage the materials.

    The non shader code related to CTS is quite a significant body of work now and its taking some time to get it right. Hopefully I will get it knocked out by early next week.
     
    catfink likes this.
  50. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Ok just wait for new update then everything should work or if not, we will fix this step by step:) New version had big optimisation and changes so it's hard to compare anything now.
     
    Mark_01, MarcAudouy2 and llJIMBOBll like this.