Author Topic: Tasharen Water  (Read 125251 times)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #150 on: July 09, 2014, 01:20:33 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.
I actually ran into this myself, and it is some issue in Unity. I re-imported the shader and the problem went away.

jviloria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tasharen Water
« Reply #151 on: July 16, 2014, 04:25:09 PM »
Greetings, i just upgraded Unity to version 4.5.2f1 (Pro) and now the water is pink. I tried reimporting from the asset store, but i still get the problem.

Is there another way to fix the problem? Is the current version of Unity having issues with the asset?

jviloria

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tasharen Water
« Reply #152 on: July 16, 2014, 06:41:19 PM »
I was receiving this error:
Shader error in 'Tasharen/Water': 'tex2Dproj': no matching 2 parameter intrinsic function; Possible intrinsic functions are: tex2Dproj(sampler2D, float4|half4|min10float4|min16float4) at line 131

So i fixed the problem by editing the shader in the line 130:

Before:
half3 projTC = UNITY_PROJ_COORD(IN.proj0);

After:
half4 projTC = UNITY_PROJ_COORD(IN.proj0);

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #153 on: July 17, 2014, 03:17:52 AM »
Hmm... that must be new. You can also resolve it using this then:
  1. float3 projTC = UNITY_PROJ_COORD(IN.proj0).xyz;

HashbangGames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Tasharen Water
« Reply #154 on: July 18, 2014, 04:23:04 PM »
I have this same exact problem,  I have Unity Pro  4.5  and the Tasharen Water material is pink.   
No errors are thrown in the editor

Update:  The shader fix posted right above my post fixed the problem for me as well.
« Last Edit: July 18, 2014, 06:21:34 PM by HashbangGames »

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #155 on: July 21, 2014, 10:11:21 PM »
Hello!

Fortunately, I was able to borrow some smart phones.
So I had an opportunity to test.

However, some device's water was still broken.
This are not texture import setting or build option problem.

All build options are same (Minimum API Level, texutre import setting etc...)

Camera Position (1000,1,500)
Water Position(1000,-2,500)


1.
Model : SHV-E110S
Phone Name : Samsung Galaxy S2 LTE
CPU : Qualcomm Snapdragon S3 APQ8060
Result : Normal

2.
Model : SHV-E160S
Phone Name : Samsung Galaxy  Note LTE
CPU : Qualcomm Snapdragon S3 APQ8060
Result : Normal

3.
Model : SHV-E120S
Phone Name : Samsung Galaxy S2 HD LTE
CPU : Qualcomm Snapdragon S3 MSM8660
Result : Normal

4.
Model : SHV-E170S
Phone Name : Samsung Galaxy R Style
CPU : Qualcomm Snapdragon S4 MSM8960
Result : Normal

5.
Model : SHV-E300S
Phone Name : Samsung Galaxy S4
CPU : Samsung Exynos 5 Octa 5410
Result : Normal

===================================================

6.
Model : SHW-M250L
Phone Name : Samsung Galaxy S2
CPU : Samsung S5PC210 Exynos 4 Dual 4210
Result : abnormal



7.
Model : SHV-E210S
Phone Name : Samsung Galaxy S3 LTE
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal



8.
Model : SHV-E250S_32GB
Phone Name : Samsung Galaxy Note2
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal


9.
Model : SHV-E330S
Phone Name : Samsung Galaxy S4 LTE-A
CPU : Qualcomm Snapdragon 800 MSM8974AA v2
Result : abnormal



10.
Model : SM-N900S
Phone Name : Samsung Galaxy Note3
CPU : Qualcomm Snapdragon 800
Result : abnormal



11.
Model : SHW-M440S
Phone Name : Samsung Galaxy S3
CPU : Samsung Exynos 4 Quad 4412
Result : abnormal



12.
Model : SM-C105S
Phone Name : Samsung Galaxy S4 Zoom
CPU : Samsung Exynos 4 Dual 4212
Result : abnormal



13.
Model : LG-F350S
Phone Name : LG Optimus G Pro2
CPU : Qualcomm Snapdragon 800
Result : abnormal



14.
Model : LG-F340S
Phone Name : LG Optimus G Flex
CPU : Qualcomm Snapdragon 800
Result : abnormal



« Last Edit: July 26, 2014, 10:54:10 AM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #156 on: July 22, 2014, 06:21:19 PM »
What version of Unity are you running? Have you tried updating to the latest? I know I had issues with the FOW shaders until upgrading to 4.5.1, and the current latest is 4.5.2.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #157 on: July 23, 2014, 04:52:50 AM »
Hello

I tested 4.3.1, 4.5.1
but there was not difference.

this problem was influenced by position of camera.(Camera Position (0,1,0) -> Camera Position (1000,1,500))
« Last Edit: July 23, 2014, 05:23:13 AM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #158 on: July 23, 2014, 09:48:34 PM »
Does it look fine if it's at (0, 1, 0)? What is the scale of your water mesh? The way I normally use the water is I keep its "keep under camera" flag checked so that it's always positioned underneath the camera, allowing me to keep its size relatively small. In Windward I used a scale of (80, 80, 80) for example. Keeping values small is good for float precision.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #159 on: July 26, 2014, 10:55:08 AM »
Hello

All device did not tested.

Model : SHW-M250L
Phone Name : Samsung Galaxy S2
CPU : Samsung S5PC210 Exynos 4 Dual 4210

Camera Pos (0,1,0)
water Pos (0,-2,0)
water Scale (80,80,80)




Camera Pos (1000,1,500)
water Pos (1000,-2,500)
water Scale (80,80,80)






« Last Edit: July 26, 2014, 11:10:04 AM by MainMe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #160 on: July 27, 2014, 03:37:29 AM »
Ok, so it looks like the devices simply run into float precision issues. It's likely that they are limited to "half" precision in the shader or something similar. All I can suggest is don't use such large float numbers for position.

MainMe

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Android device problem
« Reply #161 on: July 27, 2014, 12:49:09 PM »
This water seems to unsuitable in android platform.

when camera xz position value is greater than 100,  water occurs problem (even if latest phone model).
« Last Edit: July 27, 2014, 12:55:20 PM by MainMe »

akagt17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tasharen Water
« Reply #162 on: September 10, 2014, 10:54:34 PM »
Hi Tasharen I am not a programmer so this is proving to be difficult but I am having pink on my sea and I have no idea how to resolve it. I am using Unity version  4.3.4f1 and bought the latest version of your shader in which u mentioned that it is still backwards compatible.
The errors I am getting are

Program 'frag_surf', incompatible types in initialization at line 130
Program 'frag_surf', invalid initialization at line 130
Program 'vert_surf', incompatible types in initialization at line 130
Program 'vert_surf', invalid initialization at line 130

Please help

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tasharen Water
« Reply #163 on: September 11, 2014, 01:02:33 AM »
Let me just send you the updated water version I have in Windward right now. I'm guessing you are going down the DX11 route? The one I'm using here locally should work there as expected. PM me your OR# and I'll send you the replacement shader.

akagt17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Tasharen Water
« Reply #164 on: September 11, 2014, 04:12:42 AM »
Hi Arenmook, I've sent a personal message to your inbox in UNITY with my info , please send it there thanks