GRIM: Correct diffuse reflectance.
Determined by keping a single directional light source enabled, as they are not subject to attenuation (having no position), and comparing with original software renderer. Default DirectX material reflects all diffuse light, so 1.0f coefficient is likely correct.
This commit is contained in:
parent
f36d2b62f8
commit
06e7aa68b0
2 changed files with 4 additions and 0 deletions
|
@ -158,6 +158,8 @@ byte *GfxOpenGL::setupScreen(int screenW, int screenH, bool fullscreen) {
|
|||
|
||||
GLfloat ambientSource[] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientSource);
|
||||
GLfloat diffuseReflectance[] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseReflectance);
|
||||
|
||||
if (g_grim->getGameType() == GType_GRIM) {
|
||||
glPolygonOffset(-6.0, -6.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue