Author Topic: Reflection with custom ocean material  (Read 1025 times)

Siskin

  • Guest
Reflection with custom ocean material
« on: January 25, 2012, 03:25:00 am »
Is there any way to preserve the water reflection of clouds and objects when using a material ?

The only way of doing this that i found is to edit "WaterReflectMat" in the "water.material" file, but that would modify the water an all the maps. To do this for a single map, i created a .material file and an include line in mapname.material to prevent cluter. The system is working well, for other material definitions, however when i copy/paste the definition of "WaterReflectMat", the reflection is lost. I noticed that "WaterReflectMat" uses  a vertex program "WaterVP" and the fragment WaterFP. Copying those in my own .material file has no aparent effect even after renaming them (and the calls to them in the copyed version of "WaterReflectMat"). The only reason i can think of for this not to work, is that content of this program and fragment are locally declared thus have null value when called from my program.

So... how do i fix this?

Sorry for the wall of text, but i thought it's better to fully explain the problem rather than simplify my issue so that you guys won't have to ask for more details or suggest something i already did  ;D


Regards,
Siskin