Firestorm
09-25-2000, 12:23 PM
So i was working on my shader language, taking q3a's shader language a bit as an example, altough i wasn't really following it that closely..
And i implemented all kinds of neat stuff like being able to a translation, then a rotation and then yet another translation etc. and even translations, shears and scales for either x & y or both..
And gave all it color functionality which could do all that too..
And i was feeling pretty good about myself..
And then i wanted to do multitexturing..
umpf
I read some stuff about multitexturing before so i didn't think it'd be that hard..
unfortunatly i didn't realize that all examples i had used glvertex instead of vertex buffers..
So it took me some time to figure out i should use glClientActiveTextureARB.. and considering i didn't have internet all weekend (damn provider) i couldn't look that kind of info up on the net http://www.opengl.org/discussion_boards/ubb/frown.gif
Oh well.
So i was feeling kinda happy, finally having figured out how multitexturing with vertex buffers works and then i realized something..
Blending works completely differently with two textures you draw using multitexturing compared to two textures that are drawn on top of eachother using blending..
Now, on itself this isn't a problem..
But when you consider that i'm working on a shader language which i want to get to work on cards that:
1. have no multitexturing (unlikely, but still)
2. can draw 2 textures at the same time
3. can draw 3 textures at the same time
4. future cards that can draw x textures at the same time.
so i can't write my shaders to simply work with a specific number of textures units..
Which means i have to write the code in such a way that no matter how many texture units your card has, it'll always try to draw it with the least ammounts of passes..
This also means that i probably need to rewrite the entire symantics of my shader language (boohoo)
(not that it's *that* complex, so i won't lose any sleep over it)
so i'll have to define a lot of stuff in a more abstract way...
(instead of using shader commands like "blendfunc one one")
Soooo..
The thing is, i'm not that familiar with multitexturing and how textures are combined in x different types of ways..
So i was wondering, does anyone have any suggestions on what to do with my shader language or where i can find excellent resources on the topic?
Also, if you have good ideas/comments related to shader languages, please share http://www.opengl.org/discussion_boards/ubb/wink.gif
thanks..
And i implemented all kinds of neat stuff like being able to a translation, then a rotation and then yet another translation etc. and even translations, shears and scales for either x & y or both..
And gave all it color functionality which could do all that too..
And i was feeling pretty good about myself..
And then i wanted to do multitexturing..
umpf
I read some stuff about multitexturing before so i didn't think it'd be that hard..
unfortunatly i didn't realize that all examples i had used glvertex instead of vertex buffers..
So it took me some time to figure out i should use glClientActiveTextureARB.. and considering i didn't have internet all weekend (damn provider) i couldn't look that kind of info up on the net http://www.opengl.org/discussion_boards/ubb/frown.gif
Oh well.
So i was feeling kinda happy, finally having figured out how multitexturing with vertex buffers works and then i realized something..
Blending works completely differently with two textures you draw using multitexturing compared to two textures that are drawn on top of eachother using blending..
Now, on itself this isn't a problem..
But when you consider that i'm working on a shader language which i want to get to work on cards that:
1. have no multitexturing (unlikely, but still)
2. can draw 2 textures at the same time
3. can draw 3 textures at the same time
4. future cards that can draw x textures at the same time.
so i can't write my shaders to simply work with a specific number of textures units..
Which means i have to write the code in such a way that no matter how many texture units your card has, it'll always try to draw it with the least ammounts of passes..
This also means that i probably need to rewrite the entire symantics of my shader language (boohoo)
(not that it's *that* complex, so i won't lose any sleep over it)
so i'll have to define a lot of stuff in a more abstract way...
(instead of using shader commands like "blendfunc one one")
Soooo..
The thing is, i'm not that familiar with multitexturing and how textures are combined in x different types of ways..
So i was wondering, does anyone have any suggestions on what to do with my shader language or where i can find excellent resources on the topic?
Also, if you have good ideas/comments related to shader languages, please share http://www.opengl.org/discussion_boards/ubb/wink.gif
thanks..