mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Adds GPU skinning support via compute shaders.
We use a shader with 64 bones by default to consume less uniform memory. But if we meet bigger skeletons we batch and handle them afterwards. In the future we need to sort the input models to have less changes for bound buffers. Also we might want to skin up to 4 models per a single dispatch.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -91,8 +91,8 @@ public:
|
||||
// (TODO: sort out the timing/looping problems)
|
||||
|
||||
const size_t boneCount = skeleton.GetBoneCount();
|
||||
if (boneCount > 64)
|
||||
Log(LOG_ERROR, "Skeleton has too many bones %zu/64", boneCount);
|
||||
if (boneCount > 192)
|
||||
Log(LOG_ERROR, "Skeleton has too many bones %zu/192", boneCount);
|
||||
|
||||
std::vector<BoneTransform> boneTransforms;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user