<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tutorials on Max Kruf</title><link>https://maxkruf.com/category/tutorials/</link><description>Recent content in Tutorials on Max Kruf</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 24 Nov 2020 11:41:50 +0000</lastBuildDate><atom:link href="https://maxkruf.com/category/tutorials/index.xml" rel="self" type="application/rss+xml"/><item><title>Shader Sandwich - How to make a (unlit) terrain shader</title><link>https://maxkruf.com/shader-sandwich-how-to-make-a-unlit-terrain-shader/</link><pubDate>Fri, 08 Sep 2017 15:45:52 +0000</pubDate><guid>https://maxkruf.com/shader-sandwich-how-to-make-a-unlit-terrain-shader/</guid><description>&lt;h2 id="intro"&gt;Intro&lt;/h2&gt;
&lt;p&gt;In this tutorial, I’m going to show you how to create a terrain shader in Unity with Shader Sandwich. In this example, we will make an unlit shader, but of course you can make all kind of terrain shaders with this technique. The shader can handle up to 4 textures.&lt;/p&gt;
&lt;div class="video"&gt;&lt;iframe src="https://www.youtube-nocookie.com/embed/7d5lfZEkcEU" title="YouTube video" loading="lazy" allow="encrypted-media; picture-in-picture; fullscreen" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;

&lt;h2 id="index"&gt;Index&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;[Terrain setup](http://Terrain setup)&lt;/li&gt;
&lt;li&gt;[Shader Sandwich setup](http://Shader Sandwich setup)&lt;/li&gt;
&lt;li&gt;[Adding the first texture](http://Adding the first texture)&lt;/li&gt;
&lt;li&gt;[Adding the second texture](http://Adding the second texture)&lt;/li&gt;
&lt;li&gt;[Adding the control masks](http://Adding the control mask)&lt;/li&gt;
&lt;li&gt;[Finalizing the shader](http://Finalizing the shader)&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="terrain-setup"&gt;Terrain setup&lt;/h2&gt;
&lt;p&gt;We start by creating a new empty scene, in the new scene we will create a new terrain. In the terrain options, we will disable &lt;em&gt;Cast Shadows&lt;/em&gt;and set the &lt;em&gt;Material&lt;/em&gt; to &lt;em&gt;Custom&lt;/em&gt;. In the project folder, we will make a new material and assign it to the &lt;em&gt;Custom&lt;/em&gt; slot. We can also disable the &lt;em&gt;Reflection probes&lt;/em&gt; as we are not going to use it. And lastly, we already add one texture to the terrain.&lt;/p&gt;</description></item></channel></rss>