Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double shadow buffers in W3DBufferManager #604

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/platform/w3dengine/client/shadow/w3dbuffermanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,19 @@ class W3DBufferManager

enum
{
MAX_NUMBER_SLOTS = 4096,
// The number of slots corresponds to number of meshes casting shadows in the scene.
// The more meshes there are, the larger the slots needs to be.
// #BUGFIX Double the original sizes to allow for twice as many shadows to be created in the scene.
MAX_NUMBER_SLOTS = 4096 * 2,

// Don't change these two
// Changing these breaks shadows so something elsewhere relies on them
MAX_VERTEX_BUFFERS_CREATED = 32 * 2,
MAX_INDEX_BUFFERS_CREATED = 32 * 2,

// The max sizes correspond to a number of vertices and indices of a mesh casting shadows in the scene.
// The more vertices the meshes are supposed to have, the higher these limits need to be.
// Multiplying these numbers by 32 gives the max supported amount of vertices and indices.
MAX_VB_SIZES = 128,
MAX_IB_SIZES = 128,

MAX_VERTEX_BUFFERS_CREATED = 32,
MAX_INDEX_BUFFERS_CREATED = 32,
};

W3DBufferManager();
Expand Down
Loading