Skip to content

Add Shaders/SharedData constant buffer and sampler strings - #40

Open
Crauzer wants to merge 1 commit into
CommunityDragon:masterfrom
Crauzer:shader-shareddata-entries
Open

Add Shaders/SharedData constant buffer and sampler strings#40
Crauzer wants to merge 1 commit into
CommunityDragon:masterfrom
Crauzer:shader-shareddata-entries

Conversation

@Crauzer

@Crauzer Crauzer commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

assets/shaders/shareddata.bin holds one X3DSharedData index plus 33 definition entries: 25 X3DSharedConstantBufferDef and 8 X3DSharedSamplerDef. Every one of those entry keys is currently unresolved, and every definition carries its own name string:

0xd8907437 = X3DSharedConstantBufferDef { name: string = "BonesCB" ... }
0xa6bded4f = X3DSharedSamplerDef        { name: string = "Clamp_No_Mip" ... }

Two path schemes reproduce 28 of the 33 keys:

Shaders/SharedData/ConstantBuffers/{leaf}     20 of 25
Shaders/SharedData/SharedSamplers/{leaf}       8 of 8

{leaf} is the name field with a trailing CB or _BUFFER removed, in the casing the file itself ships: BonesCB -> Bones, PerFramePixelCB -> PerFramePixel, IBL_CUBEMAP_SCALES_BUFFER -> IBL_CUBEMAP_SCALES. Names with no such suffix are used as is.

The flat Shaders/SharedData/{leaf} entries are now stale against shipped files so this fixes it.

Five constant buffers remain unresolved because their path leaf is not a simple transform of name: CharacterPerDrawVertexCB (0xa61a3acb), PostEffectPixelCB (0xb2db15bc), FontVertexCB (0xcb07a94b), VFXDynamicPerParticleInstanceCBVS (0xd234e251), VFXDynamicPerParticleInstanceCBPS (0xd243ecdb).

This work was done with the help of an LLM, and every entry was verified against shipped game data.

@Morilli

Morilli commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I was able to find the remaining entry paths:
CharacterPerDrawVertexCB => Shaders/SharedData/ConstantBuffers/CharacterPerDrawVS
PostEffectPixelCB => Shaders/SharedData/ConstantBuffers/PostEffects
FontVertexCB => Shaders/SharedData/ConstantBuffers/FontRendering
VFXDynamicPerParticleInstanceCBVS => Shaders/SharedData/ConstantBuffers/VFXDynamicPerParticleVS
VFXDynamicPerParticleInstanceCBPS => Shaders/SharedData/ConstantBuffers/VFXDynamicPerParticlePS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants