SirKnight
04-03-2002, 04:23 AM
Now that i have hardware that can do texture shaders im going to give them a try. What i want to do is do the diffuse and sepcular calcs w/ bumps by using the texture shader plus still have the other things i have in my lighitng engine like attenuation, selfshadow etc. Now im writing this b/c i think i have the right idea but im still unsure about the texture shaders.
Here is what i think has to be done, if i am wrong in any part please tell me, i wanna make sure i understand this correctly.
*Enable texture shaders and set them up like this:
nvparse(
"!!TS1.0\n"
"texture_2d(); \n"
"dot_product_reflect_cube_map_eye_from_qs_1of3(tex0 ); \n"
"dot_product_reflect_cube_map_eye_from_qs_2of3(tex0 ); \n"
"dot_product_reflect_cube_map_eye_from_qs_3of3(tex0 ); \n" );
Where i bind tex0 w/ my normal map and i guess bind tex3 with a normal cube map or something.
*Then take this result which i think is in tex3 and multiply that with the attenuation/selfshadow/etc calcs in the combiners.
I think thats kinda close one how to do what i want. The thing im not sure about is the specular. I think the last texture shader instruction there computes the reflection vector which is used for specular but then how do i do the exponent part? I like the idea i can do good looing per pixel specular with a high exponent in the texture shaders but im kinda confused on parts. I looked at some demos but im not sure what they are doing at parts.
Also what does the qs part in the above texshade instructions stand for? I didnt see where they mentioned that in any presentation.
Thanks for your help.
-SirKnight
Here is what i think has to be done, if i am wrong in any part please tell me, i wanna make sure i understand this correctly.
*Enable texture shaders and set them up like this:
nvparse(
"!!TS1.0\n"
"texture_2d(); \n"
"dot_product_reflect_cube_map_eye_from_qs_1of3(tex0 ); \n"
"dot_product_reflect_cube_map_eye_from_qs_2of3(tex0 ); \n"
"dot_product_reflect_cube_map_eye_from_qs_3of3(tex0 ); \n" );
Where i bind tex0 w/ my normal map and i guess bind tex3 with a normal cube map or something.
*Then take this result which i think is in tex3 and multiply that with the attenuation/selfshadow/etc calcs in the combiners.
I think thats kinda close one how to do what i want. The thing im not sure about is the specular. I think the last texture shader instruction there computes the reflection vector which is used for specular but then how do i do the exponent part? I like the idea i can do good looing per pixel specular with a high exponent in the texture shaders but im kinda confused on parts. I looked at some demos but im not sure what they are doing at parts.
Also what does the qs part in the above texshade instructions stand for? I didnt see where they mentioned that in any presentation.
Thanks for your help.
-SirKnight