Skip to content

Commit

Permalink
Fixed Distortion Map tiling and offset not working
Browse files Browse the repository at this point in the history
  • Loading branch information
AkaiMage authored Apr 1, 2019
1 parent d9d10e3 commit ee3256f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cancerspace.shader
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
float4 color = tex2D(_MainTex, TRANSFORM_TEX(screenSpaceOverlayUV, _MainTex)) * _OverlayColor;

float2 displace = float2(_XShake, _YShake) * sin(_Time.yy * float2(_XShakeSpeed, _YShakeSpeed)) * _ShakeAmplitude;
displace += UnpackNormal(tex2D(_BumpMap, TRANSFORM_TEX(screenSpaceOverlayUV + _Time.yy * float2(_BumpMapScrollSpeedX, _BumpMapScrollSpeedY), _BumpMap))).xy * _DistortionAmplitude;
displace += UnpackNormal(tex2D(_BumpMap, TRANSFORM_TEX((screenSpaceOverlayUV + _Time.yy * float2(_BumpMapScrollSpeedX, _BumpMapScrollSpeedY)), _BumpMap))).xy * _DistortionAmplitude;
displace.x *= VRFix;

float2 grabUV = i.projPos.xy / i.projPos.w;
Expand Down

0 comments on commit ee3256f

Please sign in to comment.