Octopus_Tophat
Member
Hi, I'm not using cameras in my game for complicated reasons that I don't really feel like explaining. I basically have my own draw pipeline, where the main game control object handles all the drawing for my custom cameras. So my custom cameras are manipulating the matrices while setting different render targets for a kind of deferred rendering technique. Each camera basically has it's own GUI/lighting etc. I don't want to get into it lol.
It works fine for my first camera. But once I add another camera (which is rendered on the first cameras GUI), some, but usually all, of the sprites are getting culled. My debug mode, which uses draw_line's/draw_circle's, draws fine. The non-sprite draw functions don't seem to care about culling. Also, my background/terrain/lighting surfaces are drawing fine, but that may just be because they take up the whole room, so they pretty much would never be culled.
I believe this has something to do with the way GM batches draw_sprite calls. Is there a way to bypass this culling, or will I have to start drawing my sprites manually with vertex buffers? Would those get culled too?
If I disable my manual drawing, and turn all objects back to "visible", I'm seeing a full view of the whole room, which is expected. So if everything WOULD be in view if it was normally drawn... why is it suddenly culled when I set the matrices myself, even though they would still be in view?
I'm sure there will be questions to clarify what I'm doing. Feel free to ask away.
I'm really hoping nobody just says "Quit being stubborn and just use cameras/views". My game used to use cameras, but I've refactored it to not. I have my reasons. Thanks guys!
It works fine for my first camera. But once I add another camera (which is rendered on the first cameras GUI), some, but usually all, of the sprites are getting culled. My debug mode, which uses draw_line's/draw_circle's, draws fine. The non-sprite draw functions don't seem to care about culling. Also, my background/terrain/lighting surfaces are drawing fine, but that may just be because they take up the whole room, so they pretty much would never be culled.
I believe this has something to do with the way GM batches draw_sprite calls. Is there a way to bypass this culling, or will I have to start drawing my sprites manually with vertex buffers? Would those get culled too?
If I disable my manual drawing, and turn all objects back to "visible", I'm seeing a full view of the whole room, which is expected. So if everything WOULD be in view if it was normally drawn... why is it suddenly culled when I set the matrices myself, even though they would still be in view?
I'm sure there will be questions to clarify what I'm doing. Feel free to ask away.
I'm really hoping nobody just says "Quit being stubborn and just use cameras/views". My game used to use cameras, but I've refactored it to not. I have my reasons. Thanks guys!
Last edited: