Permalink
Browse files

Pixel snapping fix for odd resolutions

Fixed an issue with the half pixel offset calculations on odd sized
resolutions.
  • Loading branch information...
ericraue committed May 7, 2013
1 parent f58987e commit 991aca50d4fdc319a2d82f9d0df92b3b767655df
Showing with 2 additions and 2 deletions.
  1. +2 −2 assets/RagePixel/code/RagePixelBasic.shader
@@ -53,8 +53,8 @@ Shader "RagePixel/Basic" {
OUT.texcoord = TRANSFORM_TEX(IN.texcoord, _MainTex);
// Snapping params
float hpcX = _ScreenParams.x * 0.5;
float hpcY = _ScreenParams.y * 0.5;
float hpcX = floor(_ScreenParams.x * 0.5);
float hpcY = floor(_ScreenParams.y * 0.5);
#ifdef UNITY_HALF_TEXEL_OFFSET
float hpcOX = -0.5;
float hpcOY = 0.5;

0 comments on commit 991aca5

Please sign in to comment.