https://3.bp.blogspot.com/-J26dh7dy5L0/WMLnsFgkguI/AAAAAAAAA28/-i_F8bXZy5ojbRKQX2BBemo3C4kRfl74gCLcB/s1600/EspumaOceano.jpg">
Ocean.shader
Cambiar
//S***LINES
#ifdef S***_ON
//UNITY5.5
#if defined(UNITY_REVERSED_Z)
float zdepth = 1.0f - LinearE***epth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
#else
float zdepth = LinearE***epth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
#endif
float intensityFactor = 1- saturate((zdepth- i.ref.z) / _S***Distance);
half3 foamGradient = _S***Strength - tex2D(_FoamGradient, float2(intensityFactor - i.bumpTexCoord.w, 0) + tangentNormal.xy);
foam += foamGradient * intensityFactor * _foam;
#endif
Por
//Esto funciona en la version 5.3.6 con i.ref.z con i.ref.w version 5.5.2
#ifdef S***_ON
float zdepth = LinearE***epth(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
float intensityFactor = 1 - saturate((zdepth - i.ref.w) / _S***Distance);
half3 foamGradient = _S***Strength - tex2D(_FoamGradient, float2(intensityFactor - i.bumpTexCoord.w, 0) + tangentNormal.xy);
foam += foamGradient * intensityFactor * _foam;
#endif
OceanL1.shader
Cambiar
//S***LINES
#ifdef S***_ON
//UNITY5.5
#if defined(UNITY_REVERSED_Z)
float zdepth = 1.0f - LinearE***epth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
#else
float zdepth = LinearE***epth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
#endif
float intensityFactor = 1 - saturate((zdepth - i.ref.z) / _S***Distance);
foam += _S***Strength * intensityFactor * _foam ;
#endif
Por
//S***LINES
#ifdef S***_ON
//UNITY5.5.2
float zdepth = LinearE***epth (tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.ref)).r);
float intensityFactor = 1 - saturate((zdepth - i.ref.w) / _S***Distance);
foam += _S***Strength * intensityFactor * _foam ;
#endif
Aunque ya he visto que esta dirección ya esta en el foro, la vuelvo a poner. El Ocean_Community_Next_Gen original se descarga aquí https://github.com/eliasts/Ocean_Community_Next_Gen