yquake2remaster/src/client/refresh/gl3
Daniel Gibson 5656345d1f GL3: Dyn. Lights: Factor in angle, make it work on Win/AMD and OSX
adding dot(surfaceNormal, lightToPixelOnSurfaceNormal) to the equation,
should be Phong-y now? Looks good at least.

The Windows AMD legacy driver needed its usual manual padding..

OSX was totally weird.. There were no errors or warnings from OpenGL
at all, but the dynamic lights were just not visible.
After (too long) debugging the shader I figured out that
dynLights[i].lightIntensity was always 1, and thus
'dynLights[i].lightIntensity - distLightToPos - 64' was negative and set
to 0 with max(0, ...).
I still have no idea why that happens, but removing lightIntensity from
the struct, making lightColor a vec4 and using .a for intensity works...
2017-03-27 22:43:10 +02:00
..
glad begin implementing ref_gl3 2017-02-19 06:03:07 +01:00
header GL3: Support dynamic lights (mostly) + changes for that 2017-03-27 01:02:54 +02:00
gl3_draw.c Render lightmaps together with corresponding faces; gl_overbrightbits 2017-03-12 03:11:29 +01:00
gl3_image.c GL3: Bigger, fewer Lightmap textures, cleanups 2017-03-25 17:22:54 +01:00
gl3_light.c GL3: Support dynamic lights (mostly) + changes for that 2017-03-27 01:02:54 +02:00
gl3_lightmap.c GL3: Support dynamic lights (mostly) + changes for that 2017-03-27 01:02:54 +02:00
gl3_main.c GL3: Upload UBOs with glBufferData(), make it build+work on Windows.. 2017-03-25 18:19:28 +01:00
gl3_md2.c GL3: added missing source files and stubs of most functions 2017-02-19 06:03:07 +01:00
gl3_mesh.c GL3: Render each Model in one draw call (as GL_TRIANGLES w/ EBO) 2017-03-25 17:25:17 +01:00
gl3_misc.c GL3: Render each Model in one draw call (as GL_TRIANGLES w/ EBO) 2017-03-25 17:25:17 +01:00
gl3_model.c GL3: Bigger, fewer Lightmap textures, cleanups 2017-03-25 17:22:54 +01:00
gl3_sdl.c Allow switching VSync on/off without vid_restart (for SDL2) 2017-03-04 16:31:34 +01:00
gl3_shaders.c GL3: Dyn. Lights: Factor in angle, make it work on Win/AMD and OSX 2017-03-27 22:43:10 +02:00
gl3_sp2.c GL3: added missing source files and stubs of most functions 2017-02-19 06:03:07 +01:00
gl3_surf.c GL3: Support dynamic lights (mostly) + changes for that 2017-03-27 01:02:54 +02:00
gl3_warp.c GL3: Support dynamic lights (mostly) + changes for that 2017-03-27 01:02:54 +02:00