can jitter.gl.shader work with sampler2d?

Jun 10, 2007 at 6:54pm

can jitter.gl.shader work with sampler2d?

Hi all,

In the absence of solution to my previous dilemma, I’ve delved into glsl and
as a result, I’ve arrived to two roadblocks/questions:

1) does jitter work with sampler2D instead of sampler2DRect (by the same
token texture2D as opposed to texture2DRect)?

2) in sh.passthrudim.vp.glsl, does texdim0 contain pixel width/height of the
texture or is it values between 0 and 1?

Many thanks!

Ivica Ico Bukvic, D.M.A.
Composition, Music Technology, CCTAD, CHCI
Virginia Tech
Dept. of Music – 0240
Blacksburg, VA 24061
(540) 231-1137
(540) 231-5034 (fax)
ico@vt.edu
http://www.music.vt.edu/people/faculty/bukvic/

http://ico.bukvic.net

#32399
Jun 10, 2007 at 7:01pm

use jit.gl.slab for texture stream processing, it works with both
sampler2D and rect2D :)

On Jun 10, 2007, at 2:54 PM, Ivica Ico Bukvic wrote:

> Hi all,
>
> In the absence of solution to my previous dilemma, I’ve delved into
> glsl and
> as a result, I’ve arrived to two roadblocks/questions:
>
> 1) does jitter work with sampler2D instead of sampler2DRect (by the
> same
> token texture2D as opposed to texture2DRect)?
>
> 2) in sh.passthrudim.vp.glsl, does texdim0 contain pixel width/
> height of the
> texture or is it values between 0 and 1?
>
> Many thanks!
>
> Ivica Ico Bukvic, D.M.A.
> Composition, Music Technology, CCTAD, CHCI
> Virginia Tech
> Dept. of Music – 0240
> Blacksburg, VA 24061
> (540) 231-1137
> (540) 231-5034 (fax)
> ico@vt.edu
> http://www.music.vt.edu/people/faculty/bukvic/
> http://ico.bukvic.net
>
>

v a d e //

http://www.vade.info
abstrakt.vade.info

#106497
Jun 10, 2007 at 7:02pm

oh. and texture2D is normalized 0 to 1 non rectangluar textures, and
texture2D rect is the pixel (actually, I think the texel size). you
can normalize by dividing texcoord/texdim to get the 0 – 1 floating
point value that is easier to work with.

On Jun 10, 2007, at 2:54 PM, Ivica Ico Bukvic wrote:

> Hi all,
>
> In the absence of solution to my previous dilemma, I’ve delved into
> glsl and
> as a result, I’ve arrived to two roadblocks/questions:
>
> 1) does jitter work with sampler2D instead of sampler2DRect (by the
> same
> token texture2D as opposed to texture2DRect)?
>
> 2) in sh.passthrudim.vp.glsl, does texdim0 contain pixel width/
> height of the
> texture or is it values between 0 and 1?
>
> Many thanks!
>
> Ivica Ico Bukvic, D.M.A.
> Composition, Music Technology, CCTAD, CHCI
> Virginia Tech
> Dept. of Music – 0240
> Blacksburg, VA 24061
> (540) 231-1137
> (540) 231-5034 (fax)
> ico@vt.edu
> http://www.music.vt.edu/people/faculty/bukvic/
> http://ico.bukvic.net
>
>

v a d e //

http://www.vade.info
abstrakt.vade.info

#106498
Jun 10, 2007 at 7:03pm

> 1) does jitter work with sampler2D instead of sampler2DRect (by the same
> token texture2D as opposed to texture2DRect)?
>

Yes.
sampler2D when jit.gl.texture @rectangle 0
sampler2DRect when jit.gl.texture @rectangle 1 (default)

> 2) in sh.passthrudim.vp.glsl, does texdim0 contain pixel width/height of the
> texture or is it values between 0 and 1?

Jitter textures automatically set the texture matrix to contain the
range of coordinates for the sampler being used. In the sampler2DRect
this is the number of pixels because rectangular texture coordinates
have that range. In the sampler2D case, this is [0, 1] because that’s
the range of square texture coordinates.

wes

#106499

You must be logged in to reply to this topic.