diff --git a/SpheremapNormal.cpp b/SpheremapNormal.cpp index c0d8914..ddcc795 100644 --- a/SpheremapNormal.cpp +++ b/SpheremapNormal.cpp @@ -6,7 +6,7 @@ Normal to GBufffer: - G=normalize(N.xy)*sqrt(N.z*0.5+0.5) + G=normalize(N.xy)*sqrt(-N.z*0.5+0.5) GBuffer to Normal: @@ -19,7 +19,7 @@ namespace hgl void normal_compress(uint8 *x,uint8 *y,const uint8 *rgb,const uint count) { Vector3f in; - Vector2f in_xy; + float f; Vector2f out; for(uint i=0;i