<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Color Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/color/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Sat, 30 Mar 2024 08:52:05 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>Color Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HSV(= HSB) Color 정리</title>
		<link>https://lycos7560.com/unity/hsv-hsb-color-%ec%a0%95%eb%a6%ac/38087/</link>
					<comments>https://lycos7560.com/unity/hsv-hsb-color-%ec%a0%95%eb%a6%ac/38087/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Fri, 29 Mar 2024 15:36:43 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[UnityShader]]></category>
		<category><![CDATA[Brightness]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[HSB]]></category>
		<category><![CDATA[HSB Color]]></category>
		<category><![CDATA[HSV]]></category>
		<category><![CDATA[HSV Color]]></category>
		<category><![CDATA[Hue]]></category>
		<category><![CDATA[Saturation]]></category>
		<category><![CDATA[Value]]></category>
		<category><![CDATA[명도]]></category>
		<category><![CDATA[밝기]]></category>
		<category><![CDATA[색]]></category>
		<category><![CDATA[색상]]></category>
		<category><![CDATA[채도]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38087</guid>

					<description><![CDATA[<p>This article summarizes the basic concepts of HSV (=HSB) Color.</p>
<p>The post <a href="https://lycos7560.com/unity/hsv-hsb-color-%ec%a0%95%eb%a6%ac/38087/">HSV(= HSB) Color 정리</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-2b6ed13e      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							Index						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#hsvhsb-color" class="uagb-toc-link__trigger">HSV(= HSB) Color</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#hue-색상" class="uagb-toc-link__trigger">Hue 색상</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#saturation-채도" class="uagb-toc-link__trigger">Saturation 채도</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#value-명도-brightness-밝기" class="uagb-toc-link__trigger">Value 명도 (= Brightness 밝기)</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<h1 class="wp-block-heading">HSV(=&nbsp;HSB) Color</h1>
<cite>색상을 설명하는 모델</cite></blockquote>



<p class="wp-block-paragraph">HSV(색조, 채도, 명도) 또는 HSB(색조, 채도, 밝기)는 색상을 설명하는 컬러 모델 중 하나로 아티스트 혹은 일러스트레이터들에게 매우 친숙한 컬러 모델입니다.</p>



<p class="wp-block-paragraph">색상(Hue), 채도(Saturation), 명도(Value) or 밝기 (Brightness)</p>



<p class="wp-block-paragraph">RGB(Red, Green, Blue) 모델과 함께 가장 널리 사용되는 컬러 모델 중 하나입니다. </p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="523" height="388" src="https://lycos7560.com/wp-content/uploads/2024/03/image-57.png" alt="" class="wp-image-38096" srcset="https://lycos7560.com/wp-content/uploads/2024/03/image-57.png 523w, https://lycos7560.com/wp-content/uploads/2024/03/image-57-300x223.png 300w" sizes="(max-width: 523px) 100vw, 523px" /><figcaption class="wp-element-caption"><a href="https://en.wikipedia.org/wiki/HSL_and_HSV" target="_blank" rel="noreferrer noopener">https://en.wikipedia.org/wiki/HSL_and_HSV</a></figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img decoding="async" width="695" height="605" src="https://lycos7560.com/wp-content/uploads/2024/03/image-58.png" alt="" class="wp-image-38097" srcset="https://lycos7560.com/wp-content/uploads/2024/03/image-58.png 695w, https://lycos7560.com/wp-content/uploads/2024/03/image-58-300x261.png 300w" sizes="(max-width: 695px) 100vw, 695px" /><figcaption class="wp-element-caption"><a href="https://en.wikipedia.org/wiki/HSL_and_HSV" target="_blank" rel="noreferrer noopener">https://en.wikipedia.org/wiki/HSL_and_HSV</a></figcaption></figure>
</div>
</div>



<figure class="wp-block-video"><video height="904" style="aspect-ratio: 1720 / 904;" width="1720" controls src="https://lycos7560.com/wp-content/uploads/2024/03/RainbowColorPicker-1.mp4"></video></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<h2 class="wp-block-heading">Hue 색상</h2>



<p class="wp-block-paragraph">360도 무지개 색상</p>
</blockquote>



<p class="wp-block-paragraph">색을 표현하는 요소 중 하나로 일반적으로 0에서 360도 사이의 각도를 나타냅니다</p>



<p class="wp-block-paragraph">0도와 360도는 동일한 색상인 <mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color"><strong>빨간색</strong></mark>을, 120도는<strong> <mark style="background-color:rgba(0, 0, 0, 0);color:#0eff00" class="has-inline-color">녹색</mark></strong>을, 240도는 <mark style="background-color:rgba(0, 0, 0, 0);color:#2000ff" class="has-inline-color"><strong>파란색</strong></mark>을 나타냅니다.</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img decoding="async" width="194" height="436" src="https://lycos7560.com/wp-content/uploads/2024/03/HSVColor.gif" alt="" class="wp-image-38088"/><figcaption class="wp-element-caption">Unity Color Picker (HSV)</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img decoding="async" width="415" height="412" src="https://lycos7560.com/wp-content/uploads/2024/03/image-56.png" alt="" class="wp-image-38090" srcset="https://lycos7560.com/wp-content/uploads/2024/03/image-56.png 415w, https://lycos7560.com/wp-content/uploads/2024/03/image-56-300x298.png 300w, https://lycos7560.com/wp-content/uploads/2024/03/image-56-150x150.png 150w" sizes="(max-width: 415px) 100vw, 415px" /><figcaption class="wp-element-caption"><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/hue" target="_blank" rel="noreferrer noopener">https://developer.mozilla.org/en-US/docs/Web/CSS/hue</a></figcaption></figure>
</div>
</div>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<h2 class="wp-block-heading">Saturation 채도</h2>



<p class="wp-block-paragraph">풍부함(richness)과 선명함(vividness)</p>
</blockquote>



<p class="wp-block-paragraph">색의 순도 또는 강도를 나타내는 색상 속성입니다. </p>



<p class="wp-block-paragraph">높은 채도는 순수한 색에 가깝고, 낮은 채도는 회색조에 가까운 색을 의미합니다.</p>



<p class="wp-block-paragraph">채도는 일반적으로 0부터 100 또는 0부터 1 사이의 값으로 표현됩니다. </p>



<p class="wp-block-paragraph">0% 채도는 해당 색상이 회색조에 가깝다는 것을 의미하며, 100% 채도는 해당 색상이 순수한 색상임을 나타냅니다.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img decoding="async" width="262" height="570" src="https://lycos7560.com/wp-content/uploads/2024/03/HSVColor_2.gif" alt="" class="wp-image-38094"/><figcaption class="wp-element-caption">Unity Color Picker (HSV)</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"></div>
</div>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<h2 class="wp-block-heading">Value 명도 (= Brightness 밝기)</h2>



<p class="wp-block-paragraph">색의 밝기</p>
</blockquote>



<p class="wp-block-paragraph">명도는 색의 밝기를 나타냅니다. </p>



<p class="wp-block-paragraph">명도는 일반적으로 0부터 100 사이의 숫자로 나타내며 높을수록 색은 더 밝게 나타납니다. </p>



<p class="wp-block-paragraph">명도가 0에 가까울수록 해당 색상은 검은색에 가깝고, 명도가 최대가 되면 해당 색상은 가장 밝은 상태가 됩니다.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-full"><img decoding="async" width="176" height="382" src="https://lycos7560.com/wp-content/uploads/2024/03/HSVColor_3.gif" alt="" class="wp-image-38095"/><figcaption class="wp-element-caption">Unity Color Picker (HSV)</figcaption></figure>
</div>
</div>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>
<p>The post <a href="https://lycos7560.com/unity/hsv-hsb-color-%ec%a0%95%eb%a6%ac/38087/">HSV(= HSB) Color 정리</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/unity/hsv-hsb-color-%ec%a0%95%eb%a6%ac/38087/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://lycos7560.com/wp-content/uploads/2024/03/RainbowColorPicker-1.mp4" length="3374575" type="video/mp4" />

			</item>
		<item>
		<title>Unity &#8211; Debug.Log 색상 변경</title>
		<link>https://lycos7560.com/unity/unity-debug-log-%ec%83%89%ec%83%81-%eb%b3%80%ea%b2%bd/35443/</link>
					<comments>https://lycos7560.com/unity/unity-debug-log-%ec%83%89%ec%83%81-%eb%b3%80%ea%b2%bd/35443/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sat, 13 May 2023 19:20:20 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Debug.Log]]></category>
		<category><![CDATA[Debug.Log 색상 변경]]></category>
		<category><![CDATA[변경]]></category>
		<category><![CDATA[색상]]></category>
		<category><![CDATA[유니티]]></category>
		<category><![CDATA[콘솔]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=35443</guid>

					<description><![CDATA[<p>Unity Console창에서 Debug.Log의 글자 색상을 변경하는 방법에 대한 글입니다.<br />
(This article describes how to change the color of the letters in Debug.Log in the Unity Console window.)</p>
<p>The post <a href="https://lycos7560.com/unity/unity-debug-log-%ec%83%89%ec%83%81-%eb%b3%80%ea%b2%bd/35443/">Unity &#8211; Debug.Log 색상 변경</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<!-- HorizontalAD -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5698326622209671" data-ad-slot="6908948342" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Default
Debug.Log("Default");

Debug.Log("&lt;color=white>White&lt;/color>");
Debug.Log("&lt;color=grey>Grey&lt;/color>");
Debug.Log("&lt;color=black>Black&lt;/color>");
Debug.Log("&lt;color=red>Red&lt;/color>");
Debug.Log("&lt;color=green>Green&lt;/color>");
Debug.Log("&lt;color=blue>Blue&lt;/color>");
Debug.Log("&lt;color=yellow>Yellow&lt;/color>");
Debug.Log("&lt;color=cyan>Cyan&lt;/color>");
Debug.Log("&lt;color=brown>Brown&lt;/color>");

// Hex Color
Debug.Log("&lt;color=#fa56d6> Hex Color1 &lt;/color>");
Debug.Log("&lt;color=#74fa56> Hex Color1 &lt;/color>");
Debug.LogFormat("&lt;color=yellow> Yellow &lt;/color>" + "&lt;color=black> Black &lt;/color>");</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://lycos7560.com/wp-content/uploads/2023/06/image-29.png" alt="" class="wp-image-35445" width="1106" height="402" srcset="https://lycos7560.com/wp-content/uploads/2023/06/image-29.png 1475w, https://lycos7560.com/wp-content/uploads/2023/06/image-29-300x109.png 300w, https://lycos7560.com/wp-content/uploads/2023/06/image-29-768x279.png 768w" sizes="(max-width: 1106px) 100vw, 1106px" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5698326622209671" data-ad-slot="4245812909"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
<p>The post <a href="https://lycos7560.com/unity/unity-debug-log-%ec%83%89%ec%83%81-%eb%b3%80%ea%b2%bd/35443/">Unity &#8211; Debug.Log 색상 변경</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/unity/unity-debug-log-%ec%83%89%ec%83%81-%eb%b3%80%ea%b2%bd/35443/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>7 &#8211; 01 ~ 02 버텍스 컬러(Vertex Color) / 마스킹 기능 (Unity Shader)</title>
		<link>https://lycos7560.com/unity/unityshader-vertex-color/2698/</link>
					<comments>https://lycos7560.com/unity/unityshader-vertex-color/2698/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Mon, 28 Nov 2022 15:55:14 +0000</pubDate>
				<category><![CDATA[Unity]]></category>
		<category><![CDATA[UnityShader]]></category>
		<category><![CDATA[Color]]></category>
		<category><![CDATA[masking]]></category>
		<category><![CDATA[Shader]]></category>
		<category><![CDATA[Standard Surface Shader]]></category>
		<category><![CDATA[Unity Shader]]></category>
		<category><![CDATA[Vertex]]></category>
		<category><![CDATA[기능]]></category>
		<category><![CDATA[마스킹]]></category>
		<category><![CDATA[쉐이더]]></category>
		<category><![CDATA[유니티]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=2698</guid>

					<description><![CDATA[<p>Unity의 Standard Surface Shader를 이용하여  버텍스 컬러를 사용합니다.<br />
추가적으로 버텍스 컬러를 이용한 마스킹 기능도 정리합니다.</p>
<p>The post <a href="https://lycos7560.com/unity/unityshader-vertex-color/2698/">7 &#8211; 01 ~ 02 버텍스 컬러(Vertex Color) / 마스킹 기능 (Unity Shader)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div style="height:98px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">7 &#8211; 01 버텍스 컬러(Vertex Color)</h2>



<p class="wp-block-paragraph">Version : Unity 2021.3.5f1</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">버텍스 안에 내장되어 있는 값을 엔진으로부터 요청해야 사용할 수 있는 정보</p>



<p class="has-medium-font-size wp-block-paragraph">위치(position), UV(Texcoord), 컬러(Color), 노멀(Normal), 탄젠트(Tangent) 등에서 컬러를 이용하여 사용하는 방법입니다.</p>



<p class="has-medium-font-size wp-block-paragraph">아무런 작업도 진행하지 않은 버텍스 컬러는 무조건 흰색입니다.</p>



<p class="has-medium-font-size wp-block-paragraph">float4(1,1,1,1)이 들어 있다고 할 수 있습니다.</p>



<div style="height:38px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph"><a href="https://docs.unity3d.com/kr/2021.3/Manual/SL-SurfaceShaders.html" target="_blank" rel="noreferrer noopener">https://docs.unity3d.com/kr/2021.3/Manual/SL-SurfaceShaders.html</a></p>



<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><a href="https://docs.unity3d.com/kr/2021.3/Manual/SL-SurfaceShaders.html"><img decoding="async" width="1255" height="255" src="https://lycos7560.com/wp-content/uploads/image-328.png" alt="" class="wp-image-2699" srcset="https://lycos7560.com/wp-content/uploads/image-328.png 1255w, https://lycos7560.com/wp-content/uploads/image-328-300x61.png 300w, https://lycos7560.com/wp-content/uploads/image-328-768x156.png 768w" sizes="(max-width: 1255px) 100vw, 1255px" /></a></figure>



<div style="height:29px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1764" height="489" src="https://lycos7560.com/wp-content/uploads/image-330.png" alt="" class="wp-image-2701" srcset="https://lycos7560.com/wp-content/uploads/image-330.png 1764w, https://lycos7560.com/wp-content/uploads/image-330-300x83.png 300w, https://lycos7560.com/wp-content/uploads/image-330-768x213.png 768w, https://lycos7560.com/wp-content/uploads/image-330-1536x426.png 1536w" sizes="(max-width: 1764px) 100vw, 1764px" /></figure>



<div style="height:66px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">버텍스 컬러를 적용하는 방법은 다양한 방법이 있는데</p>



<p class="has-medium-font-size wp-block-paragraph">3ds Max와 같은 3D DCC(Digital Contents Creation) 툴을 이용하거나 엔진의 자체 기능을 이용해서 그리는 것입니다.</p>



<p class="has-medium-font-size wp-block-paragraph">Unity 내부에서 사용하기 위해서 Packages Manager에서 Polybrush를 받아줍니다.</p>



<div style="height:23px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1708" height="903" src="https://lycos7560.com/wp-content/uploads/image-332.png" alt="" class="wp-image-2703" srcset="https://lycos7560.com/wp-content/uploads/image-332.png 1708w, https://lycos7560.com/wp-content/uploads/image-332-300x159.png 300w, https://lycos7560.com/wp-content/uploads/image-332-768x406.png 768w, https://lycos7560.com/wp-content/uploads/image-332-1536x812.png 1536w" sizes="(max-width: 1708px) 100vw, 1708px" /></figure>



<div style="height:33px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1513" height="959" src="https://lycos7560.com/wp-content/uploads/image-333.png" alt="" class="wp-image-2704" srcset="https://lycos7560.com/wp-content/uploads/image-333.png 1513w, https://lycos7560.com/wp-content/uploads/image-333-300x190.png 300w, https://lycos7560.com/wp-content/uploads/image-333-768x487.png 768w" sizes="(max-width: 1513px) 100vw, 1513px" /></figure>



<div style="height:38px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">다음은 버텍스를 확인하기 위한 설정입니다.</p>



<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1291" height="914" src="https://lycos7560.com/wp-content/uploads/image-334.png" alt="" class="wp-image-2705" srcset="https://lycos7560.com/wp-content/uploads/image-334.png 1291w, https://lycos7560.com/wp-content/uploads/image-334-300x212.png 300w, https://lycos7560.com/wp-content/uploads/image-334-768x544.png 768w" sizes="(max-width: 1291px) 100vw, 1291px" /></figure>



<div style="height:36px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">이때 아무리 색을 칠해도 변화가 없습니다.</p>



<p class="has-medium-font-size wp-block-paragraph">유니티는 자체적으로 Texture만 보여주도록 쉐이더가 적용되어 있기 때문에,</p>



<p class="has-medium-font-size wp-block-paragraph">버텍스 컬러를 따로 보기 위한 쉐이더가 필요합니다.</p>



<p class="has-medium-font-size wp-block-paragraph">다음은 버텍스 컬러를 눈으로 확인 하기 위하여 쉐이더 코드를 수정합니다.</p>



<div style="height:36px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Shader "Custom/VertextTest"
{
    Properties
    {
        _MainTex ("Albedo (RGB)", 2D) = "white" {}
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 200

        CGPROGRAM
        #pragma surface surf Standard
        #pragma target 3.0
        sampler2D _MainTex;

        struct Input
        {
            float2 uv_MainTex;
            float4 color:COLOR; // float4 color 변수를 만들고 태그를 달아줌
        };

        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            fixed4 c = tex2D (_MainTex, IN.uv_MainTex);
            o.Emission = IN.color.rgb;
            o.Alpha = c.a;
        }
        ENDCG
    }
    FallBack "Diffuse"
}</pre>



<div style="height:27px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1045" height="903" src="https://lycos7560.com/wp-content/uploads/image-335.png" alt="" class="wp-image-2706" srcset="https://lycos7560.com/wp-content/uploads/image-335.png 1045w, https://lycos7560.com/wp-content/uploads/image-335-300x259.png 300w, https://lycos7560.com/wp-content/uploads/image-335-768x664.png 768w" sizes="(max-width: 1045px) 100vw, 1045px" /></figure>



<div style="height:24px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">버텍스 컬러라는 것도 결국 버텍스의 값, 즉 엔진에서 가지고 있는 값을 요청해야 하므로 Input에서 float4를 통해서</p>



<p class="has-medium-font-size wp-block-paragraph">Color(색)을 요청해야 합니다.</p>



<p class="has-medium-font-size wp-block-paragraph">Input에 요청해서 가져 왔다면 IN. 을 통해서 Input 안의 color 값을 가져오고</p>



<p class="has-medium-font-size wp-block-paragraph">Albedo 에 적용하게 되면 버텍스 컬러가 정상적으로 출력됩니다.</p>



<p class="has-medium-font-size wp-block-paragraph">이제 이쁘게 색칠해 줍니다.</p>



<div style="height:29px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1312" height="763" src="https://lycos7560.com/wp-content/uploads/image-336.png" alt="" class="wp-image-2707" srcset="https://lycos7560.com/wp-content/uploads/image-336.png 1312w, https://lycos7560.com/wp-content/uploads/image-336-300x174.png 300w, https://lycos7560.com/wp-content/uploads/image-336-768x447.png 768w" sizes="(max-width: 1312px) 100vw, 1312px" /></figure>



<div style="height:47px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">잘 보이네요</p>



<p class="has-medium-font-size wp-block-paragraph">이제 적당한 텍스쳐를 넣고&nbsp; 버텍스 컬러를 더하거나 곱해줍니다.</p>



<div style="height:45px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1331" height="696" src="https://lycos7560.com/wp-content/uploads/image-337.png" alt="" class="wp-image-2708" srcset="https://lycos7560.com/wp-content/uploads/image-337.png 1331w, https://lycos7560.com/wp-content/uploads/image-337-300x157.png 300w, https://lycos7560.com/wp-content/uploads/image-337-768x402.png 768w" sizes="(max-width: 1331px) 100vw, 1331px" /></figure>



<div style="height:47px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">이러한 기능을 이용하여 저렴한 비용으로 다양한 효과를 줄 수 있습니다.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--80)"/>



<h2 class="wp-block-heading">7 &#8211; 02 버텍스 컬러(Vertex Color)의 마스킹 기능</h2>



<div style="height:35px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">버텍스 컬러는 일반적인 컬러와 동일하게 RGBA로 구성되어 있으며,</p>



<p class="has-medium-font-size wp-block-paragraph">일반적인 텍스쳐가 가지고 있어야 하는 UV와 아무 상관이 없기 때문에 활용 범위가 매우 다양합니다.</p>



<p class="has-medium-font-size wp-block-paragraph">아까 코드에서 4가지의 텍스쳐를 받을 수 있는 쉐이더로 변경합니다.</p>



<div style="height:41px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1314" height="989" src="https://lycos7560.com/wp-content/uploads/image-338.png" alt="" class="wp-image-2709" srcset="https://lycos7560.com/wp-content/uploads/image-338.png 1314w, https://lycos7560.com/wp-content/uploads/image-338-300x226.png 300w, https://lycos7560.com/wp-content/uploads/image-338-768x578.png 768w" sizes="(max-width: 1314px) 100vw, 1314px" /></figure>



<div style="height:25px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Shader "Custom/VertextTest"
{
    Properties
    {
        _MainTex1("Albedo1 (RGB)", 2D) = "white" {}
        _MainTex2("Albedo2 (RGB)", 2D) = "white" {}
        _MainTex3("Albedo3 (RGB)", 2D) = "white" {}
        _MainTex4("Albedo4 (RGB)", 2D) = "white" {}
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 200

        CGPROGRAM
        #pragma surface surf Standard
        #pragma target 3.0
        sampler2D _MainTex1;
        sampler2D _MainTex2;
        sampler2D _MainTex3;
        sampler2D _MainTex4;

        struct Input
        {
            float2 uv_MainTex1;
            float2 uv_MainTex2;
            float2 uv_MainTex3;
            float2 uv_MainTex4;
            float4 color:COLOR;
        };

        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            fixed4 c = tex2D (_MainTex1, IN.uv_MainTex1);
            fixed4 d = tex2D(_MainTex2, IN.uv_MainTex2);
            fixed4 e = tex2D(_MainTex3, IN.uv_MainTex3);
            fixed4 f = tex2D(_MainTex4, IN.uv_MainTex4);
            o.Emission = c.rgb;
            o.Alpha = c.a;
        }
        ENDCG
    }
    FallBack "Diffuse"
}</pre>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">지금은 텍스쳐가 한장만 보이게 o.Emission 을 설정 했습니다.&nbsp;</p>



<p class="has-medium-font-size wp-block-paragraph"> lerp 함수를 이용하여 마스킹 기능으로 활용해 봅시다.</p>



<div style="height:62px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1300" height="831" src="https://lycos7560.com/wp-content/uploads/image-339.png" alt="" class="wp-image-2710" srcset="https://lycos7560.com/wp-content/uploads/image-339.png 1300w, https://lycos7560.com/wp-content/uploads/image-339-300x192.png 300w, https://lycos7560.com/wp-content/uploads/image-339-768x491.png 768w" sizes="(max-width: 1300px) 100vw, 1300px" /></figure>



<div style="height:28px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size wp-block-paragraph">lerp 함수로 버텍스 컬러의 R 값을 이용하여 마스킹 기능으로 이용했습니다.</p>



<div style="height:43px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Shader "Custom/Vertex"
{
    Properties
    {
        _MainTex ("Albedo (RGB)", 2D) = "white" {}
        _MainTex2 ("Albedo (RGB)", 2D) = "white" {}
        _MainTex3 ("Albedo (RGB)", 2D) = "white" {}
        _MainTex4 ("Albedo (RGB)", 2D) = "white" {}
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 200

        CGPROGRAM
        
        #pragma surface surf Standard noambient
        #pragma target 3.0

        sampler2D _MainTex;
        sampler2D _MainTex2;
        sampler2D _MainTex3;
        sampler2D _MainTex4;

        struct Input
        {
            float2 uv_MainTex;
            float2 uv_MainTex2;
            float2 uv_MainTex3;
            float2 uv_MainTex4;
            float4 color:COLOR;
        };

        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
            fixed4 d = tex2D(_MainTex2, IN.uv_MainTex2);
            fixed4 e = tex2D(_MainTex3, IN.uv_MainTex3);
            fixed4 f = tex2D(_MainTex4, IN.uv_MainTex4);
            // o.Emission = IN.color.rgb; 버텍스 컬러 확인용

            // lerp 함수를 이용함
            o.Albedo = lerp(c.rgb, d.rgb, IN.color.r);
            o.Albedo = lerp(o.Albedo, e.rgb, IN.color.g);
            o.Albedo = lerp(o.Albedo, f.rgb, IN.color.b);

            o.Alpha = c.a;
        }
        ENDCG
    }
    FallBack "Diffuse"
}</pre>



<div style="height:45px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-video"><video height="840" style="aspect-ratio: 1464 / 840;" width="1464" controls src="https://lycos7560.com/wp-content/uploads/녹화_2022_11_29_00_49_59_987.mp4"></video></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://lycos7560.com/unity/unityshader-vertex-color/2698/">7 &#8211; 01 ~ 02 버텍스 컬러(Vertex Color) / 마스킹 기능 (Unity Shader)</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/unity/unityshader-vertex-color/2698/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://lycos7560.com/wp-content/uploads/녹화_2022_11_29_00_49_59_987.mp4" length="4589539" type="video/mp4" />

			</item>
	</channel>
</rss>
