Fragment shader operation

I posted a similar question in the beginners forum but…well here it goes.

The NVIDIA fragment program extension has an SEQ(Set on Equal) instruction that works like this:

  tmp0 = VectorLoad(op0);
  tmp1 = VectorLoad(op1);
  result.x = (tmp0.x == tmp1.x) ? 1.0 : 0.0;
  result.y = (tmp0.y == tmp1.y) ? 1.0 : 0.0;
  result.z = (tmp0.z == tmp1.z) ? 1.0 : 0.0;
  result.w = (tmp0.w == tmp1.w) ? 1.0 : 0.0;

My question is, does anyone know if I can get this kind of functionality on a card that does not support fragment programs(texture shader?). The results doesn’t have to be in floating point, just 1 or 0.I’ve looked for extensions and in specs but cant seem to find anything. Maybe you guys can help.

old post

thanks in advance

[This message has been edited by pete876 (edited 02-12-2003).]

It can be done in GL_ATI_fragment_shader too.

GL_ARB_fragment_program, too :slight_smile:

The closest I can think of for non-shader-type hardware would be to do a dependent texture look-up that’s offset based on what you’re testing (such as the difference between two things). Dependent texture look-ups need some kind of shader capability, though.

Couldn’t ARB_shadow be somehow used to do that too?