diff options
author | Alexander Romanov <a.romanov@blend4web.com> | 2016-07-04 11:01:32 +0300 |
---|---|---|
committer | Alexander Romanov <a.romanov@blend4web.com> | 2016-07-04 11:01:32 +0300 |
commit | fe44eacf78736f99bdfd3bc3ac86abd17e8ad514 (patch) | |
tree | d455a08416a08ea5a8bd2debd5afb8ef1deb63ea /source/blender/makesrna/intern/rna_scene.c | |
parent | 9269574089a742130f02c0a1184a19d94f0e665d (diff) |
Environment lighting for the GLSL mode
Environment lighting (aka ambient) is a key component of any renderer.
It's implemented like the Environment lighting of BI render for Approximate Gather mode. It support "Sky Color" and "White" Environment lighting modes.
It would be great if the user could see actual lighting conditions right in the Blender viewport instead of waiting for the renderer to complete the final image, exporting for external renderer or for a game engine.
Before:
{F113921}
After:
{F113922}
Example file: {F319013}
Original author: valentin_b4w
Alexander (Blend4Web Team)
Reviewers: valentin_b4w, campbellbarton, merwin, brecht
Reviewed By: brecht
Subscribers: panzergame, youle, duarteframos, AlexKowel, yurikovelenov, dingto, Evgeny_Rodygin
Projects: #rendering, #opengl_gfx
Differential Revision: https://developer.blender.org/D810
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 533c0f86460..2943d74f9be 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4381,6 +4381,11 @@ static void rna_def_scene_game_data(BlenderRNA *brna) "Use extra textures like normal or specular maps for GLSL rendering"); RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update"); + prop = RNA_def_property(srna, "use_glsl_environment_lighting", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_ENV_LIGHTING); + RNA_def_property_ui_text(prop, "GLSL Environment Lighting", "Use environment lighting for GLSL rendering"); + RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update"); + prop = RNA_def_property(srna, "use_material_caching", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_NO_MATERIAL_CACHING); RNA_def_property_ui_text(prop, "Use Material Caching", |