"\n"
"#ifdef USEOFFSETMAPPING\n"
"uniform mediump vec4 OffsetMapping_ScaleSteps;\n"
-"#ifdef USEOFFSETMAPPING_LOD\n"\r
-"uniform mediump float OffsetMapping_LodDistance;\n"\r
-"#endif\n"
-"vec2 OffsetMapping(vec2 TexCoord, vec2 dPdx, vec2 dPdy)\n"\r
-"{\n"\r
-" float i;\n"\r
-" // distance-based LOD\n"\r
-"#ifdef USEOFFSETMAPPING_LOD\n"\r
-" mediump float LODFactor = min(1.0, OffsetMapping_LodDistance / EyeVectorFogDepth.z);\n"\r
-" mediump vec4 ScaleSteps = vec4(OffsetMapping_ScaleSteps.x, OffsetMapping_ScaleSteps.y * LODFactor, OffsetMapping_ScaleSteps.z / LODFactor, OffsetMapping_ScaleSteps.w * LODFactor);\n"\r
-"#else\n"\r
-" #define ScaleSteps OffsetMapping_ScaleSteps\n"\r
-"#endif\n"\r
-"#ifdef USEOFFSETMAPPING_RELIEFMAPPING\n"\r
-" float f;\n"\r
-" // 14 sample relief mapping: linear search and then binary search\n"\r
-" // this basically steps forward a small amount repeatedly until it finds\n"\r
-" // itself inside solid, then jitters forward and back using decreasing\n"\r
-" // amounts to find the impact\n"\r
-" //vec3 OffsetVector = vec3(EyeVectorFogDepth.xy * ((1.0 / EyeVectorFogDepth.z) * ScaleSteps.x) * vec2(-1, 1), -1);\n"\r
-" //vec3 OffsetVector = vec3(normalize(EyeVectorFogDepth.xy) * ScaleSteps.x * vec2(-1, 1), -1);\n"\r
-" vec3 OffsetVector = vec3(normalize(EyeVectorFogDepth.xyz).xy * ScaleSteps.x * vec2(-1, 1), -1);\n"\r
-" vec3 RT = vec3(TexCoord, 1);\n"\r
-" OffsetVector *= ScaleSteps.z;\n"\r
-" for(i = 1.0; i < ScaleSteps.y; ++i)\n"\r
-" RT += OffsetVector * step(dp_textureGrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z);\n"\r
-" for(i = 0.0, f = 1.0; i < ScaleSteps.w; ++i, f *= 0.5)\n"\r
-" RT += OffsetVector * (step(dp_textureGrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z) * f - 0.5 * f);\n"\r
-" return RT.xy;\n"\r
-"#else\n"\r
-" // 2 sample offset mapping (only 2 samples because of ATI Radeon 9500-9800/X300 limits)\n"\r
-" //vec2 OffsetVector = vec2(EyeVectorFogDepth.xy * ((1.0 / EyeVectorFogDepth.z) * ScaleSteps.x) * vec2(-1, 1));\n"\r
-" //vec2 OffsetVector = vec2(normalize(EyeVectorFogDepth.xy) * ScaleSteps.x * vec2(-1, 1));\n"\r
-" vec2 OffsetVector = vec2(normalize(EyeVectorFogDepth.xyz).xy * ScaleSteps.x * vec2(-1, 1));\n"\r
-" OffsetVector *= ScaleSteps.z;\n"\r
-" for(i = 0.0; i < ScaleSteps.y; ++i)\n"\r
-" TexCoord += OffsetVector * (1.0 - dp_textureGrad(Texture_Normal, TexCoord, dPdx, dPdy).a);\n"\r
+"#ifdef USEOFFSETMAPPING_LOD\n"
+"uniform mediump float OffsetMapping_LodDistance;\n"
+"#endif\n"
+"vec2 OffsetMapping(vec2 TexCoord, vec2 dPdx, vec2 dPdy)\n"
+"{\n"
+" float i;\n"
+" // distance-based LOD\n"
+"#ifdef USEOFFSETMAPPING_LOD\n"
+" mediump float LODFactor = min(1.0, OffsetMapping_LodDistance / EyeVectorFogDepth.z);\n"
+" mediump vec4 ScaleSteps = vec4(OffsetMapping_ScaleSteps.x, OffsetMapping_ScaleSteps.y * LODFactor, OffsetMapping_ScaleSteps.z / LODFactor, OffsetMapping_ScaleSteps.w * LODFactor);\n"
+"#else\n"
+" #define ScaleSteps OffsetMapping_ScaleSteps\n"
+"#endif\n"
+"#ifdef USEOFFSETMAPPING_RELIEFMAPPING\n"
+" float f;\n"
+" // 14 sample relief mapping: linear search and then binary search\n"
+" // this basically steps forward a small amount repeatedly until it finds\n"
+" // itself inside solid, then jitters forward and back using decreasing\n"
+" // amounts to find the impact\n"
+" //vec3 OffsetVector = vec3(EyeVectorFogDepth.xy * ((1.0 / EyeVectorFogDepth.z) * ScaleSteps.x) * vec2(-1, 1), -1);\n"
+" //vec3 OffsetVector = vec3(normalize(EyeVectorFogDepth.xy) * ScaleSteps.x * vec2(-1, 1), -1);\n"
+" vec3 OffsetVector = vec3(normalize(EyeVectorFogDepth.xyz).xy * ScaleSteps.x * vec2(-1, 1), -1);\n"
+" vec3 RT = vec3(TexCoord, 1);\n"
+" OffsetVector *= ScaleSteps.z;\n"
+" for(i = 1.0; i < ScaleSteps.y; ++i)\n"
+" RT += OffsetVector * step(dp_textureGrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z);\n"
+" for(i = 0.0, f = 1.0; i < ScaleSteps.w; ++i, f *= 0.5)\n"
+" RT += OffsetVector * (step(dp_textureGrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z) * f - 0.5 * f);\n"
+" return RT.xy;\n"
+"#else\n"
+" // 2 sample offset mapping (only 2 samples because of ATI Radeon 9500-9800/X300 limits)\n"
+" //vec2 OffsetVector = vec2(EyeVectorFogDepth.xy * ((1.0 / EyeVectorFogDepth.z) * ScaleSteps.x) * vec2(-1, 1));\n"
+" //vec2 OffsetVector = vec2(normalize(EyeVectorFogDepth.xy) * ScaleSteps.x * vec2(-1, 1));\n"
+" vec2 OffsetVector = vec2(normalize(EyeVectorFogDepth.xyz).xy * ScaleSteps.x * vec2(-1, 1));\n"
+" OffsetVector *= ScaleSteps.z;\n"
+" for(i = 0.0; i < ScaleSteps.y; ++i)\n"
+" TexCoord += OffsetVector * (1.0 - dp_textureGrad(Texture_Normal, TexCoord, dPdx, dPdy).a);\n"
" return TexCoord;\n"
"#endif\n"
"}\n"
"float2 OffsetMapping(float2 TexCoord, float4 OffsetMapping_ScaleSteps, float OffsetMapping_LodDistance, float3 EyeVector, sampler Texture_Normal, float2 dPdx, float2 dPdy)\n"
"{\n"
" float i;\n"
-" // distance-based LOD\n"\r
-"#ifdef USEOFFSETMAPPING_LOD\n"\r
-" float LODFactor = min(1.0, OffsetMapping_LodDistance / EyeVectorFogDepth.z);\n"\r
-" mediump vec4 ScaleSteps = float4(OffsetMapping_ScaleSteps.x, OffsetMapping_ScaleSteps.y * LODFactor, OffsetMapping_ScaleSteps.z / LODFactor, OffsetMapping_ScaleSteps.w * LODFactor);\n"\r
-"#else\n"\r
-" #define ScaleSteps OffsetMapping_ScaleSteps\n"\r
-"#endif\n"
-"#ifdef USEOFFSETMAPPING_RELIEFMAPPING\n"\r
-" // 14 sample relief mapping: linear search and then binary search\n"\r
-" // this basically steps forward a small amount repeatedly until it finds\n"\r
-" // itself inside solid, then jitters forward and back using decreasing\n"\r
-" // amounts to find the impact\n"\r
-" //float3 OffsetVector = float3(EyeVector.xy * ((1.0 / EyeVector.z) * ScaleSteps.x) * float2(-1, 1), -1);\n"\r
-" //float3 OffsetVector = float3(normalize(EyeVector.xy) * ScaleSteps.x * float2(-1, 1), -1);\n"\r
-" float3 OffsetVector = float3(normalize(EyeVector).xy * ScaleSteps.x * float2(-1, 1), -1);\n"\r
-" float3 RT = float3(TexCoord, 1);\n"\r
-" OffsetVector *= ScaleSteps.z;\n"\r
-" for(i = 1.0; i < ScaleSteps.y; ++i)\n"\r
-" RT += OffsetVector * step(tex2Dgrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z);\n"\r
-" for(i = 0.0, f = 1.0; i < ScaleSteps.w; ++i, f *= 0.5)\n"\r
-" RT += OffsetVector * (step(tex2Dgrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z) * f - 0.5 * f);\n"\r
-" return RT.xy;\n"\r
-"#else\n"\r
-" // 2 sample offset mapping (only 2 samples because of ATI Radeon 9500-9800/X300 limits)\n"\r
-" //float2 OffsetVector = float2(EyeVector.xy * ((1.0 / EyeVector.z) * ScaleSteps.x) * float2(-1, 1));\n"\r
-" //float2 OffsetVector = float2(normalize(EyeVector.xy) * ScaleSteps.x * float2(-1, 1));\n"\r
-" float2 OffsetVector = float2(normalize(EyeVector).xy * ScaleSteps.x * float2(-1, 1));\n"\r
-" OffsetVector *= ScaleSteps.z;\n"\r
-" for(i = 0.0; i < ScaleSteps.y; ++i)\n"\r
-" TexCoord += OffsetVector * (1.0 - tex2Dgrad(Texture_Normal, TexCoord, dPdx, dPdy).a);\n"\r
-" return TexCoord;\n"\r
+" // distance-based LOD\n"
+"#ifdef USEOFFSETMAPPING_LOD\n"
+" float LODFactor = min(1.0, OffsetMapping_LodDistance / EyeVectorFogDepth.z);\n"
+" mediump vec4 ScaleSteps = float4(OffsetMapping_ScaleSteps.x, OffsetMapping_ScaleSteps.y * LODFactor, OffsetMapping_ScaleSteps.z / LODFactor, OffsetMapping_ScaleSteps.w * LODFactor);\n"
+"#else\n"
+" #define ScaleSteps OffsetMapping_ScaleSteps\n"
+"#endif\n"
+"#ifdef USEOFFSETMAPPING_RELIEFMAPPING\n"
+" // 14 sample relief mapping: linear search and then binary search\n"
+" // this basically steps forward a small amount repeatedly until it finds\n"
+" // itself inside solid, then jitters forward and back using decreasing\n"
+" // amounts to find the impact\n"
+" //float3 OffsetVector = float3(EyeVector.xy * ((1.0 / EyeVector.z) * ScaleSteps.x) * float2(-1, 1), -1);\n"
+" //float3 OffsetVector = float3(normalize(EyeVector.xy) * ScaleSteps.x * float2(-1, 1), -1);\n"
+" float3 OffsetVector = float3(normalize(EyeVector).xy * ScaleSteps.x * float2(-1, 1), -1);\n"
+" float3 RT = float3(TexCoord, 1);\n"
+" OffsetVector *= ScaleSteps.z;\n"
+" for(i = 1.0; i < ScaleSteps.y; ++i)\n"
+" RT += OffsetVector * step(tex2Dgrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z);\n"
+" for(i = 0.0, f = 1.0; i < ScaleSteps.w; ++i, f *= 0.5)\n"
+" RT += OffsetVector * (step(tex2Dgrad(Texture_Normal, RT.xy, dPdx, dPdy).a, RT.z) * f - 0.5 * f);\n"
+" return RT.xy;\n"
+"#else\n"
+" // 2 sample offset mapping (only 2 samples because of ATI Radeon 9500-9800/X300 limits)\n"
+" //float2 OffsetVector = float2(EyeVector.xy * ((1.0 / EyeVector.z) * ScaleSteps.x) * float2(-1, 1));\n"
+" //float2 OffsetVector = float2(normalize(EyeVector.xy) * ScaleSteps.x * float2(-1, 1));\n"
+" float2 OffsetVector = float2(normalize(EyeVector).xy * ScaleSteps.x * float2(-1, 1));\n"
+" OffsetVector *= ScaleSteps.z;\n"
+" for(i = 0.0; i < ScaleSteps.y; ++i)\n"
+" TexCoord += OffsetVector * (1.0 - tex2Dgrad(Texture_Normal, TexCoord, dPdx, dPdy).a);\n"
+" return TexCoord;\n"
"#endif\n"
"}\n"
"#endif // USEOFFSETMAPPING\n"