Author Topic: GL_LIGHT_MODEL_TWO_SIDE  (Read 2788 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1190
    • zapsolution
GL_LIGHT_MODEL_TWO_SIDE
« on: May 02, 2016, 02:31:47 pm »
Mike--

Because i am tired of small normal errors, i have added a new menu/material option to turn both side illumination on/off.

In the material file use:
#bothsides
Enable the GL_LIGHT_MODEL_TWO_SIDE parameter, to illuminate both sides of polygons. By default, only the front of polygons is illuminated.
Syntax: #bothsides

There is also a new contextual menu option to turn it On or Off on the fly.



« Last Edit: May 02, 2016, 09:10:45 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1017
Re: GL_LIGHT_MODEL_TWO_SIDE
« Reply #1 on: May 02, 2016, 06:24:47 pm »
Thanks for the updates, Patrice.

However you should be aware of the following:

1. Lighting both sides of the objects aggravates lighting equation calculation stress on OpenGL, is effectively equivalent to doubling the number of active lights, and may lead to a substantial drop in the FPS rate for complex models. It is practically as stressful as not culling the model's backfaces.

2. GL_LIGHT_MODEL_TWO_SIDE toggle has no effect on GLSL shaders. Those must implement this functionality explicitly in their own code, recalculating the light incident from mirror reflected light positions.

I'd also suggest using a somewhat more grammatically correct collocation #bothsides.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1190
    • zapsolution
Re: GL_LIGHT_MODEL_TWO_SIDE
« Reply #2 on: May 02, 2016, 07:14:02 pm »
Quote
I'd also suggest using a somewhat more grammatically correct collocation #bothsides.
Done ;)

Quote
GL_LIGHT_MODEL_TWO_SIDE toggle has no effect on GLSL shaders
Most of the time this occures with simple FFP models, and models that have not been reworked yet.
« Last Edit: October 09, 2017, 03:41:09 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)