Shaders Can a shader run a recursive algorithm?

Discussion in 'Programming' started by MrPMorris, Jul 12, 2019.

  1. MrPMorris

    MrPMorris Member

    Joined:
    Jul 12, 2019
    Posts:
    2
    I have a recursive algorithm to solve a problem (which Tetris pieces needed + where to place in order to fill a board).

    I'm wondering if it is possible to write a shader in GameMaker that will allow me to solve this instead. Is it possible to run a recursive algorithm in a shader?
     
  2. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,931
    Is there a particular reason to use a shader rather than just normal code?
     
  3. MrPMorris

    MrPMorris Member

    Joined:
    Jul 12, 2019
    Posts:
    2
    Basically because it should run much faster than on the CPU.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice