State-mapping shader/extension

I am new to OpenGL so I don’t know if OGL already has something similar.

I’ve had this idea for something that I call “statemapping”. In it, texels in a texture would be treated as rendering states.
This could be coupled with multitexturing to render a textured triangle that is “shiny” on some texels, and “matte” on others. I guess it could be implemented by some kind of extension or shader or whatever.

I hope that was clear enough; I’ve never been good at getting ideas across.

Bezier128( OpenGL newbie )

If you mean that each texel represents a shader, then I’m afraid OpenGL is not ready for that, at least not with “texturing”.

As for achieving your effect, it’s already possible eg if you render your model in multipass (one pass for diffuse, one pass for specular) where the specular pass is modulated with an alpha texture.