Tex2D(_TileTextureA, IN.uv_TileTextureA) * abs(1 - blend. Tex2D(_TileTextureB, IN.uv_TileTextureR) * blend.b + Tex2D(_TileTextureG, IN.uv_TileTextureR) * blend.g + Tex2D(_TileTextureR, IN.uv_TileTextureR) * blend.r + Void surf (Input IN, inout SurfaceOutputStandard o)įixed4 blend = tex2D(_BlendTex, IN.uv_BlendTex) Use shader model 3.0 target, to get nicer looking lighting #pragma surface surf Standard fullforwardshadows Physically based Standard lighting model, and enable shadows on all light types The best shader for this is in the above link: Shader "Texture Array with Blendmap" In Unity terrain it is possible to use paint on the terrain and add visual paths this way.Īfter looking around I have found this solution. The tile texture have the problem we cannot add any walking visual paths, it is only one tiling texture. So the humongus texture is out of the question. The humongus texture is not really ideal, we need it to be something like 16kx16k for it to somewhat look good. Either we put a humongus texture on the ground, and can get all the details we want, or we put a tileing texture on the ground. The above terrain splatmap controls can also be set for road types: General Settings > Road Types. Smooth Level: This will smoothen the edges of the shape with the the original splatmap. Expand: This will increase the size of the splatmap road shape. You can select which texture should be used for this road. We need a texture on this big model and kinda stumpled into a problem. Splatmap Texture: The dropdown lists all available terrain splatmap texture. We do not plan on using the build-in unity terrain due it is recommanded not to on mobile development, and we can get build better looking 3D model with fewer polygons ourself. The model is somewhat large (in scale), but only few (less than 200) polygons. Half4 reflcol = tex2Dproj(_ReflectionTex, IN.I am creating a mobile game with a nice ground model. Size controls the size of the blended area: 0 there is no blending. If you warp the image, the border blending becomes warped, too. IN.screenPos.xy = offset * IN.screenPos.z + IN.screenPos.xy Warped Edge Blending: Controls soft edge blending for each side of the projection (left, right, top, and bottom). O.Normal += UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap - 0.01 * _Time.y)) O.Normal = UnpackNormal(tex2D(_BumpMap, 2.0 * IN.uv_BumpMap + 0.01 * _Time.y )) Void surf (Input IN, inout SurfaceOutput o) _ReflectionTex ("_ReflectionTex", 2D) = "white" The terrain blend shader allows you to smoothly blend meshes like cliffs or overhangs with your terrain. You will get this small shader that makes water: The terrain shader supports proper() normals, height based blending, parallax extrusion and painted holes (Unity 2019.3. After remove everything that cause error when shader compiles. Only 2 textures we need to make such long distance water. Sampler2D _CameraDepthTexture // : register(s4) Because of water have no transparent effect lets remove grab pass that do transparent things of water and texture accoding to this Ok lets remove step by step things that we don't need. This small dot at huge cube is a human size
UNITY TERRAIN SPLATMAP TEXTURE EDGE BLENDING DOWNLOAD
You can download start (cleanup) project Unity 5 here: Everything else should be removed like this. We have polygon with water material applied, mirror reflection script that makes reflection texture and script that detects underwater and change shader lod that makes underwater effect. Let's take a look at our previous solution. So please turn on this rendering method for your project.įirst we need to remove all underwater things and leave only above water stuff, also we need to remove tranparent soft edge blending ( cuz we need to make as fast shader as possible ). Keep in mind that this solution works with deffered rendering legacy only. Let's check previous water tutorial and modify it for long distance: Once I've did it, so I have a vector to move on. So I've decided to make my own water again :). Best of all works all together with built-in terrains rendering system. Quite awesome thing for long distance rendering, but at same time quite complicated and hard to modifying. I've looked at existed solutions and found only HORIZON. For such game like Skyship Aurora we need not very complicated but fast water with reflection and waves. But water is often suitable for first person human look and also sources and shaders are extremely complicated for modify and learning. Some of them are very awesome and looks extremely real. Now there is a lot of different waters for Unity.