mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-05 07:21:17 +00:00
5656345d1f
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... |
||
---|---|---|
.. | ||
glad | ||
header | ||
gl3_draw.c | ||
gl3_image.c | ||
gl3_light.c | ||
gl3_lightmap.c | ||
gl3_main.c | ||
gl3_md2.c | ||
gl3_mesh.c | ||
gl3_misc.c | ||
gl3_model.c | ||
gl3_sdl.c | ||
gl3_shaders.c | ||
gl3_sp2.c | ||
gl3_surf.c | ||
gl3_warp.c |