Yeah, that looks like it should do it.  Between the zero derivatives and the 
width==0, and the InterpClosest (to prevent true interpolation), you ought to 
be point sampling.

Is this not working as expected?  What happens?


On Nov 13, 2013, at 9:53 PM, ryan heniser <[email protected]> wrote:

> How do I point sample a env map with an environment call? I thought it would 
> be something like
> 
> // Initialize texture options for point sampling
> gTexOpts.nchannels = 3;
> gTexOpts.firstchannel = 0;
> gTexOpts.swrap = TextureOpt::WrapPeriodic;
> gTexOpts.twrap = TextureOpt::WrapClamp;
> gTexOpts.samples = 1;
> gTexOpts.mipmode = TextureOpt::MipModeNoMIP;
> gTexOpts.interpmode = TextureOpt::InterpClosest; // Force closest texel
> gTexOpts.conservative_filter = false;
> gTexOpts.sblur = 0;
> gTexOpts.tblur = 0;
> gTexOpts.swidth = 0;
> gTexOpts.twidth = 0;
> 
> 
> const Imath::V3f zero(0,0,0);
> bool ok = gTexSys->environment(filename, gTexOpts, r, zero, zero, test);
> 
> Ryan
> _______________________________________________
> 

--
Larry Gritz
[email protected]



_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to