<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kazumichi96</author_name>
  <author_url>https://blog.hatena.ne.jp/kazumichi96/</author_url>
  <blog_title>ブログ名は今度考える</blog_title>
  <blog_url>https://nekonecode.hatenablog.com/</blog_url>
  <categories>
    <anon>Unity/ShaderLab</anon>
  </categories>
  <description>UnityのShaderLabでライティングをしているとき、ライトの方向ベクトルってどっち向いてるんだろうと思って色として表示してみました。 まぁライティングの結果を見れば想像はできるのですが、もっと愚直に確かめないとしっくりこない子なのです。 half4 LightingSimpleLambert(SurfaceOutput s, half3 lightDir, half atten) { fixed4 c; c.rgb = lightDir; // ライトの方向をそのまま色として表示 return c; } 結果はご覧の通りで、シーン上で見えている向きとは逆向きのベクトルとして渡されてくる…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekonecode.hatenablog.com%2Fentry%2F2021%2F02%2F17%2F043221&quot; title=&quot;【ShaderLab】ディレクショナルライトの方向はどこを向いている？ - ブログ名は今度考える&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kazumichi96/20210217/20210217042815.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-02-17 04:32:21</published>
  <title>【ShaderLab】ディレクショナルライトの方向はどこを向いている？</title>
  <type>rich</type>
  <url>https://nekonecode.hatenablog.com/entry/2021/02/17/043221</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
