Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Assets Hydroform Ocean Renderer [RELEASED]

Discussion in 'Works In Progress' started by Xix-Interactive, Feb 11, 2016.

  1. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    436
    Nailed it! One line:
    Code (CSharp):
    1. fresnel = min(fresnel, depth / 150);
    immediately before the return value in getColorFromNormal()

    hydroform_island.jpg

    This is exactly what I was looking for.
     
    Akshara, Xix-Interactive and John-G like this.
  2. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
  3. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Hi Xix!

    Love the plugin and the ease of use, considering of buying it,
    But I experience the pixel line above the water as well,

    MacBook Pro (15-inch, 2016)

    2,7 GHz Intel Core i7


    16 GB 2133 MHz LPDDR3


    Radeon Pro 460 4 GB
    Screen Shot 2018-04-12 at 21.17.54.jpg
     
  4. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Bought the plug-in and experience in editor as well:
    Screen Shot 2018-04-13 at 14.13.07.jpg
     
  5. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    I recorded the phenomenon of the pixel line, also, the reflections chop-up very weirdly, you can see it in this video:

     
  6. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Sorry for the spamming of posts, just listing some things I come across.

    I bought this asset for use with an oil rig of which I want to create a simulation.
    I chose this asset for its compatibility with VR and it's vast size which I previewed in the demo

    But when I place the ocean in my scene its boundaries seem pretty limited compared to the one in the demo, what am I doing wrong also, it glitches a bit in the editor, but in the editor the size seems way bigger



    See the difference between my file and this screenshot from the demo?

    Screen Shot 2018-04-13 at 15.00.58.jpg
     
  7. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    691

    Hi,
    MAybe check your camera far clip planes...
    cheers
     
  8. yanosch

    yanosch

    Joined:
    Feb 11, 2014
    Posts:
    13
    Oh damn, that was stupid, yup, that fixed the distance issue!

    Unfortunately the pixel line got way worse tho
     
  9. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Hmm, OK so the horizon line issue is legit on Mac and/or Radeon Pro 460.

    I'll look into it with the upcoming update.

    If anyone has similar hardware and are willing to run some test code, let me know, definitely want to get this fixed.
     
  10. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Hi,

    Firstly, great asset - amazed at the performance so far.

    I'm currently creating a script to change the water colour in relation to my day/night cycle, but I seem to be having difficulty in actually achieving a 'darker' less bright water surface.

    I saw your previous post on achieving this by changing the waters colours and I am currently accessing the waterColour variable of the Surface FX and the subsurfaceColor of the SSSFX to change those based on time of day; however, it seems I cannot achieve a darker surface by altering these colours.

    NightColour.png

    As an example in this screenshot I have set both surfaceColour and subSurface colour to Black and this does not effect the overall 'brightness'. I thought it might be the cubeMap reflection but I have set this to none and I still get the same result.

    Is there anywhere else in Hydroform scripts that alters this? It certainly seems to be receiving a 'blue hue' in terms of colour from somewhere.

    Any pointers would be appreciated :)

    Kind Regards,

    Ste.
     
  11. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    436
    I'm on Windows with a1080, but the 1px horizon line is quite visible on this hardware and I'd be happy to test any fixes you have.
     
  12. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423

    Hey Ste.,

    Yes, so in addition to changing the water colors, you will also need to change the reflection or fade it out. That's why the color is still so bright. Someone posted a way of updating the reflection cubemap in realtime for day/night if you look back earlier in the thread. At some point I will integrate this into Hydroform. Right now I'm working on volume masking.
     
    ekergraphics likes this.
  13. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    OK thanks Aubrey, if anyone else could help test it would be greatly appreciated!
     
  14. enlite

    enlite

    Joined:
    Feb 27, 2017
    Posts:
    18
    Hi Xix,

    Thank you so much for the great asset!

    Is it possible to configure the Hydroform to render crystal clear water like this?



    I want to use it in a low poly project theme. Much appreciate your time.
     
  15. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Yes, but if you just want a flat plane with a reflection, Hydroform would be overkill. This asset is designed to render geometric waves quickly with good shoreline interactions. If you just want flat water, there are cheaper assets that can do that.
     
    eaque likes this.
  16. enlite

    enlite

    Joined:
    Feb 27, 2017
    Posts:
    18
    Hi Xix,

    Thank you for responding. What I wanted to do was to create an impression of crystal clear water with waves for a low poly project. The default wave color is somewhat opaque, is it possible to make the clear with a slight blue tint?

    Thanks in advance.
     
  17. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Yes, you can make it clear and tint it however you want.
     
  18. bresz

    bresz

    Joined:
    Jun 8, 2017
    Posts:
    4
    Hi,

    I have small flotsam in my ocean scene. The flotsam shall float on the water surface. To set the height of the flotsam, I use the method GetHeightAtPoint, but it seems, that I get not the exact height. The returned height differs up to 0.5 m from the visible water level.
    Is it possible to calculate exactly the height that the shader calculates?

    Thanks!
     
  19. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Hi,

    Thanks for the reply - I’m sure I can get it working with this information.

    Kind regards,

    Ste.
     
  20. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    There's a known issue with GetHeightAtPoint() being inaccurate near the shorline - it doesn't take into account the wave damping there. It should work fine in deep water however.
     
  21. bresz

    bresz

    Joined:
    Jun 8, 2017
    Posts:
    4
    Thank you for answer.
    I've no shore in my scene. It's the same effect in the 'boxes' demo scene. When you make the boxes smaller (scale 0.25), you can see it clearly. Temporarily the boxes fly over the water or were completely submerged. Is it possible to get the height exactly?
     
  22. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    OK, I was able to reproduce this error with the waterheight set to a non-zero value. What is your water height?
     
  23. bresz

    bresz

    Joined:
    Jun 8, 2017
    Posts:
    4
    I've set waterheight to 0 and amplitude to 1.5. The other values in the hydroform component are the default values from the demo scene.
     
  24. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    OK, I can see it happening briefly. This is a bug, I'll take a look at it, thanks for reporting.
     
  25. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    I wish the lower frequency waves would be procedural instead of tiled.

    As is and as I understand, in order to reduce repetition from higher view (an aerial view of a port, for example), I need to use a quite low frequency. But then to regain contrast close up I need to use a high amplitude setting, but then waves close to the camera are too high. I'm somewhat happy with everything here but the wave height near the camera. Is there a way to dissociate amplitudes? Get a high perturbed normal shading and a low vertex displacement? I don't want to eliminate displacement as I find it one of the most eye pleasing features.

    Also, I'm having a hard time getting bloom from reflection and even specular. Is it LDR? Or maybe I'm making a mess.

     
    Last edited: Apr 22, 2018
    Harinezumi likes this.
  26. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Yeah me too on the non-tiled, but it would be a big performance hit to get rid of all tiling. Doing a high perturbed normal and low vertex displacement will still leave a more tiled look at altitude. The best thing to do would probably be add another octave of noise that is low frequency to the pixel shader. I've got a backlog of bugs and I'm finishing up volume masking now, so I can't get to this anytime soon, but if you are shader-literate, take a look in WaterFunc.cginc : getHeightFromTex()
     
  27. andre-ivankio

    andre-ivankio

    Joined:
    Mar 29, 2010
    Posts:
    53
    Thank you for the pointer. I fiddled a bit but many things change with height. But I got a good setting anyway, specially removing the saturate for reflection.

    I would imagine an octave with independent frequency (like you do with shore foam) would help with the tiling. But I trust you investigated everything extensively.

    Do you have any suggestion to deal with ship wakes? Maybe you know a 3rd party FX asset that goes well with Hydroform.
     
  28. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Hey everyone,

    Just wanted to post to say I got Hydroform working nicely with my day/night system (Azure Sky). A huge thank you to the developer and Aubrey-Falconer for the help! For anybody else who has Azure Sky and wants to integrate this ocean system, here is the process I followed:

    1) Use your existing reflection probe or create a new one to reflect your sky.
    2) Set the reflection probe to update via scripting:

    Reflect.JPG

    3) Add a custom script to update the probe, I use the following code to do this. Make sure to set the refresh rate to your own preferences, taking into account performance. My game focuses heavily on the ocean so it needs to be quick but not quite as quick as every frame. Notice I have also set the 'Time Slicing' to Individual Faces to spread the update over 14 frames and reduce the impact on FPS. Check out the following Unity optimisation page for tweaks you can make: https://docs.unity3d.com/Manual/RefProbePerformance.html

    Script:

    Code (CSharp):
    1.  
    2.  
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using UnityEngine;
    6.  
    7. public class CustomUpdateProbe : MonoBehaviour {
    8.    
    9.     // This updates the reflection probe every x seconds
    10.  
    11.     private float refreshRate;
    12.  
    13.     void Start () {
    14.  
    15.         refreshRate = 0;
    16.     }
    17.  
    18.  
    19.     void Update () {
    20.  
    21.         refreshRate += Time.deltaTime;
    22.  
    23.         if (refreshRate >= 0.05f) {
    24.  
    25.             refreshRate = 0;
    26.             this.gameObject.GetComponent<ReflectionProbe> ().RenderProbe ();
    27.         }
    28.        
    29.     }
    30. }
    31.  
    32.  
    4) Now that you have a reflection probe that is updated via script, you need to create another script to update the HydroformComponent script. This also uses the output system of Azure Sky to dynamically change the colour of the ocean. See the Azure docs on output if you get stuck - it's incredibly simple and takes just two lines of code as below once you add the two outputs.

    Code (CSharp):
    1.  
    2.  
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using UnityEngine;
    6.  
    7. public class OceanDynamicColour : MonoBehaviour {
    8.  
    9.     // This script is dynamically changing the colour of the ocean based on the time of day
    10.  
    11.     // Floats
    12.  
    13.     private float maxTime;
    14.     public float t;
    15.  
    16.     // Reflection Probe
    17.  
    18.     public ReflectionProbe skyReflectionProbe;
    19.  
    20.     Cubemap tmp;
    21.  
    22.     // Script references
    23.  
    24.     HydroformComponent hydroFormComponent;
    25.     AzureSkyController azureSkyController;
    26.  
    27.  
    28.     void Start () {
    29.  
    30.         hydroFormComponent = GameObject.FindObjectOfType<HydroformComponent> ();
    31.         azureSkyController = GameObject.FindObjectOfType<AzureSkyController> ();
    32.  
    33.         tmp = new Cubemap (skyReflectionProbe.resolution, TextureFormat.RGBAHalf, true);
    34.  
    35.         for (int i = 0; i < tmp.mipmapCount; ++i)
    36.  
    37.         {
    38.             for (int f = 0; f < 6; ++f)
    39.             {
    40.                 Graphics.CopyTexture(skyReflectionProbe.texture, f, i, tmp, f, i);
    41.             }
    42.         }
    43.  
    44.         hydroFormComponent.reflectFX.skybox = tmp;
    45.     }
    46.    
    47.  
    48.     void Update () {
    49.  
    50.         // The code to update the cubemap of the ocean system
    51.  
    52.         for (int i = 0; i < tmp.mipmapCount; ++i)
    53.            
    54.         {
    55.             for (int f = 0; f < 6; ++f)
    56.             {
    57.                 Graphics.CopyTexture(skyReflectionProbe.texture, f, i, tmp, f, i);
    58.             }
    59.         }
    60.  
    61.         hydroFormComponent.reflectFX.skybox = tmp;
    62.  
    63.  
    64.         // The logic to change the water colour over time as it goes to night
    65.  
    66.         hydroFormComponent.surfaceFX.waterColor = azureSkyController.AzureGetGradientOutput (0, 0);
    67.         hydroFormComponent.subsurfaceFX.subsurfaceColor = azureSkyController.AzureGetGradientOutput (1, 0);
    68.  
    69.     }
    70. }
    71.  
    72.  
    5) The next thing to do is to open the HydroformComponent script and locate the following code:

    Code (CSharp):
    1.  
    2.  
    3. if (mInternalSkybox != reflectFX.skybox)
    4.            
    5.         {
    6.             //   set the cubemap
    7.             Material meshMat = Resources.Load("HydroformMat", typeof(Material)) as Material;
    8.             Material brimMat = Resources.Load("BrimMat", typeof(Material)) as Material;
    9.             meshMat.SetTexture( "_Cube", (Texture) reflectFX.skybox );
    10.             brimMat.SetTexture( "_Cube", reflectFX.skybox );
    11.         }
    12.     }
    13.  
    14.  
    The above code will be contained within a periodic update function. Just move this to a function that checks more regularly e.g. Update (), otherwise this won't update the ocean reflection fast enough.

    6) Last thing to do is to open the WaterFunc.cginc file and locate the following code:

    Code (CSharp):
    1.  
    2.  
    3. //-------------------------------------
    4. // reflectCubemap
    5. //-------------------------------------
    6. float4 reflectCubemap( float3 reflectDir )
    7. {
    8. //float3 reflectEye = float3( -reflectDir.x, reflectDir.y, reflectDir.z ); // swizzle for cubemap so it matches the skybox
    9. float3 reflectEye = float3( reflectDir.x, reflectDir.y, reflectDir.z ); // @aubhere don't "swizzle" for live-reflection-probe-generated-cubemaps
    10. return texCUBE( _Cube, reflectEye );
    11. }
    12.  
    13.  
    Change your code to the above or remove the first 'float3' line altogether. This will make sure your reflection probe is properly aligned with the ocean surface.

    I am certainly not the most knowledgeable when it comes to coding/shader coding, so any further input from people is always welcome! Just thought I would post what works for me!

    And lastly here is a quick video of my start menu at 'night' and some screenshots of this in action!

    Ste.



    OceanSunsetTwo.png OceanSunset.png
     
    Jason210, eaque, Akshara and 3 others like this.
  29. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    I don't really. If I ever get to it, I would use the code and geometry I set up with the underwater "cage" to redraw a small ocean patch wherever the wake is and just draw over the ocean. There might be something 3rd party that could do that by projecting onto the depth buffer? A projected shadow asset might be able to be re purposed to do a wake.
     
    andre-ivankio likes this.
  30. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423

    WOW, you guys are killing it with getting that up and running. After I'm done with volume culling and bug fixes, I'm going to integrate this into Hydroform as much as I can to make it easier. I'd like to get reflection probes going at least.
     
    Mark_01 likes this.
  31. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    602
    I would like to know if there is an easy way to get Hydrofoam to update every second frame.
    So if my game is running at 60 fps I want Hydrofoam to update every 30fps to gain a huge performance boost.

    For effects like this which are calm and in the background I think this option should be the norm as you get so much of a boost. Maybe even add in every 1/3rd fps to update 20/60 frames a second.
     
  32. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    That would be nice, but unfortunately since Hydroform reconstructs all of the geometry every frame, it cannot carry over geometry from the previous frame. You can however change the pixel and vertex complexity on-the-fly which should improve performance and look pretty much the same if you are not near the water.

    If you are having performance issues, have you taken a look at the manual on how to improve it?

    -------------------------------------------------------
    -------------------------------------------------------

    The Hydroform Ocean System gives a high degree of control over how detailed the
    waves are vs. how fast the system can render them.

    The most important controls are 'Vert Density' and 'Patch Size' located under
    'Wave Construction'. Vert Density controls how dense the vertices are in the
    grid meshes. Higher densities result in more detailed wave geometry, but also more
    meshes and lower performance.

    'Patch Size' refers to the patch of grid meshes that are rendered in front of the
    camera. A larger patch size will create more grid meshes over a larger distance
    in front of the camera before they fade into the flat brim mesh. A larger patch
    size improves the impression that the waves extend all the way to the horizon, but
    also creates more meshes and lowers performance.

    Lowering the frequency and amplitude of the waves (see 'Wave Settings'), will
    smooth the wave geometry out and require a lower vertex density for high quality
    looking waves.

    For low-end and mobile hardware, the largest performance bottleneck is the
    pixel shader complexity (see 'Pix Complexity' under 'Wave Settings'). Setting
    it to lower values will increase performance, but lose detail.

    Reflections are also important when looking at performance. Planar reflections
    look the best and are the most accurate, but they require that the scene be
    redrawn, so complex scenes can have a large performance hit.
    To improve performance on planar reflections, set a culling mask
    on the Reflect Cam (located under the Ocean prefab) so that it only renders major
    objects that will be seen in a reflection.

    Screenspace reflections (SSR) use the existing rendered scene in the frame buffer to
    provide an approximate reflection of the scene. They are much faster than
    planar reflections on most hardware, but low-end devices may bog down under the
    more complex shader.

    Another optimization is to set up a Culling Mask for the Height Cam (child of Ocean).
    For instance, if you set up the terrain as a Layer, and then set the Height Cam to
    only render the terrain Layer via a Culling Mask, it can avoid rendering much of a
    complex scene that is not affected by the ocean.
     
    Mark_01 likes this.
  33. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    602
    Thanks! However I was simply suggesting to see if this feature was possible to squeeze that extra performance out of it.
    I know that fixedupdate() can be used to update a certain amount of times per second rather than update() which renders whatever frames your computer is running at so I wanted to see if this could be possible for more curiosity sake rather than because I have performance issues with it which I once did but then found some good optimizations for it.

    I did want to know however if the underwater is something I should be worried about?
     
  34. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,064
    Just filed a bug on this but thought you might like to know, and curious if you can replicate it.

    In 2018.1 b13 selecting MANUAL.TXT in the editor crashes the editor hard. Copies of the file do also, but not a new file with just the content copied/pasted into it via a text editor.
     
  35. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Wow, bizarre, it's a plain text file, lol. Wonder if it has an issue with certain types of line endings.
     
  36. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    No, I worked hard to make sure the underwater has minimal impact. You can disable it if you never go underwater. I'm going to add a way to dynamically turn it on/off via script in volume culling update.
     
  37. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    602
    Sounds great!

    As for the bug I am pretty sure that is an issue with Unity 2018 and should be reported to them.
     
  38. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    I'm not sure if I've configured something wrong, but I'm trying to get the water to reflect the moon and stars and it seems like the skybox reflection is stretched horizontally and offset weirdly. I'm using planar reflections, the issue happens with every skybox material that I've tried.

    skyWeird.png
     
  39. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    That is very strange. Try deleting the Reflect Cam (under the Ocean prefab), it may have incorrect settings somehow.
     
  40. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    I tried deleting the reflect cam, didn't seem to change anything. Did some more messing around, seems like somehow the reflection warping is related to the size of the viewport. Only the skybox reflection is warped, scene geometry is reflected as expected.

    wideView.png
    thinView.png
     

    Attached Files:

  41. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    Were you able to get the fog scattering from Azure working with Hydroform?
     
  42. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    That is very strange, I am not able to reproduce this artifact, at least with a regular skybox. Is it just doing this with the Azure sky? Could you try a regular static skybox and see if that works?
     
  43. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Hey Goobles,

    To be honest I haven’t really looked! I’ll take a look tonight for you to see :).

    Ste
     
    Goobles likes this.
  44. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    I just tried it with a regular skybox and am getting the same results. I'm using the planar reflection toggle on Hydroform, forward rendering on the camera, and the skybox is a standard Skybox/6 sided material. This isn't a huge issue, but I just can't figure out what is making it all wonky! What's really confusing me is that geometry is reflected just fine - only the skybox is messed up.
     
  45. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Did you completely turn off Azure? Might want to eliminate other Assets and see if it's something other than Hydroform. I don't see how it's even possible though regardless - it does planar reflections in one pass into the same texture, so I don't see how a viewport change could affect the skybox but not other reflections. I assume the demos don't have this problem?
     
  46. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Haven't played around with the fog too much but had a look for you and it doesn't seem to cause any issues for me? What issue are you getting with the fog? I messed around with the variables of the fog settings and nothing strange seemed to happen.

    Ste.
     
  47. Goobles

    Goobles

    Joined:
    Jan 10, 2018
    Posts:
    17
    Yeah, all assets except for Hydroform were off. I'm pretty sure I messed something up somewhere I just need to tinker until I get it right. Thanks for looking into it for me!

    EDIT: I deleted Hydroform and did a fresh import, somehow it solved the problem. I'm still not really sure how I caused the skybox to reflect based on screen size - but that's a mystery for another day.
     
    Last edited: May 3, 2018
    Xix-Interactive likes this.
  48. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    OK, thanks for the update
     
  49. basil3

    basil3

    Joined:
    Dec 3, 2015
    Posts:
    28
    Hi everyone,

    Does anybody else get these type of artifacts when crossing the overwater/underwater line and when using the underwater camera filter?

    I am assuming this is something to do with fog settings, although the under/overwater line artifacts happen with or without the underwater filter script enabled.

    - Rendering path is set to use graphics settings (which is forward at all quality levels)
    - Fog is enabled
    - Fog is set to exponentially squared

    Sparkle.png Sparkle2.png

    Ste.
     
  50. Xix-Interactive

    Xix-Interactive

    Joined:
    Aug 26, 2015
    Posts:
    423
    Hmm, I think I know what this is, but it shouldn't be happening. What kind of hardware are you running?

    One thing you can try and tweak is in Cage.shader. Look in cageFrag() for the line:

    // draw topside of topmesh in different color to "hide" the cage when viewed from above over terrain
    if( facenormal.y > 0.1 && inData.bottom < 0.5 )


    Try increasing that 0.1 number on the facenormal comparison. Don't go too high or other artifacts will appear.
     
unityunity