I have a 6 vertex rectangle 100x100 in size, this i covered with a 100x100 background image. now i would like to render two "sub textures" on top of it.
lets say i have two sub textures size 20x20 one of then i like to position at x:10 y:10 and the other x:50 and y:50
(these are actually to get used as masks on the background image.)
how should i go with this ? my first thought was to send a uniform vec2 with the position of the two sub textures info the fragment shader, but i cant really figure out how to convert those into texture2d(subtexture, coordinate) because texture2d takes 0-1 values. i cant really wrap my head around this, and i hope to get some pointers in what direction i should go.
(this is to be used on OpenGL ES 2.0)