Jedi Academy: Enhanced: v1.0 win_msvc-x86_64 Jan 4 2019 Initialising zone memory ..... ----- FS_Startup ----- Current search path: C:\Users\kung\Documents\My Games\JAEnhanced\jaenhanced S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\jaenhanced C:\Users\kung\Documents\My Games\JAEnhanced\base S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\base\assets3.pk3 (16 files) S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\base\assets2.pk3 (62 files) S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\base\assets1.pk3 (8320 files) S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\base\assets0.pk3 (15346 files) S:\SteamLibrary\steamapps\common\Jedi Academy\GameData\base ---------------------- 23744 files in pk3 files execing default.cfg execing jaenhanced_sp.cfg couldn't exec autoexec_sp.cfg Running Jedi Academy Mode ----- Client Initialization ----- ----- Initializing Renderer ---- Trying to load "rdcustomsp-GL2_x86_64.dll" from "S:\SteamLibrary\steamapps\common\Jedi Academy\GameData"... ------------------------------- ----- Client Initialization Complete ----- --- Common Initialization Complete --- SDL Version Compiled: 2.0.8 SDL Version Linked: 2.0.8 ----- R_Init ----- SDL using driver "windows" Initializing display Display aspect: 1.778 ...setting mode 4: 800 600 Using 24 color bits, 24 depth, 8 stencil display. Available modes: '1280x720 1366x768 1600x900 1920x1080 1360x768 1280x768 1280x800 1440x900 1680x1050 1600x1024 720x480 640x480 800x600 1024x768 1152x864 1280x960 720x576 1280x1024' Initializing OpenGL 3.2 functions ...using GLSL version 1.50 NVIDIA via Cg compiler GL_RENDERER: GeForce GTX 960/PCIe/SSE2 Initializing OpenGL extensions ...GL_S3_s3tc available ...GL_EXT_texture_compression_s3tc available ...no tc preference specified .....using GL_EXT_texture_compression_s3tc ...GL_EXT_texture_filter_anisotropic available ...using GL_EXT_texture_filter_anisotropic ...using GL_EXT_texture_compression_latc ...ignoring GL_ARB_texture_compression_bptc ...using GL_ARB_texture_storage ...ignoring GL_ARB_buffer_storage ...ignoring GL_ARB_debug_output ...using GL_ARB_timer_query ------- R_InitVBOs ------- ------- FBO_Init ------- ------- GLSL_InitGPUShaders ------- #version 150 core #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifndef deformGen_t #define deformGen_t #define DEFORM_NONE 0 #define DEFORM_WAVE 1 #define DEFORM_NORMALS 2 #define DEFORM_BULGE 3 #define DEFORM_MOVE 4 #define DEFORM_PROJECTION_SHADOW 5 #define WF_NONE 0 #define WF_SIN 1 #define WF_SQUARE 2 #define WF_TRIANGLE 3 #define WF_SAWTOOTH 4 #define WF_INVERSE_SAWTOOTH 5 #endif #ifndef tcGen_t #define tcGen_t #define TCGEN_LIGHTMAP 2 #define TCGEN_LIGHTMAP1 3 #define TCGEN_LIGHTMAP2 4 #define TCGEN_LIGHTMAP3 5 #define TCGEN_TEXTURE 6 #define TCGEN_ENVIRONMENT_MAPPED 7 #define TCGEN_FOG 8 #define TCGEN_VECTOR 9 #endif #ifndef colorGen_t #define colorGen_t #define CGEN_LIGHTING_DIFFUSE 11 #endif #ifndef alphaGen_t #define alphaGen_t #define AGEN_LIGHTING_SPECULAR 6 #define AGEN_PORTAL 8 #endif #ifndef texenv_t #define texenv_t #define TEXENV_MODULATE 8448 #define TEXENV_ADD 260 #define TEXENV_REPLACE 7681 #endif #define ATEST_CMP_LT 1 #define ATEST_CMP_GT 2 #define ATEST_CMP_GE 3 #ifndef r_FB ufScale #define r_FBufScale vec2(0.001250, 0.001667) #endif #define ROUGHNESS_MIPS float(5) #define HORIZON_FADE float(1.300000) #define SWIZZLE_NORMALMAP #define RGBM_LIGHTMAP #line 306 #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) #define PER_PIXEL_LIGHTING uniform sampler2D u_ScreenDiffuseMap; uniform sampler2D u_ScreenSpecularMap; #endif uniform sampler2D u_DiffuseMap; #if defined(USE_LIGHTMAP) uniform sampler2D u_LightMap; #endif #if defined(USE_NORMALMAP) uniform sampler2D u_NormalMap; #endif #if defined(USE_DELUXEMAP) uniform sampler2D u_DeluxeMap; #endif #if defined(USE_SPECULARMAP) uniform sampler2D u_SpecularMap; #endif #if defined(USE_SHADOWMAP) uniform sampler2D u_ShadowMap; #endif #if defined(USE_CUBEMAP) uniform samplerCube u_CubeMap; #endif #if defined(USE_NORMALMAP) || defined(USE_DELUXEMAP) || defined(USE_SPECULARMAP) || defined(USE_CUBEMAP) // x = sphericalHarmonics, y = deluxe, z = specular, w = cube uniform vec4 u_EnableTextures; #endif #if defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) uniform vec3 u_DirectedLight; uniform vec3 u_AmbientLight; uniform samplerCubeShadow u_ShadowMap2; #endif #if defined(USE_PRIMARY_LIGHT) || defined(USE_SHADOWMAP) uniform vec3 u_PrimaryLightColor; uniform vec3 u_PrimaryLightAmbient; #endif #if defined(PER_PIXEL_LIGHTING) uniform vec4 u_NormalScale; uniform vec4 u_SpecularScale; #endif #if defined(PER_PIXEL_LIGHTING) #if defined(USE_CUBEMAP) uniform vec4 u_CubeMapInfo; uniform vec3 u_SphericalHarmonic[9]; uniform sampler2D u_EnvBrdfMap; #endif #endif uniform int u_AlphaTestFunction; uniform float u_AlphaTestValue; in vec4 var_TexCoords; in vec4 var_Color; #if defined(PER_PIXEL_LIGHTING) in vec4 var_Normal; in vec4 var_Tangent; in vec4 var_Bitangent; in vec4 var_LightDir; in vec3 var_Position; uniform sampler3D u_LightGridDirectionMap; uniform sampler3D u_LightGridDirectionalLightMap; uniform sampler3D u_LightGridAmbientLightMap; uniform vec3 u_LightGridOrigin; uniform vec3 u_LightGrid CellInverseSize; uniform vec3 u_StyleColor; uniform vec2 u_LightGridLightScale; #define u_LightGridAmbientScale u_LightGridLightScale.x #define u_LightGridDirectionalScale u_LightGridLightScale.y #endif #if defined(USE_PRIMARY_LIGHT) || defined(USE_SHADOWMAP) in vec4 var_PrimaryLightDir; #endif out vec4 out_Color; out vec4 out_Glow; #define EPSILON 0.00000001 #if defined(USE_PARALLAXMAP) float SampleDepth(sampler2D normalMap, vec2 t) { #if defined(SWIZZLE_NORMALMAP) return 1.0 - texture(normalMap, t).r; #else return 1.0 - texture(normalMap, t).a; #endif } float RayIntersectDisplaceMap(vec2 dp, vec2 ds, sampler2D normalMap) { const int linearSearchSteps = 16; const int binarySearchSteps = 6; // current size of search window float size = 1.0 / float(linearSearchSteps); // current depth position float depth = 0.0; // best match found (starts with last position 1.0) float bestDepth = 1.0; // texture depth at best depth float texDepth = 0.0; float prevT = SampleDepth(normalMap, dp); float prevTexDepth = prevT; // search front to back for first point inside object for(int i = 0; i < linearSearchSteps - 1; ++i) { depth += size; float t = SampleDepth(normalMap, dp + ds * depth); if(bestDepth > 0.996) // if no depth found yet if(depth >= t) { bestDepth = depth; // store best depth texDepth = t; prevTexDepth = prevT; } prevT = t; } depth = bestDepth; #if !defined (USE_RELIEFMAP) float div = 1.0 / (1.0 + (prevTexDepth - texDepth) * float(linearSearchSteps)); bestDepth -= (depth - size - prevTexDepth) * div; #else // recurse around first point (depth) for closest match for(int i = 0; i < binarySearchSteps; ++i) { size *= 0.5; float t = SampleDepth(normalMap, dp + ds * depth); if(depth >= t) { bestDepth = depth; depth -= 2.0 * size; } depth += size; } #endif return bestDepth; } #endif vec3 EnvironmentBRDF(float roughness, float NE, vec3 specular) { // from http://community.arm.com/servlet/JiveServlet/download/968 91546-19496/siggraph2015-mmg-renaldas-slides.pdf float v = 1.0 - max(roughness, NE); v *= v * v; return vec3(v) + specular; } float spec_D( float NH, float roughness) { // normal distribution // from http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf float alpha = roughness * roughness; float quotient = alpha / max(1e-8,(NH*NH*(alpha*alpha-1.0)+1.0)); return (quotient * quotient) / M_PI; } vec3 spec_F( float EH, vec3 F0) { // Fresnel // from http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf float pow2 = pow(2.0, (-5.55473*EH - 6.98316) * EH); return F0 + (vec3(1.0) - F0) * pow2; } vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness) { return F0 + (max(vec3(1.0 - roughness), F0) - F0) * pow(1.0 - cosTheta, 5.0); } float G1( float NV, float k) { return NV / (NV*(1.0-k) + k); } float spec_G(float NL, float NE, float roughness ) { // GXX Schlick // from http ://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf float k = max(((roughness + 1.0) * (roughness + 1.0)) / 8.0, 1e-5); return G1(NL,k)*G1(NE,k); } vec3 CalcDiffuse(vec3 diffuseAlbedo, float NH, float EH, float roughness) { #if defined(USE_BURLEY) // modified from https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf float fd90 = -0.5 + EH * EH * roughness; float burley = 1.0 + fd90 * 0.04 / NH; burley *= burley; return diffuseAlbedo * burley; #else return diffuseAlbedo ; #endif } vec3 CalcSpecular( in vec3 specular, in float NH, in float NL, in float NE, in float EH, in float roughness ) { float distrib = spec_D(NH,roughness); vec3 fresnel = spec_F(EH,specular); float vis = spec_G(NL, NE, roughness); float denominator = max((4.0 * max(NE,0.0) * max(NL,0.0)),0.001); return (distrib * fresnel * vis) / denominator; } float CalcLightAttenuation(float distance, float radius) { float d = pow(distance / radius, 4.0); fl oat attenuation = clamp(1.0 - d, 0.0, 1.0); attenuation *= attenuation; attenuation /= distance * distance + 1.0; // don't attenuate directional light attenuation = attenuation + float(radius < 1.0); return clamp(attenuation, 0.0, 1.0); } vec3 CalcNormal( in vec3 vertexNormal, in vec2 texCoords, in mat3 tangentToWorld ) { vec3 N = vertexNormal; #if defined(USE_NORMALMAP) #if defined(SWIZZLE_NORMALMAP) N.xy = texture(u_NormalMap, texCoords).ag - vec2(0.5); #else N.xy = texture(u_NormalMap, texCoords).rg - vec2(0.5); #endif N.xy *= u_NormalScale.xy; N.z = sqrt(clamp((0.25 - N.x * N.x) - N.y * N.y, 0.0, 1.0)); N = tangentToWorld * N; #endif return normalize(N); } #if defined(USE_LIGHT_VECTOR) #define DEPTH_MAX_ERROR 0.000000059604644775390625 vec3 sampleOffsetDirections[20] = vec3[] ( vec3(1, 1, 1), vec3(1, -1, 1), vec3(-1, -1, 1), vec3(-1, 1, 1), vec3(1, 1, -1), vec3(1, -1, -1), vec3(-1, -1, -1), vec3(-1, 1, -1), vec3(1, 1, 0), vec3(1, -1, 0), vec3(-1, -1, 0), vec3(-1, 1, 0), vec3( 1, 0, 1), vec3(-1, 0, 1), vec3(1, 0, -1), vec3(-1, 0, -1), vec3(0, 1, 1), vec3(0, -1, 1), vec3(0, -1, -1), vec3(0, 1, -1) ); float pcfShadow(samplerCubeShadow depthMap, vec3 L, float distance) { float shadow = 0.0; int samples = 20; float diskRadius = 1.0; for (int i = 0; i < samples; ++i) { shadow += texture(depthMap, vec4(L + sampleOffsetDirections[i] * diskRadius, distance)); } shadow /= float(samples); return shadow; } float getLightDepth(vec3 Vec, float f) { vec3 AbsVec = abs(Vec); float Z = max(AbsVec.x, max(AbsVec.y, AbsVec.z)); const float n = 1.0; float NormZComp = (f + n) / (f - n) - 2 * f*n / (Z* (f - n)); return ((NormZComp + 1.0) * 0.5) - DEPTH_MAX_ERROR; } float getShadowValue(vec4 light) { float distance = getLightDepth(light.xyz, light.w); return pcfShadow(u_ShadowMap2, light.xyz, distance); } #endif #if defined(USE_CUBEMAP) vec3 CalcSHColor(in vec3 normal) { float Y00 = 0.282095; float Y11 = 0.488603 * normal.x; float Y10 = 0.488603 * normal.z; float Y1_1 = 0.48 8603 * normal.y; float Y21 = 1.092548 * normal.x * normal.z; float Y2_1 = 1.092548 * normal.y * normal.z; float Y2_2 = 1.092548 * normal.y * normal.x; float Y20 = 0.946176 * normal.z * normal.z - 0.315392; float Y22 = 0.546274 * (normal.x * normal.x - normal.y * normal.y); float A0 = M_PI; float A1 = (2.0/3.0) * M_PI; float A2 = M_PI / 4.0; vec3 L00 = u_SphericalHarmonic[0]; vec3 L11 = u_SphericalHarmonic[1]; vec3 L10 = u_SphericalHarmonic[2]; vec3 L1_1 = u_SphericalHarmonic[3]; vec3 L21 = u_SphericalHarmonic[4]; vec3 L2_1 = u_SphericalHarmonic[5]; vec3 L2_2 = u_SphericalHarmonic[6]; vec3 L20 = u_SphericalHarmonic[7]; vec3 L22 = u_SphericalHarmonic[8]; vec3 color = A0*Y00*L00 + A1*Y1_1*L1_1 + A1*Y10*L10 + A1*Y11*L11 + A2*Y2_2*L2_2 + A2*Y2_1*L2_1 + A2*Y20*L20 + A2*Y21*L21 + A2*Y22*L22; return color; } #endif void main() { vec3 viewDir, lightColor, ambientColor, reflectance, vertexColor, position; vec3 L, N, E, H; float NL, NH, NE, EH, attenuation; #if defined(PER_PIXEL_LIGHTING ) mat3 tangentToWorld = mat3(var_Tangent.xyz, var_Bitangent.xyz, var_Normal.xyz); viewDir = vec3(var_Normal.w, var_Tangent.w, var_Bitangent.w); E = normalize(viewDir); position = var_Position; ivec3 gridSize = textureSize(u_LightGridDirectionalLightMap, 0); vec3 invGridSize = vec3(1.0) / vec3(gridSize); vec3 gridCell = (position - u_LightGridOrigin) * u_LightGridCellInverseSize * invGridSize; #endif #if defined(USE_LIGHTMAP) vec4 lightmapColor = texture(u_LightMap, var_TexCoords.zw); #if defined(RGBM_LIGHTMAP) lightmapColor.rgb *= lightmapColor.a; #endif lightmapColor.rgb *= lightmapColor.rgb; #endif vec2 texCoords = var_TexCoords.xy; vec4 diffuse; #if defined(PER_PIXEL_LIGHTING) float isLightgrid = float(var_LightDir.w < 1.0); L = var_LightDir.xyz; #if defined(USE_LIGHT_VERTEX) L = -normalize(texture(u_LightGridDirectionMap, gridCell).rgb * 2.0 - vec3(1.0)) * (1.0 - u_EnableTextures.y); #endif #if defined(USE_DELUXEMAP) L = -normalize(texture(u_LightGridDirectionMap, gridCell). rgb * 2.0 - vec3(1.0)) * (1.0 - u_EnableTextures.y); L += (texture(u_DeluxeMap, var_TexCoords.zw).xyz - vec3(0.5)) * u_EnableTextures.y; #endif float lightDist = length(L); L /= lightDist; vec3 ambientLight = texture(u_LightGridAmbientLightMap, gridCell).rgb * isLightgrid; ambientLight *= ambientLight; vertexColor = var_Color.rgb * var_Color.rgb; #if defined(USE_LIGHT_VECTOR) L -= normalize(texture(u_LightGridDirectionMap, gridCell).rgb * 2.0 - vec3(1.0)) * isLightgrid; vec3 directedLight = texture(u_LightGridDirectionalLightMap, gridCell).rgb * isLightgrid; directedLight *= directedLight; #endif ambientColor = ambientLight * vertexColor; #if defined(USE_LIGHTMAP) lightColor = lightmapColor.rgb * vertexColor; attenuation = 1.0; #elif defined(USE_LIGHT_VECTOR) lightColor = directedLight * vertexColor * (var_LightDir.w + float(var_LightDir.w < 1.0)); attenuation = CalcLightAttenuation(lightDist, var_LightDir.w); #if defined(USE_DSHADOWS) if (isLightgrid < 0.9) { attenuati on *= getShadowValue(var_LightDir); } #endif #elif defined(USE_LIGHT_VERTEX) lightColor = vertexColor; attenuation = 1.0; #endif #if defined(USE_PARALLAXMAP) vec3 offsetDir = viewDir * tangentToWorld; offsetDir.xy *= -u_NormalScale.a / offsetDir.z; texCoords += offsetDir.xy * RayIntersectDisplaceMap(texCoords, offsetDir.xy, u_NormalMap); #endif diffuse = texture(u_DiffuseMap, texCoords); if (u_AlphaTestFunction == ATEST_CMP_GE){ if (diffuse.a < u_AlphaTestValue) discard; } else if (u_AlphaTestFunction == ATEST_CMP_LT){ if (diffuse.a >= u_AlphaTestValue) discard; } else if (u_AlphaTestFunction == ATEST_CMP_GT){ if (diffuse.a <= u_AlphaTestValue) discard; } N = CalcNormal(var_Normal.xyz, texCoords, tangentToWorld); #if defined(USE_SHADOWMAP) vec2 shadowTex = gl_FragCoord.xy * r_FBufScale; float shadowValue = texture(u_ShadowMap, shadowTex).r; // surfaces not facing the light are always shadowed shadowValue *= clamp(dot(N, var_PrimaryLightDir.xyz), 0.0, 1.0) ; #if defined(SHADOWMAP_MODULATE) lightColor *= shadowValue * (1.0 - u_PrimaryLightAmbient.r) + u_PrimaryLightAmbient.r; #endif #endif #if defined(USE_LIGHTMAP) || defined(USE_LIGHT_VERTEX) float surfNL = clamp(dot(N, L), 0.0, 1.0) * 0.25; ambientColor = max(lightColor - lightColor * surfNL, vec3(0.0)); #endif #if defined(USE_SPECULARMAP) vec4 specular = texture(u_SpecularMap, texCoords); #else vec4 specular = vec4(1.0); #endif specular *= u_SpecularScale; diffuse.rgb *= diffuse.rgb; specular.rgb *= specular.rgb; // energy conservation //diffuse.rgb *= (vec3(1.0) - specular.rgb); // diffuse rgb is diffuse // specular rgb is specular reflectance at normal incidence // specular alpha is gloss float roughness = 1.0 - specular.a; H = normalize(L + E); EH = max(1e-8, dot(E, H)); NH = max(1e-8, dot(N, H)); NL = clamp(dot(N, L), 1e-8, 1.0); reflectance = CalcDiffuse(diffuse.rgb, NH, EH, roughness); #if (defined(USE_LIGHTMAP) || defined(USE_LIGHT_VERTEX)) && defined(USE_DELUXEMAP) NE = abs(dot(N, E)) + 1e-5; reflectance += CalcSpecular(specular.rgb, NH, NL, NE, EH, roughness) * 1.0; #endif #if defined(USE_LIGHT_VECTOR) NE = abs(dot(N, E)) + 1e-5; reflectance += CalcSpecular(specular.rgb, NH, NL, NE, EH, roughness); #endif out_Color.rgb = lightColor * reflectance * (attenuation * NL); if (u_EnableTextures.x == 0.0) out_Color.rgb += ambientColor * diffuse.rgb; ivec2 windowCoordinate = ivec2(gl_FragCoord.xy); vec3 diffuseBufferColor = texelFetch(u_ScreenDiffuseMap, windowCoordinate, 0).rgb; diffuseBufferColor *= diffuseBufferColor; out_Color.rgb += diffuse.rgb * diffuseBufferColor; vec4 specBufferColor = texelFetch(u_ScreenSpecularMap, windowCoordinate, 0); specBufferColor.rgb *= specBufferColor.rgb; out_Color.rgb += specBufferColor.rgb; #if defined(USE_CUBEMAP) NE = clamp(dot(N, E), 0.0, 1.0); vec3 EnvBRDF = texture(u_EnvBrdfMap, vec2(roughness, NE)).rgb; vec3 R = reflect(E, N); // parallax corrected cubemap (cheaper trick) // from http://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ vec3 parallax = u_CubeMapInfo.xyz + u_CubeMapInfo.w * viewDir; vec3 cubeLightColor = textureLod(u_CubeMap, R + parallax, ROUGHNESS_MIPS * roughness).rgb * u_EnableTextures.w; cubeLightColor *= cubeLightColor; vec3 shColor = CalcSHColor(-N) * u_EnableTextures.x; float horiz = 1.0; // from http://marmosetco.tumblr.com/post/81245981087 #if defined(HORIZON_FADE) horiz = clamp( 1.0 + HORIZON_FADE * dot(-R,var_Normal.xyz), 0.0, 1.0 ); horiz *= horiz; #endif if (u_EnableTextures.x == 1.0) out_Color.rgb += shColor * diffuse.rgb; out_Color.rgb += cubeLightColor * (1.0 - specBufferColor.a) * (specular.rgb * EnvBRDF.x + EnvBRDF.y) * horiz; #endif #if defined(USE_PRIMARY_LIGHT) || defined(SHADOWMAP_MODULATE) vec3 L2, H2; float NL2, EH2, NH2, L2H2; L2 = var_PrimaryLightDir.xyz; H2 = normalize(L2 + E); NL2 = clamp(dot(N, L2), 0.0, 1.0); NL2 = max(1e-8, abs(NL2) ); EH 2 = max(1e-8, dot(E, H2)); NH2 = max(1e-8, dot(N, H2)); reflectance = CalcSpecular(specular.rgb, NH2, NL2, NE, EH2, roughness); // bit of a hack, with modulated shadowmaps, ignore diffuse #if !defined(SHADOWMAP_MODULATE) reflectance += CalcDiffuse(diffuse.rgb, NH2, EH2, roughness); #endif lightColor = u_PrimaryLightColor * var_Color.rgb; #if defined(USE_SHADOWMAP) lightColor *= shadowValue; #endif out_Color.rgb += lightColor * reflectance * NL2; #endif #if defined(USE_DEBUG) if (USE_DEBUG == 1) out_Color.rgb = diffuse.rgb; if (USE_DEBUG == 2) out_Color.rgb = specular.rgb; if (USE_DEBUG == 3) out_Color.rgb = N.rgb * 0.5 + 0.5; #endif out_Color.rgb = sqrt(out_Color.rgb); #else diffuse = texture(u_DiffuseMap, texCoords); if (u_AlphaTestFunction == ATEST_CMP_GE){ if (diffuse.a < u_AlphaTestValue) discard; } else if (u_AlphaTestFunction == ATEST_CMP_LT){ if (diffuse.a >= u_AlphaTestValue) discard; } else if (u_AlphaTestFunction == ATEST_CMP_GT) { if (diffuse.a <= u_AlphaTestValue) discard; } lightColor = var_Color.rgb; out_Color.rgb = diffuse.rgb * lightColor; #endif out_Color.a = diffuse.a * var_Color.a; #if defined(USE_GLOW_BUFFER) out_Glow = out_Color; #else out_Glow = vec4(0.0); #endif }alue; #endif out_Color.rgb += lightColor * reflectance * NL2; #endif #if defined(USE_DEBUG) if (USE_DEBUG == 1) out_Color.rgb = diffuse.rgb; if (USE_DEBUG == 2) out_Color.rgb = specular.rgb; if (USE_DEBUG == 3) out_Color.rgb = N.rgb * 0.5 + 0.5; #endif out_Color.rgb = sqrt(out_Color.rgb); #else compile log: 0(918) : error C0000: syntax error, unexpected ';', expecting "::" at token ";" 0(919) : error C7102: unmatched #endif 0(922) : error C7102: unmatched #endif 0(935) : error C7102: unmatched #else (0) : error C0120: #else must not have arguments ----- CL_Shutdown ----- RE_Shutdown( 1 ) ----------------------- Couldn't compile shader