GL_FRAGMENT_SHADER ================== // BasePassPixelShader // TBasePassPixelShaderFNoLightMapPolicySkyLight_1252_menumap // D3DPS_VERSION(3,0) #version 150 core out vec4 aslFragData0; uniform vec4 ScreenPositionScaleBias; uniform vec4 NvStereoEnabled; uniform vec4 TimeOfDayLightColor; uniform vec4 UniformPixelVector_0; uniform vec4 UniformPixelScalars_0; vec4 c0[2]; const vec4 c3 = vec4(1, 0.999, 0, 0); uniform sampler2D SceneColorTexture_s0; uniform sampler2D NvStereoFixTexture_s1; uniform sampler2D PixelUE_Texture2D_0_s2; in vec4 asl_Varying_color0; in vec4 asl_Varying_texcoord0; in vec4 asl_Varying_texcoord1; in vec4 asl_Varying_texcoord7; in vec4 asl_Varying_texcoord4; vec4 cmp(in vec4 src0, in vec4 src1, in vec4 src2) { vec4 result; result.x = src0.x >= 0.0 ? src1.x : src2.x; result.y = src0.y >= 0.0 ? src1.y : src2.y; result.z = src0.z >= 0.0 ? src1.z : src2.z; result.w = src0.w >= 0.0 ? src1.w : src2.w; return result; } float cmp(in float src0, in float src1, in float src2) { return (src0 >= 0.0) ? src1 : src2; } #define imod_sat(a) clamp(a, 0.0, 1.0) void main(void) { vec4 TXC0; vec4 r0; vec4 r1; vec4 r2; vec4 r3; c0[0] = vec4(0.0625000, 0.00000, -1.00000, 0.680000); c0[1] = vec4(4.00000, 8192.00, 32.0000, 1000.00); r0.x = float(abs(NvStereoEnabled.xxxx)); if (NvStereoEnabled.x != (-(NvStereoEnabled)).x) { r1 = texture(NvStereoFixTexture_s1, vec2(c0[0])); r0.y = (c0[0].zzzz + asl_Varying_texcoord4.wwww).y; r0.z = ((-(r1)).yyyy + asl_Varying_texcoord4.wwww).z; r0.z = (r1.xxxx * r0.zzzz + asl_Varying_texcoord4.xxxx).z; r1.x = cmp((-abs(r0)).y, asl_Varying_texcoord4.x, r0.z); r1.yz = (asl_Varying_texcoord4.xyww).yz; } else { r1.xyz = vec3(c0[0].yyyy); } r0.xyz = vec3(cmp((-(r0)).xxxx, asl_Varying_texcoord4.xyww, r1)); r0.w = min(1.0 / TimeOfDayLightColor.w, 65535.0); r1.xyz = vec3(r0.wwww * TimeOfDayLightColor); r1.xyz = vec3(r0.wwww * c0[0].wwww + r1); r1.xyz = vec3(r1 * asl_Varying_texcoord1 + UniformPixelVector_0); r2.xyz = vec3(min(r1, c0[1].xxxx)); r1 = pow(texture(PixelUE_Texture2D_0_s2, vec2(asl_Varying_texcoord0)), vec4(2.2, 2.2, 2.2, 1.0)); r3 = pow(texture(PixelUE_Texture2D_0_s2, vec2(asl_Varying_texcoord0.zwzw)), vec4(2.2, 2.2, 2.2, 1.0)); r0.w = (mix(r1.xxxx, r3.xxxx, asl_Varying_color0.xxxx)).w; r0.w = (imod_sat(r0.wwww * asl_Varying_texcoord1.wwww)).w; r1.x = min(1.0 / r0.z, 65535.0); r0.xy = vec2(r0 * r1.xxxx); r1.xy = vec2(r0 * ScreenPositionScaleBias + ScreenPositionScaleBias.wzzw); r1.zw = (c0[0].yyyy).zw; TXC0 = vec4(r1) * vec4(1.0, -1.0, 1.0, 1.0) + vec4(0.0, 1.0, 0.0, 0.0); r1 = textureLod(SceneColorTexture_s0, vec2(TXC0), (TXC0).w); r0.x = inversesqrt(max(abs(r1).w,0.0000001)); r0.x = min(1.0 / r0.x, 65535.0); r0.xy = vec2(r0.xxxx * c0[1].yzzw); r0.x = cmp((-(r1)).w, r0.y, r0.x); r0.x = float((-(r0)).zzzz + r0.xxxx); r1.xy = vec2(c3); r0.yz = (r1.xxyw + (-(UniformPixelScalars_0)).xxxx).yz; r0.y = min(1.0 / r0.y, 65535.0); r0.y = cmp(r0.z, r0.y, c0[1].w); r0.x = float(imod_sat(r0.yyyy * r0.xxxx)); aslFragData0.w = (r0.xxxx * r0.wwww).w; aslFragData0.xyz = vec3(r2 * asl_Varying_texcoord7.wwww + asl_Varying_texcoord7); } GL_VERTEX_SHADER ================ // BasePassVertexShader // TBasePassVertexShaderFNoLightMapPolicyFNoDensityPolicy_3788_ // D3DVS_VERSION(3,0) #version 150 core uniform vec4 ViewProjectionMatrix[4]; uniform vec4 CameraPositionVS; uniform vec4 LocalToWorld[4]; uniform vec4 FogInScattering[4]; uniform vec4 AxisRotationVectors[2]; uniform vec4 CameraWorldPosition; uniform vec4 CameraRight; uniform vec4 CameraUp; uniform vec4 NormalsType; uniform vec4 NormalsSphereCenter; uniform vec4 NormalsCylinderUnitDirection; uniform vec4 AxisRotationVectorSourceIndex; uniform vec4 ParticleUpRightResultScalars; uniform vec4 SharedFogParameter0; uniform vec4 SharedFogParameter1; uniform vec4 SharedFogParameter2; uniform vec4 SharedFogParameter3; uniform vec4 bUseExponentialHeightFog; uniform vec4 FogMaxHeight; const vec4 c5 = vec4(0.159155, 0.5, 6.28319, -3.14159); vec4 c30[2]; in vec4 v0; // position0 in vec4 v1; // normal0 in vec4 v2; // tangent0 in vec4 v3; // blendweight0 in vec4 v4; // texcoord0 in vec4 v5; // texcoord1 in vec4 v6; // texcoord2 out vec4 asl_Varying_color0; out vec4 asl_Varying_texcoord0; out vec4 asl_Varying_texcoord1; out vec4 asl_Varying_texcoord3; out vec4 asl_Varying_texcoord7; out vec4 asl_Varying_texcoord4; #define sincos(a) vec2(cos(a), sin(a)) #define imod_sat(a) clamp(a, 0.0, 1.0) void main(void) { vec4 a0; vec4 r0; vec4 r1; vec4 r2; vec4 r3; vec4 r4; vec4 r5; vec4 r6; vec4 r7; c30[0] = vec4(0.0100000, 0.00000, 0.500000, 1.50000); c30[1] = vec4(1.00000, 0.499000, 0.500000, 0.00100000); r0 = LocalToWorld[1] * v0.yyyy; r0 = LocalToWorld[0] * v0.xxxx + r0; r0 = LocalToWorld[2] * v0.zzzz + r0; r0 = LocalToWorld[3] * v0.wwww + r0; r1.x = float(v3.xxxx * c5.xxxx + c5.yyyy); r1.x = float(fract(r1.xxxx)); r1.x = float(r1.xxxx * c5.zzzz + c5.wwww); r2.xy = vec2(sincos(r1.x)); r1.xyz = vec3(LocalToWorld[1] * v1.yyyy); r1.xyz = vec3(LocalToWorld[0] * v1.xxxx + r1); r1.xyz = vec3(LocalToWorld[2] * v1.zzzz + r1); r1.xyz = vec3(LocalToWorld[3] * v1.wwww + r1); r1.w = (fract(AxisRotationVectorSourceIndex.xxxx)).w; r2.z = ((-(r1)).wwww + AxisRotationVectorSourceIndex.xxxx).z; r2.w = (vec4(lessThan(AxisRotationVectorSourceIndex.xxxx, (-(AxisRotationVectorSourceIndex)).xxxx))).w; r1.w = (vec4(lessThan((-(r1)).wwww, r1.wwww))).w; r1.w = (r2.wwww * r1.wwww + r2.zzzz).w; a0.x = r1.w; r3.xyz = vec3((-(r0)).zxyw + CameraWorldPosition.zxyw); r2.z = dot(vec3(r3), vec3(r3)); r2.z = (max(r2.zzzz, c30[0].xxxx)).z; r2.z = inversesqrt(max(r2.z,0.0000001)); r3.xyz = vec3(r2.zzzz * r3); r1.xyz = vec3(r0 + (-(r1))); r2.z = dot(vec3(r1), vec3(r1)); r2.z = (max(r2.zzzz, c30[0].xxxx)).z; r2.z = inversesqrt(max(r2.z,0.0000001)); r1.xyz = vec3(r1 * r2.zzzz); r4 = r2.yyyy * CameraRight; r4 = (-(r2)).xxxx * CameraUp + r4; r5 = r2.xxxx * CameraRight; r2 = r2.yyyy * CameraUp + r5; r5.xyz = vec3(r1.yzxw * r3); r5.xyz = vec3(r3.zxyw * r1.zxyw + (-(r5))); r3.w = dot(vec3(r5), vec3(r5)); r3.w = (max(r3.wwww, c30[0].xxxx)).w; r3.w = inversesqrt(max(r3.w,0.0000001)); r5.xyz = vec3(r3.wwww * r5); r6.xyz = vec3(r3 * AxisRotationVectors[int(a0.x)].yzxw); r3.xyz = vec3(r3.zxyw * AxisRotationVectors[int(a0.x)].zxyw + (-(r6))); r3.w = dot(vec3(r3), vec3(r3)); r3.w = (max(r3.wwww, c30[0].xxxx)).w; r3.w = inversesqrt(max(r3.w,0.0000001)); r3.xyz = vec3(r3.wwww * r3); r3.w = (vec4(lessThan((-abs(r1)).wwww, abs(r1).wwww))).w; r3.xyz = vec3(r3 * AxisRotationVectors[int(a0.x)].wwww + (-(AxisRotationVectors[int(a0.x)]))); r6.xyz = vec3(r3.wwww * r3 + AxisRotationVectors[int(a0.x)]); r1.w = (vec4(greaterThanEqual((-abs(r1)).wwww, abs(r1).wwww))).w; r3.xyz = vec3(r1.wwww * r3 + AxisRotationVectors[int(a0.x)]); r5.xyz = vec3(r5 * ParticleUpRightResultScalars.yyyy); r5.w = c30[0].y; r4 = r4 * ParticleUpRightResultScalars.xxxx + r5; r5.xyz = vec3(r6 * ParticleUpRightResultScalars.zzzz); r5.w = c30[0].y; r4 = r4 + r5; r1.xyz = vec3((-(r1)) * ParticleUpRightResultScalars.yyyy); r1.w = c30[0].y; r1 = r2 * ParticleUpRightResultScalars.xxxx + r1; r2.xyz = vec3(r3 * ParticleUpRightResultScalars.zzzz); r2.w = c30[0].y; r1 = r1 + r2; r2.xy = vec2((-(c5)).yyyy + v6.zwzw); r2.xy = vec2(r2 * v2); r3 = r2.xxxx * r4 + r0; r2 = r2.yyyy * r1 + r3; r3.xyz = vec3(r1.yzxw * r4.zxyw); r3.xyz = vec3(r4.yzxw * r1.zxyw + (-(r3))); r0.w = dot(vec3(r3), vec3(r3)); r0.w = inversesqrt(max(r0.w,0.0000001)); r5.zw = (c30[0]).zw; r5.xy = vec2(vec4(lessThan(NormalsType.xxxx, r5.zwzw))); r6.xyz = vec3(r0 + (-(NormalsSphereCenter))); r1.w = dot(vec3(r6), vec3(r6)); r1.w = inversesqrt(max(r1.w,0.0000001)); r3.w = dot(vec3(NormalsCylinderUnitDirection), vec3(r6)); r7.xyz = vec3(NormalsCylinderUnitDirection); r7.xyz = vec3(r3.wwww * r7 + NormalsSphereCenter); r0.xyz = vec3(r0 + (-(r7))); r7.xyz = vec3(vec3(normalize(vec4(r0.x, r0.y, r0.z, 0.0)))); r0.xyz = vec3(r6 * r1.wwww + (-(r7))); r0.xyz = vec3(r5.yyyy * r0 + r7); r3.xyz = vec3(r3 * r0.wwww + (-(r0))); r0.xyz = vec3(r5.xxxx * r3 + r0); r3 = r2.yyyy * ViewProjectionMatrix[1]; r3 = ViewProjectionMatrix[0] * r2.xxxx + r3; r3 = ViewProjectionMatrix[2] * r2.zzzz + r3; r3 = ViewProjectionMatrix[3] * r2.wwww + r3; r5.xyz = vec3(r2 * (-(CameraPositionVS)).wwww + CameraPositionVS); asl_Varying_texcoord3.x = dot(vec3(r4), vec3(r5)); asl_Varying_texcoord3.y = dot(vec3(r1), vec3(r5)); asl_Varying_texcoord3.z = dot(vec3(r0), vec3(r5)); r0.x = float(abs(bUseExponentialHeightFog.xxxx)); if ((-(r0)).x < r0.x) { r0.xyz = vec3(r2 + (-(CameraPositionVS))); r0.w = dot(vec3(r0), vec3(r0)); r0.w = inversesqrt(max(r0.w,0.0000001)); r1.x = min(1.0 / r0.w, 65535.0); r1.x = float(r1.xxxx + (-(SharedFogParameter0)).wwww); r1.x = float(max(r1.xxxx, c30[0].yyyy)); r1.x = float(r1.xxxx * SharedFogParameter0.xxxx); r1.y = (vec4(lessThan(c30[0].xxxx, abs(r0).zzzz))).y; r2.w = (mix(c30[0].xxxx, r0.zzzz, r1.yyyy)).w; r1.y = (r2.wwww * (-(SharedFogParameter0)).yyyy).y; r1.y = exp2(r1.y); r1.y = ((-(r1)).yyyy + c30[1].xxxx).y; r1.z = (r2.wwww * SharedFogParameter0.yyyy).z; r1.z = min(1.0 / r1.z, 65535.0); r1.y = (r1.zzzz * r1.yyyy).y; r1.x = float(r1.yyyy * r1.xxxx); r0.xyz = vec3(r0.wwww * r0); r0.x = dot(vec3(SharedFogParameter3), vec3(r0)); r0.x = float(r0.xxxx * (-(c30[1])).yyyy + c30[1].zzzz); r1.y = pow(abs(r0.x), SharedFogParameter0.z); r0.xyz = vec3(SharedFogParameter2); r0.xyz = vec3((-(r0)) + SharedFogParameter1); r0.xyz = vec3(r1.yyyy * r0 + SharedFogParameter2); r0.w = exp2((-(r1)).x); r0.w = (min(r0.wwww, c30[1].xxxx)).w; r0.w = (max(r0.wwww, SharedFogParameter1.wwww)).w; r1.x = float((-(r0)).wwww + c30[1].xxxx); asl_Varying_texcoord7.xyz = vec3(r0 * r1.xxxx); asl_Varying_texcoord7.w = r0.w; } else { r0.xyz = vec3(r2 + (-(CameraPositionVS))); r0.x = dot(vec3(r0), vec3(r0)); r0.x = inversesqrt(max(r0.x,0.0000001)); r0.x = min(1.0 / r0.x, 65535.0); r1.z = CameraPositionVS.z; r2 = (-(r1)).zzzz + SharedFogParameter3; r0.y = (vec4(greaterThanEqual(c30[1].wwww, abs(r0).zzzz))).y; r1.x = float(mix(r0.zzzz, c30[1].wwww, r0.yyyy)); r0.y = min(1.0 / r1.x, 65535.0); r2 = imod_sat(r0.yyyy * r2); r1 = (-(r1)).zzzz + FogMaxHeight; r1 = imod_sat(r0.yyyy * r1); r0 = r0.xxxx + (-(SharedFogParameter2)); r0 = max(r0, c30[0].yyyy); r1 = (-(r2)) + r1; r0 = r0 * abs(r1); r1 = vec4(lessThan(r0, SharedFogParameter1)); r0 = r0 * SharedFogParameter0; r2.x = exp2(r0.x); r2.y = exp2(r0.y); r2.z = exp2(r0.z); r2.w = exp2(r0.w); r0 = r1 * r2; r1 = r1 * r2 + (-(c30[1])).xxxx; r2.xyz = vec3(r1.xxxx * FogInScattering[0]); r2.w = r0.x; r2 = r0.yyyy * r2; r2.xyz = vec3(r1.yyyy * FogInScattering[1] + r2); r2 = r0.zzzz * r2; r2.xyz = vec3(r1.zzzz * FogInScattering[2] + r2); r0 = r0.wwww * r2; asl_Varying_texcoord7.xyz = vec3(r1.wwww * FogInScattering[3] + r0); asl_Varying_texcoord7.w = r0.w; } asl_Varying_color0.x = v6.x; asl_Varying_texcoord0 = v4; asl_Varying_texcoord1 = v5; asl_Varying_texcoord3.w = c30[1].x; asl_Varying_texcoord4 = r3; gl_Position = r3; gl_Position.z = gl_Position.z * 2.0 - gl_Position.w; }