summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/19-oit/oit.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/19-oit/oit.cpp')
-rw-r--r--3rdparty/bgfx/examples/19-oit/oit.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/3rdparty/bgfx/examples/19-oit/oit.cpp b/3rdparty/bgfx/examples/19-oit/oit.cpp
index b9bbd041934..78c600331dd 100644
--- a/3rdparty/bgfx/examples/19-oit/oit.cpp
+++ b/3rdparty/bgfx/examples/19-oit/oit.cpp
@@ -410,6 +410,14 @@ class ExampleOIT : public entry::AppI
| BGFX_STATE_MSAA
;
+ const uint64_t stateNoDepth = 0
+ | BGFX_STATE_CULL_CW
+ | BGFX_STATE_RGB_WRITE
+ | BGFX_STATE_ALPHA_WRITE
+ | BGFX_STATE_DEPTH_TEST_ALWAYS
+ | BGFX_STATE_MSAA
+ ;
+
bgfx::ProgramHandle program = BGFX_INVALID_HANDLE;
switch (m_mode)
{
@@ -428,7 +436,7 @@ class ExampleOIT : public entry::AppI
program = m_wbSeparatePass;
// Set render states.
- bgfx::setState(state
+ bgfx::setState(stateNoDepth
| BGFX_STATE_BLEND_FUNC_SEPARATE(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ZERO, BGFX_STATE_BLEND_INV_SRC_ALPHA)
);
break;
@@ -438,7 +446,7 @@ class ExampleOIT : public entry::AppI
program = m_wbPass;
// Set render states.
- bgfx::setState(state
+ bgfx::setState(stateNoDepth
| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)
| BGFX_STATE_BLEND_INDEPENDENT
, 0