Skip to content

Commit 6137060

Browse files
committed
Made _shader_custom_gamma_correct optional
1 parent 0e20e47 commit 6137060

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

game/source/interface/c_gui_bitmap_widget.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ void __cdecl render_bitmap(s_gui_bitmap_widget_render_data const* render_data, r
283283
if (bitmap && bitmap->m_bitmap_ready && &bitmap->m_bitmap_data)
284284
{
285285
hardware_format_primary = bitmap->m_hardware_format_bitmap;
286-
explicit_shader_index = c_rasterizer_globals::_shader_custom_gamma_correct;
286+
if (bitmap->m_use_shader_custom_gamma_correct) // added by us
287+
{
288+
explicit_shader_index = c_rasterizer_globals::_shader_custom_gamma_correct;
289+
}
287290
}
288291
}
289292
}

game/source/interface/gui_custom_bitmap_storage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ void __thiscall c_gui_custom_bitmap_storage_item::initialize(int32 width, int32
5050
m_width = m_bitmap_data.width;
5151
m_height = m_bitmap_data.height;
5252
m_allocated = true;
53+
m_use_shader_custom_gamma_correct = false; // added by us
5354
}
5455

5556
bool __thiscall c_gui_custom_bitmap_storage_item::initialize_raw(int32 width, int32 height, char* buffer, int32 buffer_length, bool cpu_cached)

game/source/interface/gui_custom_bitmap_storage.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ struct c_gui_custom_bitmap_storage_item
2020
bool m_use_compressed_format;
2121
bitmap_data m_bitmap_data;
2222
bool m_allocated;
23-
byte pad[0x3];
23+
bool m_use_shader_custom_gamma_correct; // added by us
24+
byte pad[0x2]; // 0x3
2425
c_rasterizer_texture_ref m_hardware_format_bitmap;
2526
bool m_bitmap_ready;
2627
char* m_bitmap_pixel_buffer_allocation;

0 commit comments

Comments
 (0)