74cb74d3c9
- namespace refactor (example: wiGraphics:: -> wi::graphics) - provided namespace compatibility macro for old user code: WICKEDENGINE_BACKWARDS_COMPATIBILITY_0_59 - resource manager will return `Resource` instead of `shared_ptr<Resource>` objects - MAD shader optimizations - implemented alpha to coverage with alpha tested materials when MSAA is enabled - alpha testing fix with transparent shadow maps - TLAS and scene buffers will be recreated less frequently when things get added/removed from the scene
29 lines
764 B
C++
29 lines
764 B
C++
#pragma once
|
|
#include "CommonInclude.h"
|
|
#include "wiGraphicsDevice.h"
|
|
#include "wiScene_Decl.h"
|
|
|
|
namespace wi
|
|
{
|
|
struct GPUBVH
|
|
{
|
|
// Scene BVH intersection resources:
|
|
wi::graphics::GPUBuffer bvhNodeBuffer;
|
|
wi::graphics::GPUBuffer bvhParentBuffer;
|
|
wi::graphics::GPUBuffer bvhFlagBuffer;
|
|
wi::graphics::GPUBuffer primitiveCounterBuffer;
|
|
wi::graphics::GPUBuffer primitiveIDBuffer;
|
|
wi::graphics::GPUBuffer primitiveBuffer;
|
|
wi::graphics::GPUBuffer primitiveMortonBuffer;
|
|
uint32_t primitiveCapacity = 0;
|
|
bool IsValid() const { return primitiveCounterBuffer.IsValid(); }
|
|
|
|
void Update(const wi::scene::Scene& scene);
|
|
void Build(const wi::scene::Scene& scene, wi::graphics::CommandList cmd) const;
|
|
|
|
void Clear();
|
|
|
|
static void Initialize();
|
|
};
|
|
}
|