| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Oct 22, 2007, at 3:48 AM, Mark wrote:
I would like to test other interpolation options, for this, for a given coordinate XYZ, I need not the interpolated value of XYZ but instead the values of all (or some) grid points surrounding coordinate XYZ.
Does somebody have a smart idea how to do that?
Fragment shader.
I was looking for a bit more details - haven't done much texturing until now...
What I was thinking: since the grid point spacing is constant in a 3d texture, I can easily calculate those inside a shader. So for a coordinate X, I can calculate where (more or less) I have the next grid point below it and above it. I can of course do that for Y and Z too.
Together these would give me approximate coordinates of the 8 grid points surrounding coordinate XYZ. Having those I could then use nearest neighbor interpolation to actually get the precise values stored inside the 8 surrounding grid points.
That would off course require some math and 8 nearest neighbor accesses on the 3d texture.
Does someone have a better/faster/simpler idea?
Kent _______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden
| References: | |
| >3d texture lookup interpolation options (From: Mark <email@hidden>) | |
| >Re: 3d texture lookup interpolation options (From: "Keith Bauer" <email@hidden>) | |
| >Re: 3d texture lookup interpolation options (From: Mark <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.