Hi Robert, Phillip
Hi Phillip,
On 30 June 2016 at 12:22, Philipp Meyer <[email protected]> wrote:
unfortunately some objects move in my scene, so its not enough to only hold the
old view matrix.
The camera AND any object can move.
OK.
You haven't ever said what you are trying to do with current vs
previous frame data. I don't recall anyone ask for this specific
requirement before. The OSG community have been around quite a long
time now... So you are either doing something very novel or a trying
to solve a common problem in a very awkward way.
That's not entirely correct. I asked for something like this some years
ago to implement a per-object motion blur in a deferred pipeline.
Basically one would write per-fragment velocity vectors to a render
target to later selectively blur in a post-processing step. The velocity
vectors were based on the change in the view-matrix + the changes per
object.
I remember experimenting with callbacks and holding the last
model-matrix in the objects user-data which was used to fill an uniform
each frame, but I ultimately switched to a solution which didn't
consider the blur on a per-object base.
So basically there are use-cases, but I never found a satisfactory
solution (I think the problem was performance, due to the many uniform
updates/statesets).
May be there is a more advanced solution to the problem that haven't
thought of.
Cheers
Sebastian
One thing to also considering in your pondering is that not all
objects will actually be in the view frustum over subsequent frames,
especially as you pan around, new objects will appear in the view
frustum for the first time so won't have a previous modelview matrix
associated with them.
Since you haven't said what this is all in aid of I can't say whether
this later issue has any baring, it will however, if you really need
to do what you say you need to do will introduce it's own set of
issues.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org