今天我需要你的帮助!我开始在一个非常简单的用例中使用计算着色器:我有一个深度相机,我想要计算相机附近对象的边界框。我现在有一个问题,当我运行我的程序时,我有相同的最小和最大坐标。因此,我认为我的所有组和线程都在同一时间写入我的StructuredBuffers。以下是我的计算着色器的代码:
//We define the size of a group in the x, y and z directions, y and
sampler input : register(s0);float seed; //calculate in program, pass to shadercreateEnemyTexture(GraphicsDevice gd, SpriteBatch sb) //get a random number to pass into the shaderSamplerState.PointClamp, DepthStencilSt