H_R_H Posted February 12 Share Posted February 12 In my Pixi application I'm rendering (among other things) a lot of graphics that draw bezier curves. I want to implement culling for these but it's a bit tricky because they're paths and not "well bounded" graphics (like e.g, rects) which have easy-to-reason-about bounds. For example, imagine the following scenario: |========| | | ---|------------|---------> | | |========| where the box represents the viewable area, and as you can see there's a long line/path that starts from a point outside the visible area and also ends outside it (drawn here as a straight line for ease of demonstration, but it's a actually a bezier curve). So, while the start and end are not visible, the "center" portion of the path is. The main problem I have is that there are a relatively large number of these paths, which are adding a performance overhead because they're rendered all the time, even when they are completely off-view. I could implement a naive culling technique based on the control points of the bezier curve, but that could also clip paths like in the example given, where a "portion" of them is actually visible. Is there any way to make such an optimization? I'm also happy to listen to alternative approaches to the problem of the performance load, in case this is not (easily) possible; because I could be going about this problem in a wrong direction. Thanks in advance Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.