Author Topic: Tasharen Water  (Read 123315 times)

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Tasharen Water Android device problem
« Reply #135 on: July 02, 2014, 01:23:05 AM »
Hello
This is my import setting.
Texture already true color.

When camera position is changed, more deteriorated.

Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: errors when using water
« Reply #136 on: July 02, 2014, 06:20:15 AM »
I am using the water and the Multi-Purpose Game Starter Kit,

i have 2 RandomGenerator.cs scripts, one inside Terrain kit/scripts/ and one inside water example/scripts/
causes this error: Assets/Tasharen/Water Example/Scripts/RandomGenerator.cs(4,14): error CS0101: The namespace `global::' already contains a definition for `RandomGenerator'
Delete one of the RandomGenerator scripts. Keep only one copy.
Also the TasharenWater shader is throwing an error, which is probably causing the pink water. i get : shader has errors or is not supported by vid card. Im using a firepro w5000 so im sure thats not it.

the errors it lists below are:

tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type
What's the full error message?
Edit Update:

After deleating the tasharen water demo, to get rid of the extra randomgenerator.cs script, i now get 5 now errors:
Don't delete the whole demo. Just the script I mentioned above.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water Android device problem
« Reply #137 on: July 02, 2014, 06:21:26 AM »
Hello
This is my import setting.
Texture already true color.

When camera position is changed, more deteriorated.

Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)
Use the "Override for Android" checkbox to force it to be Truecolor.

If that doesn't work, open up the Tasharen Water shader and replace all instances of "half" with "float" (just global replace should work fine).

frostamation

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Tasharen Water
« Reply #138 on: July 02, 2014, 11:23:56 AM »
tex2Dproj : no matching 2 parameter intrinsic function; possible intrinsic functions are : tex2Dproj(sampler2d, float4 / half4 / min10float4 / min16float4

implicit truncation of vector type

Is the full error message: see picture. There is no errors in the console, only on the shader when i click it in the inspector.

Im on a win 8 pro PC with unity pro ver:4.5.1f3

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #139 on: July 03, 2014, 04:42:54 AM »
Hello

I changed texture import setting and Tasharen Water shader(replace all instances of "half" with "float").

but still Broken , When camera position is changed.
Camera Pos : (0,0,0) -> Camera Pos : (1001,0,499)

I tested Google Nexus7 and Samsung Galaxy S2.

« Last Edit: July 03, 2014, 04:50:02 AM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #140 on: July 03, 2014, 05:20:34 AM »
@frostamation: Oh, D3D11. That would explain it. Turn off DX11 mode.

@MainMe: Is that only the case on the mobile devices? Does it reproduce on the PC? Have you tried not using such large numbers? Generally floating point precision degrades pretty quickly. In Windward my levels are no more than 512x512 for example, and the water plane is 80x80, following the camera around so that it's not noticeable.

frostamation

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Tasharen Water
« Reply #141 on: July 03, 2014, 11:04:38 AM »
@ArenMook : Direct3d 11 check box is unchecked, and was unchecked, still have pink water.

I also checked direct3d 11, restarted unity, unchecked, restarted unity : same results, pink water.

unless there is another d3d11 check box somewhere? the one i found is in the player settings

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #142 on: July 04, 2014, 03:14:21 PM »
The error that's shown there is for DX11, but if it's not used then it shouldn't be an issue. You can tell if it's using DX11 or not by looking at the program name itself (the Unity's title bar). If it's in DX11 mode it will end with <DX11>.

Do other shaders work? And I mean shaders -- actual shader code, not fallback logic. Try going to http://www.tasharen.com/windward -- do you see the water?

frostamation

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Tasharen Water
« Reply #143 on: July 04, 2014, 05:26:03 PM »
Ok so fixed it now. What it was apparently was either the ShaderQuality.cs or TWTools.cs script was not present, therefor water was pink

However in my defense i deleted the "Water Example" folder, which those two scripts where in there. If in fact you need those 2 scripts, or one of them, it might be best to move those to the "Water" folder instead, so people dont delete them as i did.

Thanks for you help and hopefully this will help someone else out.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #144 on: July 06, 2014, 04:34:15 PM »
Hello

This is only reproduce andriod device. (ios and pc can't reproduced)
I tried change water scale (3000x3000 -> 80x80), still broken

Steps to Reproduce
1. make tasharen water
2. make camera
3. make directional light
4. change water postion (1000,-1.2,500)
5. change camera position(1000,6,500)
6. test android device (I tested Google Nexus7 and Samsung Galaxy S2.)

« Last Edit: July 06, 2014, 04:41:38 PM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #145 on: July 07, 2014, 04:25:12 AM »
If the water looks correct everywhere except your Android devices, and it happens on multiple Android devices, then this leaves only one reason: texture is not getting imported as Truecolor.

Unity is odd like that... unless you explicitly override texture import settings for a target platform (in your case -- Android) and choose to use Truecolor, it may not do it. So as long as you force override the import settings of the Water texture on an Android device to Truecolor, and the Quality is not set to Fastest, everything should work as expected.

On my end everything looks correct when I follow your steps. Tried it on my Samsung Galaxy S3.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #146 on: July 07, 2014, 06:32:57 PM »
Hello

I check texture option. and change true color.
but still broken, when I change water position.
can you tell me your email address?
I want to send my proejct file.
« Last Edit: July 08, 2014, 07:23:54 AM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #147 on: July 08, 2014, 01:38:20 PM »
Certainly -- support at tasharen.com. Please send a dropbox download link though, as my provider will reject large attachments.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #148 on: July 08, 2014, 10:58:06 PM »
Hello
I sent email(file size is 4.7MB)
check please.
Thank you

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #149 on: July 09, 2014, 01:12:13 PM »
Attached pic was taken on my Samsung Galaxy S3.

The only odd thing I noticed about your project is that it was targeting Android, and yet it was in DX11 mode. Not sure how you did that, but I had to switch to Stand-alone and remove DX11 mode, then switch back to Android.

P.S. Targeting Android 4.2.
« Last Edit: July 09, 2014, 01:19:13 PM by ArenMook »