Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fog Volume 3

Discussion in 'Assets and Asset Store' started by DavidMiranda, Jan 30, 2014.

  1. Unityaware

    Unityaware

    Joined:
    Feb 14, 2014
    Posts:
    101
    Hi David,
    Thanks for your response. There is obviously something that I am not doing right, but I can't see what. I keep getting these artifacts in the scene, like siluette cutouts of plants etc or sometimes just blank cutout slits like in the previous post. What do you think might be causing this? I changed all sorts of settings, but without any luck:
    http://3d-art.co.uk/www.3d-art.co.uk/Artifacts.html

    What is curious is that the cutout image seems to be the same, although its a different part of the scene to the previous one I posted earlier. It almost looks like a ghost image of the imported vegetation. There seems to be some conflict related to the scene content perhaps. Its a mystery.
     
    Last edited: Mar 29, 2014
  2. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Can you send me a build? I would like to see it in movement. It probably has something to do with your scene shaders. If they don't write to zbuffer, then we have a problem. Are you using alpha tested alpha or alpha blend?
     
  3. Unityaware

    Unityaware

    Joined:
    Feb 14, 2014
    Posts:
    101
    Hi David, I think I narrowed the problem down a bit more. It seems to be related to vegetation. I used a standard scene (Rocks and Boulder from K4) and then covered the area with your fog. The fog is left cut out by the swaying grass blades. I don't know whether this helps. Here is the screen grab for illustration: http://www.3d-art.co.uk/www.3d-art.co.uk/Artifacts_2.html
     
  4. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Exactly. It has nothing to do with Fog but how the vegetation shader works. The Fog Volume will use Unity's depth buffer, and its built by scene shaders. Then your problem is related with your scene/vegetation shader.
     
  5. Unityaware

    Unityaware

    Joined:
    Feb 14, 2014
    Posts:
    101
    Thanks David, so all I need to do now is finding a way to fix it. Do you happen to have any suggestions where to look?
     
  6. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    I guess that vegetation is being animated in the vertex shader. I have never done that in Unity. But the thing is that the new vertex positions must be taken into account in order to update the depth buffer.
     
  7. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    By the way, you should contact the shader developer, this should be fixed because you will have the same problem with DOF and any other effect that reads from Depth texture.
     
  8. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Working in the next update. Several warnings and errors fixed, added cute icon and volumetric noise under research.

    $03-04-2014 10-26-43.jpg




     
  9. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Just got this. Looks awesome! I'm using it on my whole scene to replace the built in unity fog (which looks much worse and messes up my ssao). Is there any way to exclude the sky from this fog volume? I could make the sky extra contrasty to offset what the fog volume does but that seems less than elegant.
     
  10. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    That sounds really weird :) It's not possible.
     
  11. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Ah, okay. Excluding the sky from fog is quite normal (is that what you were saying was weird?). The sky is excluded from both the camera global fog, and default fog in unity, so I thought perhaps there was a way.
     
  12. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yep, sounds weird for me :)
    Unity Fog is integrated inside every shader, that makes it more flexible for those kind of things. This is different, its a transparent shader like any other.

    btw, version 1.05 is uploaded and waiting for approval.


    • You can preview/experiment with the 3D Noise effect. Its ALPHA version.
    • It will only work if DX11 hardware is found.
    • In-scattering and noise are now set per fog volume. So no more conflicts when you have more than one fog volume.
     
  13. sfaok

    sfaok

    Joined:
    Nov 27, 2012
    Posts:
    23
    Hi - I am very impressed with your shader, and I'm hoping to use it for an underwater scene as the effect is amazing, especially with inscattering.

    I'm rendering in stereo (for VR) and I'm getting an artifact on the second camera:



    Basically it seems like it's using the depth/stencil from the first camera. I am confined to forward rendering.

    I would be very grateful for any help!
     
  14. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Which color space are you using?

    I've been getting big visible step issues (like smoke sprites intersecting with the floor) in Linear, but its in both eyes.
     
  15. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    I will have to investigate that. Never tried Oculus. Thanks for the report!
     
  16. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    This looks really awesome! Will be buy it later :D (bookmarked)
     
  17. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I was hoping the 3D noise would make it in - getting it working with candela could be a stress but ill figure it out - call it a buy from me when funds are assured
     
  18. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Fog Volume 1.06 is out!



    1.06 Changes:

    • Effect won't dissapear in editor mode (deferred)
    • Volumetric Noise important improvements (Only DX11 for now)
    • Noise quality adjustment
    • Fog Volume is now connected with Foggy Lights 1.02. Foggy Lights will be affected by Fog Volume visibility
    • Inscattering is now inside Volume boundings
    • Fixed Noise intensity contrast

    IMPORTANT NOTE: THIS UPDATE WON'T WORK ON MOBILE
    ​(I hope I fix it soon)

    More images and information at the asset store

    -
    Documentation -

     
    Last edited: May 13, 2014
  19. terrydif

    terrydif

    Joined:
    Aug 1, 2012
    Posts:
    4
    Hi David_MG,

    I bought your Fog Volume plugin earlier today for my project, and with a perspective camera the fogs works just fine. However, it simply does not work when using an orthographic camera, which my game uses, making the plugin useless for me. This isn't mentioned anywhere in the description or documentation. :-\
     
  20. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Sorry for that, never tried that option. This would need a custom solution.
     
  21. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Does this shader work with transparent shaders? I have Advanced Surface shaders and have been using the volumetric objects for fog. However, one problem besides the scattering not being present like in this asset is the fact that my fog is rendered awkwardly when it comes to things like leaves and other transparent objects.

    $fogbug.JPG

    Can this asset deal with that sort of thing? I'd definitely pick this up if it does.
     
  22. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Snippet from documentation:

    Some people think this is my fault. It's NOT. This is how computer graphics works for now, and I can't do much to fix this problem.
     
  23. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    awesome man
     
  24. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
  25. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    I have tried writing Depth. Its not the perfect solution, since what you need is to attenuate fog from background-to-object with object-to-camera fog.

    The correct way should be something like:

    TransparentSurfaceFog = length(BackgroundPixelPosition - TransparentSurfacePixelPosition) x length(SurfacePixelPosition - CameraPosition)

    So that's why it's almost impossible to do easily. You need 2 different pixel positions and depths.

    Just writing Depth will create fog from camera to surface, not from surface to background.
     
  26. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    Hi David,

    I just bought foggy lights and foggy volume to work in conjunction in my oculus project. They're pretty great, thank you for producing these. I am working in OSX however and neglected to pay attention to the directX11 requirement for the noise function to work which I was particularly attracted to. Do you have any info to share about when this functionality may be available on platforms other than Windows?

    thank you!

    -julian
     
  27. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Thank you Julian. We have to thank Robert Briscoe and Ryan Wiancko, since they requested these products ^^
    Have you tried them in Oculus? Do they work well?
    Can't tell you right now when volumetric noise will work in mac. A programmer friend of mine is trying to do that part. Let's see if we are lucky. I can tell you volumetric noise will never work on mobile, hehe.

    Cheers!
     
  28. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Good news, 3D Noise works now on OSX

    $Captura de pantalla 2014-05-24 a la(s) 13.41.42.png
     
  29. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    David,

    Yes, apart from the absence of the noise function they're working as advertised and not adding significant draw time or artefacts. I'm doing anything too fancy or using transparent textures at the moment, just using them for what they seem to be best at, adding atmosphere a good glows around my lighting. That's really exciting that the noise function looks like it's working in OSX! Can't wait for a build. :D

    -julian
     
  30. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Marvelous!. Can you post here some screens of them with Oculus, please?
     
  31. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    Here are some screenshots. I'm pretty new to Unity so it's only been a month. You can see how the noise function would be quite effective in this context... I didn't grab these in play mode as the lights function differently at runtime. But the fog volume and foggy lights look like this:

    $EMP3.jpg
    $EMP2.jpg
    $EMP1.jpg

    -julian
     
    Last edited: May 25, 2014
  32. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Marvelous! Thank you. Can you please make it more exaggerated? I want to see if depth information is correct :)
    And, what do you mean with "I didn't grab these in play mode as the lights function differently at runtime"
     
  33. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Good news. Fog Volume is working on android again.
    Works on iOS now. Here is a picture of an iPad test.

    $IMG_2514.jpg
     
  34. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    David,

    here's another screenshot. I've decreased the visibility parameter for the fog volume and lowered the exponent for the foggy lights. I wasn't sure how you wanted the exaggeration to occur. I figured you wanted to see the volume extents.

    I meant that my light setup flickers a lot [on purpose] at runtime, so getting a frame with the oculus CA and distortion was harder. So I just turned up values statically and grabbed the game window.

    $i-dkWdKvw.jpg

    -julian
     
  35. sfaok

    sfaok

    Joined:
    Nov 27, 2012
    Posts:
    23
    Julian - that looks awesome.

    Are you using forward or deferred rendering in your project? Also did you have to change anything to get it working?
    The reason I ask is that I'm having problems getting the right camera to render properly (see Whale screenshot on last page) in forward rendering mode - which I have to use for my project.
     
  36. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    That's why I asked him about these screenshots. I hope we can find a solution.
     
  37. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    Hey sfaok,

    I'm using forward rendering. No I didn't have to change anything. I saw your screenshot but I don't have anything to suggest sorry, other than I have struggled with some of Unity's post effects like sunlight shafts and global fog in terms of oculus integration. That's why I turned to David's fog volume and foggy light tools. I presume Unity and oculus will resolve some of these issues as it's still early days for complete oculus integration at this point.

    I'm not super experienced with Unity so my only suggestions would be to check light count, transparent textures and draw priorities for your forward rendering stuff? Do you have post effects on your oculus cameras? Things can get messy there because oculus output from unity prefers to do distortion and chromatic aberration correction first and post effects want to come after. This won't work properly. Drash on the oculus forums posted and interesting solution here.

    good luck.

    -julian
     
  38. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Hey David. I'm having very strange artifacts when I have SSAO on my camera, and when Advanced Foliage Shader is on screen. This happened after one of the more recent fog volume updates (sorry to say I don't know which one). I don't know if you have the advanced foliage asset, but would you have any guesses as to what might be causing this? The artifact seems to look like my foliage texture sheet (so weird) and it goes away when there are no advanced foliage shader assets on screen.

    $SSAO_and_Advanced_Foliage.jpg
     
  39. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Yes, I noticed and fixed it yesterday. Hopefully that will be fixed in the next revision: 1.08, which is waiting for approval.

    Thanks! With your feedback it will progressively improve:)
     
  40. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    533
    Awesome. You're continued support is extremely appreciated.
     
    DavidMiranda likes this.
  41. chronosapien

    chronosapien

    Joined:
    Feb 1, 2011
    Posts:
    73
    Just picked this up from the store. It's working great so far, but I noticed one bug: when duplicating a fog volume in the hierarchy, the fog loses its soft edges and shares a color with the duplicated volume. Creating multiple volumes by using GameObject -> Create Other -> Fog Volume works fine, but duplicating volumes in the scene does not.

    Also, I'm wondering if its possible to have a color gradient for fog volumes based on height and/or depth. I'm trying to get the effect working with multiple volumes but it isn't really working out.
     
  42. JulianButler

    JulianButler

    Joined:
    Nov 17, 2013
    Posts:
    15
    Hey Ryan, I was curious about what you were wanting to do with the bridge and the lights and tried it myself. Also the 1.07 version of fog volume appeared and also has the noise function working correctly on OSX. I managed to get the fog lights to NOT be eaten up by the fog volume as they recede by un-ticking the 'Inside Fog Volume' option for each fog light. Forgive me if you have already sorted this all out. Here's a screenshot of where I got to. [Note: I have not evaluated the framerate hit for this setup so YMMV of course]:

    Update: I'm using David's FogVolume AND FoggyLight in conjunction to achieve this look.



    -julian
     
    Last edited: Jun 3, 2014
  43. Sometimes_Always_Never

    Sometimes_Always_Never

    Joined:
    Apr 5, 2014
    Posts:
    27
    Hey David - awesome work! FogVolume is amazing.

    I just wanted to mirror what others have noted in regards to Oculus integration. We're seeing a ghosted version of the right camera's fog volume on the left camera. In the screenshot we can see a ghost tree.



    Also, the rain shader we have disappears on the righthand camera in the fog, but works perfectly on the left. Not sure how to correct this, but it appears to be related to the fog volume working properly on the right camera. Any ideas?

    Happy to share a build of this scene if helpful! And thanks so much for creating this.
     

    Attached Files:

  44. ironbelly

    ironbelly

    Joined:
    Dec 26, 2011
    Posts:
    597
    Yea that turned out nice.. We have also started using foggy lights to achieve this look and feel. David could you comment on how you feel foggy lights will perform on mobile?
     
  45. AvGaz

    AvGaz

    Joined:
    Dec 21, 2012
    Posts:
    82
    It's works on iPhone, but not iPad 5 -

    Warning: Creation of shader 'Hidden/FogVolume' failed.-------- Hidden/FogVolume




    (Filename: Line: 141)



    -------- failed compiling vertex program:




    (Filename: Line: 142)



    #version 300 es

    #version 300 es

    #ifndef _

    #define _ 1

    #endif

    #ifndef _HQ

    #define _HQ 1

    #endif

    #ifndef _LQ

    #define _LQ 1

    #endif

    #ifndef _FOG_VOLUME_NOISE

    #define _FOG_VOLUME_NOISE 1

    #endif

    #ifndef _FOG_VOLUME_INSCATTERING

    #define _FOG_VOLUME_INSCATTERING 1

    #endif

    #ifndef SHADER_API_GLES3

    #define SHADER_API_GLES3 1

    #endif

    #ifndef SHADER_API_MOBILE

    #define SHADER_API_MOBILE 1

    #endif

    #define gl_Vertex _glesVertex

    in vec4 _glesVertex;

    #define gl_Color _glesColor

    in vec4 _glesColor;

    #define gl_Normal (normalize(_glesNormal))

    in vec3 _glesNormal;

    #define gl_MultiTexCoord0 _glesMultiTexCoord0

    in vec4 _glesMultiTexCoord0;

    #define gl_MultiTexCoord1 _glesMultiTexCoord1

    in vec4 _glesMultiTexCoord1;

    #define TANGENT vec4(normalize(_glesTANGENT.xyz), _glesTANGENT.w)

    in vec4 _glesTANGENT;

    #line 221

    struct v2f_vertex_lit {

    highp vec2 uv;

    lowp vec4 diff;

    lowp vec4 spec;

    };

    #line 275

    struct v2f_img {

    highp vec4 pos;

    mediump vec2 uv;

    };

    #line 271

    struct appdata_img {

    highp vec4 vertex;

    mediump vec2 texcoord;

    };

    #line 78

    struct v2f {

    highp vec4 SampleCoordinates;

    highp vec3 Wpos;

    highp vec4 ScreenUVs;

    highp vec3 LocalPos;

    highp vec3 ViewPos;

    highp vec3 LocalEyePos;

    };

    #line 73

    struct appdata_full {

    highp vec4 vertex;

    highp vec4 tangent;

    highp vec3 normal;

    highp vec4 texcoord;

    highp vec4 texcoord1;

    lowp vec4 color;

    };

    #line 16

    uniform highp vec4 _Time;

    uniform highp vec4 _SinTime;

    uniform highp vec4 _CosTime;

    uniform highp vec4 unity_DeltaTime;

    #line 21

    uniform highp vec3 _WorldSpaceCameraPos;

    #line 27

    uniform highp vec4 _ProjectionParams;

    #line 33

    uniform highp vec4 _ScreenParams;

    uniform highp vec4 _ZBufferParams;

    #line 40

    uniform highp vec4 unity_CameraWorldClipPlanes[6];

    #line 53

    uniform highp vec4 _WorldSpaceLightPos0;

    uniform highp vec4 _LightPositionRange;

    #line 58

    uniform highp vec4 unity_4LightPosX0;

    uniform highp vec4 unity_4LightPosY0;

    uniform highp vec4 unity_4LightPosZ0;

    uniform highp vec4 unity_4LightAtten0;

    #line 63

    uniform highp vec4 unity_LightColor[8];

    uniform highp vec4 unity_LightPosition[8];

    #line 69

    uniform highp vec4 unity_LightAtten[8];

    uniform highp vec4 unity_SpotDirection[8];

    #line 73

    uniform highp vec4 unity_SHAr;

    uniform highp vec4 unity_SHAg;

    uniform highp vec4 unity_SHAb;

    uniform highp vec4 unity_SHBr;

    #line 77

    uniform highp vec4 unity_SHBg;

    uniform highp vec4 unity_SHBb;

    uniform highp vec4 unity_SHC;

    #line 83

    uniform highp vec3 unity_LightColor0;

    uniform highp vec3 unity_LightColor1;

    uniform highp vec3 unity_LightColor2;

    uniform highp vec3 unity_LightColor3;

    #line 90

    uniform highp vec4 unity_ShadowSplitSpheres[4];

    uniform highp vec4 unity_ShadowSplitSqRadii;

    uniform highp vec4 unity_LightShadowBias;

    uniform highp vec4 _LightSplitsNear;

    #line 94

    uniform highp vec4 _LightSplitsFar;

    uniform highp mat4 unity_World2Shadow[4];

    uniform highp vec4 _LightShadowData;

    uniform highp vec4 unity_ShadowFadeCenterAndType;

    #line 110

    uniform highp mat4 glstate_matrix_mvp;

    uniform highp mat4 glstate_matrix_modelview0;

    uniform highp mat4 glstate_matrix_invtrans_modelview0;

    #line 122

    uniform highp mat4 _Object2World;

    uniform highp mat4 _World2Object;

    uniform highp vec4 unity_Scale;

    #line 133

    uniform highp mat4 glstate_matrix_transpose_modelview0;

    #line 149

    uniform highp mat4 glstate_matrix_texture0;

    uniform highp mat4 glstate_matrix_texture1;

    uniform highp mat4 glstate_matrix_texture2;

    uniform highp mat4 glstate_matrix_texture3;

    #line 173

    uniform highp mat4 glstate_matrix_projection;

    uniform highp vec4 glstate_lightmodel_ambient;

    #line 182

    uniform highp mat4 unity_MatrixV;

    uniform highp mat4 unity_MatrixVP;

    #line 48

    uniform lowp vec4 unity_ColorSpaceGrey;

    #line 89

    #line 104

    #line 119

    #line 125

    #line 143

    #line 175

    #line 192

    #line 227

    #line 238

    #line 248

    #line 256

    #line 280

    #line 286

    #line 296

    #line 305

    #line 312

    #line 321

    #line 329

    #line 338

    #line 357

    #line 363

    #line 376

    #line 387

    #line 392

    #line 418

    #line 434

    #line 447

    #line 8

    uniform sampler2D _CameraDepthTexture;

    #line 13

    uniform highp vec4 _Color;

    uniform highp vec4 _InscatteringColor;

    uniform highp vec4 _BoxMin;

    uniform highp vec4 _BoxMax;

    uniform highp vec4 Speed = vec4( 1.0);

    uniform highp vec4 Stretch;

    uniform highp vec3 L = vec3( 0.0, 0.0, 1.0);

    uniform highp float _InscatteringIntensity = 1.0;

    uniform highp float _InscateringExponent = 2.0;

    uniform highp float _Visibility;

    uniform highp float InscatteringStartDistance = 100.0;

    uniform highp float InscatteringTransitionWideness = 500.0;

    uniform highp float _3DNoiseScale;

    uniform highp float _3DNoiseStepSize;

    uniform highp float gain = 1.0;

    uniform highp float threshold = 0.0;

    uniform highp float FogMinHeight = 0.0;

    uniform highp float FogMaxHeight = -20.0;

    #line 22

    #line 88

    #line 96

    #line 112

    #line 418

    highp vec4 ComputeScreenPos( in highp vec4 pos ) {

    highp vec4 o = (pos * 0.5);

    #line 423

    o.xy = (vec2( o.x, (o.y * _ProjectionParams.x)) + o.w);

    #line 430

    o.zw = pos.zw;

    return o;

    }

    #line 96

    v2f vert( in appdata_full i ) {

    v2f o;

    mediump float index = 0.0;

    #line 100

    o.SampleCoordinates = (glstate_matrix_mvp * i.vertex);

    o.Wpos.xyz = (_Object2World * vec4( i.vertex.xyz, 1.0)).xyz;

    o.ScreenUVs = ComputeScreenPos( o.SampleCoordinates);

    #line 104

    o.ViewPos = (glstate_matrix_modelview0 * vec4( i.vertex.xyz, 1.0)).xyz;

    o.LocalPos = i.vertex.xyz;

    o.LocalEyePos = (_World2Object * vec4( _WorldSpaceCameraPos, 1.0)).xyz;

    #line 108

    return o;

    }

    out highp vec3 xlv_TEXCOORD0;

    out highp vec4 xlv_TEXCOORD1;

    out highp vec3 xlv_TEXCOORD2;

    out highp vec3 xlv_TEXCOORD3;

    out highp vec3 xlv_TEXCOORD4;

    void main() {

    v2f xl_retval;

    appdata_full xlt_i;

    xlt_i.vertex = vec4(gl_Vertex);

    xlt_i.tangent = vec4(TANGENT);

    xlt_i.normal = vec3(gl_Normal);

    xlt_i.texcoord = vec4(gl_MultiTexCoord0);

    xlt_i.texcoord1 = vec4(gl_MultiTexCoord1);

    xlt_i.color = vec4(gl_Color);

    xl_retval = vert( xlt_i);

    gl_Position = vec4(xl_retval.SampleCoordinates);

    xlv_TEXCOORD0 = vec3(xl_retval.Wpos);

    xlv_TEXCOORD1 = vec4(xl_retval.ScreenUVs);

    xlv_TEXCOORD2 = vec3(xl_retval.LocalPos);

    xlv_TEXCOORD3 = vec3(xl_retval.ViewPos);

    xlv_TEXCOORD4 = vec3(xl_retval.LocalEyePos);

    }

    /* NOTE: GLSL optimization failed

    0:226(2): warning: empty declaration

    0:279(2): warning: empty declaration

    0:275(2): warning: empty declaration

    0:86(2): warning: empty declaration

    0:81(2): warning: empty declaration

    0:18(37): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:20(43): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:21(46): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:22(44): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:24(49): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:25(54): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:28(28): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:29(33): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:30(36): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:31(41): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    */

    -------- GLSL error: ERROR: 0:6: '' : #version must occur before any other statement in the program








    (Filename: Line: 145)



    Warning: Creation of shader 'Hidden/FogVolume' failed.-------- Hidden/FogVolume




    (Filename: Line: 141)



    -------- failed compiling vertex program:




    (Filename: Line: 142)



    #version 300 es

    #version 300 es

    #ifndef _

    #define _ 1

    #endif

    #ifndef _MQ

    #define _MQ 1

    #endif

    #ifndef _LQ

    #define _LQ 1

    #endif

    #ifndef _FOG_VOLUME_NOISE

    #define _FOG_VOLUME_NOISE 1

    #endif

    #ifndef _FOG_VOLUME_INSCATTERING

    #define _FOG_VOLUME_INSCATTERING 1

    #endif

    #ifndef SHADER_API_GLES3

    #define SHADER_API_GLES3 1

    #endif

    #ifndef SHADER_API_MOBILE

    #define SHADER_API_MOBILE 1

    #endif

    #define gl_Vertex _glesVertex

    in vec4 _glesVertex;

    #define gl_Color _glesColor

    in vec4 _glesColor;

    #define gl_Normal (normalize(_glesNormal))

    in vec3 _glesNormal;

    #define gl_MultiTexCoord0 _glesMultiTexCoord0

    in vec4 _glesMultiTexCoord0;

    #define gl_MultiTexCoord1 _glesMultiTexCoord1

    in vec4 _glesMultiTexCoord1;

    #define TANGENT vec4(normalize(_glesTANGENT.xyz), _glesTANGENT.w)

    in vec4 _glesTANGENT;

    #line 221

    struct v2f_vertex_lit {

    highp vec2 uv;

    lowp vec4 diff;

    lowp vec4 spec;

    };

    #line 275

    struct v2f_img {

    highp vec4 pos;

    mediump vec2 uv;

    };

    #line 271

    struct appdata_img {

    highp vec4 vertex;

    mediump vec2 texcoord;

    };

    #line 78

    struct v2f {

    highp vec4 SampleCoordinates;

    highp vec3 Wpos;

    highp vec4 ScreenUVs;

    highp vec3 LocalPos;

    highp vec3 ViewPos;

    highp vec3 LocalEyePos;

    };

    #line 73

    struct appdata_full {

    highp vec4 vertex;

    highp vec4 tangent;

    highp vec3 normal;

    highp vec4 texcoord;

    highp vec4 texcoord1;

    lowp vec4 color;

    };

    #line 16

    uniform highp vec4 _Time;

    uniform highp vec4 _SinTime;

    uniform highp vec4 _CosTime;

    uniform highp vec4 unity_DeltaTime;

    #line 21

    uniform highp vec3 _WorldSpaceCameraPos;

    #line 27

    uniform highp vec4 _ProjectionParams;

    #line 33

    uniform highp vec4 _ScreenParams;

    uniform highp vec4 _ZBufferParams;

    #line 40

    uniform highp vec4 unity_CameraWorldClipPlanes[6];

    #line 53

    uniform highp vec4 _WorldSpaceLightPos0;

    uniform highp vec4 _LightPositionRange;

    #line 58

    uniform highp vec4 unity_4LightPosX0;

    uniform highp vec4 unity_4LightPosY0;

    uniform highp vec4 unity_4LightPosZ0;

    uniform highp vec4 unity_4LightAtten0;

    #line 63

    uniform highp vec4 unity_LightColor[8];

    uniform highp vec4 unity_LightPosition[8];

    #line 69

    uniform highp vec4 unity_LightAtten[8];

    uniform highp vec4 unity_SpotDirection[8];

    #line 73

    uniform highp vec4 unity_SHAr;

    uniform highp vec4 unity_SHAg;

    uniform highp vec4 unity_SHAb;

    uniform highp vec4 unity_SHBr;

    #line 77

    uniform highp vec4 unity_SHBg;

    uniform highp vec4 unity_SHBb;

    uniform highp vec4 unity_SHC;

    #line 83

    uniform highp vec3 unity_LightColor0;

    uniform highp vec3 unity_LightColor1;

    uniform highp vec3 unity_LightColor2;

    uniform highp vec3 unity_LightColor3;

    #line 90

    uniform highp vec4 unity_ShadowSplitSpheres[4];

    uniform highp vec4 unity_ShadowSplitSqRadii;

    uniform highp vec4 unity_LightShadowBias;

    uniform highp vec4 _LightSplitsNear;

    #line 94

    uniform highp vec4 _LightSplitsFar;

    uniform highp mat4 unity_World2Shadow[4];

    uniform highp vec4 _LightShadowData;

    uniform highp vec4 unity_ShadowFadeCenterAndType;

    #line 110

    uniform highp mat4 glstate_matrix_mvp;

    uniform highp mat4 glstate_matrix_modelview0;

    uniform highp mat4 glstate_matrix_invtrans_modelview0;

    #line 122

    uniform highp mat4 _Object2World;

    uniform highp mat4 _World2Object;

    uniform highp vec4 unity_Scale;

    #line 133

    uniform highp mat4 glstate_matrix_transpose_modelview0;

    #line 149

    uniform highp mat4 glstate_matrix_texture0;

    uniform highp mat4 glstate_matrix_texture1;

    uniform highp mat4 glstate_matrix_texture2;

    uniform highp mat4 glstate_matrix_texture3;

    #line 173

    uniform highp mat4 glstate_matrix_projection;

    uniform highp vec4 glstate_lightmodel_ambient;

    #line 182

    uniform highp mat4 unity_MatrixV;

    uniform highp mat4 unity_MatrixVP;

    #line 48

    uniform lowp vec4 unity_ColorSpaceGrey;

    #line 89

    #line 104

    #line 119

    #line 125

    #line 143

    #line 175

    #line 192

    #line 227

    #line 238

    #line 248

    #line 256

    #line 280

    #line 286

    #line 296

    #line 305

    #line 312

    #line 321

    #line 329

    #line 338

    #line 357

    #line 363

    #line 376

    #line 387

    #line 392

    #line 418

    #line 434

    #line 447

    #line 8

    uniform sampler2D _CameraDepthTexture;

    #line 13

    uniform highp vec4 _Color;

    uniform highp vec4 _InscatteringColor;

    uniform highp vec4 _BoxMin;

    uniform highp vec4 _BoxMax;

    uniform highp vec4 Speed = vec4( 1.0);

    uniform highp vec4 Stretch;

    uniform highp vec3 L = vec3( 0.0, 0.0, 1.0);

    uniform highp float _InscatteringIntensity = 1.0;

    uniform highp float _InscateringExponent = 2.0;

    uniform highp float _Visibility;

    uniform highp float InscatteringStartDistance = 100.0;

    uniform highp float InscatteringTransitionWideness = 500.0;

    uniform highp float _3DNoiseScale;

    uniform highp float _3DNoiseStepSize;

    uniform highp float gain = 1.0;

    uniform highp float threshold = 0.0;

    uniform highp float FogMinHeight = 0.0;

    uniform highp float FogMaxHeight = -20.0;

    #line 22

    #line 88

    #line 96

    #line 112

    #line 418

    highp vec4 ComputeScreenPos( in highp vec4 pos ) {

    highp vec4 o = (pos * 0.5);

    #line 423

    o.xy = (vec2( o.x, (o.y * _ProjectionParams.x)) + o.w);

    #line 430

    o.zw = pos.zw;

    return o;

    }

    #line 96

    v2f vert( in appdata_full i ) {

    v2f o;

    mediump float index = 0.0;

    #line 100

    o.SampleCoordinates = (glstate_matrix_mvp * i.vertex);

    o.Wpos.xyz = (_Object2World * vec4( i.vertex.xyz, 1.0)).xyz;

    o.ScreenUVs = ComputeScreenPos( o.SampleCoordinates);

    #line 104

    o.ViewPos = (glstate_matrix_modelview0 * vec4( i.vertex.xyz, 1.0)).xyz;

    o.LocalPos = i.vertex.xyz;

    o.LocalEyePos = (_World2Object * vec4( _WorldSpaceCameraPos, 1.0)).xyz;

    #line 108

    return o;

    }

    out highp vec3 xlv_TEXCOORD0;

    out highp vec4 xlv_TEXCOORD1;

    out highp vec3 xlv_TEXCOORD2;

    out highp vec3 xlv_TEXCOORD3;

    out highp vec3 xlv_TEXCOORD4;

    void main() {

    v2f xl_retval;

    appdata_full xlt_i;

    xlt_i.vertex = vec4(gl_Vertex);

    xlt_i.tangent = vec4(TANGENT);

    xlt_i.normal = vec3(gl_Normal);

    xlt_i.texcoord = vec4(gl_MultiTexCoord0);

    xlt_i.texcoord1 = vec4(gl_MultiTexCoord1);

    xlt_i.color = vec4(gl_Color);

    xl_retval = vert( xlt_i);

    gl_Position = vec4(xl_retval.SampleCoordinates);

    xlv_TEXCOORD0 = vec3(xl_retval.Wpos);

    xlv_TEXCOORD1 = vec4(xl_retval.ScreenUVs);

    xlv_TEXCOORD2 = vec3(xl_retval.LocalPos);

    xlv_TEXCOORD3 = vec3(xl_retval.ViewPos);

    xlv_TEXCOORD4 = vec3(xl_retval.LocalEyePos);

    }

    /* NOTE: GLSL optimization failed

    0:226(2): warning: empty declaration

    0:279(2): warning: empty declaration

    0:275(2): warning: empty declaration

    0:86(2): warning: empty declaration

    0:81(2): warning: empty declaration

    0:18(37): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:20(43): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:21(46): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:22(44): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:24(49): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:25(54): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:28(28): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:29(33): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:30(36): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:31(41): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    */

    -------- GLSL error: ERROR: 0:6: '' : #version must occur before any other statement in the program








    (Filename: Line: 145)



    Warning: Creation of shader 'Hidden/FogVolume' failed.-------- Hidden/FogVolume




    (Filename: Line: 141)



    -------- failed compiling vertex program:




    (Filename: Line: 142)



    #version 300 es

    #version 300 es

    #ifndef _HQ

    #define _HQ 1

    #endif

    #ifndef _MQ

    #define _MQ 1

    #endif

    #ifndef _LQ

    #define _LQ 1

    #endif

    #ifndef _FOG_VOLUME_NOISE

    #define _FOG_VOLUME_NOISE 1

    #endif

    #ifndef _FOG_VOLUME_INSCATTERING

    #define _FOG_VOLUME_INSCATTERING 1

    #endif

    #ifndef SHADER_API_GLES3

    #define SHADER_API_GLES3 1

    #endif

    #ifndef SHADER_API_MOBILE

    #define SHADER_API_MOBILE 1

    #endif

    #define gl_Vertex _glesVertex

    in vec4 _glesVertex;

    #define gl_Color _glesColor

    in vec4 _glesColor;

    #define gl_Normal (normalize(_glesNormal))

    in vec3 _glesNormal;

    #define gl_MultiTexCoord0 _glesMultiTexCoord0

    in vec4 _glesMultiTexCoord0;

    #define gl_MultiTexCoord1 _glesMultiTexCoord1

    in vec4 _glesMultiTexCoord1;

    #define TANGENT vec4(normalize(_glesTANGENT.xyz), _glesTANGENT.w)

    in vec4 _glesTANGENT;

    #line 221

    struct v2f_vertex_lit {

    highp vec2 uv;

    lowp vec4 diff;

    lowp vec4 spec;

    };

    #line 275

    struct v2f_img {

    highp vec4 pos;

    mediump vec2 uv;

    };

    #line 271

    struct appdata_img {

    highp vec4 vertex;

    mediump vec2 texcoord;

    };

    #line 78

    struct v2f {

    highp vec4 SampleCoordinates;

    highp vec3 Wpos;

    highp vec4 ScreenUVs;

    highp vec3 LocalPos;

    highp vec3 ViewPos;

    highp vec3 LocalEyePos;

    };

    #line 73

    struct appdata_full {

    highp vec4 vertex;

    highp vec4 tangent;

    highp vec3 normal;

    highp vec4 texcoord;

    highp vec4 texcoord1;

    lowp vec4 color;

    };

    #line 16

    uniform highp vec4 _Time;

    uniform highp vec4 _SinTime;

    uniform highp vec4 _CosTime;

    uniform highp vec4 unity_DeltaTime;

    #line 21

    uniform highp vec3 _WorldSpaceCameraPos;

    #line 27

    uniform highp vec4 _ProjectionParams;

    #line 33

    uniform highp vec4 _ScreenParams;

    uniform highp vec4 _ZBufferParams;

    #line 40

    uniform highp vec4 unity_CameraWorldClipPlanes[6];

    #line 53

    uniform highp vec4 _WorldSpaceLightPos0;

    uniform highp vec4 _LightPositionRange;

    #line 58

    uniform highp vec4 unity_4LightPosX0;

    uniform highp vec4 unity_4LightPosY0;

    uniform highp vec4 unity_4LightPosZ0;

    uniform highp vec4 unity_4LightAtten0;

    #line 63

    uniform highp vec4 unity_LightColor[8];

    uniform highp vec4 unity_LightPosition[8];

    #line 69

    uniform highp vec4 unity_LightAtten[8];

    uniform highp vec4 unity_SpotDirection[8];

    #line 73

    uniform highp vec4 unity_SHAr;

    uniform highp vec4 unity_SHAg;

    uniform highp vec4 unity_SHAb;

    uniform highp vec4 unity_SHBr;

    #line 77

    uniform highp vec4 unity_SHBg;

    uniform highp vec4 unity_SHBb;

    uniform highp vec4 unity_SHC;

    #line 83

    uniform highp vec3 unity_LightColor0;

    uniform highp vec3 unity_LightColor1;

    uniform highp vec3 unity_LightColor2;

    uniform highp vec3 unity_LightColor3;

    #line 90

    uniform highp vec4 unity_ShadowSplitSpheres[4];

    uniform highp vec4 unity_ShadowSplitSqRadii;

    uniform highp vec4 unity_LightShadowBias;

    uniform highp vec4 _LightSplitsNear;

    #line 94

    uniform highp vec4 _LightSplitsFar;

    uniform highp mat4 unity_World2Shadow[4];

    uniform highp vec4 _LightShadowData;

    uniform highp vec4 unity_ShadowFadeCenterAndType;

    #line 110

    uniform highp mat4 glstate_matrix_mvp;

    uniform highp mat4 glstate_matrix_modelview0;

    uniform highp mat4 glstate_matrix_invtrans_modelview0;

    #line 122

    uniform highp mat4 _Object2World;

    uniform highp mat4 _World2Object;

    uniform highp vec4 unity_Scale;

    #line 133

    uniform highp mat4 glstate_matrix_transpose_modelview0;

    #line 149

    uniform highp mat4 glstate_matrix_texture0;

    uniform highp mat4 glstate_matrix_texture1;

    uniform highp mat4 glstate_matrix_texture2;

    uniform highp mat4 glstate_matrix_texture3;

    #line 173

    uniform highp mat4 glstate_matrix_projection;

    uniform highp vec4 glstate_lightmodel_ambient;

    #line 182

    uniform highp mat4 unity_MatrixV;

    uniform highp mat4 unity_MatrixVP;

    #line 48

    uniform lowp vec4 unity_ColorSpaceGrey;

    #line 89

    #line 104

    #line 119

    #line 125

    #line 143

    #line 175

    #line 192

    #line 227

    #line 238

    #line 248

    #line 256

    #line 280

    #line 286

    #line 296

    #line 305

    #line 312

    #line 321

    #line 329

    #line 338

    #line 357

    #line 363

    #line 376

    #line 387

    #line 392

    #line 418

    #line 434

    #line 447

    #line 8

    uniform sampler2D _CameraDepthTexture;

    #line 13

    uniform highp vec4 _Color;

    uniform highp vec4 _InscatteringColor;

    uniform highp vec4 _BoxMin;

    uniform highp vec4 _BoxMax;

    uniform highp vec4 Speed = vec4( 1.0);

    uniform highp vec4 Stretch;

    uniform highp vec3 L = vec3( 0.0, 0.0, 1.0);

    uniform highp float _InscatteringIntensity = 1.0;

    uniform highp float _InscateringExponent = 2.0;

    uniform highp float _Visibility;

    uniform highp float InscatteringStartDistance = 100.0;

    uniform highp float InscatteringTransitionWideness = 500.0;

    uniform highp float _3DNoiseScale;

    uniform highp float _3DNoiseStepSize;

    uniform highp float gain = 1.0;

    uniform highp float threshold = 0.0;

    uniform highp float FogMinHeight = 0.0;

    uniform highp float FogMaxHeight = -20.0;

    #line 22

    #line 88

    #line 96

    #line 112

    #line 418

    highp vec4 ComputeScreenPos( in highp vec4 pos ) {

    highp vec4 o = (pos * 0.5);

    #line 423

    o.xy = (vec2( o.x, (o.y * _ProjectionParams.x)) + o.w);

    #line 430

    o.zw = pos.zw;

    return o;

    }

    #line 96

    v2f vert( in appdata_full i ) {

    v2f o;

    mediump float index = 0.0;

    #line 100

    o.SampleCoordinates = (glstate_matrix_mvp * i.vertex);

    o.Wpos.xyz = (_Object2World * vec4( i.vertex.xyz, 1.0)).xyz;

    o.ScreenUVs = ComputeScreenPos( o.SampleCoordinates);

    #line 104

    o.ViewPos = (glstate_matrix_modelview0 * vec4( i.vertex.xyz, 1.0)).xyz;

    o.LocalPos = i.vertex.xyz;

    o.LocalEyePos = (_World2Object * vec4( _WorldSpaceCameraPos, 1.0)).xyz;

    #line 108

    return o;

    }

    out highp vec3 xlv_TEXCOORD0;

    out highp vec4 xlv_TEXCOORD1;

    out highp vec3 xlv_TEXCOORD2;

    out highp vec3 xlv_TEXCOORD3;

    out highp vec3 xlv_TEXCOORD4;

    void main() {

    v2f xl_retval;

    appdata_full xlt_i;

    xlt_i.vertex = vec4(gl_Vertex);

    xlt_i.tangent = vec4(TANGENT);

    xlt_i.normal = vec3(gl_Normal);

    xlt_i.texcoord = vec4(gl_MultiTexCoord0);

    xlt_i.texcoord1 = vec4(gl_MultiTexCoord1);

    xlt_i.color = vec4(gl_Color);

    xl_retval = vert( xlt_i);

    gl_Position = vec4(xl_retval.SampleCoordinates);

    xlv_TEXCOORD0 = vec3(xl_retval.Wpos);

    xlv_TEXCOORD1 = vec4(xl_retval.ScreenUVs);

    xlv_TEXCOORD2 = vec3(xl_retval.LocalPos);

    xlv_TEXCOORD3 = vec3(xl_retval.ViewPos);

    xlv_TEXCOORD4 = vec3(xl_retval.LocalEyePos);

    }

    /* NOTE: GLSL optimization failed

    0:226(2): warning: empty declaration

    0:279(2): warning: empty declaration

    0:275(2): warning: empty declaration

    0:86(2): warning: empty declaration

    0:81(2): warning: empty declaration

    0:18(37): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:20(43): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:21(46): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:22(44): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:24(49): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:25(54): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:28(28): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:29(33): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)



    0:30(36): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    0:31(41): error: cannot initialize uniforms in GLSL ES 3.00 (GLSL 1.20 required)

    */

    -------- GLSL error: ERROR: 0:6: '' : #version must occur before any other statement in the program








    (Filename: Line: 145)



    Warning: Creation of shader 'Hidden/FogVolume' failed.WARNING: Shader Unsupported: 'Hidden/FogVolume' - Pass '' shader state not supported

    WARNING: Shader Unsupported: 'Hidden/FogVolume' - Setting to default shader.

    WARNING: no native support for texture format 5, converting to 4!

    WARNING: no native support for texture format 5, converting to 4!

    The referenced script on this Behaviour is missing!


    (Filename: Line: 1783)



    The referenced script on this Behaviour is missing!


    (Filename: Line: 1783)



    The referenced script on this Behaviour is missing!


    (Filename: Line: 1783)



    WARNING: no native support for texture format 5, converting to 4!
     
  46. MihaiVladan

    MihaiVladan

    Joined:
    Dec 17, 2013
    Posts:
    6
    Hi , ive purchased the file but im having trouble using it. It works fine as long as the camera is INSIDE the Fog object but once i move the cube the effect simply disappears . Also i cant see anything in the editor. except for the wireframe and the " FogVolume" icon in the middle . Please see the attached screen shot . Im using Unity 4.3 on Mac with the free license. ( iOS target project)
     

    Attached Files:

  47. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    Hey guys, I've been unavailable for some weeks. I will give you support about these issues as soon as possible. Thanks for your patience.
     
  48. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    I'm getting this choppiness. If I make the fog thicker it goes away, but I was going for a much more subtle fog.

    If I drop the color alphas all the way down I still see these choppy plane intersections. I thought it was an issue with the Rift or something at first, but it does it on regular camera setups as well.

    Also, is there any way to subtract a volume from the fog? For instance having a fog outside as one setup, then a volume for interiors, or no fog in some places.
     

    Attached Files:

  49. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    The plane intersections you mentioned are related with 3D Noise sampling. Its computed only inside the volume, that's why you see that dramatic seam. What you are seeing is the noise sampling edge. Volumetric effects have some drawbacks. Most of the time we have to deal with this kind of unwanted implications.

    In theory, subtraction is not impossible, but doesn't sound easy nor cheap atm.
     
  50. DavidMiranda

    DavidMiranda

    Joined:
    Nov 30, 2012
    Posts:
    617
    As described in the documentation, Fog Volume requires Unity Pro. Otherwise, it won't work.