Converting HSR Mod Pipeline - Seris0/Gustav0 GitHub Wiki
How convert an older-style CS pipeline (DrawCS, dynamic blend logic) into the newer Batched Pose format.
- XXMI 0.6.6 and SRMI 2.1.0
[TextureOverride<ModName>Blend]
hash = <hash>
handling = skip
vb2 = Resource<ModName>Blend
if DRAW_TYPE == 1
vb0 = Resource<ModName>Position
draw = 4435, 0
endif
Resource<ModName>DrawCS = copy Resource<ModName>DrawCS
if DRAW_TYPE == 8
Resource\SRMI\PositionBuffer = ref Resource<ModName>PositionCS
Resource\SRMI\BlendBuffer = ref Resource<ModName>BlendCS
Resource\SRMI\DrawBuffer = ref Resource<ModName>DrawCS
$\SRMI\vertcount = 4435
elif DRAW_TYPE == 1
$_blend_ = 2
endif
[TextureOverride<ModName>Blend]
hash = <same hash>
handling = skip
vb2 = Resource<ModName>Blend
if DRAW_TYPE == 1
vb0 = Resource<ModName>Position
draw = 4435, 0
endif
if DRAW_TYPE == 8
Resource\SRMI\PositionBuffer = ref Resource<ModName>PositionCS
Resource\SRMI\BlendBuffer = ref Resource<ModName>BlendCS
$\SRMI\vertex_count = 4435
endif
-
DrawCS
andDrawBuffer
references ❌ removed -
vertcount
changed tovertex_count
- All conditional logic for
DRAW_TYPE == 1
and$_blend_
❌ removed
[TextureOverride<ModName>VertexLimitRaise/Draw/Limit/Draw_Limit]
hash = <hash>
override_vertex_count = 4435
override_byte_stride = 40
if DRAW_TYPE != 1 && DRAW_TYPE != 8 && $_blend_ > 0
$_blend_ = $_blend_ - 1
this = ref Resource<ModName>DrawCS
endif
[TextureOverride<ModName>VertexLimitRaise/Draw/Limit/Draw_Limit]
hash = <same hash>
override_vertex_count = 4435
override_byte_stride = 40
uav_byte_stride = 4
- Removed
$_blend_
logic and conditional blocks - Added
uav_byte_stride = 4
Warning
💡 Reminder: If override_vertex_count
or override_byte_stride
is missing in your conversion, add them manually. override_byte_stride
is always 40
, and override_vertex_count
must match the previous \SRMI\vertex_count
value.
HSRPipeline.mp4
This usually means the $vertex_count
value is too low.
You have two options to find the real value:
-
Increment method: Start increasing the
$vertex_count
value in steps (e.g., by 3000). For example:- If your current value is 19000, try 22000, then 25000, etc.
-
File size method: Locate the
.buf
file for the mesh (e.g.,BodyPosition.buf
), and divide its size in bytes by the stride (usually 40):
*Example: 930520 bytes / 40 = 23263
This final number is your true vertex_count
. Always round up if needed to ensure stability.