Override
There are two types of overrides: TextureOverride and ShaderOverride. When there is a corresponding hashed object on the screen, it triggers the operation of the respective override section. This is the core functionality of GIMI and the starting point for all mods.
[*Override*]
[TextureOverrideLumineBody]
[ShaderOverridGroundHealthBar]Common properties
The most used ones for most mods, while not necesary to read for most mod makers is good to learn about them.
hash
It tells GIMI which object to pay attention to and triggers the corresponding action when found.
[TextureOverrideLumineBody]
hash = afd36b46
[ShaderOverrideOutlines]
hash = afd36b46afd36b46handling
It specifies the rendering operation for the designated object, usually using skip to bypass rendering.
[TextureOverrideLumineDress]
handling = skipdrawindexed
Tell GIMI to perform our own rendering instead of using the game's rendering. It is usually used in conjunction with handling.
[TextureOverrideLumineBody]
drawindexed = autodraw
Assigns x vertex in memory space to be drawn at y index. DirectX Documentation: https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-draw
[TextureOverrideLumineBlend]
draw = x, yvbx
Vertex buffer. It usually points directly to another Resource section.
[TextureOverrideLumineBody]
vb0 = ResourceLuminePositionIn other games vb1, vb2, etc are used. For genshin's case it's always vb0.
ib
Index buffer. It usually points directly to a Resource section that contains the IB. There can only be one index buffer per object.
[TextureOverrideLumineBody]
ib = ResourceLumineBodyIBps-tx
Texture resource layer. There are several different types, generally, t0 represents the texture map, t1 represents the light map, t2 represents the metal map, and t3 represents the shadow map. In 3.0 characters this convetion is broken. For more info and fix check:
[TextureOverrideLumineDress]
ps-t0 = ResourceLumineDressDiffuse
ps-t1 = ResourceLumineDressLightMap
ps-t2 = ResourceLumineDressMetalMap
ps-t3 = ResourceLumineDressShadowRamp
...allow_duplicate_hash
At ShaderOverride. Controls whether to allow overriding the same hash or not.
Possible values are:
- true: Overrides when duplicates exist.
- false: Does not override when duplicates exist.
- overrule: Forces the override, which seems to be a plugin-level override.
[ShaderOverrideLumineQEffect]
hash = 030dbce199e10697
allow_duplicate_hash = overrulematch_priority
At TextureOverride. Declares the order priority for overrides. The higher the value, the higher the priority. It is not commonly used in GIMI, except in cases where it is used to eliminate hash conflicts. In those cases, setting it to 0 is sufficient.
[TextureOverrideLumineGlasses]
match_priority = 0Advanced properties
These are often not applied in most mods but they can be very powerful.
filter_index
Declares a check value that allows checking elsewhere. It is likely to occupy ps-t0, so it is uncertain whether it is a good approach.
[TextureOverrideLumineGlasses]
filter_index = 34analyse_options
can also be specified in [ShaderOverride*] sections (or other command lists) to set up triggers to change the options mid-way through a frame analysis, either for a single draw call (default), or permanently (by adding the 'persist' keyword).
Alternatively, "dump" can be specified in a [ShaderOverride*] section (or any other command list) to dump specific resources with per-resource options
"dump = dump_tex dds share_dupes mono ps-t0"dump resources at a specific point in time (e.g. "pre dump = o0") or dump a custom resource that frame analysis cannot otherwise see
"dump = ResourceDepthBuffer"Use additional "dump" commands to dump multiple resources.
match_first_index
Specifies the starting position of the buffer. Sometimes, a hash may contain more than one material, so it is necessary to specify the correct resource to load.
[TextureOverrideLumineBody]
match_first_index = 25600match_type
At TextureOverride. Used instead of hash. Called when any component of the selected type is rendered.
[TextureOverrideTexture2D]
match_type = Texture2Dmatch_width
At TextureOverride. Checks the width of the texture.
[TextureOverrideWidth1024]
match_width = 1024match_height
At TextureOverride. Checks the height of the texture.
[TextureOverrideHeight1024]
match_height = 1024match_msaa
At TextureOverride. Filter by MSAA (Not used in anime game).
[TextureOverrideMsaa]
match_msaa = 1match_msaa_quality
At TextureOverride.
[TextureOverrideMsaaQuality]
match_msaa_quality = 1match_usage
At TextureOverride.
This setting doesn't make much sense and defaults to DEFAULT.
More details here: https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_usage
[TextureOverrideUsage]
match_usage = IMMUTABLEmatch_bind_flags
At TextureOverride. Another filter. You can use + or - before the flag to change the filtering. If there is no + or - then the filter is simply not used.
[TextureOverrideAllBindFlags]
match_bind_flags = +VERTEX_BUFFER -INDEX_BUFFER CONSTANT_BUFFER SHADER_RESOURCE STREAM_OUTPUT RENDER_TARGET DEPTH_STENCIL UNORDERED_ACCESS DECODER VIDEO_ENCODERmatch_cpu_access_flags
At TextureOverride. Another filter. You can use + or - before the flag to change the filtering. If there is no + or - then the filter is simply not used.
[TextureOverrideAllCPUAccessFlags]
match_cpu_access_flags = +READ -WRITEmatch_misc_flags
At TextureOverride. Another filter. You can use + or - before the flag to change the filtering. If there is no + or - then the filter is simply not used.
[TextureOverrideAllMiscFlags]
match_misc_flags = GENERATE_MIPS SHARED TEXTURECUBE DRAWINDIRECT_ARGS BUFFER_ALLOW_RAW_VIEWS BUFFER_STRUCTURED RESOURCE_CLAMP SHARED_KEYEDMUTEX GDI_COMPATIBLE SHARED_NTHANDLE RESTRICTED_CONTENT RESTRICT_SHARED_RESOURCE RESTRICT_SHARED_RESOURCE_DRIVER GUARDED TILE_POOL TILEDmatch_byte_width
At TextureOverride. Match byte width.
[TextureOverrideByteWidth]
match_byte_width = res_width * res_heightmatch_stride
At TextureOverride. Something to do with buffers.
[TextureOverrideStride]
match_stride = 40match_mips
At TextureOverride.
[TextureOverrideMips]
match_mips = 1match_format
At TextureOverride. Filter by format. Useful for modifying something that doesn't have a constant hash. List of DX formats: https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format
[TextureOverrideFormat]
match_format = R32G32B32A32_FLOATmatch_depth
At TextureOverride.
[TextureOverrideDepth]
match_depth = 1match_array
At TextureOverride.
[TextureOverrideArray]
match_array = 12