Page MenuHome

View3D: Tweak GLSL preview, use only lamps enabled in active render layer and material light group.
ClosedPublic

Authored by Shinsuke Irie (irie) on Apr 9 2014, 2:58 PM.

Details

Summary

This change gives us more accurate preview in GLSL viewport, though it still doesn't support material's "Exclusive" option. I believe this is much useful for creating scenes with complicated lamp settings.

Note: Changes in view3d_draw.c are not essential, these avoid preparing unused shadow buffers.

Diff Detail

Branch
view3d_GLSL_lamps

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Apr 26 2014, 1:18 PM

Can you wrap this check in a function that can be used by both?

Does the viewport update correctly when you change render layers or add objects to groups?

Shinsuke Irie (irie) updated this revision to Unknown Object (????).Apr 27 2014, 3:05 PM

Added wrapper function for checking visibility of lamps overridden by light group. Also removed unneeded #include.
Note, gpu_render_lamp_update() doesn't check material light group because there is no way to access material data.

I confirmed the viewport is updated correctly.

Looks good to me.