Jump to content
  • Advertisement
Sign in to follow this  
Coluna

Perturbing UV (in water...) usnig NV20/R200 HW

This topic is 4966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi; I've impleneted a water demo with GLSL, and now i want to make it works nice (i have it working with only planar reflection in theese boards) in that hardware class...i know its possible in PS 1.3 (directx), so it should work with reg combiners and ati fragment shader...but im really bad with that extensions :-( ...could somebody help me?

Share this post


Link to post
Share on other sites
Advertisement
Vertex level perturbations work on anything that supports textures. Dependent per pixel perturbations can be implemented using the NV_texture_shader extension set.

Share this post


Link to post
Share on other sites
My vertex level perturbation is working, but its good only for well-tesselated water (is not my case...)...what i want is to do that with texture_shader, but im not familiar with that...does anybody have it done?

Share this post


Link to post
Share on other sites
Yeah, I did lots of stuff with texture shaders a couple of years ago. But let me tell you one thing: you want to avoid to mess with them whenever you can. They're clumsy, very confusing, and a general huge mess. I'm so glad we now have ARB_fragment_shader and/or GLSL.

I would suggest using Cg as a high level language, which is much cleaner. Cg will compile down to NV_texture_shader and NV_register_combiner, if you select the right profile. Porting your GLSL shaders to Cg will be trivial compared to the amount of work it'll take to mess with the extensions directly.

If you still want to do it lowlevel, have a look at this paper. It explains how to use texture shaders to do reflective bump mapping. That's basically what you want, although you'll have to adjust it, so that it indexes into a 2D projective texture instead of the cubemap. Also, the extension specifications will be a valuable reference.

Oh, and that's just for nvidia, obviously. For ATI, you'll have to start all over again, with ATI_fragment_shader. Have fun.

Seriously, my advice: use Cg for the NV20 and NV25 profiles, and require a GLSL or fragment shader capable card for anything else. That'll leave out only a couple of older Radeon chipsets, and you'll save yourself a lot of time and frustration...

Share this post


Link to post
Share on other sites
Thanks!! I forgot that CG also compiles for NV20 HW...my GLSL version is working very well (although i couldnt get the right refract equation. I tried to use the "refract" function in GLSL but it didnt work, so i leave it without correct refraction, only a perturbed underwater texture), and i think i'll leave the R200 path like it is, without perturbing the UV...see ya!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!