I have a compute shader that currently only draws to textures. But I want to use the same script to do the math that the cpu is doing. However when I try the code below, nothing happens. I know I am calling, and initializing everything correctly because I am drawing to the textures in the same kernels. This is the code I am trying to run:
for(int i=0; i 0 && abs (xPos_FrontandBack) < w / 2 && abs (yPos_FrontandBack) < w / 2) {
tex0[int2(xPos_FrontandBack + w / 2, yPos_FrontandBack + w / 2)] = float4(1, 1, 0, 1);
}
}
When this compiles there are no errors, or anything at all that appears in the console. When it is run in the game, nothing happens. What is happening here, and how can I get this to work?
↧