mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix glow sprite flashing, move fadeAlpha to push constants, throttle character bones
- Glow sprites now use dedicated vertex buffer (glowVB_) separate from M2 particle buffer to prevent data race when renderM2Particles() overwrites glow data mid-flight - Move fadeAlpha from shared material UBO to per-draw push constants, eliminating cross-instance alpha race on non-double-buffered UBOs - Smooth adaptive render distance transitions to prevent pop-in/out at instance count thresholds (1000/2000) - Distance-tiered character bone throttling: near (<30u) every frame, mid (30-60u) every 3rd, far (60-120u) every 6th frame - Skip weapon instance animation updates (transforms set by parent bones)
This commit is contained in:
parent
3482dacea8
commit
30fa9836d9
8 changed files with 87 additions and 31 deletions
|
|
@ -19,6 +19,7 @@ layout(push_constant) uniform Push {
|
|||
int texCoordSet;
|
||||
int useBones;
|
||||
int isFoliage;
|
||||
float fadeAlpha;
|
||||
} push;
|
||||
|
||||
layout(set = 2, binding = 0) readonly buffer BoneSSBO {
|
||||
|
|
@ -37,6 +38,7 @@ layout(location = 1) out vec3 Normal;
|
|||
layout(location = 2) out vec2 TexCoord;
|
||||
layout(location = 3) flat out vec3 InstanceOrigin;
|
||||
layout(location = 4) out float ModelHeight;
|
||||
layout(location = 5) out float vFadeAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 pos = vec4(aPos, 1.0);
|
||||
|
|
@ -86,6 +88,7 @@ void main() {
|
|||
|
||||
InstanceOrigin = push.model[3].xyz;
|
||||
ModelHeight = pos.z;
|
||||
vFadeAlpha = push.fadeAlpha;
|
||||
|
||||
gl_Position = projection * view * worldPos;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue