PDA

View Full Version : Anyone ever try writing vertex shaders for water?



Computron
March 30th, 2011, 06:51 PM
Halo 3 had some amazing water that would actaully wave up and down. That was done by vertex shaders, and halo 2 supports writing custom vertex shaders so shouldn't it be possible to replicate the effect? Anyone look in to this?

Garanas
April 2nd, 2011, 04:15 PM
Halo 3 had some amazing water that would actaully wave up and down. That was done by vertex shaders, and halo 2 supports writing custom vertex shaders so shouldn't it be possible to replicate the effect? Anyone look in to this?

Looking at the amount of replies, I guess none did.
Maybe we 2 can try and ruin some vertex shaders to see if it is possible?

Computron
April 3rd, 2011, 05:13 PM
that would be awesome. I think there is a vertex shader assigned to the flags for ctf so that they wave in the wind, maybe with some slight mods we can make some good looking water? I think only ".crate" or other sapien objects would be able to take advantage of it though.

Resinball
April 3rd, 2011, 07:07 PM
I tried making some new flags recently. I wanted to place them as .crates above a castle/base-like structure like you would see in OG Mario.

So I placed em in Sapien. After compiling the map would not appear at the Custom Map Menu.



I have not tried to make any new vertex shaders as of yet.

Computron
April 3rd, 2011, 07:28 PM
I was looking for existing vertex shaders and spawnable examples of them and came across the flag. I think the flag.model file refers to flag.vertex_shader located in the tags/rasterizer folder. After looking over the code I decided learning to code in dx9 would probably be way to much effort so I wont mod it. Water will probably end up waving funny. lol

If we manage to spawn a modified flag sideways, with the wind flag ticked in the off postion, and use a water .shader for the texure and stretch it it should work although you might need to fiddle with the flags LOD distances to get the performance right otherwise you will be rendering hundreds of flags all with high polycounts and vertex shaders when you should only have to have waves for the water thats very close to you. then you would also have to make the pole and the skull disappear somehow.

Limited
April 4th, 2011, 02:35 PM
:O H2V you can code custom vertex shaders?!?

Computron
April 4th, 2011, 09:02 PM
if you know how to code for dx9, be my guest.

Dwood
April 4th, 2011, 09:34 PM
Where?

Computron
April 5th, 2011, 12:32 AM
look in the tags/rasterizer folder.

Computron
June 5th, 2011, 01:14 PM
any progress?

Garanas
June 11th, 2011, 02:49 PM
any progress?

well, I guess not.
It could had been great, too bad that I have no coding knowledge :(