Search Unity

Is it possible to wrap indices around in compute shaders?

Discussion in 'Shaders' started by kamlesh2052, Jan 13, 2022.

  1. kamlesh2052

    kamlesh2052

    Joined:
    Feb 17, 2018
    Posts:
    5
    Hello everyone I just started learning compute shaders and I am trying to make a simple conway's game of life using the shader. I am doing this by using a render texture and saving the cell state as black or white pixel in that texture. I want to know that Is there a way to tell Unity to wrap the indices around that render texture when it goes out of bounds or do I have to handle that wrapping manually?