Graphics.Blit
を介すことで、ShaderGraphの結果をComputeShaderで使うことができます。
ShaderGraphで書いたシェーダーを使うmaterial
を用意し
// 結果をdstのテクスチャに書き出す
Graphics.Blit(src, dst, material);
// dstテクスチャをComputeShaderに渡す
MyComputeShader.SetTexture(0, "_Texture", dst);
More than 3 years have passed since last update.
Graphics.Blit
を介すことで、ShaderGraphの結果をComputeShaderで使うことができます。
ShaderGraphで書いたシェーダーを使うmaterial
を用意し
// 結果をdstのテクスチャに書き出す
Graphics.Blit(src, dst, material);
// dstテクスチャをComputeShaderに渡す
MyComputeShader.SetTexture(0, "_Texture", dst);
Register as a new user and use Qiita more conveniently