Skip to main content
gamedev.net
🔒 Locked

Dependent Texture reads

Started by Bobby-D 0 replies 650+ views
Original Post
Bobby-D
Bobby-D
I''m trying to code a specular highlight pass, using a CG shader. I''d like to make a texture lookup function of the specular exponent value based on the dot(HalfVector, SurfaceNormal). The lookup texture is a 1D texture. I''m having some errors about dependent texture reads, and since I''m not quite sure what the limitations with using them are, I can''t fix it. Could some one out there please enlighten me. Also, will PS 2.0 or GLSL still have these kind of limitations? One by one, the peguins steal my sanity.
One by one, the peguins steal my sanity.
Mezz
Mezz
There are definately limits on the dependent texture reads you can do on DirectX 8 class hardware, the types you were allowed to do were very specific for special cases. You should be able to look up into a 1D texture, I can''t remember the details though.

To answer your other question, there are far less limits oin ps 2.0 and GLSL, you can do any kind of arbitrary math and then use it to do a texture lookup. The only restrictions are the number you can do, and dependent read tree depth (which I think is something like 4 on ATi cards and unlimited on nVidia cards, but I could be wrong).

-Mezz

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.