Water + HDR test

Community Forums/Showcase/Water + HDR test

JoshK(Posted 2007) [#1]
Please try this out. Don't freak out if it doesn't work, we have only tested it on two NVidia cards:
http://www.leadwerks.com/post/watertest.zip

The appearance can be tweaked, a lot, so if something is not quite right it can probably be altered.

The reflection will cull meshes culled in the normal view, and the reflected sky will be slight off-position. These are things I just need to fix, but I wanted to make sure the basic rendering works.

If it's slow, it's because of the bloom effect. If you can't run Half-Life : Lost Coast very well, you will not be able to run this fast either. The bloom effect is very soft in this, but it can be turned up a lot. I didn't take the time to put any surfaces in that would really show it off, but light-colored surfaces will get a nice glow in the sunlight.

This is not final! There is still a lot that can be tweaked.




_33(Posted 2007) [#2]
So what are we talking about here? Reflection + Refraction + water fog + displacement maping?

By the way, it bugged so bad on my ATI that I had to reboot as I couldn't even go in task manager, the mouse was stuck in the center of the screen!

I'm not impressed.


JoshK(Posted 2007) [#3]
Please define "bugged". I haven't tried this on any ATI cards yet and I am interested in knowing how it works.

The mouse is in the center of the screen because it is used to control the camera. Press escape to end the program.


_33(Posted 2007) [#4]
The mouse was stuck on the center of the screen, the screen was black, and I couldn't even move the mouse in task manager to close the task, even with key selection! I had to reboot.

ATI R480 GPU DDR3, Opteron 165, 2GB ram, Windows XP SP2, Catalyst dates from may 2007.


JoshK(Posted 2007) [#5]
Can you post the shader log?


_33(Posted 2007) [#6]


Good luck!

Oh and, I don't know what you set the application in windowed mode, it's not something I prefer as sometimes the system goes to software 3D rendering, depending on what it likes or don't. In fullscreen mode, I never have extreme slowness. Don't ask me what sort of issue that is... But I prefer to run fullscreen.


JoshK(Posted 2007) [#7]
Thank you, those errors in the log aren't hard to fix.


JoshK(Posted 2007) [#8]
I found the errors your card gives. My card doesn't have any errors, but they are minor GLSL mistakes that not all cards overlook. If you want to fix it yourself without re-downloading anything, here's how:


Open the file "Shaders\water.vert".

Edit line 12 to read as follows:
Eye = - (gl_ModelViewMatrix * gl_Vertex).xyz;

Open the file "Shaders\post.frag".

Edit line 7 to read as follows:
vec2 c2 = coord + texture2DRect(wobble,gl_FragCoord.xy).xy * 20.0 - 10.0;

Open the file "Shaders\waterwobble.frag".
Comment out line 13 so it looks like this:
//time/=4.0;

And change line 17 to this:
gl_FragColor.zw = vec2(1.0,1.0);


SSS(Posted 2007) [#9]
Hmm, it doesn't work for me. It just shows a blank window. My specs are,
Pentium 4 3.2GHz 1 GB RAM GeForce 7800 GTX

All of the shaders compiled correctly according to the log.


JoeRetro(Posted 2007) [#10]
I had the same problem as _33. Black screen, mouse centered, ESC does nothing. It appeared the application locked up. I had to hit CTRL-ALT-DEL then use keyboard to highlight engine.exe to terminate.

SPECS: XP Pro (SP2), Nvidia GT6600 OC

Shader Log
=================
OpenGL Version: 2.0.1
GLSL Version: 1.10 NVIDIA via Cg 1.3 compiler

Compiling fragment shader object "shaders\water.frag"...
Compiling vertex shader object "shaders\water.vert"...
Failed to compile vertex shader object.
(12) : error C1020: invalid operands to "neg"


Compiling fragment shader object "shaders\waterwobble.frag"...
Compiling vertex shader object "shaders\water.vert"...
Failed to compile vertex shader object.
(12) : error C1020: invalid operands to "neg"


Compiling fragment shader object "shaders\post.frag"...
Failed to compile fragment shader object.
(2) : warning C7508: extension GL_ARB_texture_rectangle not supported
(2) : warning C7506: OpenGL does not define the global type sampler2DRect
(7) : warning C7506: OpenGL does not define the global function texture2DRect
(7) : error C1020: invalid operands to "add"
(7) : error C1020: invalid operands to "add"
(7) : error C1020: invalid operands to "add"
(7) : error C1020: invalid operands to "add"
(13) : error C1102: incompatible type for parameter #1 ("s")
(13) : error C1102: incompatible type for parameter #1 ("s")


Compiling fragment shader object "shaders\bloomx.frag"...
Compiling vertex shader object "shaders\post.vert"...
Linking shader program...
Fragment info
-------------
(2) : warning C7508: extension GL_ARB_texture_rectangle not supported
(2) : warning C7506: OpenGL does not define the global type sampler2DRect
(8) : warning C7506: OpenGL does not define the global function texture2DRect

Shader compiled successfully.

Compiling fragment shader object "shaders\bloomy.frag"...
Compiling vertex shader object "shaders\post.vert"...
Linking shader program...
Fragment info
-------------
(2) : warning C7508: extension GL_ARB_texture_rectangle not supported
(2) : warning C7506: OpenGL does not define the global type sampler2DRect
(7) : warning C7506: OpenGL does not define the global function texture2DRect

Shader compiled successfully.

Compiling fragment shader object "shaders\cubemap.frag"...
Compiling vertex shader object "shaders\cubemap.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse.frag"...
Compiling vertex shader object "shaders\diffuse.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+lightmap.frag"...
Compiling vertex shader object "shaders\diffuse+lightmap.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+lightmap+bump.frag"...
Compiling vertex shader object "shaders\diffuse+lightmap+bump.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+colorarray.frag"...
Compiling vertex shader object "shaders\diffuse+colorarray.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+colorarray+bump.frag"...
Compiling vertex shader object "shaders\diffuse+colorarray+bump.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+dynamiclight.frag"...
Compiling vertex shader object "shaders\diffuse+dynamiclight_0.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+dynamiclight.frag"...
Compiling vertex shader object "shaders\diffuse+dynamiclight_1.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+dynamiclight.frag"...
Compiling vertex shader object "shaders\diffuse+dynamiclight_2.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+dynamiclight.frag"...
Compiling vertex shader object "shaders\diffuse+dynamiclight_3.vert"...
Linking shader program...
Shader compiled successfully.

Compiling fragment shader object "shaders\diffuse+dynamiclight.frag"...
Compiling vertex shader object "shaders\diffuse+dynamiclight_4.


_33(Posted 2007) [#11]
Leadwerks:


Good luck! I now have no crash, but a blank screen with varying single color across all image. (!)


JoshK(Posted 2007) [#12]
I know the NVidia cards will likely work fine if you just update your drivers. I recommend the same for the ATI card, though I have not gotten enough info on it yet. You've got GLSL 1.1 running, which is pretty old.

If OpenGL version<2.1.0 or GLSL version<1.2 you probably need to update your drivers.

Thanks for taking the trouble to edit those shaders.


_33(Posted 2007) [#13]
But Leadwerks, my drivers pose no problems to any games, plus they date May 2007!!! What is the GLSL that should be used? Is GLSL part of the ATI drivers?


JoshK(Posted 2007) [#14]
Drivers have been posted August 13:
http://ati.amd.com/support/drivers/xp/radeonx-xp.html


_33(Posted 2007) [#15]
I know I have a copy. But you're asking me to update those tonight! I'll have to wait till tomorrow, I'm currently in my special project.


Matthew Smith(Posted 2007) [#16]
Runs quite well on my GeForce GO 7300 on my laptop


MCP(Posted 2007) [#17]
Runs without problems and is very fast on my GForce 6800 PCI Express 16. Nice work :)


Paul "Taiphoz"(Posted 2007) [#18]
can I offer some advice ?

In real life, when your close to water you can see into it fine but as your agnle of view changes and you look further into the water further away the water becomes more blacked out.

You should try and do that as well, if your futher away from the water then it should be much darker.

other than that, it looks awesome.


Naughty Alien(Posted 2007) [#19]
..one big nothing here...except in my case ESC worked well..other than that just blank black screen..

nVidia 7600GT 256MB VRAM, P4 2.4 GHz 1 Gig RAM, WinXP Pro sp2


JoshK(Posted 2007) [#20]
That is because you have not updated your drivers recently. I have seen the same thing ten times on the GE Force series. Someone says it doesn't work, they update their drivers, it works fine.


Fuller(Posted 2007) [#21]
I get an empty window that closes right away on my lappie.
Windows Vista HP. Intel Graphics Media


_33(Posted 2007) [#22]
Leadwerks, I suggest, if I may, to make water fog, that is, in the water clip, under that, you create a fog with yoru water color.


Chroma(Posted 2007) [#23]
No worky on my X800Pro ATI card. :(


JoshK(Posted 2007) [#24]
This fixes a few syntax errors that were causing ATI cards to fail to compile some shaders:
http://www.leadwerks.com/post/watertest2.zip

Please update your drivers! ATI posted new drivers recently.

The wave speed is increased, but it can be easily adjusted.


_33(Posted 2007) [#25]
Leadwerks, there are no driver issues, it plainly doesn't render on the ATI SM 2.0 cards.



I'm testing on latest official ATI drivers, which add absolutely nothing to the X800 series since around feb 2007... Why even ask this?


Matthew Smith(Posted 2007) [#26]
Josh,

Doesn't work here either - screen is brown color and the color variance changes as you move the mouse, but nothing to see at all. Latest drivers installed.

Here is my log:




JoshK(Posted 2007) [#27]
ATI posted new drivers as of August 13, 2007:
http://ati.amd.com/support/drivers/xp/radeonx-xp.html


Chad(Posted 2007) [#28]
Runs great on my system (I installed drivers before I tried, thanks for update!)

p4 3.2ghz, 1gb ram, radeon x1600, xp


Genexi2(Posted 2007) [#29]
Smooth as butter, and appears to run flawlessly here.

AMD64 3700+
GF6800 GT 256mb
2gb DDR RAM

Using the latest beta driver, v163.44.

Shader log:



ckob(Posted 2007) [#30]
locked up and didn't run with latest nvidia drivers.

amd64 3200
1Gb DDR Ram
Geforce fx 5600


_33(Posted 2007) [#31]
ckob, the latest official nvidia drivers that work for your card are the 94.24. Your card is a shader model 2, just like all the others that don't work with this test. So this confirms my doubts.


Matthew Smith(Posted 2007) [#32]
Josh

ATI posted new drivers as of August 13, 2007:


Yep - there the ones I'm using. sorry...


Yo! Wazzup?(Posted 2007) [#33]
locks down the mouse, esc quits the program, all I get is a windowed black screen :)

again, here is another log to look through...


Nvida GeForce 6200
1GB Ram (sorry thats all I know about my comp lol)


Gabriel(Posted 2007) [#34]
ckob, the latest official nvidia drivers that work for your card are the 94.24.

Well the Nvidia site disagrees with you. The Nvidia Driver page says the 162.18 are the latest drivers for that card.


Steve Elliott(Posted 2007) [#35]
Doesn't work here - just a black screen.

btw I updated my drivers recently and things ran slower - so changed them back!


degac(Posted 2007) [#36]
Works with driver 162.18
Athlon64 3500+ 1gb ram, GeForce 6600GT
(with previous drivers it shows a black screen).
Tested both test1 and test2.


FBEpyon(Posted 2007) [#37]
It doesn't run with my system I load it and all I is a bunch of flashing colors..


_33(Posted 2007) [#38]
Gabriel, there's a mistake on the french website for Nvidia. The chooser is not up to date.

http://www.nvidia.fr/page/drivers.html


Yoshi(Posted 2007) [#39]
That's pretty impressive,runs awesome on my system.


My specs -
Intel Pentium dual-core 3.2 ghz
4gb DDR2 ram
Nvidia Geforce 8600GTS


Pinete(Posted 2007) [#40]
Doesn't work on my system...
just a black screen...
The log appears to be ok.

Pentium 4 2.6ghz
Nvidia Gforce 6600GT
XP sp2

regards!