1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DrawProceduralNow: SetPass(0)の位置をミスると,変数がセットされない問題

Last updated at Posted at 2022-01-20

SetPass(0) の位置をDrawProceduralNowの直前にしないと particlesBufferのバッファーが空になったりすることがあるらしい.Spoutに切り替えり,戻したときに最初の切り替え時はBufferやSetFloatで設定した値などが空になっていたが,下のようにSetPass(0)を正しい位置に変更すると,ただしく値が渡されるようになる.

this.particlesMaterial.SetBuffer(ShaderIDs.ParticlesBuffer, this.particlesBuffer);
this.particlesMaterial.SetPass(0); //描画開始位置らしい?
Graphics.DrawProceduralNow(MeshTopology.Points, this.particlesBuffer.count); 
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?