EDuke32 2.0.0devel r1888 Compiled May 15 2011 16:40:04 Using C:/DukeNukem/Duke3D/ for game data Windows XP (build 5.1.2600) Service Pack 3 Initializing DirectDraw... Searching for game data... Using C:/DukeNukem/Duke3D/DukePlus/ for game data Using 'duke3d.grp' as main game data file. Using file 'autoload/polymer_hrp.zip' as game data. Using file 'autoload/polymer_mhk.zip' as game data. Using file 'autoload/polymer_mus.zip' as game data. Compiling: EDUKE.CON (36 bytes) Including: DukePlus/dpcons/DUKEPLUS.CON (433542 bytes) Using DEF file: dukeplus.def. Updated eduke32.cfg Using config file 'DukePlus/dp.cfg'. Including: DEFS.CON (35992 bytes) Including: USER.CON (45482 bytes) Including: DukePlus/dpcons/DEFSPLUS.CON (58759 bytes) Including: DukePlus/dpcons/USERPLUS.CON (60852 bytes) Including: DukePlus/dpcons/LIGHTS.CON (26079 bytes) Including: DukePlus/dukebike/DUKEBIKE.CON (88226 bytes) Including: DukePlus/dpcons/HUDPLUS.CON (70039 bytes) Including: DukePlus/dpcons/PLAYERPLUS.CON (138221 bytes) Including: DukePlus/dpcons/MONSTERPLUS.CON (243719 bytes) Including: DukePlus/dpcons/CIVILIANS.CON (16153 bytes) Including: DukePlus/strooper/STROOPER.CON (196470 bytes) Resizing code buffer to 155684*4 bytes Script compiled in 239ms, 155676*4b, version 1.4+ 3886/11264 labels, 814/2048 variables 323 quotes, 46 strings, 40 events, 494 actors Initialized 24.0M cache Loading 'dukeplus.def' Warning: defined hightile replacement for empty tile 9000. Maybe some tilesXXX.art are not loaded? Warning: defined hightile replacement for empty tile 9001. Definitions file 'dukeplus.def' loaded. Using .RTS file 'DUKE.RTS' Initializing OSD... Switching kb layout from 00010409 to 00010409 Initializing DirectInput... - Enumerating attached game controllers * JOYSTICK: MotioninJoy Virtual Game Controller Controller has 8 axes, 20 buttons, and 1 hat(s). Executing "DukePlus/dp_settings.cfg" clip map 0: warning: sprite 80 pointing neither northward nor southward. X-flipping will be wrong. clip map 0: warning: sprite 81 pointing neither northward nor southward. X-flipping will be wrong. Loaded clip map 0. Executing "autoexec.cfg" Setting video mode 1024x768 (32-bit fullscreen) OpenGL Information: Version: 4.1.0 Vendor: NVIDIA Corporation Renderer: GeForce GTX 460/PCI/SSE2 gltexinvalidateall() gltexinvalidate8() Failed allocating 393858587 bytes for memcache Initializing Polymer subsystem... PR : Initialization complete. Initializing music... Initializing sound... Load tile 2492: p0-m4-e0 highres/screen/menu/2492_ver.png... 63 ms Load tile 2493: p0-m4-e0 highres/screen/menu/2493_new.png... 66 ms gltexinvalidateall() gltexinvalidate8() Load tile 6320: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/PLUS.png... 6 ms PR : Board loaded. Load tile 49: p0-m4-e0 highres/screen/hud/0049_shotgunammo.png... 5 ms Load tile 502: p0-m4-e0 highres/textures/0502_d.png... 12 ms Load tile 502: p1-m4-e1 ... 7 ms Load tile 502: p6-m4-e3 ... 8 ms Load tile 502: p251-m4-e9 ... 7 ms Load tile 2462: p0-m4-e0 highres/screen/hud/2462_statusbar.png... 14 ms Load tile 2462: p1-m4-e1 ... 5 ms Load tile 2462: p6-m4-e3 ... 5 ms Load tile 2462: p251-m4-e9 ... 5 ms Load tile 6346: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/firelaser.png... 6 ms Cache time: 8301ms S_PlayMusic(): error: can't open '/NULLSOUND.mid' for playback! E5L1: DUKE PLUS HUB Load tile 344: p252-m0-e0 highres/textures/0344_n.png... 9 ms Load tile 349: p252-m0-e0 highres/textures/0349_n.png... 9 ms PR : Board loaded. Load tile 6320: p1-m4-e1 DUKEPLUS_RESOURCES/GRAPHICS/PLUS.png... 6 ms Cache time: 4498ms Load tile 79: p0-m4-e0 highres/skyboxes/0079_cloudyskies/0079_cloudyskies_right.png... 5 ms E5L5: DP EFFECTS Load skin: p50-e0 "DUKEPLUS_RESOURCES/GRAPHICS/dukecan_bust_red.jpg"... cached... 59 ms Load tile 6214: p29-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/BLOOD/dpblood1.png... 26 ms Load tile 6215: p29-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/BLOOD/dpblood2.png... 26 ms NIGHT VISION ON gltexinvalidate8() NIGHT VISION OFF gltexinvalidate8() Load tile 6425: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1890.png... 5 ms Load tile 6426: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1891.png... 5 ms Load tile 6427: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1892.png... 6 ms Load tile 6428: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1893.png... 6 ms Load tile 6429: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1894.png... 6 ms Load tile 6447: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1891.png... 5 ms Load tile 6431: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1896.png... 5 ms Load tile 6449: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1893.png... 6 ms Load tile 6432: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1897.png... 5 ms Load tile 6450: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1894.png... 6 ms Load tile 6433: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1898.png... 6 ms Load tile 6430: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1895.png... 6 ms Load tile 6451: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1895.png... 6 ms Load tile 6434: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1899.png... 6 ms Load tile 6452: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1896.png... 6 ms Load tile 6435: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1900.png... 6 ms Load tile 6453: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1897.png... 6 ms Load tile 6436: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1901.png... 6 ms Load tile 6454: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1898.png... 6 ms Load tile 6437: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1902.png... 6 ms Load tile 6455: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1899.png... 6 ms Load tile 6438: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1903.png... 6 ms Load tile 6456: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1900.png... 6 ms Load tile 6439: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1904.png... 6 ms Load tile 6457: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1901.png... 6 ms Load tile 6440: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1905.png... 6 ms Load tile 6458: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1902.png... 6 ms Load tile 6441: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1906.png... 5 ms Load tile 6459: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1903.png... 6 ms Load tile 6442: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1907.png... 6 ms Load tile 6460: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1904.png... 6 ms Load tile 6443: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1908.png... 6 ms Load tile 6461: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1905.png... 6 ms Load tile 6444: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl1/1909.png... 5 ms Load tile 6462: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1906.png... 6 ms Load tile 6463: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1907.png... 6 ms Load tile 6464: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1908.png... 6 ms Load tile 6465: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1909.png... 6 ms Load tile 6326: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/firelaser.png... 6 ms Load tile 6274: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/WEAPONS/rpgmuzzleflash.png... 11 ms Load tile 6448: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1892.png... 6 ms Load tile 6273: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/damages/scorch.png... 12 ms Load tile 6446: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/new_explosions/expl2/1890.png... 5 ms JETPACK ON HOLODUKE NOT FOUND YET! JETPACK OFF AN ACCESS CARD HAS BEEN DROPPED! Line 15853, globalsoundvar: Invalid sound -1 A DUKEBOT HAS DIED Load tile 8800: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/WEAPONS/mp5fire1.png... 6 ms A DUKEBOT HAS DIED Load tile 6347: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/WEAPONS/rpgmuzzleflash.png... 11 ms Load tile 8831: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/WEAPONS/shotgunmuzzleflash.png... 6 ms Load tile 3243: p0-m4-e0 highres/screen/menu/3243.jpg... cached... 34 ms Load tile 3244: p0-m4-e0 highres/screen/menu/3244.jpg... cached... 32 ms PR : Board loaded. Cache time: 160ms S_PlayMusic(): error: can't open '/NULLSOUND.mid' for playback! Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid E5L1: DUKE PLUS HUB Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid Line 287, getactor: tried to get ang on invalid target sprite (-1) from spr 18 pic 1405 gv spriteid Load tile 575: p252-m0-e0 highres/textures/0575_n.png... 5 ms Load tile 966: p0-m0-e0 highres/textures/0966.png... 25 ms Load tile 872: p0-m0-e0 highres/textures/0872.png... 22 ms Load tile 965: p0-m0-e0 highres/sprites/signs/0965.jpg... 19 ms PR : Board loaded. Loaded map hack file '/E1L1.mhk' Load tile 872: p1-m0-e1 highres/textures/0872.png... 23 ms Load tile 872: p6-m0-e3 ... 8 ms Load tile 872: p251-m0-e9 ... 7 ms Load tile 964: p0-m4-e0 highres/sprites/signs/0964.jpg... 21 ms Load tile 964: p1-m4-e1 ... 6 ms Load tile 964: p6-m4-e3 ... 6 ms Load tile 964: p251-m4-e9 ... 6 ms Load tile 965: p1-m0-e1 highres/sprites/signs/0965.jpg... 20 ms Load tile 965: p6-m0-e3 ... 5 ms Load tile 965: p251-m0-e9 ... 5 ms Load tile 965: p0-m4-e0 ... 5 ms Load tile 965: p1-m4-e1 ... 5 ms Load tile 965: p6-m4-e3 ... 5 ms Load tile 965: p251-m4-e9 ... 5 ms Load tile 966: p1-m0-e1 highres/textures/0966.png... 27 ms Load tile 966: p6-m0-e3 ... 8 ms Load tile 966: p251-m0-e9 ... 7 ms Cache time: 5550ms E1L1: HOLLYWOOD HOLOCAUST A SECRET PLACE! Load tile 6339: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/kick/kick1.png... 6 ms Load tile 6340: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/kick/kick2.png... 5 ms Load tile 6341: p0-m4-e0 DUKEPLUS_RESOURCES/GRAPHICS/kick/kick3.png... 7 ms A SECRET PLACE! WARNING: SE23 i<0! A SECRET PLACE! HOLODUKE ON PR : Failed to compile GPU program with bits 786645! PR : Compilation log: Vertex info ----------- (0) : error C9008: malloc failed in "mem_Alloc" Fragment info ------------- (0) : error C9008: malloc failed in "mem_Alloc" PR : Vertex source dump: #version 120 #extension GL_ARB_texture_rectangle : enable uniform vec2 diffuseScale; varying vec3 vertexNormal; varying vec3 eyeVector; varying vec3 lightVector; varying vec3 tangentSpaceLightVector; void main(void) { vec4 curVertex = gl_Vertex; vec3 curNormal = gl_Normal; int isNormalMapped = 0; mat3 TBN; gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[0] = vec4(diffuseScale, 1.0, 1.0) * gl_MultiTexCoord0; gl_FrontColor = gl_Color; vec3 vertexPos; vertexPos = vec3(gl_ModelViewMatrix * curVertex); eyeVector = -vertexPos; lightVector = gl_LightSource[0].ambient.rgb - vertexPos; if (isNormalMapped == 1) { tangentSpaceLightVector = gl_LightSource[0].specular.rgb - vec3(curVertex); tangentSpaceLightVector = TBN * tangentSpaceLightVector; } else vertexNormal = normalize(gl_NormalMatrix * curNormal); gl_Position = gl_ModelViewProjectionMatrix * curVertex; } PR : Fragment source dump: #version 120 #extension GL_ARB_texture_rectangle : enable uniform sampler2D diffuseMap; varying vec3 vertexNormal; varying vec3 eyeVector; varying vec3 lightVector; varying vec3 tangentSpaceLightVector; void main(void) { vec3 commonTexCoord = vec3(gl_TexCoord[0].st, 0.0); vec4 result = vec4(1.0, 1.0, 1.0, 1.0); vec4 diffuseTexel = vec4(1.0, 1.0, 1.0, 1.0); vec4 specTexel = vec4(1.0, 1.0, 1.0, 1.0); vec4 normalTexel; int isLightingPass = 0; int isNormalMapped = 0; int isSpecularMapped = 0; vec3 eyeVec; int isSpotLight = 0; vec3 spotVector; vec2 spotCosRadius; float shadowResult = 1.0; vec2 specularMaterial = vec2(15.0, 1.0); vec3 lightTexel = vec3(1.0, 1.0, 1.0); isLightingPass = 1; result = vec4(0.0, 0.0, 0.0, 1.0); diffuseTexel = texture2D(diffuseMap, commonTexCoord.st); if (isLightingPass == 0) result *= vec4(gl_Color); if (isLightingPass == 0) result *= diffuseTexel; float pointLightDistance; float lightAttenuation; float spotAttenuation; vec3 N, L, E, R, D; vec3 lightDiffuse; float lightSpecular; float NdotL; float spotCosAngle; L = normalize(lightVector); pointLightDistance = dot(lightVector,lightVector); lightAttenuation = clamp(1.0 - pointLightDistance * gl_LightSource[0].linearAttenuation, 0.0, 1.0); spotAttenuation = 1.0; if (isSpotLight == 1) { D = normalize(spotVector); spotCosAngle = dot(-L, D); spotAttenuation = clamp((spotCosAngle - spotCosRadius.x) * spotCosRadius.y, 0.0, 1.0); } if (isNormalMapped == 1) { E = eyeVec; N = normalize(2.0 * (normalTexel.rgb - 0.5)); L = normalize(tangentSpaceLightVector); } else { E = normalize(eyeVector); N = normalize(vertexNormal); } NdotL = max(dot(N, L), 0.0); R = reflect(-L, N); lightDiffuse = gl_Color.a * shadowResult * lightTexel * gl_LightSource[0].diffuse.rgb * lightAttenuation * spotAttenuation; result += vec4(lightDiffuse * diffuseTexel.a * diffuseTexel.rgb * NdotL, 0.0); if (isSpecularMapped == 0) specTexel.rgb = diffuseTexel.rgb * diffuseTexel.a; lightSpecular = pow( max(dot(R, E), 0.0), specularMaterial.x * specTexel.a) * specularMaterial.y; result += vec4(lightDiffuse * specTexel.rgb * lightSpecular, 0.0); gl_FragColor = result; } MIGHTY FOOT ENGAGED PR : Failed to compile GPU program with bits 979163! PR : Compilation log: Vertex info ----------- (0) : error C9008: malloc failed in "mem_Alloc" Fragment info ------------- (0) : error C9008: malloc failed in "mem_Alloc" (0) : error C9000: internal corruption, aborting PR : Vertex source dump: #version 120 #extension GL_ARB_texture_rectangle : enable attribute vec4 nextFrameData; attribute vec4 nextFrameNormal; uniform float frameProgress; attribute vec3 T; attribute vec3 B; attribute vec3 N; uniform vec3 eyePosition; varying vec3 tangentSpaceEyeVec; uniform vec2 diffuseScale; uniform mat4 shadowProjMatrix; varying vec3 vertexNormal; varying vec3 eyeVector; varying vec3 lightVector; varying vec3 tangentSpaceLightVector; void main(void) { vec4 curVertex = gl_Vertex; vec3 curNormal = gl_Normal; int isNormalMapped = 0; mat3 TBN; gl_TexCoord[0] = gl_MultiTexCoord0; vec4 currentFramePosition; vec4 nextFramePosition; currentFramePosition = curVertex * (1.0 - frameProgress); nextFramePosition = nextFrameData * frameProgress; curVertex = currentFramePosition + nextFramePosition; currentFramePosition = vec4(curNormal, 1.0) * (1.0 - frameProgress); nextFramePosition = nextFrameNormal * frameProgress; curNormal = vec3(currentFramePosition + nextFramePosition); TBN = mat3(T, B, N); tangentSpaceEyeVec = eyePosition - vec3(curVertex); tangentSpaceEyeVec = TBN * tangentSpaceEyeVec; isNormalMapped = 1; gl_TexCoord[0] = vec4(diffuseScale, 1.0, 1.0) * gl_MultiTexCoord0; gl_FrontColor = gl_Color; gl_TexCoord[2] = shadowProjMatrix * curVertex; vec3 vertexPos; vertexPos = vec3(gl_ModelViewMatrix * curVertex); eyeVector = -vertexPos; lightVector = gl_LightSource[0].ambient.rgb - vertexPos; if (isNormalMapped == 1) { tangentSpaceLightVector = gl_LightSource[0].specular.rgb - vec3(curVertex); tangentSpaceLightVector = TBN * tangentSpaceLightVector; } else vertexNormal = normalize(gl_NormalMatrix * curNormal); gl_Position = gl_ModelViewProjectionMatrix * curVertex; } PR : Fragment source dump: #version 120 #extension GL_ARB_texture_rectangle : enable uniform sampler2D normalMap; uniform vec2 normalBias; varying vec3 tangentSpaceEyeVec; uniform sampler2D diffuseMap; uniform sampler2D glowMap; uniform sampler2DShadow shadowMap; uniform vec3 spotDir; uniform vec2 spotRadius; varying vec3 vertexNormal; varying vec3 eyeVector; varying vec3 lightVector; varying vec3 tangentSpaceLightVector; void main(void) { vec3 commonTexCoord = vec3(gl_TexCoord[0].st, 0.0); vec4 result = vec4(1.0, 1.0, 1.0, 1.0); vec4 diffuseTexel = vec4(1.0, 1.0, 1.0, 1.0); vec4 specTexel = vec4(1.0, 1.0, 1.0, 1.0); vec4 normalTexel; int isLightingPass = 0; int isNormalMapped = 0; int isSpecularMapped = 0; vec3 eyeVec; int isSpotLight = 0; vec3 spotVector; vec2 spotCosRadius; float shadowResult = 1.0; vec2 specularMaterial = vec2(15.0, 1.0); vec3 lightTexel = vec3(1.0, 1.0, 1.0); vec4 normalStep; float biasedHeight; eyeVec = normalize(tangentSpaceEyeVec); for (int i = 0; i < 4; i++) { normalStep = texture2D(normalMap, commonTexCoord.st); biasedHeight = normalStep.a * normalBias.x - normalBias.y; commonTexCoord += (biasedHeight - commonTexCoord.z) * normalStep.z * eyeVec; } normalTexel = texture2D(normalMap, commonTexCoord.st); isNormalMapped = 1; diffuseTexel = texture2D(diffuseMap, commonTexCoord.st); if (isLightingPass == 0) result *= vec4(gl_Color); if (isLightingPass == 0) result *= diffuseTexel; float fragDepth; float fogFactor; fragDepth = gl_FragCoord.z / gl_FragCoord.w / 35.0; fragDepth *= fragDepth; fogFactor = exp2(-gl_Fog.density * gl_Fog.density * fragDepth * 1.442695); result.rgb = mix(gl_Fog.color.rgb, result.rgb, fogFactor); vec4 glowTexel; glowTexel = texture2D(glowMap, commonTexCoord.st); result = vec4((result.rgb * (1.0 - glowTexel.a)) + (glowTexel.rgb * glowTexel.a), result.a); shadowResult = shadow2DProj(shadowMap, gl_TexCoord[2]).a; spotVector = spotDir; spotCosRadius = spotRadius; isSpotLight = 1; float pointLightDistance; float lightAttenuation; float spotAttenuation; vec3 N, L, E, R, D; vec3 lightDiffuse; float lightSpecular; float NdotL; float spotCosAngle; L = normalize(lightVector); pointLightDistance = dot(lightVector,lightVector); lightAttenuation = clamp(1.0 - pointLightDistance * gl_LightSource[0].linearAttenuation, 0.0, 1.0); spotAttenuation = 1.0; if (isSpotLight == 1) { D = normalize(spotVector); spotCosAngle = dot(-L, D); spotAttenuation = clamp((spotCosAngle - spotCosRadius.x) * spotCosRadius.y, 0.0, 1.0); } if (isNormalMapped == 1) { E = eyeVec; N = normalize(2.0 * (normalTexel.rgb - 0.5)); L = normalize(tangentSpaceLightVector); } else { E = normalize(eyeVector); N = normalize(vertexNormal); } NdotL = max(dot(N, L), 0.0); R = reflect(-L, N); lightDiffuse = gl_Color.a * shadowResult * lightTexel * gl_LightSource[0].diffuse.rgb * lightAttenuation * spotAttenuation; result += vec4(lightDiffuse * diffuseTexel.a * diffuseTexel.rgb * NdotL, 0.0); if (isSpecularMapped == 0) specTexel.rgb = diffuseTexel.rgb * diffuseTexel.a; lightSpecular = pow( max(dot(R, E), 0.0), specularMaterial.x * specTexel.a) * specularMaterial.y; result += vec4(lightDiffuse * specTexel.rgb * lightSpecular, 0.0); gl_FragColor = result; } MIGHTY FOOT ENGAGED Saved screenshot to duke0000.tga SCREEN SAVED Saved screenshot to duke0001.tga SCREEN SAVED