Octopus_Tophat
Member
Hi! I'm wondering if I would be able to change the render target, or the view_surface_id to allow me to draw different layers of the scene to different surfaces. I'm doing something a bit similar to deferred rendering.
For example, I need to draw my lights on a seperate surface, so that entire surface can then be drawn on to the application surface with a blend mode. I've tried changing the view_surface_id right before the lights are drawn, and then change it back, but the view_surface_id only seems to really update after the view is finished drawing. I'm coming from GM1, but I've imported to GM2. I've tried just about everything in GM1 to get this effect, is there any added features of GM2 to let me do this?
I'm achieving this currently by offsetting all the absolute coordinates of the lights to local-surface coordinates, and taking into account the camera's zoom as well, but this seems hacky, and view rotation might make this a hastle, though I haven't tried to implement rotation yet.
I have other surfaces than just lights too, such as the background, a depth-map, and a distortion map.
The game is 2D, but I'm doing some pretty advanced graphics stuff. Lots of shaders and what-not.
Thanks for the help!
For example, I need to draw my lights on a seperate surface, so that entire surface can then be drawn on to the application surface with a blend mode. I've tried changing the view_surface_id right before the lights are drawn, and then change it back, but the view_surface_id only seems to really update after the view is finished drawing. I'm coming from GM1, but I've imported to GM2. I've tried just about everything in GM1 to get this effect, is there any added features of GM2 to let me do this?
I'm achieving this currently by offsetting all the absolute coordinates of the lights to local-surface coordinates, and taking into account the camera's zoom as well, but this seems hacky, and view rotation might make this a hastle, though I haven't tried to implement rotation yet.
I have other surfaces than just lights too, such as the background, a depth-map, and a distortion map.
The game is 2D, but I'm doing some pretty advanced graphics stuff. Lots of shaders and what-not.
Thanks for the help!