<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gaziya</author_name>
  <author_url>https://blog.hatena.ne.jp/gaziya/</author_url>
  <blog_title>テラByteの時代にキロByte</blog_title>
  <blog_url>https://gaz.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>オブジェクトをある点に向かすには、mat3()を使います。lookat行列と同じ作り方をします。 違うのは、かける順番。 本当は逆行列を使うのでしょうけど、GLSLの場合は、かける順番を後にすると逆行列扱いになるようです。 // point at vec3 w=normalize(ta-q); vec3 u=normalize(cross(w,vec3(0,1,0))); mat3 m=mat3(u,cross(u,w),w); q = (p-q)*m; pointAt行列部分の抜粋。 今回のshader (shadertoy rule) mat2 rotate(float a) { retu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgaz.hateblo.jp%2Fentry%2F2019%2F05%2F12%2F164845&quot; title=&quot;--shader(GLSL)の小技 09-- オブジェクトをある点に向かす - テラByteの時代にキロByte&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-05-12 16:48:45</published>
  <title>--shader(GLSL)の小技 09-- オブジェクトをある点に向かす</title>
  <type>rich</type>
  <url>https://gaz.hateblo.jp/entry/2019/05/12/164845</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
