I have a shader activated when the menu is brought up. It requires multiple image files, so if I set effect to none and then set it back when the menu turns on, load the images from file and set all the variables, it could cause quite the freeze depending on the player's hard drive speed.
So, is there a way to keep those images in memory?
Or is there a way to just temporarily disable the shader at runtime?
Or is there a fast way in HLSL to add a boolean toggle that stops it running without a huge performance hit? Like "If !_enabled break;" or something?