Originally posted by Jan2000: const unsigned char ARBVP[] =
“!!ARBvp1.0
…
END”;
Nothing to do with vertex program, but multiline string litterals are evil (as "won’t be supported forever since they’re deprecated).
Correct code style:
Well, the
didn´t make it work. But i didn´t expect that.
I have a Gf 4200, so i do have 4 TUs. And i do use all of them. I want this program to calculate some texcoords, i would have to upload every frame else. So i first tried to make a program, which does effectively do nothing, except passing all parameters through, so that the old method works and i can slowly proceed forward.
I tracked the bug, but i don´t understand it. Here is, what i do:
TU 0: normalization cubemap
TU 1: bump-map
TU 2: 3D lightmap
TU 3: texture
If i set the tex-env-combine parameters up to not use the 3D lightmap, everything works fine! Even with the VP. That means i can see the base-texture, the bumpmapping works and also the normalization is as expected.
If i disable the VP it works even with the 3D lightmap.
For TU 2 i do use the texture-matrix to create texture-coords. At the moment i don´t know, if the VP bypasses this (but i am quite sure it does). Therefore i commented the texture-matrix stuff out and set my 3D texture to all white. That means, no matter how the texcoords could be, the texel color will always be white, therefore the 3D lightmap cannot influence the image anymore. But still everything gets black! However everything else works. I do have some stuff, which is not rendered with the VP and if i stand in front of it, i can see the black siluettes (?) of the other polys.
Is there a restriction, that 3D textures (or there texcoords) cannot be used in VPs??? I will search the spec for something like that, but i don´t think, this should be the case.
Really strange.
>>That means, no matter how the texcoords could be, the texel color will always be white, therefore the 3D lightmap cannot influence the image anymore.<<
Depends on the filtering. Don’t forget to set the border color to white, too.