Revision 175:f9f5640c2a3a Assets/Standard Assets/Water (Pro Only)/Water4/Sources/Shaders/FX-Water4.shader

b/Assets/Standard Assets/Water (Pro Only)/Water4/Sources/Shaders/FX-Water4.shader
1
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
2

  
1 3
#warning Upgrade NOTE: unity_Scale shader variable was removed; replaced 'unity_Scale.w' with '1.0'
2 4

  
3 5
Shader "FX/Water4" { 
......
129 131
	{
130 132
		v2f o;
131 133
		
132
		half3 worldSpaceVertex = mul(_Object2World,(v.vertex)).xyz;
134
		half3 worldSpaceVertex = mul(unity_ObjectToWorld,(v.vertex)).xyz;
133 135
		half3 vtxForAni = (worldSpaceVertex).xzz * 1.0; 		
134 136

  
135 137
		half3 nrml;
......
147 149
		v.vertex.xyz += offsets;		
148 150
							
149 151
		// one can also use worldSpaceVertex.xz here (speed!), albeit it'll end up a little skewed	
150
		half2 tileableUv = mul(_Object2World,(v.vertex)).xz;
152
		half2 tileableUv = mul(unity_ObjectToWorld,(v.vertex)).xz;
151 153
				
152 154
		o.bumpCoords.xyzw = (tileableUv.xyxy + _Time.xxxx * _BumpDirection.xyzw) * _BumpTiling.xyzw;	
153 155

  
......
232 234
	{
233 235
		v2f_noGrab o;
234 236
		
235
		half3 worldSpaceVertex = mul(_Object2World,(v.vertex)).xyz;
237
		half3 worldSpaceVertex = mul(unity_ObjectToWorld,(v.vertex)).xyz;
236 238
		half3 vtxForAni = (worldSpaceVertex).xzz * 1.0; 			
237 239

  
238 240
		half3 nrml;
......
250 252
		v.vertex.xyz += offsets;		
251 253
							
252 254
		// one can also use worldSpaceVertex.xz here (speed!), albeit it'll end up a little skewed	
253
		half2 tileableUv = mul(_Object2World,v.vertex).xz;					
255
		half2 tileableUv = mul(unity_ObjectToWorld,v.vertex).xz;					
254 256
		o.bumpCoords.xyzw = (tileableUv.xyxy + _Time.xxxx * _BumpDirection.xyzw) * _BumpTiling.xyzw;	
255 257

  
256 258
		o.viewInterpolator.xyz = worldSpaceVertex - _WorldSpaceCameraPos;
......
316 318
	{ 
317 319
		v2f_simple o;
318 320
		
319
		half3 worldSpaceVertex = mul(_Object2World, v.vertex).xyz;
321
		half3 worldSpaceVertex = mul(unity_ObjectToWorld, v.vertex).xyz;
320 322
		half2 tileableUv = worldSpaceVertex.xz;
321 323

  
322 324
		o.bumpCoords.xyzw = (tileableUv.xyxy + _Time.xxxx * _BumpDirection.xyzw) * _BumpTiling.xyzw;	

Also available in: Unified diff