1
0
Fork 0

renderer_opengl: Fix flashlight problems in Luigi's Mansion (#6160)

This commit is contained in:
GPUCode 2022-10-16 17:49:29 +03:00 committed by GitHub
parent b05b5b3bd8
commit ea26f46b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1914,7 +1914,8 @@ void RasterizerOpenGL::SyncLightPosition(int light_index) {
void RasterizerOpenGL::SyncLightSpotDirection(int light_index) { void RasterizerOpenGL::SyncLightSpotDirection(int light_index) {
const auto& light = Pica::g_state.regs.lighting.light[light_index]; const auto& light = Pica::g_state.regs.lighting.light[light_index];
const auto spot_direction = Common::Vec3u{light.spot_x, light.spot_y, light.spot_z} / 2047.0f; const auto spot_direction =
Common::Vec3f{light.spot_x / 2047.0f, light.spot_y / 2047.0f, light.spot_z / 2047.0f};
if (spot_direction != uniform_block_data.data.light_src[light_index].spot_direction) { if (spot_direction != uniform_block_data.data.light_src[light_index].spot_direction) {
uniform_block_data.data.light_src[light_index].spot_direction = spot_direction; uniform_block_data.data.light_src[light_index].spot_direction = spot_direction;