Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_deferred.c
| Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Order Independant Transparency. | * Order Independant Transparency. | ||||
| * Similar to workbench forward. Duplicated code to avoid | * Similar to workbench forward. Duplicated code to avoid | ||||
| * spaghetti with workbench forward. It would be great if we unify | * spaghetti with workbench forward. It would be great if we unify | ||||
| * this in a clean way. | * this in a clean way. | ||||
| **/ | */ | ||||
| if (OIT_ENABLED(wpd)) { | if (OIT_ENABLED(wpd)) { | ||||
| const bool do_cull = CULL_BACKFACE_ENABLED(wpd); | const bool do_cull = CULL_BACKFACE_ENABLED(wpd); | ||||
| const int cull_state = (do_cull) ? DRW_STATE_CULL_BACK : 0; | const int cull_state = (do_cull) ? DRW_STATE_CULL_BACK : 0; | ||||
| /* Transparency Accum */ | /* Transparency Accum */ | ||||
| { | { | ||||
| /* Same as forward but here we use depth test to | /* Same as forward but here we use depth test to | ||||
| * not bleed through other solid objects. */ | * not bleed through other solid objects. */ | ||||
| int state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_OIT | DRW_STATE_DEPTH_LESS | cull_state; | int state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_OIT | DRW_STATE_DEPTH_LESS | cull_state; | ||||
| ▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines | |||||