gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
304 stars 99 forks source link

[opengl] background color is not affected by ambient light #3869

Closed lesquoyb closed 1 year ago

lesquoyb commented 1 year ago

Describe the bug As title says, when defining an ambient light, the background color of a 3d display is not affected.

To Reproduce Steps to reproduce the behavior:

  1. run:
    
    model transparent

global { init{ create b; } } species b{ aspect default{ draw circle(10) color:#red; } } experiment a {

output {
    display t type:3d background:#red {
        light #ambient intensity:20;
        species b;
    }       
}

}


3. Observe:
<img width="401" alt="image" src="https://github.com/gama-platform/gama/assets/6374469/2be70008-b8f3-4ac2-b464-8a2fbcd6ed75">

In this example, the agent and the background are both defined as red, but are displayed with a different color

**Expected behavior**
Either a warning that background color doesn't work completely in 3d, or that background color is modified by the ambient light
AlexisDrogoul commented 1 year ago

Actually, background here relates to the display (the UI, not submitted to the light) and not to the layers (the contents, submitted to the light).

AlexisDrogoul commented 1 year ago

I have added a sentence in the doc to clarify this