private void LateUpdate() { // Output ouputTimings.text = string.Format("Compute:{0}x{0} {1:F2}ms", textureSize, timer.Duration * 1000.0); // Dispatch compute shader computeShader.SetVector("targetTextureSize", new Vector4(targetTexture.width, targetTexture.height)); computeShader.SetTexture(0, "targetTexture", targetTexture); timer.Begin(); computeShader.Dispatch(0, targetTexture.width / 16, targetTexture.height / 16, 1); timer.End(); }