texture2D filtering question

This was explained to me before but I forget why I can’t get a value of 1 when sampling a ramp TOP linearly interpolating between 0 and 1 at st coords 1,0. extend is set to hold, and input smoothness on the glsl top is set to nearest pixel but I get a value of 0 instead of 1 when sampling at x = 1. here’s a .toe. Also you can see the TOPtoCHOP on the ramp doesnt show the value going all the way to 1 either.
samplerFilteringQuestion.1.toe (4.17 KB)

You want to set the Extend Mode in the GLSL TOP to Hold to get this to work, that’s the extend mode that applies to your texture2D call.
The extend modes in the Ramp TOP are used just for creating the Ramp, when dealing with the phase/period parameter.

The Ramp output itself not getting quite to 1 seems to be an artifact of the low resolution, I’ll look into it.

Ok but how do you set the extend mode in a GLSL MAT?
MATfilter.toe (4.2 KB)

In the MAT you can hit the + button next to any of the parameters on the samplers page to set the extend modes for that particular sampler.