Gregory Igehy

Dancing at hemisphere coordinate

Notes of Object pools in Unity

Notes of draw order

Notes of Unity 5.5

Notes of projection texture shadows

Notes of combine meshes in Unity

Notes of GPU Skinning in Unity

追記 : 2017/09/30

  • Unity でスキニングをしているキャラに対して, GPU スキニングを有効にして RenderDoc でシェーダの中身を見てみた
  • Camera.Render よりも前に, MeshSkinning.SkinOnGPU を実行してストリームアウトしている
  • 下図は RenderDoc でのスクリーンショットと, ストリームアウト用の頂点シェーダの一部

f:id:gregory-igehy:20170930151308p:plain

Shader hash 2b7e5ba9-d111fb26-c1bf5b67-5780f0c3

vs_4_0
      dcl_resource_buffer (mixed,mixed,mixed,mixed) texBones (t0)
      dcl_input v0.xyz
      dcl_input v1.xyz
      dcl_input v2.xyzw
      dcl_input v3.xyzw
      dcl_input v4.xyzw[f:id:gregory-igehy:20170930151308p:plain]
      dcl_output o0.xyz
      dcl_output o1.xyz
      dcl_output o2.xyzw
      dcl_temps 6
   0: imul null, r0.xyzw, v4.xyzw, l(3, 3, 3, 3)
   1: ld_indexable r1.xyzw, r0.yyyy, texBones.xyzw
   2: mul r1.xyzw, r1.xyzw, v3.yyyy
   3: ld_indexable r2.xyzw, r0.xxxx, texBones.xyzw
   4: mad r1.xyzw, v3.xxxx, r2.xyzw, r1.xyzw
   5: ld_indexable r2.xyzw, r0.zzzz, texBones.xyzw
   6: ld_indexable r0.xyzw, r0.wwww, texBones.xyzw
   7: mad r1.xyzw, v3.zzzz, r2.xyzw, r1.xyzw
   8: mad r0.xyzw, v3.wwww, r0.xyzw, r1.xyzw
   9: mov r1.xyz, v0.xyzx
  10: mov r1.w, l(1.000000)
  11: dp4 o0.x, r1.xyzw, r0.xyzw
  12: imad r2.xyzw, v4.xxyy, l(3, 3, 3, 3), l(2, 1, 2, 1)
  13: ld_indexable r3.xyzw, r2.wwww, texBones.xyzw
  14: mul r3.xyzw, r3.xyzw, v3.yyyy
  15: ld_indexable r4.xyzw, r2.yyyy, texBones.xyzw
  16: mad r3.xyzw, v3.xxxx, r4.xyzw, r3.xyzw
  17: imad r4.xyzw, v4.zzww, l(3, 3, 3, 3), l(2, 1, 2, 1)
  18: ld_indexable r5.xyzw, r4.yyyy, texBones.xyzw
  19: mad r3.xyzw, v3.zzzz, r5.xyzw, r3.xyzw
  20: ld_indexable r5.xyzw, r4.wwww, texBones.xyzw
  21: mad r3.xyzw, v3.wwww, r5.xyzw, r3.xyzw
  22: dp4 o0.y, r1.xyzw, r3.xyzw
  23: ld_indexable r5.xyzw, r2.zzzz, texBones.xyzw
  24: ld_indexable r2.xyzw, r2.xxxx, texBones.xyzw
  25: mul r5.xyzw, r5.xyzw, v3.yyyy
  26: mad r2.xyzw, v3.xxxx, r2.xyzw, r5.xyzw
  27: ld_indexable r5.xyzw, r4.xxxx, texBones.xyzw
  28: ld_indexable r4.xyzw, r4.zzzz, texBones.xyzw
  29: mad r2.xyzw, v3.zzzz, r5.xyzw, r2.xyzw
  30: mad r2.xyzw, v3.wwww, r4.xyzw, r2.xyzw
  31: dp4 o0.z, r1.xyzw, r2.xyzw
  32: dp3 o1.y, v1.xyzx, r3.xyzx
  33: dp3 o2.y, v2.xyzx, r3.xyzx
  34: dp3 o1.z, v1.xyzx, r2.xyzx
  35: dp3 o2.z, v2.xyzx, r2.xyzx
  36: dp3 o1.x, v1.xyzx, r0.xyzx
  37: dp3 o2.x, v2.xyzx, r0.xyzx
  38: mov o2.w, v2.w
  39: ret

Notes of Graphics in Witcher3

Notes of DontDestroyOnLoad in Unity

Notes of billboard lighting

Notes of graphics in Uncharted 4


Notes of GC in Unity

Notes of const and readonly

Notes of StringBuilder

Notes of Stencil buffer in Unity

Notes of Material Property Block in Unity

Notes of Scriptable Objects in Unity