Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@baobao
Created December 14, 2018 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baobao/caf36b9c21c2bec0ce36da47199ad703 to your computer and use it in GitHub Desktop.
Save baobao/caf36b9c21c2bec0ce36da47199ad703 to your computer and use it in GitHub Desktop.
Unity2018.2.11f1で作成したComputeShaderのデフォルト状態
#pragma kernel CSMain
RWTexture2D<float4> Result;
[numthreads(8,8,1)]
void CSMain (uint3 id : SV_DispatchThreadID)
{
Result[id.xy] = float4(id.x & id.y, (id.x & 15)/15.0, (id.y & 15)/15.0, 0.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment