From 160d651b934905ea0391529971daafd2ba085723 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Thu, 26 Dec 2024 15:03:39 -0500 Subject: [PATCH] feat(unrealengine): merge dx11 and dx12 --- src/games/ue-dx12/addon.cpp | 403 --- src/games/ue-dx12/common.hlsl | 163 - .../ue-dx12/lutbuilder_0x2569985B.ps_5_1.hlsl | 1350 ------- .../ue-dx12/lutbuilder_0x3028EBE7.ps_6_6.hlsl | 1127 ------ .../ue-dx12/lutbuilder_0x31FE4421.ps_5_1.hlsl | 1503 -------- .../ue-dx12/lutbuilder_0x36E3A438.ps_5_1.hlsl | 1396 -------- .../ue-dx12/lutbuilder_0x4CC68F73.ps_6_6.hlsl | 1037 ------ .../ue-dx12/lutbuilder_0x4F3FCE76.ps_6_6.hlsl | 1095 ------ .../ue-dx12/lutbuilder_0x5CAE0013.ps_5_1.hlsl | 1421 -------- .../ue-dx12/lutbuilder_0x61C2EA30.ps_5_1.hlsl | 1490 -------- .../ue-dx12/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl | 2844 --------------- .../ue-dx12/lutbuilder_0x73B2BA54.ps_5_1.hlsl | 1564 --------- .../ue-dx12/lutbuilder_0x7570E7B1.ps_5_1.hlsl | 394 --- .../ue-dx12/lutbuilder_0x80CD76B6.ps_5_1.hlsl | 363 -- .../ue-dx12/lutbuilder_0x94D26E3A.ps_6_6.hlsl | 1041 ------ .../ue-dx12/lutbuilder_0xA918F0C8.ps_5_1.hlsl | 1533 -------- .../ue-dx12/lutbuilder_0xB1614732.ps_5_1.hlsl | 503 --- .../ue-dx12/lutbuilder_0xB530B36A.ps_6_6.hlsl | 1013 ------ .../ue-dx12/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl | 3114 ----------------- .../ue-dx12/lutbuilder_0xBAA27141.ps_6_6.hlsl | 2718 -------------- .../ue-dx12/lutbuilder_0xBEB7EB31.ps_5_1.hlsl | 1394 -------- .../ue-dx12/lutbuilder_0xC130BE2D.ps_5_1.hlsl | 472 --- .../ue-dx12/lutbuilder_0xC1BCC6B5.ps_5_1.hlsl | 1388 -------- .../ue-dx12/lutbuilder_0xC2A711CC.ps_5_1.hlsl | 1386 -------- .../ue-dx12/lutbuilder_0xCA383248.ps_5_1.hlsl | 403 --- .../ue-dx12/lutbuilder_0xCC8FD0FF.ps_5_1.hlsl | 1292 ------- .../ue-dx12/lutbuilder_0xD4A45A02.ps_5_1.hlsl | 1521 -------- .../ue-dx12/lutbuilder_0xE6EB2840.ps_5_1.hlsl | 1420 -------- .../ue-dx12/lutbuilder_0xF6AA7756.ps_5_1.hlsl | 1452 -------- src/games/ue-dx12/shared.h | 36 - .../swap_chain_proxy_pixel_shader.ps_5_1.hlsl | 11 - ...swap_chain_proxy_vertex_shader.vs_5_1.hlsl | 6 - src/games/{ue-dx11 => unrealengine}/addon.cpp | 0 .../{ue-dx11 => unrealengine}/common.hlsl | 0 .../fmv_0xAC791084.ps_5_0.hlsl | 0 .../kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl | 0 .../lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl | 0 .../kh3/lutbuilder_0xE9343033.ps_5_0.hlsl | 0 .../lutbuilder_0xE9343033_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x2569985B.ps_5_0.hlsl | 0 .../lutbuilder_0x2569985B_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl | 0 .../lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl | 0 .../lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl | 0 .../lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl | 0 .../lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl | 0 .../lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl | 0 .../lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl | 0 .../lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl | 0 .../lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xB1614732.ps_5_0.hlsl | 0 .../lutbuilder_0xB1614732_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl | 0 .../lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl | 0 .../lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl | 0 .../lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl | 0 .../lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xCA383248.ps_5_0.hlsl | 0 .../lutbuilder_0xCA383248_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl | 0 .../lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl | 0 .../lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl | 0 .../lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl | 0 .../sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl | 0 .../lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl | 0 .../sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x33247499.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x5D760393.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl | 0 .../sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl | 0 src/games/{ue-dx11 => unrealengine}/shared.h | 0 .../swap_chain_proxy_pixel_shader.ps_5_0.hlsl | 0 ..._chain_proxy_pixel_shader_dx12.ps_5_1.hlsl | 0 ...swap_chain_proxy_vertex_shader.vs_4_0.hlsl | 0 ...chain_proxy_vertex_shader_dx12.vs_5_1.hlsl | 0 94 files changed, 36853 deletions(-) delete mode 100644 src/games/ue-dx12/addon.cpp delete mode 100644 src/games/ue-dx12/common.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x2569985B.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x3028EBE7.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x31FE4421.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x36E3A438.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x4CC68F73.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x4F3FCE76.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x5CAE0013.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x61C2EA30.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x73B2BA54.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x7570E7B1.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x80CD76B6.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0x94D26E3A.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xA918F0C8.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xB1614732.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xB530B36A.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xBAA27141.ps_6_6.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xBEB7EB31.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xC130BE2D.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xC1BCC6B5.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xC2A711CC.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xCA383248.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xCC8FD0FF.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xD4A45A02.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xE6EB2840.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/lutbuilder_0xF6AA7756.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/shared.h delete mode 100644 src/games/ue-dx12/swap_chain_proxy_pixel_shader.ps_5_1.hlsl delete mode 100644 src/games/ue-dx12/swap_chain_proxy_vertex_shader.vs_5_1.hlsl rename src/games/{ue-dx11 => unrealengine}/addon.cpp (100%) rename src/games/{ue-dx11 => unrealengine}/common.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/crisiscoreff7reunion/fmv_0xAC791084.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/kh3/lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/kh3/lutbuilder_0xE9343033.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/kh3/lutbuilder_0xE9343033_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x2569985B.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x2569985B_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xB1614732.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xB1614732_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xCA383248.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xCA383248_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm5/lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x33247499.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x5D760393.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/lutbuilders/sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/shared.h (100%) rename src/games/{ue-dx11 => unrealengine}/swapchainproxy/swap_chain_proxy_pixel_shader.ps_5_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/swapchainproxy/swap_chain_proxy_pixel_shader_dx12.ps_5_1.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/swapchainproxy/swap_chain_proxy_vertex_shader.vs_4_0.hlsl (100%) rename src/games/{ue-dx11 => unrealengine}/swapchainproxy/swap_chain_proxy_vertex_shader_dx12.vs_5_1.hlsl (100%) diff --git a/src/games/ue-dx12/addon.cpp b/src/games/ue-dx12/addon.cpp deleted file mode 100644 index cc2d7bae..00000000 --- a/src/games/ue-dx12/addon.cpp +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (C) 2024 Carlos Lopez - * SPDX-License-Identifier: MIT - */ - -#define ImTextureID ImU64 - -#define DEBUG_LEVEL_0 - -#include -#include -#include - -#include "../../mods/shader.hpp" -#include "../../mods/swapchain.hpp" -#include "../../utils/date.hpp" -#include "../../utils/platform.hpp" -#include "../../utils/settings.hpp" -#include "./shared.h" - -namespace { - -renodx::mods::shader::CustomShaders custom_shaders = { - CustomShaderEntry(0x5CAE0013), - CustomShaderEntry(0x61C2EA30), - CustomShaderEntry(0x73B2BA54), - CustomShaderEntry(0x7570E7B1), - CustomShaderEntry(0x80CD76B6), - CustomShaderEntry(0xA918F0C8), - CustomShaderEntry(0xB1614732), - CustomShaderEntry(0xBEB7EB31), - CustomShaderEntry(0xC130BE2D), - CustomShaderEntry(0xC1BCC6B5), - CustomShaderEntry(0xCA383248), - CustomShaderEntry(0xCC8FD0FF), - CustomShaderEntry(0xD4A45A02), - CustomShaderEntry(0xE6EB2840), - CustomShaderEntry(0xF6AA7756), - CustomShaderEntry(0x4F3FCE76), - CustomShaderEntry(0x6CFBD4C0), - CustomShaderEntry(0x31FE4421), - CustomShaderEntry(0x36E3A438), - CustomShaderEntry(0x94D26E3A), - CustomShaderEntry(0x3028EBE7), - CustomShaderEntry(0x2569985B), - CustomShaderEntry(0xB6CA5FD9), - CustomShaderEntry(0xB530B36A), - CustomShaderEntry(0xBAA27141), - CustomShaderEntry(0xC2A711CC), -}; - -ShaderInjectData shader_injection; - -renodx::utils::settings::Settings settings = { - new renodx::utils::settings::Setting{ - .key = "toneMapType", - .binding = &shader_injection.toneMapType, - .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 1.f, - .can_reset = false, - .label = "Tone Mapper", - .section = "Tone Mapping", - .tooltip = "Sets the tone mapper type", - .labels = {"Vanilla", "RenoDRT"}, - }, - new renodx::utils::settings::Setting{ - .key = "toneMapPeakNits", - .binding = &shader_injection.toneMapPeakNits, - .default_value = 1000.f, - .can_reset = false, - .label = "Peak Brightness", - .section = "Tone Mapping", - .tooltip = "Sets the value of peak white in nits", - .min = 48.f, - .max = 4000.f, - }, - new renodx::utils::settings::Setting{ - .key = "toneMapGameNits", - .binding = &shader_injection.toneMapGameNits, - .default_value = 203.f, - .label = "Game Brightness", - .section = "Tone Mapping", - .tooltip = "Sets the value of 100% white in nits", - .min = 48.f, - .max = 500.f, - }, - new renodx::utils::settings::Setting{ - .key = "toneMapUINits", - .binding = &shader_injection.toneMapUINits, - .default_value = 203.f, - .label = "UI Brightness", - .section = "Tone Mapping", - .tooltip = "Sets the brightness of UI and HUD elements in nits", - .min = 48.f, - .max = 500.f, - }, - new renodx::utils::settings::Setting{ - .key = "toneMapGammaCorrection", - .binding = &shader_injection.toneMapGammaCorrection, - .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 1.f, - .label = "Gamma Correction", - .section = "Tone Mapping", - .tooltip = "Emulates a display EOTF.", - .labels = {"Off", "2.2", "BT.1886"}, - }, - new renodx::utils::settings::Setting{ - .key = "ToneMapHueProcessor", - .binding = &shader_injection.toneMapHueProcessor, - .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 0.f, - .label = "Hue Processor", - .section = "Tone Mapping", - .tooltip = "Selects hue processor", - .labels = {"OKLab", "ICtCp", "darkTable UCS"}, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - }, - new renodx::utils::settings::Setting{ - .key = "ToneMapPerChannel", - .binding = &shader_injection.toneMapPerChannel, - .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 1.f, - .label = "Per Channel", - .section = "Tone Mapping", - .tooltip = "Applies tonemapping per-channel instead of by luminance", - .labels = {"Off", "On"}, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeExposure", - .binding = &shader_injection.colorGradeExposure, - .default_value = 1.f, - .label = "Exposure", - .section = "Color Grading", - .max = 2.f, - .format = "%.2f", - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeHighlights", - .binding = &shader_injection.colorGradeHighlights, - .default_value = 50.f, - .label = "Highlights", - .section = "Color Grading", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeShadows", - .binding = &shader_injection.colorGradeShadows, - .default_value = 50.f, - .label = "Shadows", - .section = "Color Grading", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeContrast", - .binding = &shader_injection.colorGradeContrast, - .default_value = 50.f, - .label = "Contrast", - .section = "Color Grading", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeSaturation", - .binding = &shader_injection.colorGradeSaturation, - .default_value = 50.f, - .label = "Saturation", - .section = "Color Grading", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f; }, - }, - new renodx::utils::settings::Setting{ - .key = "ColorGradeBlowout", - .binding = &shader_injection.colorGradeBlowout, - .default_value = 50.f, - .label = "Blowout", - .section = "Color Grading", - .tooltip = "Controls highlight desaturation due to overexposure.", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f - 1.f; }, - }, - new renodx::utils::settings::Setting{ - .key = "ColorGradeFlare", - .binding = &shader_injection.colorGradeFlare, - .default_value = 0.f, - .label = "Flare", - .section = "Color Grading", - .tooltip = "Flare/Glare Compensation", - .max = 100.f, - .is_enabled = []() { return shader_injection.toneMapType == 1; }, - .parse = [](float value) { return value * 0.02f; }, - }, - new renodx::utils::settings::Setting{ - .key = "colorGradeColorSpace", - .binding = &shader_injection.colorGradeColorSpace, - .value_type = renodx::utils::settings::SettingValueType::INTEGER, - .default_value = 0.f, - .label = "Color Space", - .section = "Color Grading", - .tooltip = "Selects output color space" - "\nUS Modern for BT.709 D65." - "\nJPN Modern for BT.709 D93." - "\nUS CRT for BT.601 (NTSC-U)." - "\nJPN CRT for BT.601 ARIB-TR-B09 D93 (NTSC-J)." - "\nDefault: US CRT", - .labels = { - "US Modern", - "JPN Modern", - "US CRT", - "JPN CRT", - }, - }, - new renodx::utils::settings::Setting{ - .value_type = renodx::utils::settings::SettingValueType::BUTTON, - .label = "Discord", - .section = "Links", - .group = "button-line-1", - .tint = 0x5865F2, - .on_change = []() { - renodx::utils::platform::Launch( - "https://discord.gg/" - // Anti-bot - "5WZXDpmbpP"); - }, - }, - new renodx::utils::settings::Setting{ - .value_type = renodx::utils::settings::SettingValueType::BUTTON, - .label = "More Mods", - .section = "Links", - .group = "button-line-1", - .tint = 0x2B3137, - .on_change = []() { - renodx::utils::platform::Launch("https://github.com/clshortfuse/renodx/wiki/Mods"); - }, - }, - new renodx::utils::settings::Setting{ - .value_type = renodx::utils::settings::SettingValueType::BUTTON, - .label = "Github", - .section = "Links", - .group = "button-line-1", - .tint = 0x2B3137, - .on_change = []() { - renodx::utils::platform::Launch("https://github.com/clshortfuse/renodx"); - }, - }, - new renodx::utils::settings::Setting{ - .value_type = renodx::utils::settings::SettingValueType::BUTTON, - .label = "ShortFuse's Ko-Fi", - .section = "Links", - .group = "button-line-1", - .tint = 0xFF5A16, - .on_change = []() { - renodx::utils::platform::Launch("https://ko-fi.com/shortfuse"); - }, - }, - new renodx::utils::settings::Setting{ - .value_type = renodx::utils::settings::SettingValueType::TEXT, - .label = std::string("Build: ") + renodx::utils::date::ISO_DATE_TIME, - .section = "About", - }, -}; - -void OnPresetOff() { - renodx::utils::settings::UpdateSetting("toneMapType", 0.f); - renodx::utils::settings::UpdateSetting("toneMapPeakNits", 203.f); - renodx::utils::settings::UpdateSetting("toneMapGameNits", 203.f); - renodx::utils::settings::UpdateSetting("toneMapUINits", 203.f); - renodx::utils::settings::UpdateSetting("toneMapGammaCorrection", 0.f); - renodx::utils::settings::UpdateSetting("toneMapHueCorrection", 0.f); - renodx::utils::settings::UpdateSetting("colorGradeExposure", 1.f); - renodx::utils::settings::UpdateSetting("colorGradeHighlights", 50.f); - renodx::utils::settings::UpdateSetting("colorGradeShadows", 50.f); - renodx::utils::settings::UpdateSetting("colorGradeContrast", 50.f); - renodx::utils::settings::UpdateSetting("colorGradeSaturation", 50.f); - renodx::utils::settings::UpdateSetting("colorGradeBlowout", 0.f); - renodx::utils::settings::UpdateSetting("colorGradeLUTStrength", 100.f); - renodx::utils::settings::UpdateSetting("colorGradeLUTScaling", 0.f); - renodx::utils::settings::UpdateSetting("colorGradeColorSpace", 0.f); -} - -bool fired_on_init_swapchain = false; - -void OnInitSwapchain(reshade::api::swapchain* swapchain) { - if (fired_on_init_swapchain) return; - fired_on_init_swapchain = true; - auto peak = renodx::utils::swapchain::GetPeakNits(swapchain); - if (peak.has_value()) { - settings[1]->default_value = peak.value(); - settings[1]->can_reset = true; - } -} - -void AddPsychonauts2Patches() { - renodx::mods::swapchain::force_borderless = false; - renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - .old_format = reshade::api::format::r10g10b10a2_unorm, - .new_format = reshade::api::format::r16g16b16a16_float, - .ignore_size = true, - .usage_include = reshade::api::resource_usage::render_target, - }); - renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - .old_format = reshade::api::format::r11g11b10_float, - .new_format = reshade::api::format::r16g16b16a16_float, - .ignore_size = true, - .usage_include = reshade::api::resource_usage::render_target, - }); -} - -void AddHifiRushPatches() { - // for (auto index : {1}) { - // renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - // .old_format = reshade::api::format::b8g8r8a8_typeless, - // .new_format = reshade::api::format::b8g8r8a8_typeless, - // .index = index, - // .view_upgrades = {}, - // .usage_include = reshade::api::resource_usage::render_target, - // }); - // } - // renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - // .old_format = reshade::api::format::b8g8r8a8_typeless, - // .new_format = reshade::api::format::r16g16b16a16_typeless, - // .usage_include = reshade::api::resource_usage::render_target, - // }); -} - -void AddGamePatches() { - try { - auto process_path = renodx::utils::platform::GetCurrentProcessPath(); - auto filename = process_path.filename().string(); - if (filename == "Psychonauts2-WinGDK-Shipping.exe") { - AddPsychonauts2Patches(); - } else if (filename == "Hi-Fi-RUSH.exe") { - AddHifiRushPatches(); - } else if (filename == "TheThaumaturge-Win64-Shipping.exe") { - renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - .old_format = reshade::api::format::r10g10b10a2_unorm, - .new_format = reshade::api::format::r16g16b16a16_float, - .usage_include = reshade::api::resource_usage::render_target, - }); - } else { - return; - } - reshade::log::message(reshade::log::level::info, std::format("Applied patches for {}.", filename).c_str()); - } catch (...) { - reshade::log::message(reshade::log::level::error, "Could not read process path"); - } -} - -} // namespace - -extern "C" __declspec(dllexport) constexpr const char* NAME = "RenoDX"; -extern "C" __declspec(dllexport) constexpr const char* DESCRIPTION = "RenoDX for Unreal Engine (DirectX 12)"; - -BOOL APIENTRY DllMain(HMODULE h_module, DWORD fdw_reason, LPVOID lpv_reserved) { - switch (fdw_reason) { - case DLL_PROCESS_ATTACH: - if (!reshade::register_addon(h_module)) return FALSE; - - renodx::mods::shader::on_init_pipeline_layout = [](reshade::api::device* device, auto, auto) { - return device->get_api() == reshade::api::device_api::d3d12; - }; - - renodx::mods::shader::expected_constant_buffer_space = 50; - renodx::mods::shader::expected_constant_buffer_index = 13; - renodx::mods::shader::allow_multiple_push_constants = true; - - renodx::mods::swapchain::expected_constant_buffer_space = 50; - renodx::mods::swapchain::expected_constant_buffer_index = 13; - renodx::mods::swapchain::use_resource_cloning = true; - renodx::mods::swapchain::swap_chain_proxy_vertex_shader = __swap_chain_proxy_vertex_shader; - renodx::mods::swapchain::swap_chain_proxy_pixel_shader = __swap_chain_proxy_pixel_shader; - - renodx::mods::swapchain::swap_chain_upgrade_targets.push_back({ - .old_format = reshade::api::format::r10g10b10a2_unorm, - .new_format = reshade::api::format::r16g16b16a16_float, - .dimensions = {.width = 32, .height = 32, .depth = 32}, - }); - - AddGamePatches(); - - reshade::register_event(OnInitSwapchain); - - break; - case DLL_PROCESS_DETACH: - reshade::unregister_event(OnInitSwapchain); - reshade::unregister_addon(h_module); - break; - } - - renodx::utils::settings::Use(fdw_reason, &settings, &OnPresetOff); - renodx::mods::shader::Use(fdw_reason, custom_shaders, &shader_injection); - renodx::mods::swapchain::Use(fdw_reason, &shader_injection); - - return TRUE; -} diff --git a/src/games/ue-dx12/common.hlsl b/src/games/ue-dx12/common.hlsl deleted file mode 100644 index 27605870..00000000 --- a/src/games/ue-dx12/common.hlsl +++ /dev/null @@ -1,163 +0,0 @@ -#include "./shared.h" - -float3 PostToneMapScale(float3 color) { - if (injectedData.toneMapGammaCorrection == 2.f) { - color = renodx::color::srgb::EncodeSafe(color); - color = renodx::color::gamma::DecodeSafe(color, 2.4f); - color *= injectedData.toneMapGameNits / injectedData.toneMapUINits; - color = renodx::color::gamma::EncodeSafe(color, 2.4f); - } else if (injectedData.toneMapGammaCorrection == 1.f) { - color = renodx::color::srgb::EncodeSafe(color); - color = renodx::color::gamma::DecodeSafe(color, 2.2f); - color *= injectedData.toneMapGameNits / injectedData.toneMapUINits; - color = renodx::color::gamma::EncodeSafe(color, 2.2f); - } else { - color *= injectedData.toneMapGameNits / injectedData.toneMapUINits; - color = renodx::color::srgb::EncodeSafe(color); - } - return color; -} - -float UpgradeToneMapRatio(float ap1_color_hdr, float ap1_color_sdr, float ap1_post_process_color) { - if (ap1_color_hdr < ap1_color_sdr) { - // If substracting (user contrast or paperwhite) scale down instead - // Should only apply on mismatched HDR - return ap1_color_hdr / ap1_color_sdr; - } else { - float ap1_delta = ap1_color_hdr - ap1_color_sdr; - ap1_delta = max(0, ap1_delta); // Cleans up NaN - const float ap1_new = ap1_post_process_color + ap1_delta; - - const bool ap1_valid = (ap1_post_process_color > 0); // Cleans up NaN and ignore black - return ap1_valid ? (ap1_new / ap1_post_process_color) : 0; - } -} -float3 UpgradeToneMapPerChannel(float3 color_hdr, float3 color_sdr, float3 post_process_color, float post_process_strength) { - // float ratio = 1.f; - - float3 bt2020_hdr = max(0, renodx::color::bt2020::from::BT709(color_hdr)); - float3 bt2020_sdr = max(0, renodx::color::bt2020::from::BT709(color_sdr)); - float3 bt2020_post_process = max(0, renodx::color::bt2020::from::BT709(post_process_color)); - - float3 ratio = float3( - UpgradeToneMapRatio(bt2020_hdr.r, bt2020_sdr.r, bt2020_post_process.r), - UpgradeToneMapRatio(bt2020_hdr.g, bt2020_sdr.g, bt2020_post_process.g), - UpgradeToneMapRatio(bt2020_hdr.b, bt2020_sdr.b, bt2020_post_process.b)); - - float3 color_scaled = max(0, bt2020_post_process * ratio); - color_scaled = renodx::color::bt709::from::BT2020(color_scaled); - float peak_correction = saturate(1.f - renodx::color::y::from::BT2020(bt2020_post_process)); - color_scaled = renodx::color::correct::Hue(color_scaled, post_process_color, peak_correction); - return lerp(color_hdr, color_scaled, post_process_strength); -} - -float3 FinalizeOutput(float3 color) { - if (injectedData.toneMapGammaCorrection == 2.f) { - color = renodx::color::gamma::DecodeSafe(color, 2.4f); - } else if (injectedData.toneMapGammaCorrection == 1.f) { - color = renodx::color::gamma::DecodeSafe(color, 2.2f); - } else { - color = renodx::color::srgb::DecodeSafe(color); - } - - if (injectedData.colorGradeColorSpace == 1.f) { - // BT709 D65 => BT709 D93 - color = mul(float3x3(0.941922724f, -0.0795196890f, -0.0160709824f, - 0.00374091602f, 1.01361334f, -0.00624059885f, - 0.00760519271f, 0.0278747007f, 1.30704438f), - color); - } else if (injectedData.colorGradeColorSpace == 2.f) { - // BT.709 D65 => BT.601 (NTSC-U) - color = mul(float3x3(0.939542055f, 0.0501813553f, 0.0102765792f, - 0.0177722238f, 0.965792834f, 0.0164349135f, - -0.00162159989f, -0.00436974968f, 1.00599133f), - color); - } else if (injectedData.colorGradeColorSpace == 3.f) { - // BT.709 D65 => ARIB-TR-B09 D93 (NTSC-J) - color = mul(float3x3(0.871554791f, -0.161164566f, -0.0151899587f, - 0.0417598634f, 0.980491757f, -0.00258531118f, - 0.00544220115f, 0.0462860465f, 1.73763155f), - color); - } - - color *= injectedData.toneMapUINits; - color = min(color, injectedData.toneMapPeakNits); // Clamp UI or Videos - - color = renodx::color::bt709::clamp::BT2020(color); - - color /= 80.f; - return color; -} - -float3 RenoDRTSmoothClamp(float3 untonemapped) { - renodx::tonemap::renodrt::Config renodrt_config = - renodx::tonemap::renodrt::config::Create(); - renodrt_config.nits_peak = 100.f; - renodrt_config.mid_gray_value = 0.18f; - renodrt_config.mid_gray_nits = 18.f; - renodrt_config.exposure = 1.f; - renodrt_config.highlights = 1.f; - renodrt_config.shadows = 1.f; - renodrt_config.contrast = 1.05f; - renodrt_config.saturation = 1.05f; - renodrt_config.dechroma = 0.f; - renodrt_config.flare = 0.f; - renodrt_config.hue_correction_strength = 0.f; - renodrt_config.tone_map_method = - renodx::tonemap::renodrt::config::tone_map_method::DANIELE; - renodrt_config.working_color_space = 2u; - - return renodx::tonemap::renodrt::BT709(untonemapped, renodrt_config); -} - -float3 ToneMap(float3 bt709) { - renodx::tonemap::Config config = renodx::tonemap::config::Create(); - config.type = 3.f; - config.peak_nits = injectedData.toneMapPeakNits; - // config.peak_nits = 10000.f; - config.game_nits = injectedData.toneMapGameNits; - config.gamma_correction = injectedData.toneMapGammaCorrection; - config.exposure = injectedData.colorGradeExposure; - config.highlights = injectedData.colorGradeHighlights; - config.shadows = injectedData.colorGradeShadows; - config.contrast = injectedData.colorGradeContrast; - config.saturation = injectedData.colorGradeSaturation; - - // Default inverts smooth clamp - config.reno_drt_highlights = 1.0f; - config.reno_drt_shadows = 1.0f; - config.reno_drt_contrast = 1.0f; - config.reno_drt_saturation = 1.05f; - config.reno_drt_dechroma = 0; - config.reno_drt_blowout = injectedData.colorGradeBlowout; - config.reno_drt_flare = 0.10f * injectedData.colorGradeFlare; - config.reno_drt_working_color_space = 2u; - config.reno_drt_per_channel = injectedData.toneMapPerChannel != 0; - - config.reno_drt_hue_correction_method = (uint)injectedData.toneMapHueProcessor; - - config.hue_correction_strength = injectedData.toneMapHueCorrection; - - float3 output_color = renodx::tonemap::config::Apply(bt709, config); - - return output_color; -} - -float4 LutBuilderToneMap(float3 untonemapped_ap1, float3 tonemapped_bt709) { - float3 untonemapped_bt709 = renodx::color::bt709::from::AP1(untonemapped_ap1); - - float3 neutral_sdr_color = RenoDRTSmoothClamp(untonemapped_bt709); - - float3 untonemapped_graded = UpgradeToneMapPerChannel( - untonemapped_bt709, - neutral_sdr_color, - tonemapped_bt709, - 1); - - float3 color = ToneMap(untonemapped_graded); - - color = PostToneMapScale(color); - color *= 1.f / 1.05f; - color = renodx::color::bt709::clamp::BT2020(color); - return float4(color, 1); -} diff --git a/src/games/ue-dx12/lutbuilder_0x2569985B.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x2569985B.ps_5_1.hlsl deleted file mode 100644 index 7b3fab26..00000000 --- a/src/games/ue-dx12/lutbuilder_0x2569985B.ps_5_1.hlsl +++ /dev/null @@ -1,1350 +0,0 @@ -// ---- Created with 3Dmigoto v1.3.16 on Thu Oct 17 13:24:08 2024 -#include "./common.hlsl" -#include "./shared.h" - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r5.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r5.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r5.xyz; - r3.xyz = r2.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r3.xyz; - r4.xyz = r2.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r5.xyz; - r3.xyz = r2.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r3.xyz; - r4.xyz = r2.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r2.yzw; - r0.z = cmp(asuint(cb0[40].w) >= 3); - r5.xy = log2(r0.xy); - r5.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r5.xyz; - r0.xyw = exp2(r0.xyw); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r5.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[36].z * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r5.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r5.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r5.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r5.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r5.xyz = r5.xyz * r5.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r1.xyz = r1.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].z; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r0.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].x + -cb0[35].w; - r3.w = -cb0[35].w + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r0.xyz = r6.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r6.xyz = r7.xyz * r7.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r0.xyz = r0.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r5.xyz * r4.www + r0.xyz; - - // CustomEdit - float3 untonemapped_ap1 = r0.xyz; - - // Blue correct - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = cb0[36].yyy * r1.xyz + r0.xyz; - - // start of film tonemap - // AP1 => AP0 - - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r1.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r1.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r1.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - // aces::hueweight (with smoothstep) - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - // AP0 => AP1 - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; // End of ACES:RRT - - // Film Toe > 0.8 - r6.xy = cb0[37].ww + float2(1, 0.180000007); - r0.w = -cb0[37].y + r6.x; - r1.w = cb0[38].x + 1; - r2.w = -cb0[37].z + r1.w; - r3.w = cmp(0.800000012 < cb0[37].y); - r6.xz = -cb0[37].yy + float2(0.819999993, 1); - r6.xz = r6.xz / cb0[37].xx; - r4.w = -0.744727492 + r6.x; - r5.w = r6.y / r0.w; - r6.x = -1 + r5.w; - r6.x = 1 + -r6.x; - r5.w = r5.w / r6.x; - r5.w = log2(r5.w); - r5.w = 0.346573591 * r5.w; - r6.x = r0.w / cb0[37].x; - r5.w = -r5.w * r6.x + -0.744727492; - r3.w = r3.w ? r4.w : r5.w; - r4.w = r6.z + -r3.w; - r5.w = cb0[37].z / cb0[37].x; - r5.w = r5.w + -r4.w; - r5.xyz = log2(r5.xyz); - r6.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r7.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.www; - r7.xyz = cb0[37].xxx * r7.xyz; - r4.w = r0.w + r0.w; - r6.w = cb0[37].x * -2; - r0.w = r6.w / r0.w; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r9.xyz = r8.xyz * r0.www; - r9.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r9.xyz; - r9.xyz = exp2(r9.xyz); - r9.xyz = float3(1, 1, 1) + r9.xyz; - r9.xyz = r4.www / r9.xyz; - r9.xyz = -cb0[37].www + r9.xyz; - r0.w = r2.w + r2.w; - r4.w = cb0[37].x + cb0[37].x; - r2.w = r4.w / r2.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r5.www; - r5.xyz = r5.xyz * r2.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r0.www / r5.xyz; - r5.xyz = -r5.xyz + r1.www; - r10.xyz = cmp(r6.xyz < r3.www); - r9.xyz = r10.xyz ? r9.xyz : r7.xyz; - r6.xyz = cmp(r5.www < r6.xyz); - r5.xyz = r6.xyz ? r5.xyz : r7.xyz; - r0.w = r5.w + -r3.w; - r6.xyz = saturate(r8.xyz / r0.www); - r0.w = cmp(r5.w < r3.w); - r7.xyz = float3(1, 1, 1) + -r6.xyz; - r6.xyz = r0.www ? r7.xyz : r6.xyz; - r7.xyz = -r6.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r6.xyz = r6.xyz * r6.xyz; - r6.xyz = r6.xyz * r7.xyz; - r5.xyz = r5.xyz + -r9.xyz; - r5.xyz = r6.xyz * r5.xyz + r9.xyz; - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].www * r5.xyz + r1.xyz; - - // BlueBlueCorrectInv - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r1.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r1.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r1.xyz); - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].yyy * r5.xyz + r1.xyz; - - r5.x = dot(cb1[12].xyz, r1.xyz); - r5.y = dot(cb1[13].xyz, r1.xyz); - r5.z = dot(cb1[14].xyz, r1.xyz); - r1.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r1.xyz * r1.xyz; - r1.xyz = cb0[39].yyy * r1.xyz; - r1.xyz = cb0[39].xxx * r5.xyz + r1.xyz; - r1.xyz = cb0[39].zzz + r1.xyz; - r5.xyz = cb0[14].xyz * r1.xyz; - r1.xyz = -r1.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r1.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r1.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - // CustomEdit - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { // cb[40].w = output device - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r3.xyz, r6.xyz); - r7.y = dot(r4.xyz, r6.xyz); - r7.z = dot(r2.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r0.xyz); - r7.y = dot(cb1[13].xyz, r0.xyz); - r7.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r7.xyz + r0.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r0.xyz); - r7.y = dot(cb1[9].xyz, r0.xyz); - r7.z = dot(cb1[10].xyz, r0.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r1.xyz); - r8.y = dot(cb1[9].xyz, r1.xyz); - r8.z = dot(cb1[10].xyz, r1.xyz); - r1.x = dot(r3.xyz, r8.xyz); - r1.y = dot(r4.xyz, r8.xyz); - r1.z = dot(r2.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r3.xyz, r8.xyz); - r1.w = dot(r4.xyz, r8.xyz); - r2.x = dot(r2.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.x); - r2.xyz = cb0[40].zzz * r3.xyz; - r2.xyz = exp2(r2.xyz); - r1.xyz = r7.yyy ? r1.xyz : r2.xyz; - r6.xyz = r7.xxx ? r0.xyz : r1.xyz; - } - } - } - } - } - - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x3028EBE7.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0x3028EBE7.ps_6_6.hlsl deleted file mode 100644 index c961b243..00000000 --- a/src/games/ue-dx12/lutbuilder_0x3028EBE7.ps_6_6.hlsl +++ /dev/null @@ -1,1127 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D Textures_1 : register(t0); - -cbuffer cb0 : register(b0) { - float cb0_005x : packoffset(c005.x); - float cb0_005y : packoffset(c005.y); - float cb0_008x : packoffset(c008.x); - float cb0_008y : packoffset(c008.y); - float cb0_008z : packoffset(c008.z); - float cb0_008w : packoffset(c008.w); - float cb0_009x : packoffset(c009.x); - float cb0_010x : packoffset(c010.x); - float cb0_010y : packoffset(c010.y); - float cb0_010z : packoffset(c010.z); - float cb0_010w : packoffset(c010.w); - float cb0_011x : packoffset(c011.x); - float cb0_011y : packoffset(c011.y); - float cb0_011z : packoffset(c011.z); - float cb0_011w : packoffset(c011.w); - float cb0_012x : packoffset(c012.x); - float cb0_012y : packoffset(c012.y); - float cb0_012z : packoffset(c012.z); - float cb0_013x : packoffset(c013.x); - float cb0_013y : packoffset(c013.y); - float cb0_013z : packoffset(c013.z); - float cb0_013w : packoffset(c013.w); - float cb0_014x : packoffset(c014.x); - float cb0_014y : packoffset(c014.y); - float cb0_014z : packoffset(c014.z); - float cb0_015x : packoffset(c015.x); - float cb0_015y : packoffset(c015.y); - float cb0_015z : packoffset(c015.z); - float cb0_015w : packoffset(c015.w); - float cb0_016x : packoffset(c016.x); - float cb0_016y : packoffset(c016.y); - float cb0_016z : packoffset(c016.z); - float cb0_016w : packoffset(c016.w); - float cb0_017x : packoffset(c017.x); - float cb0_017y : packoffset(c017.y); - float cb0_017z : packoffset(c017.z); - float cb0_017w : packoffset(c017.w); - float cb0_018x : packoffset(c018.x); - float cb0_018y : packoffset(c018.y); - float cb0_018z : packoffset(c018.z); - float cb0_018w : packoffset(c018.w); - float cb0_019x : packoffset(c019.x); - float cb0_019y : packoffset(c019.y); - float cb0_019z : packoffset(c019.z); - float cb0_019w : packoffset(c019.w); - float cb0_020x : packoffset(c020.x); - float cb0_020y : packoffset(c020.y); - float cb0_020z : packoffset(c020.z); - float cb0_020w : packoffset(c020.w); - float cb0_021x : packoffset(c021.x); - float cb0_021y : packoffset(c021.y); - float cb0_021z : packoffset(c021.z); - float cb0_021w : packoffset(c021.w); - float cb0_022x : packoffset(c022.x); - float cb0_022y : packoffset(c022.y); - float cb0_022z : packoffset(c022.z); - float cb0_022w : packoffset(c022.w); - float cb0_023x : packoffset(c023.x); - float cb0_023y : packoffset(c023.y); - float cb0_023z : packoffset(c023.z); - float cb0_023w : packoffset(c023.w); - float cb0_024x : packoffset(c024.x); - float cb0_024y : packoffset(c024.y); - float cb0_024z : packoffset(c024.z); - float cb0_024w : packoffset(c024.w); - float cb0_025x : packoffset(c025.x); - float cb0_025y : packoffset(c025.y); - float cb0_025z : packoffset(c025.z); - float cb0_025w : packoffset(c025.w); - float cb0_026x : packoffset(c026.x); - float cb0_026y : packoffset(c026.y); - float cb0_026z : packoffset(c026.z); - float cb0_026w : packoffset(c026.w); - float cb0_027x : packoffset(c027.x); - float cb0_027y : packoffset(c027.y); - float cb0_027z : packoffset(c027.z); - float cb0_027w : packoffset(c027.w); - float cb0_028x : packoffset(c028.x); - float cb0_028y : packoffset(c028.y); - float cb0_028z : packoffset(c028.z); - float cb0_028w : packoffset(c028.w); - float cb0_029x : packoffset(c029.x); - float cb0_029y : packoffset(c029.y); - float cb0_029z : packoffset(c029.z); - float cb0_029w : packoffset(c029.w); - float cb0_030x : packoffset(c030.x); - float cb0_030y : packoffset(c030.y); - float cb0_030z : packoffset(c030.z); - float cb0_030w : packoffset(c030.w); - float cb0_031x : packoffset(c031.x); - float cb0_031y : packoffset(c031.y); - float cb0_031z : packoffset(c031.z); - float cb0_031w : packoffset(c031.w); - float cb0_032x : packoffset(c032.x); - float cb0_032y : packoffset(c032.y); - float cb0_032z : packoffset(c032.z); - float cb0_032w : packoffset(c032.w); - float cb0_033x : packoffset(c033.x); - float cb0_033y : packoffset(c033.y); - float cb0_033z : packoffset(c033.z); - float cb0_033w : packoffset(c033.w); - float cb0_034x : packoffset(c034.x); - float cb0_034y : packoffset(c034.y); - float cb0_034z : packoffset(c034.z); - float cb0_034w : packoffset(c034.w); - float cb0_035x : packoffset(c035.x); - float cb0_035y : packoffset(c035.y); - float cb0_036x : packoffset(c036.x); - float cb0_036y : packoffset(c036.y); - float cb0_036z : packoffset(c036.z); - float cb0_037x : packoffset(c037.x); - float cb0_037y : packoffset(c037.y); - float cb0_037z : packoffset(c037.z); - float cb0_037w : packoffset(c037.w); - float cb0_038x : packoffset(c038.x); - float cb0_038y : packoffset(c038.y); - float cb0_038z : packoffset(c038.z); - float cb0_038w : packoffset(c038.w); - float cb0_039x : packoffset(c039.x); - float cb0_039y : packoffset(c039.y); - float cb0_039z : packoffset(c039.z); - float cb0_039w : packoffset(c039.w); - float cb0_040x : packoffset(c040.x); - float cb0_040y : packoffset(c040.y); - uint cb0_040w : packoffset(c040.w); - float cb0_041x : packoffset(c041.x); - float cb0_041y : packoffset(c041.y); - float cb0_041z : packoffset(c041.z); - float cb0_042y : packoffset(c042.y); - float cb0_042z : packoffset(c042.z); - uint cb0_042w : packoffset(c042.w); - uint cb0_043x : packoffset(c043.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_000x : packoffset(c000.x); - float UniformBufferConstants_WorkingColorSpace_000y : packoffset(c000.y); - float UniformBufferConstants_WorkingColorSpace_000z : packoffset(c000.z); - float UniformBufferConstants_WorkingColorSpace_001x : packoffset(c001.x); - float UniformBufferConstants_WorkingColorSpace_001y : packoffset(c001.y); - float UniformBufferConstants_WorkingColorSpace_001z : packoffset(c001.z); - float UniformBufferConstants_WorkingColorSpace_002x : packoffset(c002.x); - float UniformBufferConstants_WorkingColorSpace_002y : packoffset(c002.y); - float UniformBufferConstants_WorkingColorSpace_002z : packoffset(c002.z); - float UniformBufferConstants_WorkingColorSpace_004x : packoffset(c004.x); - float UniformBufferConstants_WorkingColorSpace_004y : packoffset(c004.y); - float UniformBufferConstants_WorkingColorSpace_004z : packoffset(c004.z); - float UniformBufferConstants_WorkingColorSpace_005x : packoffset(c005.x); - float UniformBufferConstants_WorkingColorSpace_005y : packoffset(c005.y); - float UniformBufferConstants_WorkingColorSpace_005z : packoffset(c005.z); - float UniformBufferConstants_WorkingColorSpace_006x : packoffset(c006.x); - float UniformBufferConstants_WorkingColorSpace_006y : packoffset(c006.y); - float UniformBufferConstants_WorkingColorSpace_006z : packoffset(c006.z); - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -SamplerState Samplers_1 : register(s0); - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - - float _10[6]; - float _11[6]; - float _12[6]; - float _13[6]; - float _16 = 0.5f / (cb0_037x); - float _21 = (cb0_037x) + -1.0f; - float _22 = ((cb0_037x) * ((TEXCOORD.x) - _16)) / _21; - float _23 = ((cb0_037x) * ((TEXCOORD.y) - _16)) / _21; - float _25 = (float((uint)(SV_RenderTargetArrayIndex))) / _21; - float _45 = 1.379158854484558f; - float _46 = -0.3088507056236267f; - float _47 = -0.07034677267074585f; - float _48 = -0.06933528929948807f; - float _49 = 1.0822921991348267f; - float _50 = -0.012962047010660172f; - float _51 = -0.002159259282052517f; - float _52 = -0.045465391129255295f; - float _53 = 1.0477596521377563f; - float _111; - float _112; - float _113; - float _161; - float _889; - float _922; - float _936; - float _1000; - float _1179; - float _1190; - float _1201; - float _1399; - float _1400; - float _1401; - float _1412; - float _1423; - float _1603; - float _1636; - float _1650; - float _1689; - float _1799; - float _1873; - float _1947; - float _2026; - float _2027; - float _2028; - float _2177; - float _2210; - float _2224; - float _2263; - float _2373; - float _2447; - float _2521; - float _2600; - float _2601; - float _2602; - float _2779; - float _2780; - float _2781; - if (!((((uint)(cb0_043x)) == 1))) { - _45 = 1.02579927444458f; - _46 = -0.020052503794431686f; - _47 = -0.0057713985443115234f; - _48 = -0.0022350111976265907f; - _49 = 1.0045825242996216f; - _50 = -0.002352306619286537f; - _51 = -0.005014004185795784f; - _52 = -0.025293385609984398f; - _53 = 1.0304402112960815f; - if (!((((uint)(cb0_043x)) == 2))) { - _45 = 0.6954522132873535f; - _46 = 0.14067870378494263f; - _47 = 0.16386906802654266f; - _48 = 0.044794563204050064f; - _49 = 0.8596711158752441f; - _50 = 0.0955343171954155f; - _51 = -0.005525882821530104f; - _52 = 0.004025210160762072f; - _53 = 1.0015007257461548f; - if (!((((uint)(cb0_043x)) == 3))) { - bool _34 = (((uint)(cb0_043x)) == 4); - _45 = ((_34 ? 1.0f : 1.7050515413284302f)); - _46 = ((_34 ? 0.0f : -0.6217905879020691f)); - _47 = ((_34 ? 0.0f : -0.0832584798336029f)); - _48 = ((_34 ? 0.0f : -0.13025718927383423f)); - _49 = ((_34 ? 1.0f : 1.1408027410507202f)); - _50 = ((_34 ? 0.0f : -0.010548528283834457f)); - _51 = ((_34 ? 0.0f : -0.024003278464078903f)); - _52 = ((_34 ? 0.0f : -0.1289687603712082f)); - _53 = ((_34 ? 1.0f : 1.152971863746643f)); - } - } - } - if (((((uint)(cb0_042w)) > 2))) { - float _64 = exp2(((log2(_22)) * 0.012683313339948654f)); - float _65 = exp2(((log2(_23)) * 0.012683313339948654f)); - float _66 = exp2(((log2(_25)) * 0.012683313339948654f)); - _111 = ((exp2(((log2(((max(0.0f, (_64 + -0.8359375f))) / (18.8515625f - (_64 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _112 = ((exp2(((log2(((max(0.0f, (_65 + -0.8359375f))) / (18.8515625f - (_65 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _113 = ((exp2(((log2(((max(0.0f, (_66 + -0.8359375f))) / (18.8515625f - (_66 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - } else { - _111 = (((exp2(((_22 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _112 = (((exp2(((_23 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _113 = (((exp2(((_25 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - } - bool _140 = (((uint)(cb0_040w)) != 0); - float _144 = 0.9994439482688904f / (cb0_037y); - if (!(!(((cb0_037y) * 1.0005563497543335f) <= 7000.0f))) { - _161 = (((((2967800.0f - (_144 * 4607000064.0f)) * _144) + 99.11000061035156f) * _144) + 0.24406300485134125f); - } else { - _161 = (((((1901800.0f - (_144 * 2006400000.0f)) * _144) + 247.47999572753906f) * _144) + 0.23703999817371368f); - } - float _175 = (((((cb0_037y) * 1.2864121856637212e-07f) + 0.00015411825734190643f) * (cb0_037y)) + 0.8601177334785461f) / (((((cb0_037y) * 7.081451371959702e-07f) + 0.0008424202096648514f) * (cb0_037y)) + 1.0f); - float _182 = (cb0_037y) * (cb0_037y); - float _185 = (((((cb0_037y) * 4.204816761443908e-08f) + 4.228062607580796e-05f) * (cb0_037y)) + 0.31739872694015503f) / ((1.0f - ((cb0_037y) * 2.8974181986995973e-05f)) + (_182 * 1.6145605741257896e-07f)); - float _190 = ((_175 * 2.0f) + 4.0f) - (_185 * 8.0f); - float _191 = (_175 * 3.0f) / _190; - float _193 = (_185 * 2.0f) / _190; - bool _194 = ((cb0_037y) < 4000.0f); - float _203 = (((cb0_037y) + 1189.6199951171875f) * (cb0_037y)) + 1412139.875f; - float _205 = ((-1137581184.0f - ((cb0_037y) * 1916156.25f)) - (_182 * 1.5317699909210205f)) / (_203 * _203); - float _212 = (6193636.0f - ((cb0_037y) * 179.45599365234375f)) + _182; - float _214 = ((1974715392.0f - ((cb0_037y) * 705674.0f)) - (_182 * 308.60699462890625f)) / (_212 * _212); - float _216 = rsqrt((dot(float2(_205, _214), float2(_205, _214)))); - float _217 = (cb0_037z) * 0.05000000074505806f; - float _220 = ((_217 * _214) * _216) + _175; - float _223 = _185 - ((_217 * _205) * _216); - float _228 = (4.0f - (_223 * 8.0f)) + (_220 * 2.0f); - float _234 = (((_220 * 3.0f) / _228) - _191) + ((_194 ? _191 : _161)); - float _235 = (((_223 * 2.0f) / _228) - _193) + ((_194 ? _193 : (((_161 * 2.869999885559082f) + -0.2750000059604645f) - ((_161 * _161) * 3.0f)))); - float _236 = (_140 ? _234 : 0.3127000033855438f); - float _237 = (_140 ? _235 : 0.32899999618530273f); - float _238 = (_140 ? 0.3127000033855438f : _234); - float _239 = (_140 ? 0.32899999618530273f : _235); - float _240 = max(_237, 1.000000013351432e-10f); - float _241 = _236 / _240; - float _244 = ((1.0f - _236) - _237) / _240; - float _245 = max(_239, 1.000000013351432e-10f); - float _246 = _238 / _245; - float _249 = ((1.0f - _238) - _239) / _245; - float _268 = (mad(-0.16140000522136688f, _249, ((_246 * 0.8950999975204468f) + 0.266400009393692f))) / (mad(-0.16140000522136688f, _244, ((_241 * 0.8950999975204468f) + 0.266400009393692f))); - float _269 = (mad(0.03669999912381172f, _249, (1.7135000228881836f - (_246 * 0.7501999735832214f)))) / (mad(0.03669999912381172f, _244, (1.7135000228881836f - (_241 * 0.7501999735832214f)))); - float _270 = (mad(1.0296000242233276f, _249, ((_246 * 0.03889999911189079f) + -0.06849999725818634f))) / (mad(1.0296000242233276f, _244, ((_241 * 0.03889999911189079f) + -0.06849999725818634f))); - float _271 = mad(_269, -0.7501999735832214f, 0.0f); - float _272 = mad(_269, 1.7135000228881836f, 0.0f); - float _273 = mad(_269, 0.03669999912381172f, -0.0f); - float _274 = mad(_270, 0.03889999911189079f, 0.0f); - float _275 = mad(_270, -0.06849999725818634f, 0.0f); - float _276 = mad(_270, 1.0296000242233276f, 0.0f); - float _279 = mad(0.1599626988172531f, _274, (mad(-0.1470542997121811f, _271, (_268 * 0.883457362651825f)))); - float _282 = mad(0.1599626988172531f, _275, (mad(-0.1470542997121811f, _272, (_268 * 0.26293492317199707f)))); - float _285 = mad(0.1599626988172531f, _276, (mad(-0.1470542997121811f, _273, (_268 * -0.15930065512657166f)))); - float _288 = mad(0.04929120093584061f, _274, (mad(0.5183603167533875f, _271, (_268 * 0.38695648312568665f)))); - float _291 = mad(0.04929120093584061f, _275, (mad(0.5183603167533875f, _272, (_268 * 0.11516613513231277f)))); - float _294 = mad(0.04929120093584061f, _276, (mad(0.5183603167533875f, _273, (_268 * -0.0697740763425827f)))); - float _297 = mad(0.9684867262840271f, _274, (mad(0.04004279896616936f, _271, (_268 * -0.007634039502590895f)))); - float _300 = mad(0.9684867262840271f, _275, (mad(0.04004279896616936f, _272, (_268 * -0.0022720457054674625f)))); - float _303 = mad(0.9684867262840271f, _276, (mad(0.04004279896616936f, _273, (_268 * 0.0013765322510153055f)))); - float _306 = mad(_285, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_282, (UniformBufferConstants_WorkingColorSpace_001x), (_279 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _309 = mad(_285, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_282, (UniformBufferConstants_WorkingColorSpace_001y), (_279 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _312 = mad(_285, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_282, (UniformBufferConstants_WorkingColorSpace_001z), (_279 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _315 = mad(_294, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_291, (UniformBufferConstants_WorkingColorSpace_001x), (_288 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _318 = mad(_294, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_291, (UniformBufferConstants_WorkingColorSpace_001y), (_288 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _321 = mad(_294, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_291, (UniformBufferConstants_WorkingColorSpace_001z), (_288 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _324 = mad(_303, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_300, (UniformBufferConstants_WorkingColorSpace_001x), (_297 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _327 = mad(_303, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_300, (UniformBufferConstants_WorkingColorSpace_001y), (_297 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _330 = mad(_303, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_300, (UniformBufferConstants_WorkingColorSpace_001z), (_297 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _360 = mad((mad((UniformBufferConstants_WorkingColorSpace_004z), _330, (mad((UniformBufferConstants_WorkingColorSpace_004y), _321, (_312 * (UniformBufferConstants_WorkingColorSpace_004x)))))), _113, (mad((mad((UniformBufferConstants_WorkingColorSpace_004z), _327, (mad((UniformBufferConstants_WorkingColorSpace_004y), _318, (_309 * (UniformBufferConstants_WorkingColorSpace_004x)))))), _112, ((mad((UniformBufferConstants_WorkingColorSpace_004z), _324, (mad((UniformBufferConstants_WorkingColorSpace_004y), _315, (_306 * (UniformBufferConstants_WorkingColorSpace_004x)))))) * _111)))); - float _363 = mad((mad((UniformBufferConstants_WorkingColorSpace_005z), _330, (mad((UniformBufferConstants_WorkingColorSpace_005y), _321, (_312 * (UniformBufferConstants_WorkingColorSpace_005x)))))), _113, (mad((mad((UniformBufferConstants_WorkingColorSpace_005z), _327, (mad((UniformBufferConstants_WorkingColorSpace_005y), _318, (_309 * (UniformBufferConstants_WorkingColorSpace_005x)))))), _112, ((mad((UniformBufferConstants_WorkingColorSpace_005z), _324, (mad((UniformBufferConstants_WorkingColorSpace_005y), _315, (_306 * (UniformBufferConstants_WorkingColorSpace_005x)))))) * _111)))); - float _366 = mad((mad((UniformBufferConstants_WorkingColorSpace_006z), _330, (mad((UniformBufferConstants_WorkingColorSpace_006y), _321, (_312 * (UniformBufferConstants_WorkingColorSpace_006x)))))), _113, (mad((mad((UniformBufferConstants_WorkingColorSpace_006z), _327, (mad((UniformBufferConstants_WorkingColorSpace_006y), _318, (_309 * (UniformBufferConstants_WorkingColorSpace_006x)))))), _112, ((mad((UniformBufferConstants_WorkingColorSpace_006z), _324, (mad((UniformBufferConstants_WorkingColorSpace_006y), _315, (_306 * (UniformBufferConstants_WorkingColorSpace_006x)))))) * _111)))); - float _381 = mad((UniformBufferConstants_WorkingColorSpace_008z), _366, (mad((UniformBufferConstants_WorkingColorSpace_008y), _363, ((UniformBufferConstants_WorkingColorSpace_008x)*_360)))); - float _384 = mad((UniformBufferConstants_WorkingColorSpace_009z), _366, (mad((UniformBufferConstants_WorkingColorSpace_009y), _363, ((UniformBufferConstants_WorkingColorSpace_009x)*_360)))); - float _387 = mad((UniformBufferConstants_WorkingColorSpace_010z), _366, (mad((UniformBufferConstants_WorkingColorSpace_010y), _363, ((UniformBufferConstants_WorkingColorSpace_010x)*_360)))); - float _388 = dot(float3(_381, _384, _387), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _392 = (_381 / _388) + -1.0f; - float _393 = (_384 / _388) + -1.0f; - float _394 = (_387 / _388) + -1.0f; - float _406 = (1.0f - (exp2((((_388 * _388) * -4.0f) * (cb0_038w))))) * (1.0f - (exp2(((dot(float3(_392, _393, _394), float3(_392, _393, _394))) * -4.0f)))); - float _422 = (((mad(-0.06368283927440643f, _387, (mad(-0.32929131388664246f, _384, (_381 * 1.370412826538086f))))) - _381) * _406) + _381; - float _423 = (((mad(-0.010861567221581936f, _387, (mad(1.0970908403396606f, _384, (_381 * -0.08343426138162613f))))) - _384) * _406) + _384; - float _424 = (((mad(1.203694462776184f, _387, (mad(-0.09862564504146576f, _384, (_381 * -0.02579325996339321f))))) - _387) * _406) + _387; - float _425 = dot(float3(_422, _423, _424), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _439 = (cb0_019w) + (cb0_024w); - float _453 = (cb0_018w) * (cb0_023w); - float _467 = (cb0_017w) * (cb0_022w); - float _481 = (cb0_016w) * (cb0_021w); - float _495 = (cb0_015w) * (cb0_020w); - float _499 = _422 - _425; - float _500 = _423 - _425; - float _501 = _424 - _425; - float _558 = saturate((_425 / (cb0_037w))); - float _562 = (_558 * _558) * (3.0f - (_558 * 2.0f)); - float _563 = 1.0f - _562; - float _572 = (cb0_019w) + (cb0_034w); - float _581 = (cb0_018w) * (cb0_033w); - float _590 = (cb0_017w) * (cb0_032w); - float _599 = (cb0_016w) * (cb0_031w); - float _608 = (cb0_015w) * (cb0_030w); - float _671 = saturate(((_425 - (cb0_038x)) / ((cb0_038y) - (cb0_038x)))); - float _675 = (_671 * _671) * (3.0f - (_671 * 2.0f)); - float _684 = (cb0_019w) + (cb0_029w); - float _693 = (cb0_018w) * (cb0_028w); - float _702 = (cb0_017w) * (cb0_027w); - float _711 = (cb0_016w) * (cb0_026w); - float _720 = (cb0_015w) * (cb0_025w); - float _778 = _562 - _675; - float _789 = ((_675 * ((((cb0_019x) + (cb0_034x)) + _572) + ((((cb0_018x) * (cb0_033x)) * _581) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_031x)) * _599) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_030x)) * _608) * _499) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_032x)) * _590)))))))) + (_563 * ((((cb0_019x) + (cb0_024x)) + _439) + ((((cb0_018x) * (cb0_023x)) * _453) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_021x)) * _481) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_020x)) * _495) * _499) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_022x)) * _467))))))))) + (((((cb0_019x) + (cb0_029x)) + _684) + ((((cb0_018x) * (cb0_028x)) * _693) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_026x)) * _711) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_025x)) * _720) * _499) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_027x)) * _702))))))) * _778); - float _791 = ((_675 * ((((cb0_019y) + (cb0_034y)) + _572) + ((((cb0_018y) * (cb0_033y)) * _581) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_031y)) * _599) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_030y)) * _608) * _500) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_032y)) * _590)))))))) + (_563 * ((((cb0_019y) + (cb0_024y)) + _439) + ((((cb0_018y) * (cb0_023y)) * _453) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_021y)) * _481) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_020y)) * _495) * _500) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_022y)) * _467))))))))) + (((((cb0_019y) + (cb0_029y)) + _684) + ((((cb0_018y) * (cb0_028y)) * _693) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_026y)) * _711) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_025y)) * _720) * _500) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_027y)) * _702))))))) * _778); - float _793 = ((_675 * ((((cb0_019z) + (cb0_034z)) + _572) + ((((cb0_018z) * (cb0_033z)) * _581) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_031z)) * _599) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_030z)) * _608) * _501) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_032z)) * _590)))))))) + (_563 * ((((cb0_019z) + (cb0_024z)) + _439) + ((((cb0_018z) * (cb0_023z)) * _453) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_021z)) * _481) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_020z)) * _495) * _501) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_022z)) * _467))))))))) + (((((cb0_019z) + (cb0_029z)) + _684) + ((((cb0_018z) * (cb0_028z)) * _693) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_026z)) * _711) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_025z)) * _720) * _501) + _425))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_027z)) * _702))))))) * _778); - - float3 untonemapped_ap1 = float3(_789, _791, _793); // CustomEdit - - float _829 = (((mad(0.061360642313957214f, _793, (mad(-4.540197551250458e-09f, _791, (_789 * 0.9386394023895264f))))) - _789) * (cb0_038z)) + _789; - float _830 = (((mad(0.169205904006958f, _793, (mad(0.8307942152023315f, _791, (_789 * 6.775371730327606e-08f))))) - _791) * (cb0_038z)) + _791; - float _831 = ((mad(-2.3283064365386963e-10f, _791, (_789 * -9.313225746154785e-10f))) * (cb0_038z)) + _793; - float _834 = mad(0.16386905312538147f, _831, (mad(0.14067868888378143f, _830, (_829 * 0.6954522132873535f)))); - float _837 = mad(0.0955343246459961f, _831, (mad(0.8596711158752441f, _830, (_829 * 0.044794581830501556f)))); - float _840 = mad(1.0015007257461548f, _831, (mad(0.004025210160762072f, _830, (_829 * -0.005525882821530104f)))); - float _844 = max((max(_834, _837)), _840); - float _849 = ((max(_844, 1.000000013351432e-10f)) - (max((min((min(_834, _837)), _840)), 1.000000013351432e-10f))) / (max(_844, 0.009999999776482582f)); - float _862 = ((_837 + _834) + _840) + ((sqrt(((((_840 - _837) * _840) + ((_837 - _834) * _837)) + ((_834 - _840) * _834)))) * 1.75f); - float _863 = _862 * 0.3333333432674408f; - float _864 = _849 + -0.4000000059604645f; - float _865 = _864 * 5.0f; - float _869 = max((1.0f - (abs((_864 * 2.5f)))), 0.0f); - float _880 = (((float(((int(((bool)((_865 > 0.0f))))) - (int(((bool)((_865 < 0.0f)))))))) * (1.0f - (_869 * _869))) + 1.0f) * 0.02500000037252903f; - _889 = _880; - if ((!(_863 <= 0.0533333346247673f))) { - _889 = 0.0f; - if ((!(_863 >= 0.1599999964237213f))) { - _889 = (((0.23999999463558197f / _862) + -0.5f) * _880); - } - } - float _890 = _889 + 1.0f; - float _891 = _890 * _834; - float _892 = _890 * _837; - float _893 = _890 * _840; - _922 = 0.0f; - if (!(((bool)((_891 == _892))) && ((bool)((_892 == _893))))) { - float _900 = ((_891 * 2.0f) - _892) - _893; - float _903 = ((_837 - _840) * 1.7320507764816284f) * _890; - float _905 = atan((_903 / _900)); - bool _908 = (_900 < 0.0f); - bool _909 = (_900 == 0.0f); - bool _910 = (_903 >= 0.0f); - bool _911 = (_903 < 0.0f); - _922 = ((((bool)(_910 && _909)) ? 90.0f : ((((bool)(_911 && _909)) ? -90.0f : (((((bool)(_911 && _908)) ? (_905 + -3.1415927410125732f) : ((((bool)(_910 && _908)) ? (_905 + 3.1415927410125732f) : _905)))) * 57.2957763671875f))))); - } - float _927 = min((max(((((bool)((_922 < 0.0f))) ? (_922 + 360.0f) : _922)), 0.0f)), 360.0f); - if (((_927 < -180.0f))) { - _936 = (_927 + 360.0f); - } else { - _936 = _927; - if (((_927 > 180.0f))) { - _936 = (_927 + -360.0f); - } - } - float _940 = saturate((1.0f - (abs((_936 * 0.014814814552664757f))))); - float _944 = (_940 * _940) * (3.0f - (_940 * 2.0f)); - float _950 = ((_944 * _944) * ((_849 * 0.18000000715255737f) * (0.029999999329447746f - _891))) + _891; - float _960 = max(0.0f, (mad(-0.21492856740951538f, _893, (mad(-0.2365107536315918f, _892, (_950 * 1.4514392614364624f)))))); - float _961 = max(0.0f, (mad(-0.09967592358589172f, _893, (mad(1.17622971534729f, _892, (_950 * -0.07655377686023712f)))))); - float _962 = max(0.0f, (mad(0.9977163076400757f, _893, (mad(-0.006032449658960104f, _892, (_950 * 0.008316148072481155f)))))); - float _963 = dot(float3(_960, _961, _962), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _978 = ((cb0_040x) + 1.0f) - (cb0_039z); - float _980 = (cb0_040y) + 1.0f; - float _982 = _980 - (cb0_039w); - if ((((cb0_039z) > 0.800000011920929f))) { - _1000 = (((0.8199999928474426f - (cb0_039z)) / (cb0_039y)) + -0.7447274923324585f); - } else { - float _991 = ((cb0_040x) + 0.18000000715255737f) / _978; - _1000 = (-0.7447274923324585f - (((log2((_991 / (2.0f - _991)))) * 0.3465735912322998f) * (_978 / (cb0_039y)))); - } - float _1003 = ((1.0f - (cb0_039z)) / (cb0_039y)) - _1000; - float _1005 = ((cb0_039w) / (cb0_039y)) - _1003; - float _1009 = (log2((((_960 - _963) * 0.9599999785423279f) + _963))) * 0.3010300099849701f; - float _1010 = (log2((((_961 - _963) * 0.9599999785423279f) + _963))) * 0.3010300099849701f; - float _1011 = (log2((((_962 - _963) * 0.9599999785423279f) + _963))) * 0.3010300099849701f; - float _1015 = (cb0_039y) * (_1009 + _1003); - float _1016 = (cb0_039y) * (_1010 + _1003); - float _1017 = (cb0_039y) * (_1011 + _1003); - float _1018 = _978 * 2.0f; - float _1020 = ((cb0_039y) * -2.0f) / _978; - float _1021 = _1009 - _1000; - float _1022 = _1010 - _1000; - float _1023 = _1011 - _1000; - float _1042 = _982 * 2.0f; - float _1044 = ((cb0_039y) * 2.0f) / _982; - float _1069 = (((bool)((_1009 < _1000))) ? ((_1018 / ((exp2(((_1021 * 1.4426950216293335f) * _1020))) + 1.0f)) - (cb0_040x)) : _1015); - float _1070 = (((bool)((_1010 < _1000))) ? ((_1018 / ((exp2(((_1022 * 1.4426950216293335f) * _1020))) + 1.0f)) - (cb0_040x)) : _1016); - float _1071 = (((bool)((_1011 < _1000))) ? ((_1018 / ((exp2(((_1023 * 1.4426950216293335f) * _1020))) + 1.0f)) - (cb0_040x)) : _1017); - float _1078 = _1005 - _1000; - float _1082 = saturate((_1021 / _1078)); - float _1083 = saturate((_1022 / _1078)); - float _1084 = saturate((_1023 / _1078)); - bool _1085 = (_1005 < _1000); - float _1089 = (_1085 ? (1.0f - _1082) : _1082); - float _1090 = (_1085 ? (1.0f - _1083) : _1083); - float _1091 = (_1085 ? (1.0f - _1084) : _1084); - float _1110 = (((_1089 * _1089) * (((((bool)((_1009 > _1005))) ? (_980 - (_1042 / ((exp2((((_1009 - _1005) * 1.4426950216293335f) * _1044))) + 1.0f))) : _1015)) - _1069)) * (3.0f - (_1089 * 2.0f))) + _1069; - float _1111 = (((_1090 * _1090) * (((((bool)((_1010 > _1005))) ? (_980 - (_1042 / ((exp2((((_1010 - _1005) * 1.4426950216293335f) * _1044))) + 1.0f))) : _1016)) - _1070)) * (3.0f - (_1090 * 2.0f))) + _1070; - float _1112 = (((_1091 * _1091) * (((((bool)((_1011 > _1005))) ? (_980 - (_1042 / ((exp2((((_1011 - _1005) * 1.4426950216293335f) * _1044))) + 1.0f))) : _1017)) - _1071)) * (3.0f - (_1091 * 2.0f))) + _1071; - float _1113 = dot(float3(_1110, _1111, _1112), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1133 = ((cb0_039x) * ((max(0.0f, (((_1110 - _1113) * 0.9300000071525574f) + _1113))) - _829)) + _829; - float _1134 = ((cb0_039x) * ((max(0.0f, (((_1111 - _1113) * 0.9300000071525574f) + _1113))) - _830)) + _830; - float _1135 = ((cb0_039x) * ((max(0.0f, (((_1112 - _1113) * 0.9300000071525574f) + _1113))) - _831)) + _831; - float _1151 = (((mad(-0.06537103652954102f, _1135, (mad(1.451815478503704e-06f, _1134, (_1133 * 1.065374732017517f))))) - _1133) * (cb0_038z)) + _1133; - float _1152 = (((mad(-0.20366770029067993f, _1135, (mad(1.2036634683609009f, _1134, (_1133 * -2.57161445915699e-07f))))) - _1134) * (cb0_038z)) + _1134; - float _1153 = (((mad(0.9999996423721313f, _1135, (mad(2.0954757928848267e-08f, _1134, (_1133 * 1.862645149230957e-08f))))) - _1135) * (cb0_038z)) + _1135; - float _1166 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_012z), _1153, (mad((UniformBufferConstants_WorkingColorSpace_012y), _1152, ((UniformBufferConstants_WorkingColorSpace_012x)*_1151)))))))); - float _1167 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_013z), _1153, (mad((UniformBufferConstants_WorkingColorSpace_013y), _1152, ((UniformBufferConstants_WorkingColorSpace_013x)*_1151)))))))); - float _1168 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_014z), _1153, (mad((UniformBufferConstants_WorkingColorSpace_014y), _1152, ((UniformBufferConstants_WorkingColorSpace_014x)*_1151)))))))); - if (((_1166 < 0.0031306699384003878f))) { - _1179 = (_1166 * 12.920000076293945f); - } else { - _1179 = (((exp2(((log2(_1166)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1167 < 0.0031306699384003878f))) { - _1190 = (_1167 * 12.920000076293945f); - } else { - _1190 = (((exp2(((log2(_1167)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1168 < 0.0031306699384003878f))) { - _1201 = (_1168 * 12.920000076293945f); - } else { - _1201 = (((exp2(((log2(_1168)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - float _1205 = (_1190 * 0.9375f) + 0.03125f; - float _1212 = _1201 * 15.0f; - float _1213 = floor(_1212); - float _1214 = _1212 - _1213; - float _1216 = (((_1179 * 0.9375f) + 0.03125f) + _1213) * 0.0625f; - float4 _1219 = Textures_1.Sample(Samplers_1, float2(_1216, _1205)); - float4 _1226 = Textures_1.Sample(Samplers_1, float2((_1216 + 0.0625f), _1205)); - float _1245 = max(6.103519990574569e-05f, ((((((_1226.x) - (_1219.x)) * _1214) + (_1219.x)) * (cb0_005y)) + ((cb0_005x)*_1179))); - float _1246 = max(6.103519990574569e-05f, ((((((_1226.y) - (_1219.y)) * _1214) + (_1219.y)) * (cb0_005y)) + ((cb0_005x)*_1190))); - float _1247 = max(6.103519990574569e-05f, ((((((_1226.z) - (_1219.z)) * _1214) + (_1219.z)) * (cb0_005y)) + ((cb0_005x)*_1201))); - float _1269 = (((bool)((_1245 > 0.040449999272823334f))) ? (exp2(((log2(((_1245 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_1245 * 0.07739938050508499f)); - float _1270 = (((bool)((_1246 > 0.040449999272823334f))) ? (exp2(((log2(((_1246 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_1246 * 0.07739938050508499f)); - float _1271 = (((bool)((_1247 > 0.040449999272823334f))) ? (exp2(((log2(((_1247 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_1247 * 0.07739938050508499f)); - float _1297 = (cb0_014x) * ((((cb0_041y) + ((cb0_041x)*_1269)) * _1269) + (cb0_041z)); - float _1298 = (cb0_014y) * ((((cb0_041y) + ((cb0_041x)*_1270)) * _1270) + (cb0_041z)); - float _1299 = (cb0_014z) * ((((cb0_041y) + ((cb0_041x)*_1271)) * _1271) + (cb0_041z)); - float _1306 = (((cb0_013x)-_1297) * (cb0_013w)) + _1297; - float _1307 = (((cb0_013y)-_1298) * (cb0_013w)) + _1298; - float _1308 = (((cb0_013z)-_1299) * (cb0_013w)) + _1299; - float _1309 = (cb0_014x) * (mad((UniformBufferConstants_WorkingColorSpace_012z), _793, (mad((UniformBufferConstants_WorkingColorSpace_012y), _791, (_789 * (UniformBufferConstants_WorkingColorSpace_012x)))))); - float _1310 = (cb0_014y) * (mad((UniformBufferConstants_WorkingColorSpace_013z), _793, (mad((UniformBufferConstants_WorkingColorSpace_013y), _791, ((UniformBufferConstants_WorkingColorSpace_013x)*_789))))); - float _1311 = (cb0_014z) * (mad((UniformBufferConstants_WorkingColorSpace_014z), _793, (mad((UniformBufferConstants_WorkingColorSpace_014y), _791, ((UniformBufferConstants_WorkingColorSpace_014x)*_789))))); - float _1318 = (((cb0_013x)-_1309) * (cb0_013w)) + _1309; - float _1319 = (((cb0_013y)-_1310) * (cb0_013w)) + _1310; - float _1320 = (((cb0_013z)-_1311) * (cb0_013w)) + _1311; - float _1332 = exp2(((log2((max(0.0f, _1306)))) * (cb0_042y))); - float _1333 = exp2(((log2((max(0.0f, _1307)))) * (cb0_042y))); - float _1334 = exp2(((log2((max(0.0f, _1308)))) * (cb0_042y))); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_1332, _1333, _1334)); - } - - if (((((uint)(cb0_042w)) == 0))) { - float _1340 = max((dot(float3(_1332, _1333, _1334), float3(0.2126390039920807f, 0.7151690125465393f, 0.0721919983625412f))), 9.999999747378752e-05f); - float _1360 = ((((((bool)((_1340 < (cb0_036z)))) ? 0.0f : 1.0f)) * (((cb0_035y)-_1340) + ((-0.0f - (cb0_036x)) / ((cb0_035x) + _1340)))) + _1340) * (cb0_036y); - float _1361 = _1360 * (_1332 / _1340); - float _1362 = _1360 * (_1333 / _1340); - float _1363 = _1360 * (_1334 / _1340); - _1399 = _1361; - _1400 = _1362; - _1401 = _1363; - do { - if (((((uint)(UniformBufferConstants_WorkingColorSpace_020x)) == 0))) { - float _1382 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1363, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1362, ((UniformBufferConstants_WorkingColorSpace_008x)*_1361)))); - float _1385 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1363, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1362, ((UniformBufferConstants_WorkingColorSpace_009x)*_1361)))); - float _1388 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1363, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1362, ((UniformBufferConstants_WorkingColorSpace_010x)*_1361)))); - _1399 = (mad(_47, _1388, (mad(_46, _1385, (_1382 * _45))))); - _1400 = (mad(_50, _1388, (mad(_49, _1385, (_1382 * _48))))); - _1401 = (mad(_53, _1388, (mad(_52, _1385, (_1382 * _51))))); - } - do { - if (((_1399 < 0.0031306699384003878f))) { - _1412 = (_1399 * 12.920000076293945f); - } else { - _1412 = (((exp2(((log2(_1399)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - do { - if (((_1400 < 0.0031306699384003878f))) { - _1423 = (_1400 * 12.920000076293945f); - } else { - _1423 = (((exp2(((log2(_1400)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1401 < 0.0031306699384003878f))) { - _2779 = _1412; - _2780 = _1423; - _2781 = (_1401 * 12.920000076293945f); - } else { - _2779 = _1412; - _2780 = _1423; - _2781 = (((exp2(((log2(_1401)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 1))) { - float _1450 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1333, ((UniformBufferConstants_WorkingColorSpace_008x)*_1332)))); - float _1453 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1333, ((UniformBufferConstants_WorkingColorSpace_009x)*_1332)))); - float _1456 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1333, ((UniformBufferConstants_WorkingColorSpace_010x)*_1332)))); - float _1466 = max(6.103519990574569e-05f, (mad(_47, _1456, (mad(_46, _1453, (_1450 * _45)))))); - float _1467 = max(6.103519990574569e-05f, (mad(_50, _1456, (mad(_49, _1453, (_1450 * _48)))))); - float _1468 = max(6.103519990574569e-05f, (mad(_53, _1456, (mad(_52, _1453, (_1450 * _51)))))); - _2779 = (min((_1466 * 4.5f), (((exp2(((log2((max(_1466, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2780 = (min((_1467 * 4.5f), (((exp2(((log2((max(_1467, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2781 = (min((_1468 * 4.5f), (((exp2(((log2((max(_1468, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - } else { - if ((((bool)((((uint)(cb0_042w)) == 3))) || ((bool)((((uint)(cb0_042w)) == 5))))) { - _12[0] = (cb0_010x); - _12[1] = (cb0_010y); - _12[2] = (cb0_010z); - _12[3] = (cb0_010w); - _12[4] = (cb0_012x); - _12[5] = (cb0_012x); - _13[0] = (cb0_011x); - _13[1] = (cb0_011y); - _13[2] = (cb0_011z); - _13[3] = (cb0_011w); - _13[4] = (cb0_012y); - _13[5] = (cb0_012y); - float _1543 = (cb0_012z)*_1318; - float _1544 = (cb0_012z)*_1319; - float _1545 = (cb0_012z)*_1320; - float _1548 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1545, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1544, ((UniformBufferConstants_WorkingColorSpace_016x)*_1543)))); - float _1551 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1545, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1544, ((UniformBufferConstants_WorkingColorSpace_017x)*_1543)))); - float _1554 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1545, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1544, ((UniformBufferConstants_WorkingColorSpace_018x)*_1543)))); - float _1558 = max((max(_1548, _1551)), _1554); - float _1563 = ((max(_1558, 1.000000013351432e-10f)) - (max((min((min(_1548, _1551)), _1554)), 1.000000013351432e-10f))) / (max(_1558, 0.009999999776482582f)); - float _1576 = ((_1551 + _1548) + _1554) + ((sqrt(((((_1554 - _1551) * _1554) + ((_1551 - _1548) * _1551)) + ((_1548 - _1554) * _1548)))) * 1.75f); - float _1577 = _1576 * 0.3333333432674408f; - float _1578 = _1563 + -0.4000000059604645f; - float _1579 = _1578 * 5.0f; - float _1583 = max((1.0f - (abs((_1578 * 2.5f)))), 0.0f); - float _1594 = (((float(((int(((bool)((_1579 > 0.0f))))) - (int(((bool)((_1579 < 0.0f)))))))) * (1.0f - (_1583 * _1583))) + 1.0f) * 0.02500000037252903f; - _1603 = _1594; - do { - if ((!(_1577 <= 0.0533333346247673f))) { - _1603 = 0.0f; - if ((!(_1577 >= 0.1599999964237213f))) { - _1603 = (((0.23999999463558197f / _1576) + -0.5f) * _1594); - } - } - float _1604 = _1603 + 1.0f; - float _1605 = _1604 * _1548; - float _1606 = _1604 * _1551; - float _1607 = _1604 * _1554; - _1636 = 0.0f; - do { - if (!(((bool)((_1605 == _1606))) && ((bool)((_1606 == _1607))))) { - float _1614 = ((_1605 * 2.0f) - _1606) - _1607; - float _1617 = ((_1551 - _1554) * 1.7320507764816284f) * _1604; - float _1619 = atan((_1617 / _1614)); - bool _1622 = (_1614 < 0.0f); - bool _1623 = (_1614 == 0.0f); - bool _1624 = (_1617 >= 0.0f); - bool _1625 = (_1617 < 0.0f); - _1636 = ((((bool)(_1624 && _1623)) ? 90.0f : ((((bool)(_1625 && _1623)) ? -90.0f : (((((bool)(_1625 && _1622)) ? (_1619 + -3.1415927410125732f) : ((((bool)(_1624 && _1622)) ? (_1619 + 3.1415927410125732f) : _1619)))) * 57.2957763671875f))))); - } - float _1641 = min((max(((((bool)((_1636 < 0.0f))) ? (_1636 + 360.0f) : _1636)), 0.0f)), 360.0f); - do { - if (((_1641 < -180.0f))) { - _1650 = (_1641 + 360.0f); - } else { - _1650 = _1641; - if (((_1641 > 180.0f))) { - _1650 = (_1641 + -360.0f); - } - } - _1689 = 0.0f; - do { - if ((((bool)((_1650 > -67.5f))) && ((bool)((_1650 < 67.5f))))) { - float _1656 = (_1650 + 67.5f) * 0.029629629105329514f; - int _1657 = int(1657); - float _1659 = _1656 - (float(_1657)); - float _1660 = _1659 * _1659; - float _1661 = _1660 * _1659; - if (((_1657 == 3))) { - _1689 = (((0.1666666716337204f - (_1659 * 0.5f)) + (_1660 * 0.5f)) - (_1661 * 0.1666666716337204f)); - } else { - if (((_1657 == 2))) { - _1689 = ((0.6666666865348816f - _1660) + (_1661 * 0.5f)); - } else { - if (((_1657 == 1))) { - _1689 = (((_1661 * -0.5f) + 0.1666666716337204f) + ((_1660 + _1659) * 0.5f)); - } else { - _1689 = ((((bool)((_1657 == 0))) ? (_1661 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1698 = min((max(((((_1563 * 0.27000001072883606f) * (0.029999999329447746f - _1605)) * _1689) + _1605), 0.0f)), 65535.0f); - float _1699 = min((max(_1606, 0.0f)), 65535.0f); - float _1700 = min((max(_1607, 0.0f)), 65535.0f); - float _1713 = min((max((mad(-0.21492856740951538f, _1700, (mad(-0.2365107536315918f, _1699, (_1698 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1714 = min((max((mad(-0.09967592358589172f, _1700, (mad(1.17622971534729f, _1699, (_1698 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1715 = min((max((mad(0.9977163076400757f, _1700, (mad(-0.006032449658960104f, _1699, (_1698 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1716 = dot(float3(_1713, _1714, _1715), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1727 = log2((max((((_1713 - _1716) * 0.9599999785423279f) + _1716), 1.000000013351432e-10f))); - float _1728 = _1727 * 0.3010300099849701f; - float _1729 = log2((cb0_008x)); - float _1730 = _1729 * 0.3010300099849701f; - do { - if (!(!(_1728 <= _1730))) { - _1799 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1737 = log2((cb0_009x)); - float _1738 = _1737 * 0.3010300099849701f; - if ((((bool)((_1728 > _1730))) && ((bool)((_1728 < _1738))))) { - float _1746 = ((_1727 - _1729) * 0.9030900001525879f) / ((_1737 - _1729) * 0.3010300099849701f); - int _1747 = int(1747); - float _1749 = _1746 - (float(_1747)); - float _1751 = _12[_1747]; - float _1754 = _12[(_1747 + 1)]; - float _1759 = _1751 * 0.5f; - _1799 = (dot(float3((_1749 * _1749), _1749, 1.0f), float3((mad((_12[(_1747 + 2)]), 0.5f, (mad(_1754, -1.0f, _1759)))), (_1754 - _1751), (mad(_1754, 0.5f, _1759))))); - } else { - do { - if (!(!(_1728 >= _1738))) { - float _1768 = log2((cb0_008z)); - if (((_1728 < (_1768 * 0.3010300099849701f)))) { - float _1776 = ((_1727 - _1737) * 0.9030900001525879f) / ((_1768 - _1737) * 0.3010300099849701f); - int _1777 = int(1777); - float _1779 = _1776 - (float(_1777)); - float _1781 = _13[_1777]; - float _1784 = _13[(_1777 + 1)]; - float _1789 = _1781 * 0.5f; - _1799 = (dot(float3((_1779 * _1779), _1779, 1.0f), float3((mad((_13[(_1777 + 2)]), 0.5f, (mad(_1784, -1.0f, _1789)))), (_1784 - _1781), (mad(_1784, 0.5f, _1789))))); - break; - } - } - _1799 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1803 = log2((max((((_1714 - _1716) * 0.9599999785423279f) + _1716), 1.000000013351432e-10f))); - float _1804 = _1803 * 0.3010300099849701f; - do { - if (!(!(_1804 <= _1730))) { - _1873 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1811 = log2((cb0_009x)); - float _1812 = _1811 * 0.3010300099849701f; - if ((((bool)((_1804 > _1730))) && ((bool)((_1804 < _1812))))) { - float _1820 = ((_1803 - _1729) * 0.9030900001525879f) / ((_1811 - _1729) * 0.3010300099849701f); - int _1821 = int(1821); - float _1823 = _1820 - (float(_1821)); - float _1825 = _12[_1821]; - float _1828 = _12[(_1821 + 1)]; - float _1833 = _1825 * 0.5f; - _1873 = (dot(float3((_1823 * _1823), _1823, 1.0f), float3((mad((_12[(_1821 + 2)]), 0.5f, (mad(_1828, -1.0f, _1833)))), (_1828 - _1825), (mad(_1828, 0.5f, _1833))))); - } else { - do { - if (!(!(_1804 >= _1812))) { - float _1842 = log2((cb0_008z)); - if (((_1804 < (_1842 * 0.3010300099849701f)))) { - float _1850 = ((_1803 - _1811) * 0.9030900001525879f) / ((_1842 - _1811) * 0.3010300099849701f); - int _1851 = int(1851); - float _1853 = _1850 - (float(_1851)); - float _1855 = _13[_1851]; - float _1858 = _13[(_1851 + 1)]; - float _1863 = _1855 * 0.5f; - _1873 = (dot(float3((_1853 * _1853), _1853, 1.0f), float3((mad((_13[(_1851 + 2)]), 0.5f, (mad(_1858, -1.0f, _1863)))), (_1858 - _1855), (mad(_1858, 0.5f, _1863))))); - break; - } - } - _1873 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1877 = log2((max((((_1715 - _1716) * 0.9599999785423279f) + _1716), 1.000000013351432e-10f))); - float _1878 = _1877 * 0.3010300099849701f; - do { - if (!(!(_1878 <= _1730))) { - _1947 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1885 = log2((cb0_009x)); - float _1886 = _1885 * 0.3010300099849701f; - if ((((bool)((_1878 > _1730))) && ((bool)((_1878 < _1886))))) { - float _1894 = ((_1877 - _1729) * 0.9030900001525879f) / ((_1885 - _1729) * 0.3010300099849701f); - int _1895 = int(1895); - float _1897 = _1894 - (float(_1895)); - float _1899 = _12[_1895]; - float _1902 = _12[(_1895 + 1)]; - float _1907 = _1899 * 0.5f; - _1947 = (dot(float3((_1897 * _1897), _1897, 1.0f), float3((mad((_12[(_1895 + 2)]), 0.5f, (mad(_1902, -1.0f, _1907)))), (_1902 - _1899), (mad(_1902, 0.5f, _1907))))); - } else { - do { - if (!(!(_1878 >= _1886))) { - float _1916 = log2((cb0_008z)); - if (((_1878 < (_1916 * 0.3010300099849701f)))) { - float _1924 = ((_1877 - _1885) * 0.9030900001525879f) / ((_1916 - _1885) * 0.3010300099849701f); - int _1925 = int(1925); - float _1927 = _1924 - (float(_1925)); - float _1929 = _13[_1925]; - float _1932 = _13[(_1925 + 1)]; - float _1937 = _1929 * 0.5f; - _1947 = (dot(float3((_1927 * _1927), _1927, 1.0f), float3((mad((_13[(_1925 + 2)]), 0.5f, (mad(_1932, -1.0f, _1937)))), (_1932 - _1929), (mad(_1932, 0.5f, _1937))))); - break; - } - } - _1947 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1951 = (cb0_008w) - (cb0_008y); - float _1952 = ((exp2((_1799 * 3.321928024291992f))) - (cb0_008y)) / _1951; - float _1954 = ((exp2((_1873 * 3.321928024291992f))) - (cb0_008y)) / _1951; - float _1956 = ((exp2((_1947 * 3.321928024291992f))) - (cb0_008y)) / _1951; - float _1959 = mad(0.15618768334388733f, _1956, (mad(0.13400420546531677f, _1954, (_1952 * 0.6624541878700256f)))); - float _1962 = mad(0.053689517080783844f, _1956, (mad(0.6740817427635193f, _1954, (_1952 * 0.2722287178039551f)))); - float _1965 = mad(1.0103391408920288f, _1956, (mad(0.00406073359772563f, _1954, (_1952 * -0.005574649665504694f)))); - float _1978 = min((max((mad(-0.23642469942569733f, _1965, (mad(-0.32480329275131226f, _1962, (_1959 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _1979 = min((max((mad(0.016756348311901093f, _1965, (mad(1.6153316497802734f, _1962, (_1959 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _1980 = min((max((mad(0.9883948564529419f, _1965, (mad(-0.008284442126750946f, _1962, (_1959 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _1983 = mad(0.15618768334388733f, _1980, (mad(0.13400420546531677f, _1979, (_1978 * 0.6624541878700256f)))); - float _1986 = mad(0.053689517080783844f, _1980, (mad(0.6740817427635193f, _1979, (_1978 * 0.2722287178039551f)))); - float _1989 = mad(1.0103391408920288f, _1980, (mad(0.00406073359772563f, _1979, (_1978 * -0.005574649665504694f)))); - float _2011 = min((max(((min((max((mad(-0.23642469942569733f, _1989, (mad(-0.32480329275131226f, _1986, (_1983 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2012 = min((max(((min((max((mad(0.016756348311901093f, _1989, (mad(1.6153316497802734f, _1986, (_1983 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2013 = min((max(((min((max((mad(0.9883948564529419f, _1989, (mad(-0.008284442126750946f, _1986, (_1983 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2026 = _2011; - _2027 = _2012; - _2028 = _2013; - do { - if (!((((uint)(cb0_042w)) == 5))) { - _2026 = (mad(_47, _2013, (mad(_46, _2012, (_2011 * _45))))); - _2027 = (mad(_50, _2013, (mad(_49, _2012, (_2011 * _48))))); - _2028 = (mad(_53, _2013, (mad(_52, _2012, (_2011 * _51))))); - } - float _2038 = exp2(((log2((_2026 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2039 = exp2(((log2((_2027 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2040 = exp2(((log2((_2028 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2779 = (exp2(((log2(((1.0f / ((_2038 * 18.6875f) + 1.0f)) * ((_2038 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2780 = (exp2(((log2(((1.0f / ((_2039 * 18.6875f) + 1.0f)) * ((_2039 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2781 = (exp2(((log2(((1.0f / ((_2040 * 18.6875f) + 1.0f)) * ((_2040 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if ((((((uint)(cb0_042w)) & -3) == 4))) { - _10[0] = (cb0_010x); - _10[1] = (cb0_010y); - _10[2] = (cb0_010z); - _10[3] = (cb0_010w); - _10[4] = (cb0_012x); - _10[5] = (cb0_012x); - _11[0] = (cb0_011x); - _11[1] = (cb0_011y); - _11[2] = (cb0_011z); - _11[3] = (cb0_011w); - _11[4] = (cb0_012y); - _11[5] = (cb0_012y); - float _2117 = (cb0_012z)*_1318; - float _2118 = (cb0_012z)*_1319; - float _2119 = (cb0_012z)*_1320; - float _2122 = mad((UniformBufferConstants_WorkingColorSpace_016z), _2119, (mad((UniformBufferConstants_WorkingColorSpace_016y), _2118, ((UniformBufferConstants_WorkingColorSpace_016x)*_2117)))); - float _2125 = mad((UniformBufferConstants_WorkingColorSpace_017z), _2119, (mad((UniformBufferConstants_WorkingColorSpace_017y), _2118, ((UniformBufferConstants_WorkingColorSpace_017x)*_2117)))); - float _2128 = mad((UniformBufferConstants_WorkingColorSpace_018z), _2119, (mad((UniformBufferConstants_WorkingColorSpace_018y), _2118, ((UniformBufferConstants_WorkingColorSpace_018x)*_2117)))); - float _2132 = max((max(_2122, _2125)), _2128); - float _2137 = ((max(_2132, 1.000000013351432e-10f)) - (max((min((min(_2122, _2125)), _2128)), 1.000000013351432e-10f))) / (max(_2132, 0.009999999776482582f)); - float _2150 = ((_2125 + _2122) + _2128) + ((sqrt(((((_2128 - _2125) * _2128) + ((_2125 - _2122) * _2125)) + ((_2122 - _2128) * _2122)))) * 1.75f); - float _2151 = _2150 * 0.3333333432674408f; - float _2152 = _2137 + -0.4000000059604645f; - float _2153 = _2152 * 5.0f; - float _2157 = max((1.0f - (abs((_2152 * 2.5f)))), 0.0f); - float _2168 = (((float(((int(((bool)((_2153 > 0.0f))))) - (int(((bool)((_2153 < 0.0f)))))))) * (1.0f - (_2157 * _2157))) + 1.0f) * 0.02500000037252903f; - _2177 = _2168; - do { - if ((!(_2151 <= 0.0533333346247673f))) { - _2177 = 0.0f; - if ((!(_2151 >= 0.1599999964237213f))) { - _2177 = (((0.23999999463558197f / _2150) + -0.5f) * _2168); - } - } - float _2178 = _2177 + 1.0f; - float _2179 = _2178 * _2122; - float _2180 = _2178 * _2125; - float _2181 = _2178 * _2128; - _2210 = 0.0f; - do { - if (!(((bool)((_2179 == _2180))) && ((bool)((_2180 == _2181))))) { - float _2188 = ((_2179 * 2.0f) - _2180) - _2181; - float _2191 = ((_2125 - _2128) * 1.7320507764816284f) * _2178; - float _2193 = atan((_2191 / _2188)); - bool _2196 = (_2188 < 0.0f); - bool _2197 = (_2188 == 0.0f); - bool _2198 = (_2191 >= 0.0f); - bool _2199 = (_2191 < 0.0f); - _2210 = ((((bool)(_2198 && _2197)) ? 90.0f : ((((bool)(_2199 && _2197)) ? -90.0f : (((((bool)(_2199 && _2196)) ? (_2193 + -3.1415927410125732f) : ((((bool)(_2198 && _2196)) ? (_2193 + 3.1415927410125732f) : _2193)))) * 57.2957763671875f))))); - } - float _2215 = min((max(((((bool)((_2210 < 0.0f))) ? (_2210 + 360.0f) : _2210)), 0.0f)), 360.0f); - do { - if (((_2215 < -180.0f))) { - _2224 = (_2215 + 360.0f); - } else { - _2224 = _2215; - if (((_2215 > 180.0f))) { - _2224 = (_2215 + -360.0f); - } - } - _2263 = 0.0f; - do { - if ((((bool)((_2224 > -67.5f))) && ((bool)((_2224 < 67.5f))))) { - float _2230 = (_2224 + 67.5f) * 0.029629629105329514f; - int _2231 = int(2231); - float _2233 = _2230 - (float(_2231)); - float _2234 = _2233 * _2233; - float _2235 = _2234 * _2233; - if (((_2231 == 3))) { - _2263 = (((0.1666666716337204f - (_2233 * 0.5f)) + (_2234 * 0.5f)) - (_2235 * 0.1666666716337204f)); - } else { - if (((_2231 == 2))) { - _2263 = ((0.6666666865348816f - _2234) + (_2235 * 0.5f)); - } else { - if (((_2231 == 1))) { - _2263 = (((_2235 * -0.5f) + 0.1666666716337204f) + ((_2234 + _2233) * 0.5f)); - } else { - _2263 = ((((bool)((_2231 == 0))) ? (_2235 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _2272 = min((max(((((_2137 * 0.27000001072883606f) * (0.029999999329447746f - _2179)) * _2263) + _2179), 0.0f)), 65535.0f); - float _2273 = min((max(_2180, 0.0f)), 65535.0f); - float _2274 = min((max(_2181, 0.0f)), 65535.0f); - float _2287 = min((max((mad(-0.21492856740951538f, _2274, (mad(-0.2365107536315918f, _2273, (_2272 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _2288 = min((max((mad(-0.09967592358589172f, _2274, (mad(1.17622971534729f, _2273, (_2272 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _2289 = min((max((mad(0.9977163076400757f, _2274, (mad(-0.006032449658960104f, _2273, (_2272 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _2290 = dot(float3(_2287, _2288, _2289), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2301 = log2((max((((_2287 - _2290) * 0.9599999785423279f) + _2290), 1.000000013351432e-10f))); - float _2302 = _2301 * 0.3010300099849701f; - float _2303 = log2((cb0_008x)); - float _2304 = _2303 * 0.3010300099849701f; - do { - if (!(!(_2302 <= _2304))) { - _2373 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2311 = log2((cb0_009x)); - float _2312 = _2311 * 0.3010300099849701f; - if ((((bool)((_2302 > _2304))) && ((bool)((_2302 < _2312))))) { - float _2320 = ((_2301 - _2303) * 0.9030900001525879f) / ((_2311 - _2303) * 0.3010300099849701f); - int _2321 = int(2321); - float _2323 = _2320 - (float(_2321)); - float _2325 = _10[_2321]; - float _2328 = _10[(_2321 + 1)]; - float _2333 = _2325 * 0.5f; - _2373 = (dot(float3((_2323 * _2323), _2323, 1.0f), float3((mad((_10[(_2321 + 2)]), 0.5f, (mad(_2328, -1.0f, _2333)))), (_2328 - _2325), (mad(_2328, 0.5f, _2333))))); - } else { - do { - if (!(!(_2302 >= _2312))) { - float _2342 = log2((cb0_008z)); - if (((_2302 < (_2342 * 0.3010300099849701f)))) { - float _2350 = ((_2301 - _2311) * 0.9030900001525879f) / ((_2342 - _2311) * 0.3010300099849701f); - int _2351 = int(2351); - float _2353 = _2350 - (float(_2351)); - float _2355 = _11[_2351]; - float _2358 = _11[(_2351 + 1)]; - float _2363 = _2355 * 0.5f; - _2373 = (dot(float3((_2353 * _2353), _2353, 1.0f), float3((mad((_11[(_2351 + 2)]), 0.5f, (mad(_2358, -1.0f, _2363)))), (_2358 - _2355), (mad(_2358, 0.5f, _2363))))); - break; - } - } - _2373 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2377 = log2((max((((_2288 - _2290) * 0.9599999785423279f) + _2290), 1.000000013351432e-10f))); - float _2378 = _2377 * 0.3010300099849701f; - do { - if (!(!(_2378 <= _2304))) { - _2447 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2385 = log2((cb0_009x)); - float _2386 = _2385 * 0.3010300099849701f; - if ((((bool)((_2378 > _2304))) && ((bool)((_2378 < _2386))))) { - float _2394 = ((_2377 - _2303) * 0.9030900001525879f) / ((_2385 - _2303) * 0.3010300099849701f); - int _2395 = int(2395); - float _2397 = _2394 - (float(_2395)); - float _2399 = _10[_2395]; - float _2402 = _10[(_2395 + 1)]; - float _2407 = _2399 * 0.5f; - _2447 = (dot(float3((_2397 * _2397), _2397, 1.0f), float3((mad((_10[(_2395 + 2)]), 0.5f, (mad(_2402, -1.0f, _2407)))), (_2402 - _2399), (mad(_2402, 0.5f, _2407))))); - } else { - do { - if (!(!(_2378 >= _2386))) { - float _2416 = log2((cb0_008z)); - if (((_2378 < (_2416 * 0.3010300099849701f)))) { - float _2424 = ((_2377 - _2385) * 0.9030900001525879f) / ((_2416 - _2385) * 0.3010300099849701f); - int _2425 = int(2425); - float _2427 = _2424 - (float(_2425)); - float _2429 = _11[_2425]; - float _2432 = _11[(_2425 + 1)]; - float _2437 = _2429 * 0.5f; - _2447 = (dot(float3((_2427 * _2427), _2427, 1.0f), float3((mad((_11[(_2425 + 2)]), 0.5f, (mad(_2432, -1.0f, _2437)))), (_2432 - _2429), (mad(_2432, 0.5f, _2437))))); - break; - } - } - _2447 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2451 = log2((max((((_2289 - _2290) * 0.9599999785423279f) + _2290), 1.000000013351432e-10f))); - float _2452 = _2451 * 0.3010300099849701f; - do { - if (!(!(_2452 <= _2304))) { - _2521 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2459 = log2((cb0_009x)); - float _2460 = _2459 * 0.3010300099849701f; - if ((((bool)((_2452 > _2304))) && ((bool)((_2452 < _2460))))) { - float _2468 = ((_2451 - _2303) * 0.9030900001525879f) / ((_2459 - _2303) * 0.3010300099849701f); - int _2469 = int(2469); - float _2471 = _2468 - (float(_2469)); - float _2473 = _10[_2469]; - float _2476 = _10[(_2469 + 1)]; - float _2481 = _2473 * 0.5f; - _2521 = (dot(float3((_2471 * _2471), _2471, 1.0f), float3((mad((_10[(_2469 + 2)]), 0.5f, (mad(_2476, -1.0f, _2481)))), (_2476 - _2473), (mad(_2476, 0.5f, _2481))))); - } else { - do { - if (!(!(_2452 >= _2460))) { - float _2490 = log2((cb0_008z)); - if (((_2452 < (_2490 * 0.3010300099849701f)))) { - float _2498 = ((_2451 - _2459) * 0.9030900001525879f) / ((_2490 - _2459) * 0.3010300099849701f); - int _2499 = int(2499); - float _2501 = _2498 - (float(_2499)); - float _2503 = _11[_2499]; - float _2506 = _11[(_2499 + 1)]; - float _2511 = _2503 * 0.5f; - _2521 = (dot(float3((_2501 * _2501), _2501, 1.0f), float3((mad((_11[(_2499 + 2)]), 0.5f, (mad(_2506, -1.0f, _2511)))), (_2506 - _2503), (mad(_2506, 0.5f, _2511))))); - break; - } - } - _2521 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2525 = (cb0_008w) - (cb0_008y); - float _2526 = ((exp2((_2373 * 3.321928024291992f))) - (cb0_008y)) / _2525; - float _2528 = ((exp2((_2447 * 3.321928024291992f))) - (cb0_008y)) / _2525; - float _2530 = ((exp2((_2521 * 3.321928024291992f))) - (cb0_008y)) / _2525; - float _2533 = mad(0.15618768334388733f, _2530, (mad(0.13400420546531677f, _2528, (_2526 * 0.6624541878700256f)))); - float _2536 = mad(0.053689517080783844f, _2530, (mad(0.6740817427635193f, _2528, (_2526 * 0.2722287178039551f)))); - float _2539 = mad(1.0103391408920288f, _2530, (mad(0.00406073359772563f, _2528, (_2526 * -0.005574649665504694f)))); - float _2552 = min((max((mad(-0.23642469942569733f, _2539, (mad(-0.32480329275131226f, _2536, (_2533 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _2553 = min((max((mad(0.016756348311901093f, _2539, (mad(1.6153316497802734f, _2536, (_2533 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _2554 = min((max((mad(0.9883948564529419f, _2539, (mad(-0.008284442126750946f, _2536, (_2533 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _2557 = mad(0.15618768334388733f, _2554, (mad(0.13400420546531677f, _2553, (_2552 * 0.6624541878700256f)))); - float _2560 = mad(0.053689517080783844f, _2554, (mad(0.6740817427635193f, _2553, (_2552 * 0.2722287178039551f)))); - float _2563 = mad(1.0103391408920288f, _2554, (mad(0.00406073359772563f, _2553, (_2552 * -0.005574649665504694f)))); - float _2585 = min((max(((min((max((mad(-0.23642469942569733f, _2563, (mad(-0.32480329275131226f, _2560, (_2557 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2586 = min((max(((min((max((mad(0.016756348311901093f, _2563, (mad(1.6153316497802734f, _2560, (_2557 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2587 = min((max(((min((max((mad(0.9883948564529419f, _2563, (mad(-0.008284442126750946f, _2560, (_2557 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2600 = _2585; - _2601 = _2586; - _2602 = _2587; - do { - if (!((((uint)(cb0_042w)) == 6))) { - _2600 = (mad(_47, _2587, (mad(_46, _2586, (_2585 * _45))))); - _2601 = (mad(_50, _2587, (mad(_49, _2586, (_2585 * _48))))); - _2602 = (mad(_53, _2587, (mad(_52, _2586, (_2585 * _51))))); - } - float _2612 = exp2(((log2((_2600 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2613 = exp2(((log2((_2601 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2614 = exp2(((log2((_2602 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2779 = (exp2(((log2(((1.0f / ((_2612 * 18.6875f) + 1.0f)) * ((_2612 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2780 = (exp2(((log2(((1.0f / ((_2613 * 18.6875f) + 1.0f)) * ((_2613 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2781 = (exp2(((log2(((1.0f / ((_2614 * 18.6875f) + 1.0f)) * ((_2614 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 7))) { - float _2659 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1320, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1319, ((UniformBufferConstants_WorkingColorSpace_008x)*_1318)))); - float _2662 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1320, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1319, ((UniformBufferConstants_WorkingColorSpace_009x)*_1318)))); - float _2665 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1320, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1319, ((UniformBufferConstants_WorkingColorSpace_010x)*_1318)))); - float _2684 = exp2(((log2(((mad(_47, _2665, (mad(_46, _2662, (_2659 * _45))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2685 = exp2(((log2(((mad(_50, _2665, (mad(_49, _2662, (_2659 * _48))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2686 = exp2(((log2(((mad(_53, _2665, (mad(_52, _2662, (_2659 * _51))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2779 = (exp2(((log2(((1.0f / ((_2684 * 18.6875f) + 1.0f)) * ((_2684 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2780 = (exp2(((log2(((1.0f / ((_2685 * 18.6875f) + 1.0f)) * ((_2685 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2781 = (exp2(((log2(((1.0f / ((_2686 * 18.6875f) + 1.0f)) * ((_2686 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } else { - _2779 = _1318; - _2780 = _1319; - _2781 = _1320; - if (!((((uint)(cb0_042w)) == 8))) { - if (((((uint)(cb0_042w)) == 9))) { - float _2733 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1308, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1307, ((UniformBufferConstants_WorkingColorSpace_008x)*_1306)))); - float _2736 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1308, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1307, ((UniformBufferConstants_WorkingColorSpace_009x)*_1306)))); - float _2739 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1308, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1307, ((UniformBufferConstants_WorkingColorSpace_010x)*_1306)))); - _2779 = (mad(_47, _2739, (mad(_46, _2736, (_2733 * _45))))); - _2780 = (mad(_50, _2739, (mad(_49, _2736, (_2733 * _48))))); - _2781 = (mad(_53, _2739, (mad(_52, _2736, (_2733 * _51))))); - } else { - float _2752 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1333, ((UniformBufferConstants_WorkingColorSpace_008x)*_1332)))); - float _2755 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1333, ((UniformBufferConstants_WorkingColorSpace_009x)*_1332)))); - float _2758 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1334, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1333, ((UniformBufferConstants_WorkingColorSpace_010x)*_1332)))); - _2779 = (exp2(((log2((mad(_47, _2758, (mad(_46, _2755, (_2752 * _45))))))) * (cb0_042z)))); - _2780 = (exp2(((log2((mad(_50, _2758, (mad(_49, _2755, (_2752 * _48))))))) * (cb0_042z)))); - _2781 = (exp2(((log2((mad(_53, _2758, (mad(_52, _2755, (_2752 * _51))))))) * (cb0_042z)))); - } - } - } - } - } - } - } - SV_Target.x = (_2779 * 0.9523810148239136f); - SV_Target.y = (_2780 * 0.9523810148239136f); - SV_Target.z = (_2781 * 0.9523810148239136f); - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0x31FE4421.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x31FE4421.ps_5_1.hlsl deleted file mode 100644 index 4f9b7f1c..00000000 --- a/src/games/ue-dx12/lutbuilder_0x31FE4421.ps_5_1.hlsl +++ /dev/null @@ -1,1503 +0,0 @@ -// ---- Created with 3Dmigoto v1.3.16 on Thu Oct 17 13:24:17 2024 -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r5.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r5.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r5.xyz; - r3.xyz = r2.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r3.xyz; - r4.xyz = r2.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r5.xyz; - r3.xyz = r2.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r3.xyz; - r4.xyz = r2.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r2.yzw; - - r0.z = cmp(asuint(cb0[40].w) >= 3); - - // PQ Decode - r5.xy = log2(r0.xy); - r5.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r5.xyz; - r0.xyw = exp2(r0.xyw); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r5.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r0.w = cb0[35].x * 1.00055635; - r0.w = 1 / r0.w; - r1.x = cmp(6996.10791 >= cb0[35].x); - r1.yz = -r0.ww * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r1.yz = r1.yz * r0.ww + float2(99.1100006, 247.479996); - r1.yz = r1.yz * r0.ww + float2(0.244063005, 0.237039998); - r1.x = r1.x ? r1.y : r1.z; - r0.w = r1.x * r1.x; - r1.z = 2.86999989 * r1.x; - r0.w = r0.w * -3 + r1.z; - r1.y = -0.275000006 + r0.w; - r5.xyz = cb0[35].xxx * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[35].x * cb0[35].x; - r5.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r5.xyz; - r1.z = r5.x / r5.y; - r5.xyw = -cb0[35].xxx * float3(2.8974182e-05, 1916156.25, 705674) + float3(1, -1.13758118e+09, 1.97471539e+09); - r1.w = r0.w * 1.61456057e-07 + r5.x; - r1.w = r5.z / r1.w; - r2.w = 3 * r1.z; - r3.w = r1.z + r1.z; - r3.w = -r1.w * 8 + r3.w; - r3.w = 4 + r3.w; - r6.x = r2.w / r3.w; - r2.w = r1.w + r1.w; - r6.y = r2.w / r3.w; - r2.w = cmp(cb0[35].x < 4000); - r1.xy = r2.ww ? r6.xy : r1.xy; - r5.xy = -r0.ww * float2(1.53176999, 308.606995) + r5.yw; - r2.w = cb0[35].x * 1189.62 + r0.w; - r2.w = 1412139.88 + r2.w; - r2.w = r2.w * r2.w; - r7.x = r5.x / r2.w; - r0.w = -cb0[35].x * 179.455994 + r0.w; - r0.w = 6193636 + r0.w; - r0.w = r0.w * r0.w; - r7.y = r5.y / r0.w; - r0.w = dot(r7.xy, r7.xy); - r0.w = rsqrt(r0.w); - r5.xy = r7.xy * r0.ww; - r0.w = cb0[35].y * r5.y; - r0.w = r0.w * 0.0500000007 + r1.z; - r1.z = cb0[35].y * -r5.x; - r1.z = r1.z * 0.0500000007 + r1.w; - r1.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.z * 8 + r0.w; - r0.w = 4 + r0.w; - r1.z = r1.z + r1.z; - r5.xy = r1.wz / r0.ww; - r1.zw = r5.xy + -r6.xy; - r1.xy = r1.xy + r1.zw; - r1.zw = float2(0.312700003, 0.328999996); - r1.xyzw = cb0[38].zzzz ? r1.xyzw : r1.zwxy; - r5.xy = max(float2(1.00000001e-10, 1.00000001e-10), r1.yw); - r5.zw = float2(1, 1) + -r1.xz; - r1.yw = r5.zw + -r1.yw; - r6.xy = r1.xz / r5.xy; - r1.xy = r1.yw / r5.xy; - r6.z = 1; - r6.w = r1.x; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r6.xzw); - r1.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r6.xzw); - r2.w = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r6.xzw); - r1.zw = r6.yz; - r3.w = dot(float3(-0.161400005, 0.895099998, 0.266400009), r1.yzw); - r4.w = dot(float3(0.0366999991, -0.750199974, 1.71350002), r1.yzw); - r1.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r1.yzw); - r0.w = r3.w / r0.w; - r1.x = r4.w / r1.x; - r1.y = r1.y / r2.w; - r5.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r1.xzw = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.xxx; - r6.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r1.yyy; - r7.x = r5.x; - r7.y = r1.x; - r7.z = r6.x; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r7.xyz); - r8.x = r5.y; - r8.y = r1.z; - r8.z = r6.y; - r1.x = dot(float3(0.986992896, -0.1470543, 0.159962699), r8.xyz); - r6.x = r5.z; - r6.y = r1.w; - r1.y = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r1.z = dot(float3(0.432305306, 0.518360317, 0.0492912009), r7.xyz); - r1.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r8.xyz); - r2.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r3.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r7.xyz); - r4.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r8.xyz); - r5.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r5.yzw = cb1[1].xyz * r1.xxx; - r5.yzw = r0.www * cb1[0].xyz + r5.yzw; - r5.yzw = r1.yyy * cb1[2].xyz + r5.yzw; - r1.xyw = cb1[1].xyz * r1.www; - r1.xyz = r1.zzz * cb1[0].xyz + r1.xyw; - r1.xyz = r2.www * cb1[2].xyz + r1.xyz; - r6.xyz = cb1[1].xyz * r4.www; - r6.xyz = r3.www * cb1[0].xyz + r6.xyz; - r6.xyz = r5.xxx * cb1[2].xyz + r6.xyz; - r7.xyz = cb1[4].yyy * r1.xyz; - r7.xyz = cb1[4].xxx * r5.yzw + r7.xyz; - r7.xyz = cb1[4].zzz * r6.xyz + r7.xyz; - r8.xyz = cb1[5].yyy * r1.xyz; - r8.xyz = cb1[5].xxx * r5.yzw + r8.xyz; - r8.xyz = cb1[5].zzz * r6.xyz + r8.xyz; - r1.xyz = cb1[6].yyy * r1.xyz; - r1.xyz = cb1[6].xxx * r5.yzw + r1.xyz; - r1.xyz = cb1[6].zzz * r6.xyz + r1.xyz; - r5.x = dot(r7.xyz, r0.xyz); - r5.y = dot(r8.xyz, r0.xyz); - r5.z = dot(r1.xyz, r0.xyz); - r0.x = dot(cb1[8].xyz, r5.xyz); - r0.y = dot(cb1[9].xyz, r5.xyz); - r0.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r0.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[36].z * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r0.xyz); - r1.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r0.xyz); - r1.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = r0.www * r1.xyz + r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r5.xyz = r5.xyz * r5.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r1.xyz = r1.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].z; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r0.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].x + -cb0[35].w; - r3.w = -cb0[35].w + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r0.xyz = r6.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r6.xyz = r7.xyz * r7.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r0.xyz = r0.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r5.xyz * r4.www + r0.xyz; - - // CustomEdit - float3 untonemapped_ap1 = r0.xyz; - - // Blue correct - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = cb0[36].yyy * r1.xyz + r0.xyz; - - // start of film tonemap - // AP1 => AP0 - - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r1.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r1.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r1.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - // aces::hueweight (with smoothstep) - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - // AP0 => AP1 - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; // End of ACES:RRT - - // Film Toe > 0.8 - r6.xy = cb0[37].ww + float2(1, 0.180000007); - r0.w = -cb0[37].y + r6.x; - r1.w = cb0[38].x + 1; - r2.w = -cb0[37].z + r1.w; - r3.w = cmp(0.800000012 < cb0[37].y); - r6.xz = -cb0[37].yy + float2(0.819999993, 1); - r6.xz = r6.xz / cb0[37].xx; - r4.w = -0.744727492 + r6.x; - r5.w = r6.y / r0.w; - r6.x = -1 + r5.w; - r6.x = 1 + -r6.x; - r5.w = r5.w / r6.x; - r5.w = log2(r5.w); - r5.w = 0.346573591 * r5.w; - r6.x = r0.w / cb0[37].x; - r5.w = -r5.w * r6.x + -0.744727492; - r3.w = r3.w ? r4.w : r5.w; - r4.w = r6.z + -r3.w; - r5.w = cb0[37].z / cb0[37].x; - r5.w = r5.w + -r4.w; - r5.xyz = log2(r5.xyz); - r6.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r7.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.www; - r7.xyz = cb0[37].xxx * r7.xyz; - r4.w = r0.w + r0.w; - r6.w = cb0[37].x * -2; - r0.w = r6.w / r0.w; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r9.xyz = r8.xyz * r0.www; - r9.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r9.xyz; - r9.xyz = exp2(r9.xyz); - r9.xyz = float3(1, 1, 1) + r9.xyz; - r9.xyz = r4.www / r9.xyz; - r9.xyz = -cb0[37].www + r9.xyz; - r0.w = r2.w + r2.w; - r4.w = cb0[37].x + cb0[37].x; - r2.w = r4.w / r2.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r5.www; - r5.xyz = r5.xyz * r2.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r0.www / r5.xyz; - r5.xyz = -r5.xyz + r1.www; - r10.xyz = cmp(r6.xyz < r3.www); - r9.xyz = r10.xyz ? r9.xyz : r7.xyz; - r6.xyz = cmp(r5.www < r6.xyz); - r5.xyz = r6.xyz ? r5.xyz : r7.xyz; - r0.w = r5.w + -r3.w; - r6.xyz = saturate(r8.xyz / r0.www); - r0.w = cmp(r5.w < r3.w); - r7.xyz = float3(1, 1, 1) + -r6.xyz; - r6.xyz = r0.www ? r7.xyz : r6.xyz; - r7.xyz = -r6.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r6.xyz = r6.xyz * r6.xyz; - r6.xyz = r6.xyz * r7.xyz; - r5.xyz = r5.xyz + -r9.xyz; - r5.xyz = r6.xyz * r5.xyz + r9.xyz; - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].www * r5.xyz + r1.xyz; - - // BlueBlueCorrectInv - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r1.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r1.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r1.xyz); - // lerp with BlueCorrection - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].yyy * r5.xyz + r1.xyz; - - // Convert to target space but lacks clamp - r5.x = saturate(dot(cb1[12].xyz, r1.xyz)); - r5.y = saturate(dot(cb1[13].xyz, r1.xyz)); - r5.z = saturate(dot(cb1[14].xyz, r1.xyz)); - - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r5.xyz; - r6.xyz = cmp(r5.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r5.xyz = log2(r5.xyz); - r5.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = r5.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r1.xyz = r6.xyz ? r5.xyz : r1.xyz; - r5.yzw = r1.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r5.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r5.y + r1.w; - r5.x = 0.0625 * r1.w; - r6.xyz = t0.Sample(s0_s, r5.xz).xyz; - r5.xy = float2(0.0625, 0) + r5.xz; - r5.xyz = t0.Sample(s0_s, r5.xy).xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r0.www * r5.xyz + r6.xyz; - r5.xyz = cb0[5].yyy * r5.xyz; - r1.xyz = cb0[5].xxx * r1.xyz + r5.xyz; - r1.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r1.xyz); - r5.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r1.xyz); - - r6.xyz = r1.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r1.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r1.xyz; - r1.xyz = r5.xyz ? r6.xyz : r1.xyz; - - r5.xyz = r1.xyz * r1.xyz; - r1.xyz = cb0[39].yyy * r1.xyz; - r1.xyz = cb0[39].xxx * r5.xyz + r1.xyz; - r1.xyz = cb0[39].zzz + r1.xyz; - r5.xyz = cb0[14].xyz * r1.xyz; - r1.xyz = -r1.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r1.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r1.xyz); - r5.xyz = log2(r5.xyz); - - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - // CustomEdit - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { // cb[40].w = output device - // Shader uses this section - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r3.xyz, r6.xyz); - r7.y = dot(r4.xyz, r6.xyz); - r7.z = dot(r2.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r0.xyz); - r7.y = dot(cb1[13].xyz, r0.xyz); - r7.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r7.xyz + r0.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r0.xyz); - r7.y = dot(cb1[9].xyz, r0.xyz); - r7.z = dot(cb1[10].xyz, r0.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r1.xyz); - r8.y = dot(cb1[9].xyz, r1.xyz); - r8.z = dot(cb1[10].xyz, r1.xyz); - r1.x = dot(r3.xyz, r8.xyz); - r1.y = dot(r4.xyz, r8.xyz); - r1.z = dot(r2.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r3.xyz, r8.xyz); - r1.w = dot(r4.xyz, r8.xyz); - r2.x = dot(r2.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.x); - r2.xyz = cb0[40].zzz * r3.xyz; - r2.xyz = exp2(r2.xyz); - r1.xyz = r7.yyy ? r1.xyz : r2.xyz; - r6.xyz = r7.xxx ? r0.xyz : r1.xyz; - } - } - } - } - } - - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x36E3A438.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x36E3A438.ps_5_1.hlsl deleted file mode 100644 index 4f8e6b15..00000000 --- a/src/games/ue-dx12/lutbuilder_0x36E3A438.ps_5_1.hlsl +++ /dev/null @@ -1,1396 +0,0 @@ -// ---- Created with 3Dmigoto v1.3.16 on Thu Oct 17 13:24:09 2024 -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t1 : register(t1); - -Texture2D t0 : register(t0); - -SamplerState s1_s : register(s1); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r5.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r5.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r5.xyz; - r3.xyz = r2.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r3.xyz; - r4.xyz = r2.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r5.xyz; - r3.xyz = r2.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r3.xyz; - r4.xyz = r2.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r2.yzw; - - r0.z = cmp(asuint(cb0[40].w) >= 3); - - // PQ Decode - r5.xy = log2(r0.xy); - r5.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r5.xyz; - r0.xyw = exp2(r0.xyw); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r5.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[36].z * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r5.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r5.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r5.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r5.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r5.xyz = r5.xyz * r5.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r1.xyz = r1.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].z; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r0.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].x + -cb0[35].w; - r3.w = -cb0[35].w + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r0.xyz = r6.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r6.xyz = r7.xyz * r7.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r0.xyz = r0.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r5.xyz * r4.www + r0.xyz; - - // CustomEdit - float3 untonemapped_ap1 = r0.xyz; - - // Blue correct - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = cb0[36].yyy * r1.xyz + r0.xyz; - - // start of film tonemap - // AP1 => AP0 - - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r1.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r1.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r1.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - // aces::hueweight (with smoothstep) - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - // AP0 => AP1 - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; // End of ACES:RRT - - // Film Toe > 0.8 - r6.xy = cb0[37].ww + float2(1, 0.180000007); - r0.w = -cb0[37].y + r6.x; - r1.w = cb0[38].x + 1; - r2.w = -cb0[37].z + r1.w; - r3.w = cmp(0.800000012 < cb0[37].y); - r6.xz = -cb0[37].yy + float2(0.819999993, 1); - r6.xz = r6.xz / cb0[37].xx; - r4.w = -0.744727492 + r6.x; - r5.w = r6.y / r0.w; - r6.x = -1 + r5.w; - r6.x = 1 + -r6.x; - r5.w = r5.w / r6.x; - r5.w = log2(r5.w); - r5.w = 0.346573591 * r5.w; - r6.x = r0.w / cb0[37].x; - r5.w = -r5.w * r6.x + -0.744727492; - r3.w = r3.w ? r4.w : r5.w; - r4.w = r6.z + -r3.w; - r5.w = cb0[37].z / cb0[37].x; - r5.w = r5.w + -r4.w; - r5.xyz = log2(r5.xyz); - r6.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r7.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.www; - r7.xyz = cb0[37].xxx * r7.xyz; - r4.w = r0.w + r0.w; - r6.w = cb0[37].x * -2; - r0.w = r6.w / r0.w; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r9.xyz = r8.xyz * r0.www; - r9.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r9.xyz; - r9.xyz = exp2(r9.xyz); - r9.xyz = float3(1, 1, 1) + r9.xyz; - r9.xyz = r4.www / r9.xyz; - r9.xyz = -cb0[37].www + r9.xyz; - r0.w = r2.w + r2.w; - r4.w = cb0[37].x + cb0[37].x; - r2.w = r4.w / r2.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r5.www; - r5.xyz = r5.xyz * r2.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r0.www / r5.xyz; - r5.xyz = -r5.xyz + r1.www; - r10.xyz = cmp(r6.xyz < r3.www); - r9.xyz = r10.xyz ? r9.xyz : r7.xyz; - r6.xyz = cmp(r5.www < r6.xyz); - r5.xyz = r6.xyz ? r5.xyz : r7.xyz; - r0.w = r5.w + -r3.w; - r6.xyz = saturate(r8.xyz / r0.www); - r0.w = cmp(r5.w < r3.w); - r7.xyz = float3(1, 1, 1) + -r6.xyz; - r6.xyz = r0.www ? r7.xyz : r6.xyz; - r7.xyz = -r6.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r6.xyz = r6.xyz * r6.xyz; - r6.xyz = r6.xyz * r7.xyz; - r5.xyz = r5.xyz + -r9.xyz; - r5.xyz = r6.xyz * r5.xyz + r9.xyz; - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].www * r5.xyz + r1.xyz; - - // BlueBlueCorrectInv - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r1.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r1.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r1.xyz); - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].yyy * r5.xyz + r1.xyz; - - r5.x = saturate(dot(cb1[12].xyz, r1.xyz)); - r5.y = saturate(dot(cb1[13].xyz, r1.xyz)); - r5.z = saturate(dot(cb1[14].xyz, r1.xyz)); - - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r5.xyz; - r6.xyz = cmp(r5.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r5.xyz = log2(r5.xyz); - r5.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = r5.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r1.xyz = r6.xyz ? r5.xyz : r1.xyz; - r5.yzw = r1.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r5.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r5.y + r1.w; - r5.x = 0.0625 * r1.w; - r6.xyz = t0.Sample(s0_s, r5.xz).xyz; - r5.yw = float2(0.0625, 0) + r5.xz; - r7.xyz = t0.Sample(s0_s, r5.yw).xyz; - r7.xyz = r7.xyz + -r6.xyz; - r6.xyz = r0.www * r7.xyz + r6.xyz; - r6.xyz = cb0[5].yyy * r6.xyz; - r1.xyz = cb0[5].xxx * r1.xyz + r6.xyz; - r6.xyz = t1.Sample(s1_s, r5.xz).xyz; - r5.xyz = t1.Sample(s1_s, r5.yw).xyz; // Sampling two luts - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r0.www * r5.xyz + r6.xyz; - r1.xyz = cb0[5].zzz * r5.xyz + r1.xyz; - r1.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r1.xyz); - r5.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r1.xyz); - r6.xyz = r1.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r1.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r1.xyz; - r1.xyz = r5.xyz ? r6.xyz : r1.xyz; - - r5.xyz = r1.xyz * r1.xyz; - r1.xyz = cb0[39].yyy * r1.xyz; - r1.xyz = cb0[39].xxx * r5.xyz + r1.xyz; - r1.xyz = cb0[39].zzz + r1.xyz; - r5.xyz = cb0[14].xyz * r1.xyz; - r1.xyz = -r1.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r1.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r1.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - // CustomEdit - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { // cb[40].w = output device - // SDR path - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r3.xyz, r6.xyz); - r7.y = dot(r4.xyz, r6.xyz); - r7.z = dot(r2.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r0.xyz); - r7.y = dot(cb1[13].xyz, r0.xyz); - r7.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r7.xyz + r0.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r0.xyz); - r7.y = dot(cb1[9].xyz, r0.xyz); - r7.z = dot(cb1[10].xyz, r0.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r1.xyz); - r8.y = dot(cb1[9].xyz, r1.xyz); - r8.z = dot(cb1[10].xyz, r1.xyz); - r1.x = dot(r3.xyz, r8.xyz); - r1.y = dot(r4.xyz, r8.xyz); - r1.z = dot(r2.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r3.xyz, r8.xyz); - r1.w = dot(r4.xyz, r8.xyz); - r2.x = dot(r2.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.x); - r2.xyz = cb0[40].zzz * r3.xyz; - r2.xyz = exp2(r2.xyz); - r1.xyz = r7.yyy ? r1.xyz : r2.xyz; - r6.xyz = r7.xxx ? r0.xyz : r1.xyz; - } - } - } - } - } - - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x4CC68F73.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0x4CC68F73.ps_6_6.hlsl deleted file mode 100644 index d37da949..00000000 --- a/src/games/ue-dx12/lutbuilder_0x4CC68F73.ps_6_6.hlsl +++ /dev/null @@ -1,1037 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); - -cbuffer cb0 : register(b0) { - float cb0_005x : packoffset(c005.x); - float cb0_005y : packoffset(c005.y); - float cb0_008x : packoffset(c008.x); - float cb0_008y : packoffset(c008.y); - float cb0_008z : packoffset(c008.z); - float cb0_008w : packoffset(c008.w); - float cb0_009x : packoffset(c009.x); - float cb0_010x : packoffset(c010.x); - float cb0_010y : packoffset(c010.y); - float cb0_010z : packoffset(c010.z); - float cb0_010w : packoffset(c010.w); - float cb0_011x : packoffset(c011.x); - float cb0_011y : packoffset(c011.y); - float cb0_011z : packoffset(c011.z); - float cb0_011w : packoffset(c011.w); - float cb0_012x : packoffset(c012.x); - float cb0_012y : packoffset(c012.y); - float cb0_012z : packoffset(c012.z); - float cb0_013x : packoffset(c013.x); - float cb0_013y : packoffset(c013.y); - float cb0_013z : packoffset(c013.z); - float cb0_013w : packoffset(c013.w); - float cb0_014x : packoffset(c014.x); - float cb0_014y : packoffset(c014.y); - float cb0_014z : packoffset(c014.z); - float cb0_015x : packoffset(c015.x); - float cb0_015y : packoffset(c015.y); - float cb0_015z : packoffset(c015.z); - float cb0_015w : packoffset(c015.w); - float cb0_016x : packoffset(c016.x); - float cb0_016y : packoffset(c016.y); - float cb0_016z : packoffset(c016.z); - float cb0_016w : packoffset(c016.w); - float cb0_017x : packoffset(c017.x); - float cb0_017y : packoffset(c017.y); - float cb0_017z : packoffset(c017.z); - float cb0_017w : packoffset(c017.w); - float cb0_018x : packoffset(c018.x); - float cb0_018y : packoffset(c018.y); - float cb0_018z : packoffset(c018.z); - float cb0_018w : packoffset(c018.w); - float cb0_019x : packoffset(c019.x); - float cb0_019y : packoffset(c019.y); - float cb0_019z : packoffset(c019.z); - float cb0_019w : packoffset(c019.w); - float cb0_020x : packoffset(c020.x); - float cb0_020y : packoffset(c020.y); - float cb0_020z : packoffset(c020.z); - float cb0_020w : packoffset(c020.w); - float cb0_021x : packoffset(c021.x); - float cb0_021y : packoffset(c021.y); - float cb0_021z : packoffset(c021.z); - float cb0_021w : packoffset(c021.w); - float cb0_022x : packoffset(c022.x); - float cb0_022y : packoffset(c022.y); - float cb0_022z : packoffset(c022.z); - float cb0_022w : packoffset(c022.w); - float cb0_023x : packoffset(c023.x); - float cb0_023y : packoffset(c023.y); - float cb0_023z : packoffset(c023.z); - float cb0_023w : packoffset(c023.w); - float cb0_024x : packoffset(c024.x); - float cb0_024y : packoffset(c024.y); - float cb0_024z : packoffset(c024.z); - float cb0_024w : packoffset(c024.w); - float cb0_025x : packoffset(c025.x); - float cb0_025y : packoffset(c025.y); - float cb0_025z : packoffset(c025.z); - float cb0_025w : packoffset(c025.w); - float cb0_026x : packoffset(c026.x); - float cb0_026y : packoffset(c026.y); - float cb0_026z : packoffset(c026.z); - float cb0_026w : packoffset(c026.w); - float cb0_027x : packoffset(c027.x); - float cb0_027y : packoffset(c027.y); - float cb0_027z : packoffset(c027.z); - float cb0_027w : packoffset(c027.w); - float cb0_028x : packoffset(c028.x); - float cb0_028y : packoffset(c028.y); - float cb0_028z : packoffset(c028.z); - float cb0_028w : packoffset(c028.w); - float cb0_029x : packoffset(c029.x); - float cb0_029y : packoffset(c029.y); - float cb0_029z : packoffset(c029.z); - float cb0_029w : packoffset(c029.w); - float cb0_030x : packoffset(c030.x); - float cb0_030y : packoffset(c030.y); - float cb0_030z : packoffset(c030.z); - float cb0_030w : packoffset(c030.w); - float cb0_031x : packoffset(c031.x); - float cb0_031y : packoffset(c031.y); - float cb0_031z : packoffset(c031.z); - float cb0_031w : packoffset(c031.w); - float cb0_032x : packoffset(c032.x); - float cb0_032y : packoffset(c032.y); - float cb0_032z : packoffset(c032.z); - float cb0_032w : packoffset(c032.w); - float cb0_033x : packoffset(c033.x); - float cb0_033y : packoffset(c033.y); - float cb0_033z : packoffset(c033.z); - float cb0_033w : packoffset(c033.w); - float cb0_034x : packoffset(c034.x); - float cb0_034y : packoffset(c034.y); - float cb0_034z : packoffset(c034.z); - float cb0_034w : packoffset(c034.w); - float cb0_035z : packoffset(c035.z); - float cb0_035w : packoffset(c035.w); - float cb0_036x : packoffset(c036.x); - float cb0_036y : packoffset(c036.y); - float cb0_036z : packoffset(c036.z); - float cb0_036w : packoffset(c036.w); - float cb0_037x : packoffset(c037.x); - float cb0_037y : packoffset(c037.y); - float cb0_037z : packoffset(c037.z); - float cb0_037w : packoffset(c037.w); - float cb0_038x : packoffset(c038.x); - float cb0_039x : packoffset(c039.x); - float cb0_039y : packoffset(c039.y); - float cb0_039z : packoffset(c039.z); - float cb0_040y : packoffset(c040.y); - float cb0_040z : packoffset(c040.z); - uint cb0_040w : packoffset(c040.w); - uint cb0_041x : packoffset(c041.x); -}; - -cbuffer cb1 : register(b1) { - float cb1_008x : packoffset(c008.x); - float cb1_008y : packoffset(c008.y); - float cb1_008z : packoffset(c008.z); - float cb1_009x : packoffset(c009.x); - float cb1_009y : packoffset(c009.y); - float cb1_009z : packoffset(c009.z); - float cb1_010x : packoffset(c010.x); - float cb1_010y : packoffset(c010.y); - float cb1_010z : packoffset(c010.z); - float cb1_012x : packoffset(c012.x); - float cb1_012y : packoffset(c012.y); - float cb1_012z : packoffset(c012.z); - float cb1_013x : packoffset(c013.x); - float cb1_013y : packoffset(c013.y); - float cb1_013z : packoffset(c013.z); - float cb1_014x : packoffset(c014.x); - float cb1_014y : packoffset(c014.y); - float cb1_014z : packoffset(c014.z); - float cb1_016x : packoffset(c016.x); - float cb1_016y : packoffset(c016.y); - float cb1_016z : packoffset(c016.z); - float cb1_017x : packoffset(c017.x); - float cb1_017y : packoffset(c017.y); - float cb1_017z : packoffset(c017.z); - float cb1_018x : packoffset(c018.x); - float cb1_018y : packoffset(c018.y); - float cb1_018z : packoffset(c018.z); - uint cb1_020x : packoffset(c020.x); -}; - -SamplerState s0 : register(s0); - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - float _10[6]; - float _11[6]; - float _12[6]; - float _13[6]; - float _14 = (TEXCOORD.x) + -0.015625f; - float _15 = (TEXCOORD.y) + -0.015625f; - float _18 = float((uint)(SV_RenderTargetArrayIndex)); - float _39 = 1.379158854484558f; - float _40 = -0.3088507056236267f; - float _41 = -0.07034677267074585f; - float _42 = -0.06933528929948807f; - float _43 = 1.0822921991348267f; - float _44 = -0.012962047010660172f; - float _45 = -0.002159259282052517f; - float _46 = -0.045465391129255295f; - float _47 = 1.0477596521377563f; - float _105; - float _106; - float _107; - float _631; - float _667; - float _678; - float _742; - float _921; - float _932; - float _943; - float _1116; - float _1117; - float _1118; - float _1129; - float _1140; - float _1322; - float _1358; - float _1369; - float _1408; - float _1518; - float _1592; - float _1666; - float _1745; - float _1746; - float _1747; - float _1898; - float _1934; - float _1945; - float _1984; - float _2094; - float _2168; - float _2242; - float _2321; - float _2322; - float _2323; - float _2500; - float _2501; - float _2502; - if (!((((uint)(cb0_041x)) == 1))) { - _39 = 1.02579927444458f; - _40 = -0.020052503794431686f; - _41 = -0.0057713985443115234f; - _42 = -0.0022350111976265907f; - _43 = 1.0045825242996216f; - _44 = -0.002352306619286537f; - _45 = -0.005014004185795784f; - _46 = -0.025293385609984398f; - _47 = 1.0304402112960815f; - if (!((((uint)(cb0_041x)) == 2))) { - _39 = 0.6954522132873535f; - _40 = 0.14067870378494263f; - _41 = 0.16386906802654266f; - _42 = 0.044794563204050064f; - _43 = 0.8596711158752441f; - _44 = 0.0955343171954155f; - _45 = -0.005525882821530104f; - _46 = 0.004025210160762072f; - _47 = 1.0015007257461548f; - if (!((((uint)(cb0_041x)) == 3))) { - bool _28 = (((uint)(cb0_041x)) == 4); - _39 = ((_28 ? 1.0f : 1.7050515413284302f)); - _40 = ((_28 ? 0.0f : -0.6217905879020691f)); - _41 = ((_28 ? 0.0f : -0.0832584798336029f)); - _42 = ((_28 ? 0.0f : -0.13025718927383423f)); - _43 = ((_28 ? 1.0f : 1.1408027410507202f)); - _44 = ((_28 ? 0.0f : -0.010548528283834457f)); - _45 = ((_28 ? 0.0f : -0.024003278464078903f)); - _46 = ((_28 ? 0.0f : -0.1289687603712082f)); - _47 = ((_28 ? 1.0f : 1.152971863746643f)); - } - } - } - if (((((uint)(cb0_040w)) > 2))) { - float _58 = exp2(((log2((_14 * 1.0322580337524414f))) * 0.012683313339948654f)); - float _59 = exp2(((log2((_15 * 1.0322580337524414f))) * 0.012683313339948654f)); - float _60 = exp2(((log2((_18 * 0.032258063554763794f))) * 0.012683313339948654f)); - _105 = ((exp2(((log2(((max(0.0f, (_58 + -0.8359375f))) / (18.8515625f - (_58 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _106 = ((exp2(((log2(((max(0.0f, (_59 + -0.8359375f))) / (18.8515625f - (_59 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _107 = ((exp2(((log2(((max(0.0f, (_60 + -0.8359375f))) / (18.8515625f - (_60 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - } else { - _105 = (((exp2(((_14 * 14.45161247253418f) + -6.07624626159668f))) * 0.18000000715255737f) + -0.002667719265446067f); - _106 = (((exp2(((_15 * 14.45161247253418f) + -6.07624626159668f))) * 0.18000000715255737f) + -0.002667719265446067f); - _107 = (((exp2(((_18 * 0.4516128897666931f) + -6.07624626159668f))) * 0.18000000715255737f) + -0.002667719265446067f); - } - float _122 = mad((cb1_008z), _107, (mad((cb1_008y), _106, ((cb1_008x)*_105)))); - float _125 = mad((cb1_009z), _107, (mad((cb1_009y), _106, ((cb1_009x)*_105)))); - float _128 = mad((cb1_010z), _107, (mad((cb1_010y), _106, ((cb1_010x)*_105)))); - float _129 = dot(float3(_122, _125, _128), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _133 = (_122 / _129) + -1.0f; - float _134 = (_125 / _129) + -1.0f; - float _135 = (_128 / _129) + -1.0f; - float _147 = (1.0f - (exp2((((_129 * _129) * -4.0f) * (cb0_036z))))) * (1.0f - (exp2(((dot(float3(_133, _134, _135), float3(_133, _134, _135))) * -4.0f)))); - float _163 = (((mad(-0.06368283927440643f, _128, (mad(-0.32929131388664246f, _125, (_122 * 1.370412826538086f))))) - _122) * _147) + _122; - float _164 = (((mad(-0.010861567221581936f, _128, (mad(1.0970908403396606f, _125, (_122 * -0.08343426138162613f))))) - _125) * _147) + _125; - float _165 = (((mad(1.203694462776184f, _128, (mad(-0.09862564504146576f, _125, (_122 * -0.02579325996339321f))))) - _128) * _147) + _128; - float _166 = dot(float3(_163, _164, _165), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _180 = (cb0_019w) + (cb0_024w); - float _194 = (cb0_018w) * (cb0_023w); - float _208 = (cb0_017w) * (cb0_022w); - float _222 = (cb0_016w) * (cb0_021w); - float _236 = (cb0_015w) * (cb0_020w); - float _240 = _163 - _166; - float _241 = _164 - _166; - float _242 = _165 - _166; - float _300 = saturate((_166 / (cb0_035z))); - float _304 = (_300 * _300) * (3.0f - (_300 * 2.0f)); - float _305 = 1.0f - _304; - float _314 = (cb0_019w) + (cb0_034w); - float _323 = (cb0_018w) * (cb0_033w); - float _332 = (cb0_017w) * (cb0_032w); - float _341 = (cb0_016w) * (cb0_031w); - float _350 = (cb0_015w) * (cb0_030w); - float _413 = saturate(((_166 - (cb0_035w)) / ((cb0_036x) - (cb0_035w)))); - float _417 = (_413 * _413) * (3.0f - (_413 * 2.0f)); - float _426 = (cb0_019w) + (cb0_029w); - float _435 = (cb0_018w) * (cb0_028w); - float _444 = (cb0_017w) * (cb0_027w); - float _453 = (cb0_016w) * (cb0_026w); - float _462 = (cb0_015w) * (cb0_025w); - float _520 = _304 - _417; - float _531 = ((_417 * ((((cb0_019x) + (cb0_034x)) + _314) + ((((cb0_018x) * (cb0_033x)) * _323) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_031x)) * _341) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_030x)) * _350) * _240) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_032x)) * _332)))))))) + (_305 * ((((cb0_019x) + (cb0_024x)) + _180) + ((((cb0_018x) * (cb0_023x)) * _194) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_021x)) * _222) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_020x)) * _236) * _240) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_022x)) * _208))))))))) + (((((cb0_019x) + (cb0_029x)) + _426) + ((((cb0_018x) * (cb0_028x)) * _435) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_026x)) * _453) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_025x)) * _462) * _240) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_027x)) * _444))))))) * _520); - float _533 = ((_417 * ((((cb0_019y) + (cb0_034y)) + _314) + ((((cb0_018y) * (cb0_033y)) * _323) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_031y)) * _341) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_030y)) * _350) * _241) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_032y)) * _332)))))))) + (_305 * ((((cb0_019y) + (cb0_024y)) + _180) + ((((cb0_018y) * (cb0_023y)) * _194) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_021y)) * _222) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_020y)) * _236) * _241) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_022y)) * _208))))))))) + (((((cb0_019y) + (cb0_029y)) + _426) + ((((cb0_018y) * (cb0_028y)) * _435) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_026y)) * _453) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_025y)) * _462) * _241) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_027y)) * _444))))))) * _520); - float _535 = ((_417 * ((((cb0_019z) + (cb0_034z)) + _314) + ((((cb0_018z) * (cb0_033z)) * _323) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_031z)) * _341) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_030z)) * _350) * _242) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_032z)) * _332)))))))) + (_305 * ((((cb0_019z) + (cb0_024z)) + _180) + ((((cb0_018z) * (cb0_023z)) * _194) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_021z)) * _222) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_020z)) * _236) * _242) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_022z)) * _208))))))))) + (((((cb0_019z) + (cb0_029z)) + _426) + ((((cb0_018z) * (cb0_028z)) * _435) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_026z)) * _453) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_025z)) * _462) * _242) + _166))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_027z)) * _444))))))) * _520); - - float3 untonemapped_ap1 = float3(_531, _533, _535); - - float _571 = (((mad(0.061360642313957214f, _535, (mad(-4.540197551250458e-09f, _533, (_531 * 0.9386394023895264f))))) - _531) * (cb0_036y)) + _531; - float _572 = (((mad(0.169205904006958f, _535, (mad(0.8307942152023315f, _533, (_531 * 6.775371730327606e-08f))))) - _533) * (cb0_036y)) + _533; - float _573 = ((mad(-2.3283064365386963e-10f, _533, (_531 * -9.313225746154785e-10f))) * (cb0_036y)) + _535; - float _576 = mad(0.16386905312538147f, _573, (mad(0.14067868888378143f, _572, (_571 * 0.6954522132873535f)))); - float _579 = mad(0.0955343246459961f, _573, (mad(0.8596711158752441f, _572, (_571 * 0.044794581830501556f)))); - float _582 = mad(1.0015007257461548f, _573, (mad(0.004025210160762072f, _572, (_571 * -0.005525882821530104f)))); - float _586 = max((max(_576, _579)), _582); - float _591 = ((max(_586, 1.000000013351432e-10f)) - (max((min((min(_576, _579)), _582)), 1.000000013351432e-10f))) / (max(_586, 0.009999999776482582f)); - float _604 = ((_579 + _576) + _582) + ((sqrt(((((_582 - _579) * _582) + ((_579 - _576) * _579)) + ((_576 - _582) * _576)))) * 1.75f); - float _605 = _604 * 0.3333333432674408f; - float _606 = _591 + -0.4000000059604645f; - float _607 = _606 * 5.0f; - float _611 = max((1.0f - (abs((_606 * 2.5f)))), 0.0f); - float _622 = (((float(((int(((bool)((_607 > 0.0f))))) - (int(((bool)((_607 < 0.0f)))))))) * (1.0f - (_611 * _611))) + 1.0f) * 0.02500000037252903f; - _631 = _622; - if ((!(_605 <= 0.0533333346247673f))) { - _631 = 0.0f; - if ((!(_605 >= 0.1599999964237213f))) { - _631 = (((0.23999999463558197f / _604) + -0.5f) * _622); - } - } - float _632 = _631 + 1.0f; - float _633 = _632 * _576; - float _634 = _632 * _579; - float _635 = _632 * _582; - _667 = 0.0f; - if (!(((bool)((_633 == _634))) && ((bool)((_634 == _635))))) { - float _642 = ((_633 * 2.0f) - _634) - _635; - float _645 = ((_579 - _582) * 1.7320507764816284f) * _632; - float _647 = atan((_645 / _642)); - bool _650 = (_642 < 0.0f); - bool _651 = (_642 == 0.0f); - bool _652 = (_645 >= 0.0f); - bool _653 = (_645 < 0.0f); - float _662 = (((bool)(_652 && _651)) ? 90.0f : ((((bool)(_653 && _651)) ? -90.0f : (((((bool)(_653 && _650)) ? (_647 + -3.1415927410125732f) : ((((bool)(_652 && _650)) ? (_647 + 3.1415927410125732f) : _647)))) * 57.2957763671875f)))); - _667 = _662; - if (((_662 < 0.0f))) { - _667 = (_662 + 360.0f); - } - } - float _669 = min((max(_667, 0.0f)), 360.0f); - if (((_669 < -180.0f))) { - _678 = (_669 + 360.0f); - } else { - _678 = _669; - if (((_669 > 180.0f))) { - _678 = (_669 + -360.0f); - } - } - float _682 = saturate((1.0f - (abs((_678 * 0.014814814552664757f))))); - float _686 = (_682 * _682) * (3.0f - (_682 * 2.0f)); - float _692 = ((_686 * _686) * ((_591 * 0.18000000715255737f) * (0.029999999329447746f - _633))) + _633; - float _702 = max(0.0f, (mad(-0.21492856740951538f, _635, (mad(-0.2365107536315918f, _634, (_692 * 1.4514392614364624f)))))); - float _703 = max(0.0f, (mad(-0.09967592358589172f, _635, (mad(1.17622971534729f, _634, (_692 * -0.07655377686023712f)))))); - float _704 = max(0.0f, (mad(0.9977163076400757f, _635, (mad(-0.006032449658960104f, _634, (_692 * 0.008316148072481155f)))))); - float _705 = dot(float3(_702, _703, _704), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _719 = ((cb0_037w) + 1.0f) - (cb0_037y); - float _722 = (cb0_038x) + 1.0f; - float _724 = _722 - (cb0_037z); - if ((((cb0_037y) > 0.800000011920929f))) { - _742 = (((0.8199999928474426f - (cb0_037y)) / (cb0_037x)) + -0.7447274923324585f); - } else { - float _733 = ((cb0_037w) + 0.18000000715255737f) / _719; - _742 = (-0.7447274923324585f - (((log2((_733 / (2.0f - _733)))) * 0.3465735912322998f) * (_719 / (cb0_037x)))); - } - float _745 = ((1.0f - (cb0_037y)) / (cb0_037x)) - _742; - float _747 = ((cb0_037z) / (cb0_037x)) - _745; - float _751 = (log2((((_702 - _705) * 0.9599999785423279f) + _705))) * 0.3010300099849701f; - float _752 = (log2((((_703 - _705) * 0.9599999785423279f) + _705))) * 0.3010300099849701f; - float _753 = (log2((((_704 - _705) * 0.9599999785423279f) + _705))) * 0.3010300099849701f; - float _757 = (cb0_037x) * (_751 + _745); - float _758 = (cb0_037x) * (_752 + _745); - float _759 = (cb0_037x) * (_753 + _745); - float _760 = _719 * 2.0f; - float _762 = ((cb0_037x) * -2.0f) / _719; - float _763 = _751 - _742; - float _764 = _752 - _742; - float _765 = _753 - _742; - float _784 = _724 * 2.0f; - float _786 = ((cb0_037x) * 2.0f) / _724; - float _811 = (((bool)((_751 < _742))) ? ((_760 / ((exp2(((_763 * 1.4426950216293335f) * _762))) + 1.0f)) - (cb0_037w)) : _757); - float _812 = (((bool)((_752 < _742))) ? ((_760 / ((exp2(((_764 * 1.4426950216293335f) * _762))) + 1.0f)) - (cb0_037w)) : _758); - float _813 = (((bool)((_753 < _742))) ? ((_760 / ((exp2(((_765 * 1.4426950216293335f) * _762))) + 1.0f)) - (cb0_037w)) : _759); - float _820 = _747 - _742; - float _824 = saturate((_763 / _820)); - float _825 = saturate((_764 / _820)); - float _826 = saturate((_765 / _820)); - bool _827 = (_747 < _742); - float _831 = (_827 ? (1.0f - _824) : _824); - float _832 = (_827 ? (1.0f - _825) : _825); - float _833 = (_827 ? (1.0f - _826) : _826); - float _852 = (((_831 * _831) * (((((bool)((_751 > _747))) ? (_722 - (_784 / ((exp2((((_751 - _747) * 1.4426950216293335f) * _786))) + 1.0f))) : _757)) - _811)) * (3.0f - (_831 * 2.0f))) + _811; - float _853 = (((_832 * _832) * (((((bool)((_752 > _747))) ? (_722 - (_784 / ((exp2((((_752 - _747) * 1.4426950216293335f) * _786))) + 1.0f))) : _758)) - _812)) * (3.0f - (_832 * 2.0f))) + _812; - float _854 = (((_833 * _833) * (((((bool)((_753 > _747))) ? (_722 - (_784 / ((exp2((((_753 - _747) * 1.4426950216293335f) * _786))) + 1.0f))) : _759)) - _813)) * (3.0f - (_833 * 2.0f))) + _813; - float _855 = dot(float3(_852, _853, _854), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _875 = ((cb0_036w) * ((max(0.0f, (((_852 - _855) * 0.9300000071525574f) + _855))) - _571)) + _571; - float _876 = ((cb0_036w) * ((max(0.0f, (((_853 - _855) * 0.9300000071525574f) + _855))) - _572)) + _572; - float _877 = ((cb0_036w) * ((max(0.0f, (((_854 - _855) * 0.9300000071525574f) + _855))) - _573)) + _573; - float _893 = (((mad(-0.06537103652954102f, _877, (mad(1.451815478503704e-06f, _876, (_875 * 1.065374732017517f))))) - _875) * (cb0_036y)) + _875; - float _894 = (((mad(-0.20366770029067993f, _877, (mad(1.2036634683609009f, _876, (_875 * -2.57161445915699e-07f))))) - _876) * (cb0_036y)) + _876; - float _895 = (((mad(0.9999996423721313f, _877, (mad(2.0954757928848267e-08f, _876, (_875 * 1.862645149230957e-08f))))) - _877) * (cb0_036y)) + _877; - float _908 = saturate((max(0.0f, (mad((cb1_012z), _895, (mad((cb1_012y), _894, ((cb1_012x)*_893)))))))); - float _909 = saturate((max(0.0f, (mad((cb1_013z), _895, (mad((cb1_013y), _894, ((cb1_013x)*_893)))))))); - float _910 = saturate((max(0.0f, (mad((cb1_014z), _895, (mad((cb1_014y), _894, ((cb1_014x)*_893)))))))); - if (((_908 < 0.0031306699384003878f))) { - _921 = (_908 * 12.920000076293945f); - } else { - _921 = (((exp2(((log2(_908)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_909 < 0.0031306699384003878f))) { - _932 = (_909 * 12.920000076293945f); - } else { - _932 = (((exp2(((log2(_909)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_910 < 0.0031306699384003878f))) { - _943 = (_910 * 12.920000076293945f); - } else { - _943 = (((exp2(((log2(_910)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - float _947 = (_932 * 0.9375f) + 0.03125f; - float _954 = _943 * 15.0f; - float _955 = floor(_954); - float _956 = _954 - _955; - float _958 = (((_921 * 0.9375f) + 0.03125f) + _955) * 0.0625f; - float4 _961 = t0.Sample(s0, float2(_958, _947)); - float4 _968 = t0.Sample(s0, float2((_958 + 0.0625f), _947)); - float _987 = max(6.103519990574569e-05f, ((((((_968.x) - (_961.x)) * _956) + (_961.x)) * (cb0_005y)) + ((cb0_005x)*_921))); - float _988 = max(6.103519990574569e-05f, ((((((_968.y) - (_961.y)) * _956) + (_961.y)) * (cb0_005y)) + ((cb0_005x)*_932))); - float _989 = max(6.103519990574569e-05f, ((((((_968.z) - (_961.z)) * _956) + (_961.z)) * (cb0_005y)) + ((cb0_005x)*_943))); - float _1011 = (((bool)((_987 > 0.040449999272823334f))) ? (exp2(((log2(((_987 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_987 * 0.07739938050508499f)); - float _1012 = (((bool)((_988 > 0.040449999272823334f))) ? (exp2(((log2(((_988 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_988 * 0.07739938050508499f)); - float _1013 = (((bool)((_989 > 0.040449999272823334f))) ? (exp2(((log2(((_989 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_989 * 0.07739938050508499f)); - float _1039 = (cb0_014x) * ((((cb0_039y) + ((cb0_039x)*_1011)) * _1011) + (cb0_039z)); - float _1040 = (cb0_014y) * ((((cb0_039y) + ((cb0_039x)*_1012)) * _1012) + (cb0_039z)); - float _1041 = (cb0_014z) * ((((cb0_039y) + ((cb0_039x)*_1013)) * _1013) + (cb0_039z)); - float _1048 = (((cb0_013x)-_1039) * (cb0_013w)) + _1039; - float _1049 = (((cb0_013y)-_1040) * (cb0_013w)) + _1040; - float _1050 = (((cb0_013z)-_1041) * (cb0_013w)) + _1041; - float _1051 = (cb0_014x) * (mad((cb1_012z), _535, (mad((cb1_012y), _533, (_531 * (cb1_012x)))))); - float _1052 = (cb0_014y) * (mad((cb1_013z), _535, (mad((cb1_013y), _533, ((cb1_013x)*_531))))); - float _1053 = (cb0_014z) * (mad((cb1_014z), _535, (mad((cb1_014y), _533, ((cb1_014x)*_531))))); - float _1060 = (((cb0_013x)-_1051) * (cb0_013w)) + _1051; - float _1061 = (((cb0_013y)-_1052) * (cb0_013w)) + _1052; - float _1062 = (((cb0_013z)-_1053) * (cb0_013w)) + _1053; - float _1074 = exp2(((log2((max(0.0f, _1048)))) * (cb0_040y))); - float _1075 = exp2(((log2((max(0.0f, _1049)))) * (cb0_040y))); - float _1076 = exp2(((log2((max(0.0f, _1050)))) * (cb0_040y))); - - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_1074, _1075, _1076)); - } - - if (((((uint)(cb0_040w)) == 0))) { - _1116 = _1074; - _1117 = _1075; - _1118 = _1076; - do { - if (((((uint)(cb1_020x)) == 0))) { - float _1099 = mad((cb1_008z), _1076, (mad((cb1_008y), _1075, ((cb1_008x)*_1074)))); - float _1102 = mad((cb1_009z), _1076, (mad((cb1_009y), _1075, ((cb1_009x)*_1074)))); - float _1105 = mad((cb1_010z), _1076, (mad((cb1_010y), _1075, ((cb1_010x)*_1074)))); - _1116 = (mad(_41, _1105, (mad(_40, _1102, (_1099 * _39))))); - _1117 = (mad(_44, _1105, (mad(_43, _1102, (_1099 * _42))))); - _1118 = (mad(_47, _1105, (mad(_46, _1102, (_1099 * _45))))); - } - do { - if (((_1116 < 0.0031306699384003878f))) { - _1129 = (_1116 * 12.920000076293945f); - } else { - _1129 = (((exp2(((log2(_1116)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - do { - if (((_1117 < 0.0031306699384003878f))) { - _1140 = (_1117 * 12.920000076293945f); - } else { - _1140 = (((exp2(((log2(_1117)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1118 < 0.0031306699384003878f))) { - _2500 = _1129; - _2501 = _1140; - _2502 = (_1118 * 12.920000076293945f); - } else { - _2500 = _1129; - _2501 = _1140; - _2502 = (((exp2(((log2(_1118)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_040w)) == 1))) { - float _1167 = mad((cb1_008z), _1076, (mad((cb1_008y), _1075, ((cb1_008x)*_1074)))); - float _1170 = mad((cb1_009z), _1076, (mad((cb1_009y), _1075, ((cb1_009x)*_1074)))); - float _1173 = mad((cb1_010z), _1076, (mad((cb1_010y), _1075, ((cb1_010x)*_1074)))); - float _1183 = max(6.103519990574569e-05f, (mad(_41, _1173, (mad(_40, _1170, (_1167 * _39)))))); - float _1184 = max(6.103519990574569e-05f, (mad(_44, _1173, (mad(_43, _1170, (_1167 * _42)))))); - float _1185 = max(6.103519990574569e-05f, (mad(_47, _1173, (mad(_46, _1170, (_1167 * _45)))))); - _2500 = (min((_1183 * 4.5f), (((exp2(((log2((max(_1183, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2501 = (min((_1184 * 4.5f), (((exp2(((log2((max(_1184, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2502 = (min((_1185 * 4.5f), (((exp2(((log2((max(_1185, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - } else { - if ((((bool)((((uint)(cb0_040w)) == 3))) || ((bool)((((uint)(cb0_040w)) == 5))))) { - _12[0] = (cb0_010x); - _12[1] = (cb0_010y); - _12[2] = (cb0_010z); - _12[3] = (cb0_010w); - _12[4] = (cb0_012x); - _12[5] = (cb0_012x); - _13[0] = (cb0_011x); - _13[1] = (cb0_011y); - _13[2] = (cb0_011z); - _13[3] = (cb0_011w); - _13[4] = (cb0_012y); - _13[5] = (cb0_012y); - float _1262 = (cb0_012z)*_1060; - float _1263 = (cb0_012z)*_1061; - float _1264 = (cb0_012z)*_1062; - float _1267 = mad((cb1_016z), _1264, (mad((cb1_016y), _1263, ((cb1_016x)*_1262)))); - float _1270 = mad((cb1_017z), _1264, (mad((cb1_017y), _1263, ((cb1_017x)*_1262)))); - float _1273 = mad((cb1_018z), _1264, (mad((cb1_018y), _1263, ((cb1_018x)*_1262)))); - float _1277 = max((max(_1267, _1270)), _1273); - float _1282 = ((max(_1277, 1.000000013351432e-10f)) - (max((min((min(_1267, _1270)), _1273)), 1.000000013351432e-10f))) / (max(_1277, 0.009999999776482582f)); - float _1295 = ((_1270 + _1267) + _1273) + ((sqrt(((((_1273 - _1270) * _1273) + ((_1270 - _1267) * _1270)) + ((_1267 - _1273) * _1267)))) * 1.75f); - float _1296 = _1295 * 0.3333333432674408f; - float _1297 = _1282 + -0.4000000059604645f; - float _1298 = _1297 * 5.0f; - float _1302 = max((1.0f - (abs((_1297 * 2.5f)))), 0.0f); - float _1313 = (((float(((int(((bool)((_1298 > 0.0f))))) - (int(((bool)((_1298 < 0.0f)))))))) * (1.0f - (_1302 * _1302))) + 1.0f) * 0.02500000037252903f; - _1322 = _1313; - do { - if ((!(_1296 <= 0.0533333346247673f))) { - _1322 = 0.0f; - if ((!(_1296 >= 0.1599999964237213f))) { - _1322 = (((0.23999999463558197f / _1295) + -0.5f) * _1313); - } - } - float _1323 = _1322 + 1.0f; - float _1324 = _1323 * _1267; - float _1325 = _1323 * _1270; - float _1326 = _1323 * _1273; - _1358 = 0.0f; - do { - if (!(((bool)((_1324 == _1325))) && ((bool)((_1325 == _1326))))) { - float _1333 = ((_1324 * 2.0f) - _1325) - _1326; - float _1336 = ((_1270 - _1273) * 1.7320507764816284f) * _1323; - float _1338 = atan((_1336 / _1333)); - bool _1341 = (_1333 < 0.0f); - bool _1342 = (_1333 == 0.0f); - bool _1343 = (_1336 >= 0.0f); - bool _1344 = (_1336 < 0.0f); - float _1353 = (((bool)(_1343 && _1342)) ? 90.0f : ((((bool)(_1344 && _1342)) ? -90.0f : (((((bool)(_1344 && _1341)) ? (_1338 + -3.1415927410125732f) : ((((bool)(_1343 && _1341)) ? (_1338 + 3.1415927410125732f) : _1338)))) * 57.2957763671875f)))); - _1358 = _1353; - if (((_1353 < 0.0f))) { - _1358 = (_1353 + 360.0f); - } - } - float _1360 = min((max(_1358, 0.0f)), 360.0f); - do { - if (((_1360 < -180.0f))) { - _1369 = (_1360 + 360.0f); - } else { - _1369 = _1360; - if (((_1360 > 180.0f))) { - _1369 = (_1360 + -360.0f); - } - } - _1408 = 0.0f; - do { - if ((((bool)((_1369 > -67.5f))) && ((bool)((_1369 < 67.5f))))) { - float _1375 = (_1369 + 67.5f) * 0.029629629105329514f; - int _1376 = int(1376); - float _1378 = _1375 - (float(_1376)); - float _1379 = _1378 * _1378; - float _1380 = _1379 * _1378; - if (((_1376 == 3))) { - _1408 = (((0.1666666716337204f - (_1378 * 0.5f)) + (_1379 * 0.5f)) - (_1380 * 0.1666666716337204f)); - } else { - if (((_1376 == 2))) { - _1408 = ((0.6666666865348816f - _1379) + (_1380 * 0.5f)); - } else { - if (((_1376 == 1))) { - _1408 = (((_1380 * -0.5f) + 0.1666666716337204f) + ((_1379 + _1378) * 0.5f)); - } else { - _1408 = ((((bool)((_1376 == 0))) ? (_1380 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1417 = min((max(((((_1282 * 0.27000001072883606f) * (0.029999999329447746f - _1324)) * _1408) + _1324), 0.0f)), 65535.0f); - float _1418 = min((max(_1325, 0.0f)), 65535.0f); - float _1419 = min((max(_1326, 0.0f)), 65535.0f); - float _1432 = min((max((mad(-0.21492856740951538f, _1419, (mad(-0.2365107536315918f, _1418, (_1417 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1433 = min((max((mad(-0.09967592358589172f, _1419, (mad(1.17622971534729f, _1418, (_1417 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1434 = min((max((mad(0.9977163076400757f, _1419, (mad(-0.006032449658960104f, _1418, (_1417 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1435 = dot(float3(_1432, _1433, _1434), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1446 = log2((max((((_1432 - _1435) * 0.9599999785423279f) + _1435), 1.000000013351432e-10f))); - float _1447 = _1446 * 0.3010300099849701f; - float _1448 = log2((cb0_008x)); - float _1449 = _1448 * 0.3010300099849701f; - do { - if (!(!(_1447 <= _1449))) { - _1518 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1456 = log2((cb0_009x)); - float _1457 = _1456 * 0.3010300099849701f; - if ((((bool)((_1447 > _1449))) && ((bool)((_1447 < _1457))))) { - float _1465 = ((_1446 - _1448) * 0.9030900001525879f) / ((_1456 - _1448) * 0.3010300099849701f); - int _1466 = int(1466); - float _1468 = _1465 - (float(_1466)); - float _1470 = _12[_1466]; - float _1473 = _12[(_1466 + 1)]; - float _1478 = _1470 * 0.5f; - _1518 = (dot(float3((_1468 * _1468), _1468, 1.0f), float3((mad((_12[(_1466 + 2)]), 0.5f, (mad(_1473, -1.0f, _1478)))), (_1473 - _1470), (mad(_1473, 0.5f, _1478))))); - } else { - do { - if (!(!(_1447 >= _1457))) { - float _1487 = log2((cb0_008z)); - if (((_1447 < (_1487 * 0.3010300099849701f)))) { - float _1495 = ((_1446 - _1456) * 0.9030900001525879f) / ((_1487 - _1456) * 0.3010300099849701f); - int _1496 = int(1496); - float _1498 = _1495 - (float(_1496)); - float _1500 = _13[_1496]; - float _1503 = _13[(_1496 + 1)]; - float _1508 = _1500 * 0.5f; - _1518 = (dot(float3((_1498 * _1498), _1498, 1.0f), float3((mad((_13[(_1496 + 2)]), 0.5f, (mad(_1503, -1.0f, _1508)))), (_1503 - _1500), (mad(_1503, 0.5f, _1508))))); - break; - } - } - _1518 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1522 = log2((max((((_1433 - _1435) * 0.9599999785423279f) + _1435), 1.000000013351432e-10f))); - float _1523 = _1522 * 0.3010300099849701f; - do { - if (!(!(_1523 <= _1449))) { - _1592 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1530 = log2((cb0_009x)); - float _1531 = _1530 * 0.3010300099849701f; - if ((((bool)((_1523 > _1449))) && ((bool)((_1523 < _1531))))) { - float _1539 = ((_1522 - _1448) * 0.9030900001525879f) / ((_1530 - _1448) * 0.3010300099849701f); - int _1540 = int(1540); - float _1542 = _1539 - (float(_1540)); - float _1544 = _12[_1540]; - float _1547 = _12[(_1540 + 1)]; - float _1552 = _1544 * 0.5f; - _1592 = (dot(float3((_1542 * _1542), _1542, 1.0f), float3((mad((_12[(_1540 + 2)]), 0.5f, (mad(_1547, -1.0f, _1552)))), (_1547 - _1544), (mad(_1547, 0.5f, _1552))))); - } else { - do { - if (!(!(_1523 >= _1531))) { - float _1561 = log2((cb0_008z)); - if (((_1523 < (_1561 * 0.3010300099849701f)))) { - float _1569 = ((_1522 - _1530) * 0.9030900001525879f) / ((_1561 - _1530) * 0.3010300099849701f); - int _1570 = int(1570); - float _1572 = _1569 - (float(_1570)); - float _1574 = _13[_1570]; - float _1577 = _13[(_1570 + 1)]; - float _1582 = _1574 * 0.5f; - _1592 = (dot(float3((_1572 * _1572), _1572, 1.0f), float3((mad((_13[(_1570 + 2)]), 0.5f, (mad(_1577, -1.0f, _1582)))), (_1577 - _1574), (mad(_1577, 0.5f, _1582))))); - break; - } - } - _1592 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1596 = log2((max((((_1434 - _1435) * 0.9599999785423279f) + _1435), 1.000000013351432e-10f))); - float _1597 = _1596 * 0.3010300099849701f; - do { - if (!(!(_1597 <= _1449))) { - _1666 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1604 = log2((cb0_009x)); - float _1605 = _1604 * 0.3010300099849701f; - if ((((bool)((_1597 > _1449))) && ((bool)((_1597 < _1605))))) { - float _1613 = ((_1596 - _1448) * 0.9030900001525879f) / ((_1604 - _1448) * 0.3010300099849701f); - int _1614 = int(1614); - float _1616 = _1613 - (float(_1614)); - float _1618 = _12[_1614]; - float _1621 = _12[(_1614 + 1)]; - float _1626 = _1618 * 0.5f; - _1666 = (dot(float3((_1616 * _1616), _1616, 1.0f), float3((mad((_12[(_1614 + 2)]), 0.5f, (mad(_1621, -1.0f, _1626)))), (_1621 - _1618), (mad(_1621, 0.5f, _1626))))); - } else { - do { - if (!(!(_1597 >= _1605))) { - float _1635 = log2((cb0_008z)); - if (((_1597 < (_1635 * 0.3010300099849701f)))) { - float _1643 = ((_1596 - _1604) * 0.9030900001525879f) / ((_1635 - _1604) * 0.3010300099849701f); - int _1644 = int(1644); - float _1646 = _1643 - (float(_1644)); - float _1648 = _13[_1644]; - float _1651 = _13[(_1644 + 1)]; - float _1656 = _1648 * 0.5f; - _1666 = (dot(float3((_1646 * _1646), _1646, 1.0f), float3((mad((_13[(_1644 + 2)]), 0.5f, (mad(_1651, -1.0f, _1656)))), (_1651 - _1648), (mad(_1651, 0.5f, _1656))))); - break; - } - } - _1666 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1670 = (cb0_008w) - (cb0_008y); - float _1671 = ((exp2((_1518 * 3.321928024291992f))) - (cb0_008y)) / _1670; - float _1673 = ((exp2((_1592 * 3.321928024291992f))) - (cb0_008y)) / _1670; - float _1675 = ((exp2((_1666 * 3.321928024291992f))) - (cb0_008y)) / _1670; - float _1678 = mad(0.15618768334388733f, _1675, (mad(0.13400420546531677f, _1673, (_1671 * 0.6624541878700256f)))); - float _1681 = mad(0.053689517080783844f, _1675, (mad(0.6740817427635193f, _1673, (_1671 * 0.2722287178039551f)))); - float _1684 = mad(1.0103391408920288f, _1675, (mad(0.00406073359772563f, _1673, (_1671 * -0.005574649665504694f)))); - float _1697 = min((max((mad(-0.23642469942569733f, _1684, (mad(-0.32480329275131226f, _1681, (_1678 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _1698 = min((max((mad(0.016756348311901093f, _1684, (mad(1.6153316497802734f, _1681, (_1678 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _1699 = min((max((mad(0.9883948564529419f, _1684, (mad(-0.008284442126750946f, _1681, (_1678 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _1702 = mad(0.15618768334388733f, _1699, (mad(0.13400420546531677f, _1698, (_1697 * 0.6624541878700256f)))); - float _1705 = mad(0.053689517080783844f, _1699, (mad(0.6740817427635193f, _1698, (_1697 * 0.2722287178039551f)))); - float _1708 = mad(1.0103391408920288f, _1699, (mad(0.00406073359772563f, _1698, (_1697 * -0.005574649665504694f)))); - float _1730 = min((max(((min((max((mad(-0.23642469942569733f, _1708, (mad(-0.32480329275131226f, _1705, (_1702 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1731 = min((max(((min((max((mad(0.016756348311901093f, _1708, (mad(1.6153316497802734f, _1705, (_1702 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1732 = min((max(((min((max((mad(0.9883948564529419f, _1708, (mad(-0.008284442126750946f, _1705, (_1702 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _1745 = _1730; - _1746 = _1731; - _1747 = _1732; - do { - if (!((((uint)(cb0_040w)) == 5))) { - _1745 = (mad(_41, _1732, (mad(_40, _1731, (_1730 * _39))))); - _1746 = (mad(_44, _1732, (mad(_43, _1731, (_1730 * _42))))); - _1747 = (mad(_47, _1732, (mad(_46, _1731, (_1730 * _45))))); - } - float _1757 = exp2(((log2((_1745 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1758 = exp2(((log2((_1746 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1759 = exp2(((log2((_1747 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2500 = (exp2(((log2(((1.0f / ((_1757 * 18.6875f) + 1.0f)) * ((_1757 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2501 = (exp2(((log2(((1.0f / ((_1758 * 18.6875f) + 1.0f)) * ((_1758 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2502 = (exp2(((log2(((1.0f / ((_1759 * 18.6875f) + 1.0f)) * ((_1759 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if ((((((uint)(cb0_040w)) & -3) == 4))) { - _10[0] = (cb0_010x); - _10[1] = (cb0_010y); - _10[2] = (cb0_010z); - _10[3] = (cb0_010w); - _10[4] = (cb0_012x); - _10[5] = (cb0_012x); - _11[0] = (cb0_011x); - _11[1] = (cb0_011y); - _11[2] = (cb0_011z); - _11[3] = (cb0_011w); - _11[4] = (cb0_012y); - _11[5] = (cb0_012y); - float _1838 = (cb0_012z)*_1060; - float _1839 = (cb0_012z)*_1061; - float _1840 = (cb0_012z)*_1062; - float _1843 = mad((cb1_016z), _1840, (mad((cb1_016y), _1839, ((cb1_016x)*_1838)))); - float _1846 = mad((cb1_017z), _1840, (mad((cb1_017y), _1839, ((cb1_017x)*_1838)))); - float _1849 = mad((cb1_018z), _1840, (mad((cb1_018y), _1839, ((cb1_018x)*_1838)))); - float _1853 = max((max(_1843, _1846)), _1849); - float _1858 = ((max(_1853, 1.000000013351432e-10f)) - (max((min((min(_1843, _1846)), _1849)), 1.000000013351432e-10f))) / (max(_1853, 0.009999999776482582f)); - float _1871 = ((_1846 + _1843) + _1849) + ((sqrt(((((_1849 - _1846) * _1849) + ((_1846 - _1843) * _1846)) + ((_1843 - _1849) * _1843)))) * 1.75f); - float _1872 = _1871 * 0.3333333432674408f; - float _1873 = _1858 + -0.4000000059604645f; - float _1874 = _1873 * 5.0f; - float _1878 = max((1.0f - (abs((_1873 * 2.5f)))), 0.0f); - float _1889 = (((float(((int(((bool)((_1874 > 0.0f))))) - (int(((bool)((_1874 < 0.0f)))))))) * (1.0f - (_1878 * _1878))) + 1.0f) * 0.02500000037252903f; - _1898 = _1889; - do { - if ((!(_1872 <= 0.0533333346247673f))) { - _1898 = 0.0f; - if ((!(_1872 >= 0.1599999964237213f))) { - _1898 = (((0.23999999463558197f / _1871) + -0.5f) * _1889); - } - } - float _1899 = _1898 + 1.0f; - float _1900 = _1899 * _1843; - float _1901 = _1899 * _1846; - float _1902 = _1899 * _1849; - _1934 = 0.0f; - do { - if (!(((bool)((_1900 == _1901))) && ((bool)((_1901 == _1902))))) { - float _1909 = ((_1900 * 2.0f) - _1901) - _1902; - float _1912 = ((_1846 - _1849) * 1.7320507764816284f) * _1899; - float _1914 = atan((_1912 / _1909)); - bool _1917 = (_1909 < 0.0f); - bool _1918 = (_1909 == 0.0f); - bool _1919 = (_1912 >= 0.0f); - bool _1920 = (_1912 < 0.0f); - float _1929 = (((bool)(_1919 && _1918)) ? 90.0f : ((((bool)(_1920 && _1918)) ? -90.0f : (((((bool)(_1920 && _1917)) ? (_1914 + -3.1415927410125732f) : ((((bool)(_1919 && _1917)) ? (_1914 + 3.1415927410125732f) : _1914)))) * 57.2957763671875f)))); - _1934 = _1929; - if (((_1929 < 0.0f))) { - _1934 = (_1929 + 360.0f); - } - } - float _1936 = min((max(_1934, 0.0f)), 360.0f); - do { - if (((_1936 < -180.0f))) { - _1945 = (_1936 + 360.0f); - } else { - _1945 = _1936; - if (((_1936 > 180.0f))) { - _1945 = (_1936 + -360.0f); - } - } - _1984 = 0.0f; - do { - if ((((bool)((_1945 > -67.5f))) && ((bool)((_1945 < 67.5f))))) { - float _1951 = (_1945 + 67.5f) * 0.029629629105329514f; - int _1952 = int(1952); - float _1954 = _1951 - (float(_1952)); - float _1955 = _1954 * _1954; - float _1956 = _1955 * _1954; - if (((_1952 == 3))) { - _1984 = (((0.1666666716337204f - (_1954 * 0.5f)) + (_1955 * 0.5f)) - (_1956 * 0.1666666716337204f)); - } else { - if (((_1952 == 2))) { - _1984 = ((0.6666666865348816f - _1955) + (_1956 * 0.5f)); - } else { - if (((_1952 == 1))) { - _1984 = (((_1956 * -0.5f) + 0.1666666716337204f) + ((_1955 + _1954) * 0.5f)); - } else { - _1984 = ((((bool)((_1952 == 0))) ? (_1956 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1993 = min((max(((((_1858 * 0.27000001072883606f) * (0.029999999329447746f - _1900)) * _1984) + _1900), 0.0f)), 65535.0f); - float _1994 = min((max(_1901, 0.0f)), 65535.0f); - float _1995 = min((max(_1902, 0.0f)), 65535.0f); - float _2008 = min((max((mad(-0.21492856740951538f, _1995, (mad(-0.2365107536315918f, _1994, (_1993 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _2009 = min((max((mad(-0.09967592358589172f, _1995, (mad(1.17622971534729f, _1994, (_1993 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _2010 = min((max((mad(0.9977163076400757f, _1995, (mad(-0.006032449658960104f, _1994, (_1993 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _2011 = dot(float3(_2008, _2009, _2010), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2022 = log2((max((((_2008 - _2011) * 0.9599999785423279f) + _2011), 1.000000013351432e-10f))); - float _2023 = _2022 * 0.3010300099849701f; - float _2024 = log2((cb0_008x)); - float _2025 = _2024 * 0.3010300099849701f; - do { - if (!(!(_2023 <= _2025))) { - _2094 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2032 = log2((cb0_009x)); - float _2033 = _2032 * 0.3010300099849701f; - if ((((bool)((_2023 > _2025))) && ((bool)((_2023 < _2033))))) { - float _2041 = ((_2022 - _2024) * 0.9030900001525879f) / ((_2032 - _2024) * 0.3010300099849701f); - int _2042 = int(2042); - float _2044 = _2041 - (float(_2042)); - float _2046 = _10[_2042]; - float _2049 = _10[(_2042 + 1)]; - float _2054 = _2046 * 0.5f; - _2094 = (dot(float3((_2044 * _2044), _2044, 1.0f), float3((mad((_10[(_2042 + 2)]), 0.5f, (mad(_2049, -1.0f, _2054)))), (_2049 - _2046), (mad(_2049, 0.5f, _2054))))); - } else { - do { - if (!(!(_2023 >= _2033))) { - float _2063 = log2((cb0_008z)); - if (((_2023 < (_2063 * 0.3010300099849701f)))) { - float _2071 = ((_2022 - _2032) * 0.9030900001525879f) / ((_2063 - _2032) * 0.3010300099849701f); - int _2072 = int(2072); - float _2074 = _2071 - (float(_2072)); - float _2076 = _11[_2072]; - float _2079 = _11[(_2072 + 1)]; - float _2084 = _2076 * 0.5f; - _2094 = (dot(float3((_2074 * _2074), _2074, 1.0f), float3((mad((_11[(_2072 + 2)]), 0.5f, (mad(_2079, -1.0f, _2084)))), (_2079 - _2076), (mad(_2079, 0.5f, _2084))))); - break; - } - } - _2094 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2098 = log2((max((((_2009 - _2011) * 0.9599999785423279f) + _2011), 1.000000013351432e-10f))); - float _2099 = _2098 * 0.3010300099849701f; - do { - if (!(!(_2099 <= _2025))) { - _2168 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2106 = log2((cb0_009x)); - float _2107 = _2106 * 0.3010300099849701f; - if ((((bool)((_2099 > _2025))) && ((bool)((_2099 < _2107))))) { - float _2115 = ((_2098 - _2024) * 0.9030900001525879f) / ((_2106 - _2024) * 0.3010300099849701f); - int _2116 = int(2116); - float _2118 = _2115 - (float(_2116)); - float _2120 = _10[_2116]; - float _2123 = _10[(_2116 + 1)]; - float _2128 = _2120 * 0.5f; - _2168 = (dot(float3((_2118 * _2118), _2118, 1.0f), float3((mad((_10[(_2116 + 2)]), 0.5f, (mad(_2123, -1.0f, _2128)))), (_2123 - _2120), (mad(_2123, 0.5f, _2128))))); - } else { - do { - if (!(!(_2099 >= _2107))) { - float _2137 = log2((cb0_008z)); - if (((_2099 < (_2137 * 0.3010300099849701f)))) { - float _2145 = ((_2098 - _2106) * 0.9030900001525879f) / ((_2137 - _2106) * 0.3010300099849701f); - int _2146 = int(2146); - float _2148 = _2145 - (float(_2146)); - float _2150 = _11[_2146]; - float _2153 = _11[(_2146 + 1)]; - float _2158 = _2150 * 0.5f; - _2168 = (dot(float3((_2148 * _2148), _2148, 1.0f), float3((mad((_11[(_2146 + 2)]), 0.5f, (mad(_2153, -1.0f, _2158)))), (_2153 - _2150), (mad(_2153, 0.5f, _2158))))); - break; - } - } - _2168 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2172 = log2((max((((_2010 - _2011) * 0.9599999785423279f) + _2011), 1.000000013351432e-10f))); - float _2173 = _2172 * 0.3010300099849701f; - do { - if (!(!(_2173 <= _2025))) { - _2242 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2180 = log2((cb0_009x)); - float _2181 = _2180 * 0.3010300099849701f; - if ((((bool)((_2173 > _2025))) && ((bool)((_2173 < _2181))))) { - float _2189 = ((_2172 - _2024) * 0.9030900001525879f) / ((_2180 - _2024) * 0.3010300099849701f); - int _2190 = int(2190); - float _2192 = _2189 - (float(_2190)); - float _2194 = _10[_2190]; - float _2197 = _10[(_2190 + 1)]; - float _2202 = _2194 * 0.5f; - _2242 = (dot(float3((_2192 * _2192), _2192, 1.0f), float3((mad((_10[(_2190 + 2)]), 0.5f, (mad(_2197, -1.0f, _2202)))), (_2197 - _2194), (mad(_2197, 0.5f, _2202))))); - } else { - do { - if (!(!(_2173 >= _2181))) { - float _2211 = log2((cb0_008z)); - if (((_2173 < (_2211 * 0.3010300099849701f)))) { - float _2219 = ((_2172 - _2180) * 0.9030900001525879f) / ((_2211 - _2180) * 0.3010300099849701f); - int _2220 = int(2220); - float _2222 = _2219 - (float(_2220)); - float _2224 = _11[_2220]; - float _2227 = _11[(_2220 + 1)]; - float _2232 = _2224 * 0.5f; - _2242 = (dot(float3((_2222 * _2222), _2222, 1.0f), float3((mad((_11[(_2220 + 2)]), 0.5f, (mad(_2227, -1.0f, _2232)))), (_2227 - _2224), (mad(_2227, 0.5f, _2232))))); - break; - } - } - _2242 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2246 = (cb0_008w) - (cb0_008y); - float _2247 = ((exp2((_2094 * 3.321928024291992f))) - (cb0_008y)) / _2246; - float _2249 = ((exp2((_2168 * 3.321928024291992f))) - (cb0_008y)) / _2246; - float _2251 = ((exp2((_2242 * 3.321928024291992f))) - (cb0_008y)) / _2246; - float _2254 = mad(0.15618768334388733f, _2251, (mad(0.13400420546531677f, _2249, (_2247 * 0.6624541878700256f)))); - float _2257 = mad(0.053689517080783844f, _2251, (mad(0.6740817427635193f, _2249, (_2247 * 0.2722287178039551f)))); - float _2260 = mad(1.0103391408920288f, _2251, (mad(0.00406073359772563f, _2249, (_2247 * -0.005574649665504694f)))); - float _2273 = min((max((mad(-0.23642469942569733f, _2260, (mad(-0.32480329275131226f, _2257, (_2254 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _2274 = min((max((mad(0.016756348311901093f, _2260, (mad(1.6153316497802734f, _2257, (_2254 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _2275 = min((max((mad(0.9883948564529419f, _2260, (mad(-0.008284442126750946f, _2257, (_2254 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _2278 = mad(0.15618768334388733f, _2275, (mad(0.13400420546531677f, _2274, (_2273 * 0.6624541878700256f)))); - float _2281 = mad(0.053689517080783844f, _2275, (mad(0.6740817427635193f, _2274, (_2273 * 0.2722287178039551f)))); - float _2284 = mad(1.0103391408920288f, _2275, (mad(0.00406073359772563f, _2274, (_2273 * -0.005574649665504694f)))); - float _2306 = min((max(((min((max((mad(-0.23642469942569733f, _2284, (mad(-0.32480329275131226f, _2281, (_2278 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2307 = min((max(((min((max((mad(0.016756348311901093f, _2284, (mad(1.6153316497802734f, _2281, (_2278 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2308 = min((max(((min((max((mad(0.9883948564529419f, _2284, (mad(-0.008284442126750946f, _2281, (_2278 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2321 = _2306; - _2322 = _2307; - _2323 = _2308; - do { - if (!((((uint)(cb0_040w)) == 6))) { - _2321 = (mad(_41, _2308, (mad(_40, _2307, (_2306 * _39))))); - _2322 = (mad(_44, _2308, (mad(_43, _2307, (_2306 * _42))))); - _2323 = (mad(_47, _2308, (mad(_46, _2307, (_2306 * _45))))); - } - float _2333 = exp2(((log2((_2321 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2334 = exp2(((log2((_2322 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2335 = exp2(((log2((_2323 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2500 = (exp2(((log2(((1.0f / ((_2333 * 18.6875f) + 1.0f)) * ((_2333 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2501 = (exp2(((log2(((1.0f / ((_2334 * 18.6875f) + 1.0f)) * ((_2334 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2502 = (exp2(((log2(((1.0f / ((_2335 * 18.6875f) + 1.0f)) * ((_2335 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_040w)) == 7))) { - float _2380 = mad((cb1_008z), _1062, (mad((cb1_008y), _1061, ((cb1_008x)*_1060)))); - float _2383 = mad((cb1_009z), _1062, (mad((cb1_009y), _1061, ((cb1_009x)*_1060)))); - float _2386 = mad((cb1_010z), _1062, (mad((cb1_010y), _1061, ((cb1_010x)*_1060)))); - float _2405 = exp2(((log2(((mad(_41, _2386, (mad(_40, _2383, (_2380 * _39))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2406 = exp2(((log2(((mad(_44, _2386, (mad(_43, _2383, (_2380 * _42))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2407 = exp2(((log2(((mad(_47, _2386, (mad(_46, _2383, (_2380 * _45))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2500 = (exp2(((log2(((1.0f / ((_2405 * 18.6875f) + 1.0f)) * ((_2405 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2501 = (exp2(((log2(((1.0f / ((_2406 * 18.6875f) + 1.0f)) * ((_2406 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2502 = (exp2(((log2(((1.0f / ((_2407 * 18.6875f) + 1.0f)) * ((_2407 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } else { - _2500 = _1060; - _2501 = _1061; - _2502 = _1062; - if (!((((uint)(cb0_040w)) == 8))) { - if (((((uint)(cb0_040w)) == 9))) { - float _2454 = mad((cb1_008z), _1050, (mad((cb1_008y), _1049, ((cb1_008x)*_1048)))); - float _2457 = mad((cb1_009z), _1050, (mad((cb1_009y), _1049, ((cb1_009x)*_1048)))); - float _2460 = mad((cb1_010z), _1050, (mad((cb1_010y), _1049, ((cb1_010x)*_1048)))); - _2500 = (mad(_41, _2460, (mad(_40, _2457, (_2454 * _39))))); - _2501 = (mad(_44, _2460, (mad(_43, _2457, (_2454 * _42))))); - _2502 = (mad(_47, _2460, (mad(_46, _2457, (_2454 * _45))))); - } else { - float _2473 = mad((cb1_008z), _1076, (mad((cb1_008y), _1075, ((cb1_008x)*_1074)))); - float _2476 = mad((cb1_009z), _1076, (mad((cb1_009y), _1075, ((cb1_009x)*_1074)))); - float _2479 = mad((cb1_010z), _1076, (mad((cb1_010y), _1075, ((cb1_010x)*_1074)))); - _2500 = (exp2(((log2((mad(_41, _2479, (mad(_40, _2476, (_2473 * _39))))))) * (cb0_040z)))); - _2501 = (exp2(((log2((mad(_44, _2479, (mad(_43, _2476, (_2473 * _42))))))) * (cb0_040z)))); - _2502 = (exp2(((log2((mad(_47, _2479, (mad(_46, _2476, (_2473 * _45))))))) * (cb0_040z)))); - } - } - } - } - } - } - } - SV_Target.x = (_2500 * 0.9523810148239136f); - SV_Target.y = (_2501 * 0.9523810148239136f); - SV_Target.z = (_2502 * 0.9523810148239136f); - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0x4F3FCE76.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0x4F3FCE76.ps_6_6.hlsl deleted file mode 100644 index 37ab7c92..00000000 --- a/src/games/ue-dx12/lutbuilder_0x4F3FCE76.ps_6_6.hlsl +++ /dev/null @@ -1,1095 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -cbuffer cb0 : register(b0) { - float cb0_008x : packoffset(c008.x); - float cb0_008y : packoffset(c008.y); - float cb0_008z : packoffset(c008.z); - float cb0_008w : packoffset(c008.w); - float cb0_009x : packoffset(c009.x); - float cb0_010x : packoffset(c010.x); - float cb0_010y : packoffset(c010.y); - float cb0_010z : packoffset(c010.z); - float cb0_010w : packoffset(c010.w); - float cb0_011x : packoffset(c011.x); - float cb0_011y : packoffset(c011.y); - float cb0_011z : packoffset(c011.z); - float cb0_011w : packoffset(c011.w); - float cb0_012x : packoffset(c012.x); - float cb0_012y : packoffset(c012.y); - float cb0_012z : packoffset(c012.z); - float cb0_013x : packoffset(c013.x); - float cb0_013y : packoffset(c013.y); - float cb0_013z : packoffset(c013.z); - float cb0_013w : packoffset(c013.w); - float cb0_014x : packoffset(c014.x); - float cb0_014y : packoffset(c014.y); - float cb0_014z : packoffset(c014.z); - float cb0_015x : packoffset(c015.x); - float cb0_015y : packoffset(c015.y); - float cb0_015z : packoffset(c015.z); - float cb0_015w : packoffset(c015.w); - float cb0_016x : packoffset(c016.x); - float cb0_016y : packoffset(c016.y); - float cb0_016z : packoffset(c016.z); - float cb0_016w : packoffset(c016.w); - float cb0_017x : packoffset(c017.x); - float cb0_017y : packoffset(c017.y); - float cb0_017z : packoffset(c017.z); - float cb0_017w : packoffset(c017.w); - float cb0_018x : packoffset(c018.x); - float cb0_018y : packoffset(c018.y); - float cb0_018z : packoffset(c018.z); - float cb0_018w : packoffset(c018.w); - float cb0_019x : packoffset(c019.x); - float cb0_019y : packoffset(c019.y); - float cb0_019z : packoffset(c019.z); - float cb0_019w : packoffset(c019.w); - float cb0_020x : packoffset(c020.x); - float cb0_020y : packoffset(c020.y); - float cb0_020z : packoffset(c020.z); - float cb0_020w : packoffset(c020.w); - float cb0_021x : packoffset(c021.x); - float cb0_021y : packoffset(c021.y); - float cb0_021z : packoffset(c021.z); - float cb0_021w : packoffset(c021.w); - float cb0_022x : packoffset(c022.x); - float cb0_022y : packoffset(c022.y); - float cb0_022z : packoffset(c022.z); - float cb0_022w : packoffset(c022.w); - float cb0_023x : packoffset(c023.x); - float cb0_023y : packoffset(c023.y); - float cb0_023z : packoffset(c023.z); - float cb0_023w : packoffset(c023.w); - float cb0_024x : packoffset(c024.x); - float cb0_024y : packoffset(c024.y); - float cb0_024z : packoffset(c024.z); - float cb0_024w : packoffset(c024.w); - float cb0_025x : packoffset(c025.x); - float cb0_025y : packoffset(c025.y); - float cb0_025z : packoffset(c025.z); - float cb0_025w : packoffset(c025.w); - float cb0_026x : packoffset(c026.x); - float cb0_026y : packoffset(c026.y); - float cb0_026z : packoffset(c026.z); - float cb0_026w : packoffset(c026.w); - float cb0_027x : packoffset(c027.x); - float cb0_027y : packoffset(c027.y); - float cb0_027z : packoffset(c027.z); - float cb0_027w : packoffset(c027.w); - float cb0_028x : packoffset(c028.x); - float cb0_028y : packoffset(c028.y); - float cb0_028z : packoffset(c028.z); - float cb0_028w : packoffset(c028.w); - float cb0_029x : packoffset(c029.x); - float cb0_029y : packoffset(c029.y); - float cb0_029z : packoffset(c029.z); - float cb0_029w : packoffset(c029.w); - float cb0_030x : packoffset(c030.x); - float cb0_030y : packoffset(c030.y); - float cb0_030z : packoffset(c030.z); - float cb0_030w : packoffset(c030.w); - float cb0_031x : packoffset(c031.x); - float cb0_031y : packoffset(c031.y); - float cb0_031z : packoffset(c031.z); - float cb0_031w : packoffset(c031.w); - float cb0_032x : packoffset(c032.x); - float cb0_032y : packoffset(c032.y); - float cb0_032z : packoffset(c032.z); - float cb0_032w : packoffset(c032.w); - float cb0_033x : packoffset(c033.x); - float cb0_033y : packoffset(c033.y); - float cb0_033z : packoffset(c033.z); - float cb0_033w : packoffset(c033.w); - float cb0_034x : packoffset(c034.x); - float cb0_034y : packoffset(c034.y); - float cb0_034z : packoffset(c034.z); - float cb0_034w : packoffset(c034.w); - float cb0_035x : packoffset(c035.x); - float cb0_035y : packoffset(c035.y); - float cb0_036x : packoffset(c036.x); - float cb0_036y : packoffset(c036.y); - float cb0_036z : packoffset(c036.z); - float cb0_037x : packoffset(c037.x); - float cb0_037y : packoffset(c037.y); - float cb0_037z : packoffset(c037.z); - float cb0_037w : packoffset(c037.w); - float cb0_038x : packoffset(c038.x); - float cb0_038y : packoffset(c038.y); - float cb0_038z : packoffset(c038.z); - float cb0_038w : packoffset(c038.w); - float cb0_039x : packoffset(c039.x); - float cb0_039y : packoffset(c039.y); - float cb0_039z : packoffset(c039.z); - float cb0_039w : packoffset(c039.w); - float cb0_040x : packoffset(c040.x); - float cb0_040y : packoffset(c040.y); - uint cb0_040w : packoffset(c040.w); - float cb0_041x : packoffset(c041.x); - float cb0_041y : packoffset(c041.y); - float cb0_041z : packoffset(c041.z); - float cb0_042y : packoffset(c042.y); - float cb0_042z : packoffset(c042.z); - uint cb0_042w : packoffset(c042.w); - uint cb0_043x : packoffset(c043.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_000x : packoffset(c000.x); - float UniformBufferConstants_WorkingColorSpace_000y : packoffset(c000.y); - float UniformBufferConstants_WorkingColorSpace_000z : packoffset(c000.z); - float UniformBufferConstants_WorkingColorSpace_001x : packoffset(c001.x); - float UniformBufferConstants_WorkingColorSpace_001y : packoffset(c001.y); - float UniformBufferConstants_WorkingColorSpace_001z : packoffset(c001.z); - float UniformBufferConstants_WorkingColorSpace_002x : packoffset(c002.x); - float UniformBufferConstants_WorkingColorSpace_002y : packoffset(c002.y); - float UniformBufferConstants_WorkingColorSpace_002z : packoffset(c002.z); - float UniformBufferConstants_WorkingColorSpace_004x : packoffset(c004.x); - float UniformBufferConstants_WorkingColorSpace_004y : packoffset(c004.y); - float UniformBufferConstants_WorkingColorSpace_004z : packoffset(c004.z); - float UniformBufferConstants_WorkingColorSpace_005x : packoffset(c005.x); - float UniformBufferConstants_WorkingColorSpace_005y : packoffset(c005.y); - float UniformBufferConstants_WorkingColorSpace_005z : packoffset(c005.z); - float UniformBufferConstants_WorkingColorSpace_006x : packoffset(c006.x); - float UniformBufferConstants_WorkingColorSpace_006y : packoffset(c006.y); - float UniformBufferConstants_WorkingColorSpace_006z : packoffset(c006.z); - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - - float _8[6]; - float _9[6]; - float _10[6]; - float _11[6]; - float _14 = 0.5f / (cb0_037x); - float _19 = (cb0_037x) + -1.0f; - float _20 = ((cb0_037x) * ((TEXCOORD.x) - _14)) / _19; - float _21 = ((cb0_037x) * ((TEXCOORD.y) - _14)) / _19; - float _23 = (float((uint)(SV_RenderTargetArrayIndex))) / _19; - float _43 = 1.379158854484558f; - float _44 = -0.3088507056236267f; - float _45 = -0.07034677267074585f; - float _46 = -0.06933528929948807f; - float _47 = 1.0822921991348267f; - float _48 = -0.012962047010660172f; - float _49 = -0.002159259282052517f; - float _50 = -0.045465391129255295f; - float _51 = 1.0477596521377563f; - float _109; - float _110; - float _111; - float _159; - float _887; - float _920; - float _934; - float _998; - float _1291; - float _1292; - float _1293; - float _1304; - float _1315; - float _1495; - float _1528; - float _1542; - float _1581; - float _1691; - float _1765; - float _1839; - float _1918; - float _1919; - float _1920; - float _2069; - float _2102; - float _2116; - float _2155; - float _2265; - float _2339; - float _2413; - float _2492; - float _2493; - float _2494; - float _2671; - float _2672; - float _2673; - if (!((((uint)(cb0_043x)) == 1))) { - _43 = 1.02579927444458f; - _44 = -0.020052503794431686f; - _45 = -0.0057713985443115234f; - _46 = -0.0022350111976265907f; - _47 = 1.0045825242996216f; - _48 = -0.002352306619286537f; - _49 = -0.005014004185795784f; - _50 = -0.025293385609984398f; - _51 = 1.0304402112960815f; - if (!((((uint)(cb0_043x)) == 2))) { - _43 = 0.6954522132873535f; - _44 = 0.14067870378494263f; - _45 = 0.16386906802654266f; - _46 = 0.044794563204050064f; - _47 = 0.8596711158752441f; - _48 = 0.0955343171954155f; - _49 = -0.005525882821530104f; - _50 = 0.004025210160762072f; - _51 = 1.0015007257461548f; - if (!((((uint)(cb0_043x)) == 3))) { - bool _32 = (((uint)(cb0_043x)) == 4); - _43 = ((_32 ? 1.0f : 1.7050515413284302f)); - _44 = ((_32 ? 0.0f : -0.6217905879020691f)); - _45 = ((_32 ? 0.0f : -0.0832584798336029f)); - _46 = ((_32 ? 0.0f : -0.13025718927383423f)); - _47 = ((_32 ? 1.0f : 1.1408027410507202f)); - _48 = ((_32 ? 0.0f : -0.010548528283834457f)); - _49 = ((_32 ? 0.0f : -0.024003278464078903f)); - _50 = ((_32 ? 0.0f : -0.1289687603712082f)); - _51 = ((_32 ? 1.0f : 1.152971863746643f)); - } - } - } - if (((((uint)(cb0_042w)) > 2))) { - float _62 = exp2(((log2(_20)) * 0.012683313339948654f)); - float _63 = exp2(((log2(_21)) * 0.012683313339948654f)); - float _64 = exp2(((log2(_23)) * 0.012683313339948654f)); - _109 = ((exp2(((log2(((max(0.0f, (_62 + -0.8359375f))) / (18.8515625f - (_62 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _110 = ((exp2(((log2(((max(0.0f, (_63 + -0.8359375f))) / (18.8515625f - (_63 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _111 = ((exp2(((log2(((max(0.0f, (_64 + -0.8359375f))) / (18.8515625f - (_64 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - } else { - _109 = (((exp2(((_20 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _110 = (((exp2(((_21 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _111 = (((exp2(((_23 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - } - bool _138 = (((uint)(cb0_040w)) != 0); - float _142 = 0.9994439482688904f / (cb0_037y); - if (!(!(((cb0_037y) * 1.0005563497543335f) <= 7000.0f))) { - _159 = (((((2967800.0f - (_142 * 4607000064.0f)) * _142) + 99.11000061035156f) * _142) + 0.24406300485134125f); - } else { - _159 = (((((1901800.0f - (_142 * 2006400000.0f)) * _142) + 247.47999572753906f) * _142) + 0.23703999817371368f); - } - float _173 = (((((cb0_037y) * 1.2864121856637212e-07f) + 0.00015411825734190643f) * (cb0_037y)) + 0.8601177334785461f) / (((((cb0_037y) * 7.081451371959702e-07f) + 0.0008424202096648514f) * (cb0_037y)) + 1.0f); - float _180 = (cb0_037y) * (cb0_037y); - float _183 = (((((cb0_037y) * 4.204816761443908e-08f) + 4.228062607580796e-05f) * (cb0_037y)) + 0.31739872694015503f) / ((1.0f - ((cb0_037y) * 2.8974181986995973e-05f)) + (_180 * 1.6145605741257896e-07f)); - float _188 = ((_173 * 2.0f) + 4.0f) - (_183 * 8.0f); - float _189 = (_173 * 3.0f) / _188; - float _191 = (_183 * 2.0f) / _188; - bool _192 = ((cb0_037y) < 4000.0f); - float _201 = (((cb0_037y) + 1189.6199951171875f) * (cb0_037y)) + 1412139.875f; - float _203 = ((-1137581184.0f - ((cb0_037y) * 1916156.25f)) - (_180 * 1.5317699909210205f)) / (_201 * _201); - float _210 = (6193636.0f - ((cb0_037y) * 179.45599365234375f)) + _180; - float _212 = ((1974715392.0f - ((cb0_037y) * 705674.0f)) - (_180 * 308.60699462890625f)) / (_210 * _210); - float _214 = rsqrt((dot(float2(_203, _212), float2(_203, _212)))); - float _215 = (cb0_037z) * 0.05000000074505806f; - float _218 = ((_215 * _212) * _214) + _173; - float _221 = _183 - ((_215 * _203) * _214); - float _226 = (4.0f - (_221 * 8.0f)) + (_218 * 2.0f); - float _232 = (((_218 * 3.0f) / _226) - _189) + ((_192 ? _189 : _159)); - float _233 = (((_221 * 2.0f) / _226) - _191) + ((_192 ? _191 : (((_159 * 2.869999885559082f) + -0.2750000059604645f) - ((_159 * _159) * 3.0f)))); - float _234 = (_138 ? _232 : 0.3127000033855438f); - float _235 = (_138 ? _233 : 0.32899999618530273f); - float _236 = (_138 ? 0.3127000033855438f : _232); - float _237 = (_138 ? 0.32899999618530273f : _233); - float _238 = max(_235, 1.000000013351432e-10f); - float _239 = _234 / _238; - float _242 = ((1.0f - _234) - _235) / _238; - float _243 = max(_237, 1.000000013351432e-10f); - float _244 = _236 / _243; - float _247 = ((1.0f - _236) - _237) / _243; - float _266 = (mad(-0.16140000522136688f, _247, ((_244 * 0.8950999975204468f) + 0.266400009393692f))) / (mad(-0.16140000522136688f, _242, ((_239 * 0.8950999975204468f) + 0.266400009393692f))); - float _267 = (mad(0.03669999912381172f, _247, (1.7135000228881836f - (_244 * 0.7501999735832214f)))) / (mad(0.03669999912381172f, _242, (1.7135000228881836f - (_239 * 0.7501999735832214f)))); - float _268 = (mad(1.0296000242233276f, _247, ((_244 * 0.03889999911189079f) + -0.06849999725818634f))) / (mad(1.0296000242233276f, _242, ((_239 * 0.03889999911189079f) + -0.06849999725818634f))); - float _269 = mad(_267, -0.7501999735832214f, 0.0f); - float _270 = mad(_267, 1.7135000228881836f, 0.0f); - float _271 = mad(_267, 0.03669999912381172f, -0.0f); - float _272 = mad(_268, 0.03889999911189079f, 0.0f); - float _273 = mad(_268, -0.06849999725818634f, 0.0f); - float _274 = mad(_268, 1.0296000242233276f, 0.0f); - float _277 = mad(0.1599626988172531f, _272, (mad(-0.1470542997121811f, _269, (_266 * 0.883457362651825f)))); - float _280 = mad(0.1599626988172531f, _273, (mad(-0.1470542997121811f, _270, (_266 * 0.26293492317199707f)))); - float _283 = mad(0.1599626988172531f, _274, (mad(-0.1470542997121811f, _271, (_266 * -0.15930065512657166f)))); - float _286 = mad(0.04929120093584061f, _272, (mad(0.5183603167533875f, _269, (_266 * 0.38695648312568665f)))); - float _289 = mad(0.04929120093584061f, _273, (mad(0.5183603167533875f, _270, (_266 * 0.11516613513231277f)))); - float _292 = mad(0.04929120093584061f, _274, (mad(0.5183603167533875f, _271, (_266 * -0.0697740763425827f)))); - float _295 = mad(0.9684867262840271f, _272, (mad(0.04004279896616936f, _269, (_266 * -0.007634039502590895f)))); - float _298 = mad(0.9684867262840271f, _273, (mad(0.04004279896616936f, _270, (_266 * -0.0022720457054674625f)))); - float _301 = mad(0.9684867262840271f, _274, (mad(0.04004279896616936f, _271, (_266 * 0.0013765322510153055f)))); - float _304 = mad(_283, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_280, (UniformBufferConstants_WorkingColorSpace_001x), (_277 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _307 = mad(_283, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_280, (UniformBufferConstants_WorkingColorSpace_001y), (_277 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _310 = mad(_283, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_280, (UniformBufferConstants_WorkingColorSpace_001z), (_277 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _313 = mad(_292, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_289, (UniformBufferConstants_WorkingColorSpace_001x), (_286 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _316 = mad(_292, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_289, (UniformBufferConstants_WorkingColorSpace_001y), (_286 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _319 = mad(_292, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_289, (UniformBufferConstants_WorkingColorSpace_001z), (_286 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _322 = mad(_301, (UniformBufferConstants_WorkingColorSpace_002x), (mad(_298, (UniformBufferConstants_WorkingColorSpace_001x), (_295 * (UniformBufferConstants_WorkingColorSpace_000x))))); - float _325 = mad(_301, (UniformBufferConstants_WorkingColorSpace_002y), (mad(_298, (UniformBufferConstants_WorkingColorSpace_001y), (_295 * (UniformBufferConstants_WorkingColorSpace_000y))))); - float _328 = mad(_301, (UniformBufferConstants_WorkingColorSpace_002z), (mad(_298, (UniformBufferConstants_WorkingColorSpace_001z), (_295 * (UniformBufferConstants_WorkingColorSpace_000z))))); - float _358 = mad((mad((UniformBufferConstants_WorkingColorSpace_004z), _328, (mad((UniformBufferConstants_WorkingColorSpace_004y), _319, (_310 * (UniformBufferConstants_WorkingColorSpace_004x)))))), _111, (mad((mad((UniformBufferConstants_WorkingColorSpace_004z), _325, (mad((UniformBufferConstants_WorkingColorSpace_004y), _316, (_307 * (UniformBufferConstants_WorkingColorSpace_004x)))))), _110, ((mad((UniformBufferConstants_WorkingColorSpace_004z), _322, (mad((UniformBufferConstants_WorkingColorSpace_004y), _313, (_304 * (UniformBufferConstants_WorkingColorSpace_004x)))))) * _109)))); - float _361 = mad((mad((UniformBufferConstants_WorkingColorSpace_005z), _328, (mad((UniformBufferConstants_WorkingColorSpace_005y), _319, (_310 * (UniformBufferConstants_WorkingColorSpace_005x)))))), _111, (mad((mad((UniformBufferConstants_WorkingColorSpace_005z), _325, (mad((UniformBufferConstants_WorkingColorSpace_005y), _316, (_307 * (UniformBufferConstants_WorkingColorSpace_005x)))))), _110, ((mad((UniformBufferConstants_WorkingColorSpace_005z), _322, (mad((UniformBufferConstants_WorkingColorSpace_005y), _313, (_304 * (UniformBufferConstants_WorkingColorSpace_005x)))))) * _109)))); - float _364 = mad((mad((UniformBufferConstants_WorkingColorSpace_006z), _328, (mad((UniformBufferConstants_WorkingColorSpace_006y), _319, (_310 * (UniformBufferConstants_WorkingColorSpace_006x)))))), _111, (mad((mad((UniformBufferConstants_WorkingColorSpace_006z), _325, (mad((UniformBufferConstants_WorkingColorSpace_006y), _316, (_307 * (UniformBufferConstants_WorkingColorSpace_006x)))))), _110, ((mad((UniformBufferConstants_WorkingColorSpace_006z), _322, (mad((UniformBufferConstants_WorkingColorSpace_006y), _313, (_304 * (UniformBufferConstants_WorkingColorSpace_006x)))))) * _109)))); - float _379 = mad((UniformBufferConstants_WorkingColorSpace_008z), _364, (mad((UniformBufferConstants_WorkingColorSpace_008y), _361, ((UniformBufferConstants_WorkingColorSpace_008x)*_358)))); - float _382 = mad((UniformBufferConstants_WorkingColorSpace_009z), _364, (mad((UniformBufferConstants_WorkingColorSpace_009y), _361, ((UniformBufferConstants_WorkingColorSpace_009x)*_358)))); - float _385 = mad((UniformBufferConstants_WorkingColorSpace_010z), _364, (mad((UniformBufferConstants_WorkingColorSpace_010y), _361, ((UniformBufferConstants_WorkingColorSpace_010x)*_358)))); - float _386 = dot(float3(_379, _382, _385), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _390 = (_379 / _386) + -1.0f; - float _391 = (_382 / _386) + -1.0f; - float _392 = (_385 / _386) + -1.0f; - float _404 = (1.0f - (exp2((((_386 * _386) * -4.0f) * (cb0_038w))))) * (1.0f - (exp2(((dot(float3(_390, _391, _392), float3(_390, _391, _392))) * -4.0f)))); - float _420 = (((mad(-0.06368283927440643f, _385, (mad(-0.32929131388664246f, _382, (_379 * 1.370412826538086f))))) - _379) * _404) + _379; - float _421 = (((mad(-0.010861567221581936f, _385, (mad(1.0970908403396606f, _382, (_379 * -0.08343426138162613f))))) - _382) * _404) + _382; - float _422 = (((mad(1.203694462776184f, _385, (mad(-0.09862564504146576f, _382, (_379 * -0.02579325996339321f))))) - _385) * _404) + _385; - float _423 = dot(float3(_420, _421, _422), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _437 = (cb0_019w) + (cb0_024w); - float _451 = (cb0_018w) * (cb0_023w); - float _465 = (cb0_017w) * (cb0_022w); - float _479 = (cb0_016w) * (cb0_021w); - float _493 = (cb0_015w) * (cb0_020w); - float _497 = _420 - _423; - float _498 = _421 - _423; - float _499 = _422 - _423; - float _556 = saturate((_423 / (cb0_037w))); - float _560 = (_556 * _556) * (3.0f - (_556 * 2.0f)); - float _561 = 1.0f - _560; - float _570 = (cb0_019w) + (cb0_034w); - float _579 = (cb0_018w) * (cb0_033w); - float _588 = (cb0_017w) * (cb0_032w); - float _597 = (cb0_016w) * (cb0_031w); - float _606 = (cb0_015w) * (cb0_030w); - float _669 = saturate(((_423 - (cb0_038x)) / ((cb0_038y) - (cb0_038x)))); - float _673 = (_669 * _669) * (3.0f - (_669 * 2.0f)); - float _682 = (cb0_019w) + (cb0_029w); - float _691 = (cb0_018w) * (cb0_028w); - float _700 = (cb0_017w) * (cb0_027w); - float _709 = (cb0_016w) * (cb0_026w); - float _718 = (cb0_015w) * (cb0_025w); - float _776 = _560 - _673; - float _787 = ((_673 * ((((cb0_019x) + (cb0_034x)) + _570) + ((((cb0_018x) * (cb0_033x)) * _579) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_031x)) * _597) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_030x)) * _606) * _497) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_032x)) * _588)))))))) + (_561 * ((((cb0_019x) + (cb0_024x)) + _437) + ((((cb0_018x) * (cb0_023x)) * _451) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_021x)) * _479) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_020x)) * _493) * _497) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_022x)) * _465))))))))) + (((((cb0_019x) + (cb0_029x)) + _682) + ((((cb0_018x) * (cb0_028x)) * _691) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_026x)) * _709) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_025x)) * _718) * _497) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_027x)) * _700))))))) * _776); - float _789 = ((_673 * ((((cb0_019y) + (cb0_034y)) + _570) + ((((cb0_018y) * (cb0_033y)) * _579) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_031y)) * _597) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_030y)) * _606) * _498) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_032y)) * _588)))))))) + (_561 * ((((cb0_019y) + (cb0_024y)) + _437) + ((((cb0_018y) * (cb0_023y)) * _451) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_021y)) * _479) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_020y)) * _493) * _498) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_022y)) * _465))))))))) + (((((cb0_019y) + (cb0_029y)) + _682) + ((((cb0_018y) * (cb0_028y)) * _691) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_026y)) * _709) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_025y)) * _718) * _498) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_027y)) * _700))))))) * _776); - float _791 = ((_673 * ((((cb0_019z) + (cb0_034z)) + _570) + ((((cb0_018z) * (cb0_033z)) * _579) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_031z)) * _597) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_030z)) * _606) * _499) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_032z)) * _588)))))))) + (_561 * ((((cb0_019z) + (cb0_024z)) + _437) + ((((cb0_018z) * (cb0_023z)) * _451) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_021z)) * _479) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_020z)) * _493) * _499) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_022z)) * _465))))))))) + (((((cb0_019z) + (cb0_029z)) + _682) + ((((cb0_018z) * (cb0_028z)) * _691) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_026z)) * _709) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_025z)) * _718) * _499) + _423))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_027z)) * _700))))))) * _776); - - float3 untonemapped_ap1 = float3(_787, _789, _791); // CustomEdit - - float _827 = (((mad(0.061360642313957214f, _791, (mad(-4.540197551250458e-09f, _789, (_787 * 0.9386394023895264f))))) - _787) * (cb0_038z)) + _787; - float _828 = (((mad(0.169205904006958f, _791, (mad(0.8307942152023315f, _789, (_787 * 6.775371730327606e-08f))))) - _789) * (cb0_038z)) + _789; - float _829 = ((mad(-2.3283064365386963e-10f, _789, (_787 * -9.313225746154785e-10f))) * (cb0_038z)) + _791; - - float _832 = mad(0.16386905312538147f, _829, (mad(0.14067868888378143f, _828, (_827 * 0.6954522132873535f)))); - float _835 = mad(0.0955343246459961f, _829, (mad(0.8596711158752441f, _828, (_827 * 0.044794581830501556f)))); - float _838 = mad(1.0015007257461548f, _829, (mad(0.004025210160762072f, _828, (_827 * -0.005525882821530104f)))); - float _842 = max((max(_832, _835)), _838); - float _847 = ((max(_842, 1.000000013351432e-10f)) - (max((min((min(_832, _835)), _838)), 1.000000013351432e-10f))) / (max(_842, 0.009999999776482582f)); - float _860 = ((_835 + _832) + _838) + ((sqrt(((((_838 - _835) * _838) + ((_835 - _832) * _835)) + ((_832 - _838) * _832)))) * 1.75f); - float _861 = _860 * 0.3333333432674408f; - float _862 = _847 + -0.4000000059604645f; - float _863 = _862 * 5.0f; - float _867 = max((1.0f - (abs((_862 * 2.5f)))), 0.0f); - float _878 = (((float(((int(((bool)((_863 > 0.0f))))) - (int(((bool)((_863 < 0.0f)))))))) * (1.0f - (_867 * _867))) + 1.0f) * 0.02500000037252903f; - _887 = _878; - if ((!(_861 <= 0.0533333346247673f))) { - _887 = 0.0f; - if ((!(_861 >= 0.1599999964237213f))) { - _887 = (((0.23999999463558197f / _860) + -0.5f) * _878); - } - } - float _888 = _887 + 1.0f; - float _889 = _888 * _832; - float _890 = _888 * _835; - float _891 = _888 * _838; - _920 = 0.0f; - if (!(((bool)((_889 == _890))) && ((bool)((_890 == _891))))) { - float _898 = ((_889 * 2.0f) - _890) - _891; - float _901 = ((_835 - _838) * 1.7320507764816284f) * _888; - float _903 = atan((_901 / _898)); - bool _906 = (_898 < 0.0f); - bool _907 = (_898 == 0.0f); - bool _908 = (_901 >= 0.0f); - bool _909 = (_901 < 0.0f); - _920 = ((((bool)(_908 && _907)) ? 90.0f : ((((bool)(_909 && _907)) ? -90.0f : (((((bool)(_909 && _906)) ? (_903 + -3.1415927410125732f) : ((((bool)(_908 && _906)) ? (_903 + 3.1415927410125732f) : _903)))) * 57.2957763671875f))))); - } - float _925 = min((max(((((bool)((_920 < 0.0f))) ? (_920 + 360.0f) : _920)), 0.0f)), 360.0f); - if (((_925 < -180.0f))) { - _934 = (_925 + 360.0f); - } else { - _934 = _925; - if (((_925 > 180.0f))) { - _934 = (_925 + -360.0f); - } - } - float _938 = saturate((1.0f - (abs((_934 * 0.014814814552664757f))))); - float _942 = (_938 * _938) * (3.0f - (_938 * 2.0f)); - float _948 = ((_942 * _942) * ((_847 * 0.18000000715255737f) * (0.029999999329447746f - _889))) + _889; - float _958 = max(0.0f, (mad(-0.21492856740951538f, _891, (mad(-0.2365107536315918f, _890, (_948 * 1.4514392614364624f)))))); - float _959 = max(0.0f, (mad(-0.09967592358589172f, _891, (mad(1.17622971534729f, _890, (_948 * -0.07655377686023712f)))))); - float _960 = max(0.0f, (mad(0.9977163076400757f, _891, (mad(-0.006032449658960104f, _890, (_948 * 0.008316148072481155f)))))); - float _961 = dot(float3(_958, _959, _960), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - - float _976 = ((cb0_040x) + 1.0f) - (cb0_039z); - float _978 = (cb0_040y) + 1.0f; - float _980 = _978 - (cb0_039w); - - if ((((cb0_039z) > 0.800000011920929f))) { - _998 = (((0.8199999928474426f - (cb0_039z)) / (cb0_039y)) + -0.7447274923324585f); - } else { - float _989 = ((cb0_040x) + 0.18000000715255737f) / _976; - _998 = (-0.7447274923324585f - (((log2((_989 / (2.0f - _989)))) * 0.3465735912322998f) * (_976 / (cb0_039y)))); - } - float _1001 = ((1.0f - (cb0_039z)) / (cb0_039y)) - _998; - float _1003 = ((cb0_039w) / (cb0_039y)) - _1001; - float _1007 = (log2((((_958 - _961) * 0.9599999785423279f) + _961))) * 0.3010300099849701f; - float _1008 = (log2((((_959 - _961) * 0.9599999785423279f) + _961))) * 0.3010300099849701f; - float _1009 = (log2((((_960 - _961) * 0.9599999785423279f) + _961))) * 0.3010300099849701f; - float _1013 = (cb0_039y) * (_1007 + _1001); - float _1014 = (cb0_039y) * (_1008 + _1001); - float _1015 = (cb0_039y) * (_1009 + _1001); - float _1016 = _976 * 2.0f; - float _1018 = ((cb0_039y) * -2.0f) / _976; - float _1019 = _1007 - _998; - float _1020 = _1008 - _998; - float _1021 = _1009 - _998; - float _1040 = _980 * 2.0f; - float _1042 = ((cb0_039y) * 2.0f) / _980; - float _1067 = (((bool)((_1007 < _998))) ? ((_1016 / ((exp2(((_1019 * 1.4426950216293335f) * _1018))) + 1.0f)) - (cb0_040x)) : _1013); - float _1068 = (((bool)((_1008 < _998))) ? ((_1016 / ((exp2(((_1020 * 1.4426950216293335f) * _1018))) + 1.0f)) - (cb0_040x)) : _1014); - float _1069 = (((bool)((_1009 < _998))) ? ((_1016 / ((exp2(((_1021 * 1.4426950216293335f) * _1018))) + 1.0f)) - (cb0_040x)) : _1015); - float _1076 = _1003 - _998; - float _1080 = saturate((_1019 / _1076)); - float _1081 = saturate((_1020 / _1076)); - float _1082 = saturate((_1021 / _1076)); - bool _1083 = (_1003 < _998); - float _1087 = (_1083 ? (1.0f - _1080) : _1080); - float _1088 = (_1083 ? (1.0f - _1081) : _1081); - float _1089 = (_1083 ? (1.0f - _1082) : _1082); - float _1108 = (((_1087 * _1087) * (((((bool)((_1007 > _1003))) ? (_978 - (_1040 / ((exp2((((_1007 - _1003) * 1.4426950216293335f) * _1042))) + 1.0f))) : _1013)) - _1067)) * (3.0f - (_1087 * 2.0f))) + _1067; - float _1109 = (((_1088 * _1088) * (((((bool)((_1008 > _1003))) ? (_978 - (_1040 / ((exp2((((_1008 - _1003) * 1.4426950216293335f) * _1042))) + 1.0f))) : _1014)) - _1068)) * (3.0f - (_1088 * 2.0f))) + _1068; - float _1110 = (((_1089 * _1089) * (((((bool)((_1009 > _1003))) ? (_978 - (_1040 / ((exp2((((_1009 - _1003) * 1.4426950216293335f) * _1042))) + 1.0f))) : _1015)) - _1069)) * (3.0f - (_1089 * 2.0f))) + _1069; - float _1111 = dot(float3(_1108, _1109, _1110), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - - float _1131 = ((cb0_039x) * ((max(0.0f, (((_1108 - _1111) * 0.9300000071525574f) + _1111))) - _827)) + _827; - float _1132 = ((cb0_039x) * ((max(0.0f, (((_1109 - _1111) * 0.9300000071525574f) + _1111))) - _828)) + _828; - float _1133 = ((cb0_039x) * ((max(0.0f, (((_1110 - _1111) * 0.9300000071525574f) + _1111))) - _829)) + _829; - - float _1149 = (((mad(-0.06537103652954102f, _1133, (mad(1.451815478503704e-06f, _1132, (_1131 * 1.065374732017517f))))) - _1131) * (cb0_038z)) + _1131; - float _1150 = (((mad(-0.20366770029067993f, _1133, (mad(1.2036634683609009f, _1132, (_1131 * -2.57161445915699e-07f))))) - _1132) * (cb0_038z)) + _1132; - float _1151 = (((mad(0.9999996423721313f, _1133, (mad(2.0954757928848267e-08f, _1132, (_1131 * 1.862645149230957e-08f))))) - _1133) * (cb0_038z)) + _1133; - float _1161 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_012z), _1151, (mad((UniformBufferConstants_WorkingColorSpace_012y), _1150, ((UniformBufferConstants_WorkingColorSpace_012x)*_1149)))))); - float _1162 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_013z), _1151, (mad((UniformBufferConstants_WorkingColorSpace_013y), _1150, ((UniformBufferConstants_WorkingColorSpace_013x)*_1149)))))); - float _1163 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_014z), _1151, (mad((UniformBufferConstants_WorkingColorSpace_014y), _1150, ((UniformBufferConstants_WorkingColorSpace_014x)*_1149)))))); - float _1189 = (cb0_014x) * ((((cb0_041y) + ((cb0_041x)*_1161)) * _1161) + (cb0_041z)); - float _1190 = (cb0_014y) * ((((cb0_041y) + ((cb0_041x)*_1162)) * _1162) + (cb0_041z)); - float _1191 = (cb0_014z) * ((((cb0_041y) + ((cb0_041x)*_1163)) * _1163) + (cb0_041z)); - float _1198 = (((cb0_013x)-_1189) * (cb0_013w)) + _1189; - float _1199 = (((cb0_013y)-_1190) * (cb0_013w)) + _1190; - float _1200 = (((cb0_013z)-_1191) * (cb0_013w)) + _1191; - float _1201 = (cb0_014x) * (mad((UniformBufferConstants_WorkingColorSpace_012z), _791, (mad((UniformBufferConstants_WorkingColorSpace_012y), _789, (_787 * (UniformBufferConstants_WorkingColorSpace_012x)))))); - float _1202 = (cb0_014y) * (mad((UniformBufferConstants_WorkingColorSpace_013z), _791, (mad((UniformBufferConstants_WorkingColorSpace_013y), _789, ((UniformBufferConstants_WorkingColorSpace_013x)*_787))))); - float _1203 = (cb0_014z) * (mad((UniformBufferConstants_WorkingColorSpace_014z), _791, (mad((UniformBufferConstants_WorkingColorSpace_014y), _789, ((UniformBufferConstants_WorkingColorSpace_014x)*_787))))); - float _1210 = (((cb0_013x)-_1201) * (cb0_013w)) + _1201; - float _1211 = (((cb0_013y)-_1202) * (cb0_013w)) + _1202; - float _1212 = (((cb0_013z)-_1203) * (cb0_013w)) + _1203; - float _1224 = exp2(((log2((max(0.0f, _1198)))) * (cb0_042y))); - float _1225 = exp2(((log2((max(0.0f, _1199)))) * (cb0_042y))); - float _1226 = exp2(((log2((max(0.0f, _1200)))) * (cb0_042y))); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return float4(LutBuilderToneMap(untonemapped_ap1, float3(_1224, _1225, _1226)).rgb, 0); - } - - if (((((uint)(cb0_042w)) == 0))) { - float _1232 = max((dot(float3(_1224, _1225, _1226), float3(0.2126390039920807f, 0.7151690125465393f, 0.0721919983625412f))), 9.999999747378752e-05f); - float _1252 = ((((((bool)((_1232 < (cb0_036z)))) ? 0.0f : 1.0f)) * (((cb0_035y)-_1232) + ((-0.0f - (cb0_036x)) / ((cb0_035x) + _1232)))) + _1232) * (cb0_036y); - float _1253 = _1252 * (_1224 / _1232); - float _1254 = _1252 * (_1225 / _1232); - float _1255 = _1252 * (_1226 / _1232); - _1291 = _1253; - _1292 = _1254; - _1293 = _1255; - do { - if (((((uint)(UniformBufferConstants_WorkingColorSpace_020x)) == 0))) { - float _1274 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1255, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1254, ((UniformBufferConstants_WorkingColorSpace_008x)*_1253)))); - float _1277 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1255, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1254, ((UniformBufferConstants_WorkingColorSpace_009x)*_1253)))); - float _1280 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1255, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1254, ((UniformBufferConstants_WorkingColorSpace_010x)*_1253)))); - _1291 = (mad(_45, _1280, (mad(_44, _1277, (_1274 * _43))))); - _1292 = (mad(_48, _1280, (mad(_47, _1277, (_1274 * _46))))); - _1293 = (mad(_51, _1280, (mad(_50, _1277, (_1274 * _49))))); - } - do { - if (((_1291 < 0.0031306699384003878f))) { - _1304 = (_1291 * 12.920000076293945f); - } else { - _1304 = (((exp2(((log2(_1291)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - do { - if (((_1292 < 0.0031306699384003878f))) { - _1315 = (_1292 * 12.920000076293945f); - } else { - _1315 = (((exp2(((log2(_1292)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1293 < 0.0031306699384003878f))) { - _2671 = _1304; - _2672 = _1315; - _2673 = (_1293 * 12.920000076293945f); - } else { - _2671 = _1304; - _2672 = _1315; - _2673 = (((exp2(((log2(_1293)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 1))) { - float _1342 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1225, ((UniformBufferConstants_WorkingColorSpace_008x)*_1224)))); - float _1345 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1225, ((UniformBufferConstants_WorkingColorSpace_009x)*_1224)))); - float _1348 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1225, ((UniformBufferConstants_WorkingColorSpace_010x)*_1224)))); - float _1358 = max(6.103519990574569e-05f, (mad(_45, _1348, (mad(_44, _1345, (_1342 * _43)))))); - float _1359 = max(6.103519990574569e-05f, (mad(_48, _1348, (mad(_47, _1345, (_1342 * _46)))))); - float _1360 = max(6.103519990574569e-05f, (mad(_51, _1348, (mad(_50, _1345, (_1342 * _49)))))); - _2671 = (min((_1358 * 4.5f), (((exp2(((log2((max(_1358, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2672 = (min((_1359 * 4.5f), (((exp2(((log2((max(_1359, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2673 = (min((_1360 * 4.5f), (((exp2(((log2((max(_1360, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - } else { - if ((((bool)((((uint)(cb0_042w)) == 3))) || ((bool)((((uint)(cb0_042w)) == 5))))) { - _10[0] = (cb0_010x); - _10[1] = (cb0_010y); - _10[2] = (cb0_010z); - _10[3] = (cb0_010w); - _10[4] = (cb0_012x); - _10[5] = (cb0_012x); - _11[0] = (cb0_011x); - _11[1] = (cb0_011y); - _11[2] = (cb0_011z); - _11[3] = (cb0_011w); - _11[4] = (cb0_012y); - _11[5] = (cb0_012y); - float _1435 = (cb0_012z)*_1210; - float _1436 = (cb0_012z)*_1211; - float _1437 = (cb0_012z)*_1212; - float _1440 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1437, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1436, ((UniformBufferConstants_WorkingColorSpace_016x)*_1435)))); - float _1443 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1437, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1436, ((UniformBufferConstants_WorkingColorSpace_017x)*_1435)))); - float _1446 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1437, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1436, ((UniformBufferConstants_WorkingColorSpace_018x)*_1435)))); - float _1450 = max((max(_1440, _1443)), _1446); - float _1455 = ((max(_1450, 1.000000013351432e-10f)) - (max((min((min(_1440, _1443)), _1446)), 1.000000013351432e-10f))) / (max(_1450, 0.009999999776482582f)); - float _1468 = ((_1443 + _1440) + _1446) + ((sqrt(((((_1446 - _1443) * _1446) + ((_1443 - _1440) * _1443)) + ((_1440 - _1446) * _1440)))) * 1.75f); - float _1469 = _1468 * 0.3333333432674408f; - float _1470 = _1455 + -0.4000000059604645f; - float _1471 = _1470 * 5.0f; - float _1475 = max((1.0f - (abs((_1470 * 2.5f)))), 0.0f); - float _1486 = (((float(((int(((bool)((_1471 > 0.0f))))) - (int(((bool)((_1471 < 0.0f)))))))) * (1.0f - (_1475 * _1475))) + 1.0f) * 0.02500000037252903f; - _1495 = _1486; - do { - if ((!(_1469 <= 0.0533333346247673f))) { - _1495 = 0.0f; - if ((!(_1469 >= 0.1599999964237213f))) { - _1495 = (((0.23999999463558197f / _1468) + -0.5f) * _1486); - } - } - float _1496 = _1495 + 1.0f; - float _1497 = _1496 * _1440; - float _1498 = _1496 * _1443; - float _1499 = _1496 * _1446; - _1528 = 0.0f; - do { - if (!(((bool)((_1497 == _1498))) && ((bool)((_1498 == _1499))))) { - float _1506 = ((_1497 * 2.0f) - _1498) - _1499; - float _1509 = ((_1443 - _1446) * 1.7320507764816284f) * _1496; - float _1511 = atan((_1509 / _1506)); - bool _1514 = (_1506 < 0.0f); - bool _1515 = (_1506 == 0.0f); - bool _1516 = (_1509 >= 0.0f); - bool _1517 = (_1509 < 0.0f); - _1528 = ((((bool)(_1516 && _1515)) ? 90.0f : ((((bool)(_1517 && _1515)) ? -90.0f : (((((bool)(_1517 && _1514)) ? (_1511 + -3.1415927410125732f) : ((((bool)(_1516 && _1514)) ? (_1511 + 3.1415927410125732f) : _1511)))) * 57.2957763671875f))))); - } - float _1533 = min((max(((((bool)((_1528 < 0.0f))) ? (_1528 + 360.0f) : _1528)), 0.0f)), 360.0f); - do { - if (((_1533 < -180.0f))) { - _1542 = (_1533 + 360.0f); - } else { - _1542 = _1533; - if (((_1533 > 180.0f))) { - _1542 = (_1533 + -360.0f); - } - } - _1581 = 0.0f; - do { - if ((((bool)((_1542 > -67.5f))) && ((bool)((_1542 < 67.5f))))) { - float _1548 = (_1542 + 67.5f) * 0.029629629105329514f; - int _1549 = int(1549); - float _1551 = _1548 - (float(_1549)); - float _1552 = _1551 * _1551; - float _1553 = _1552 * _1551; - if (((_1549 == 3))) { - _1581 = (((0.1666666716337204f - (_1551 * 0.5f)) + (_1552 * 0.5f)) - (_1553 * 0.1666666716337204f)); - } else { - if (((_1549 == 2))) { - _1581 = ((0.6666666865348816f - _1552) + (_1553 * 0.5f)); - } else { - if (((_1549 == 1))) { - _1581 = (((_1553 * -0.5f) + 0.1666666716337204f) + ((_1552 + _1551) * 0.5f)); - } else { - _1581 = ((((bool)((_1549 == 0))) ? (_1553 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1590 = min((max(((((_1455 * 0.27000001072883606f) * (0.029999999329447746f - _1497)) * _1581) + _1497), 0.0f)), 65535.0f); - float _1591 = min((max(_1498, 0.0f)), 65535.0f); - float _1592 = min((max(_1499, 0.0f)), 65535.0f); - float _1605 = min((max((mad(-0.21492856740951538f, _1592, (mad(-0.2365107536315918f, _1591, (_1590 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1606 = min((max((mad(-0.09967592358589172f, _1592, (mad(1.17622971534729f, _1591, (_1590 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1607 = min((max((mad(0.9977163076400757f, _1592, (mad(-0.006032449658960104f, _1591, (_1590 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1608 = dot(float3(_1605, _1606, _1607), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1619 = log2((max((((_1605 - _1608) * 0.9599999785423279f) + _1608), 1.000000013351432e-10f))); - float _1620 = _1619 * 0.3010300099849701f; - float _1621 = log2((cb0_008x)); - float _1622 = _1621 * 0.3010300099849701f; - do { - if (!(!(_1620 <= _1622))) { - _1691 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1629 = log2((cb0_009x)); - float _1630 = _1629 * 0.3010300099849701f; - if ((((bool)((_1620 > _1622))) && ((bool)((_1620 < _1630))))) { - float _1638 = ((_1619 - _1621) * 0.9030900001525879f) / ((_1629 - _1621) * 0.3010300099849701f); - int _1639 = int(1639); - float _1641 = _1638 - (float(_1639)); - float _1643 = _10[_1639]; - float _1646 = _10[(_1639 + 1)]; - float _1651 = _1643 * 0.5f; - _1691 = (dot(float3((_1641 * _1641), _1641, 1.0f), float3((mad((_10[(_1639 + 2)]), 0.5f, (mad(_1646, -1.0f, _1651)))), (_1646 - _1643), (mad(_1646, 0.5f, _1651))))); - } else { - do { - if (!(!(_1620 >= _1630))) { - float _1660 = log2((cb0_008z)); - if (((_1620 < (_1660 * 0.3010300099849701f)))) { - float _1668 = ((_1619 - _1629) * 0.9030900001525879f) / ((_1660 - _1629) * 0.3010300099849701f); - int _1669 = int(1669); - float _1671 = _1668 - (float(_1669)); - float _1673 = _11[_1669]; - float _1676 = _11[(_1669 + 1)]; - float _1681 = _1673 * 0.5f; - _1691 = (dot(float3((_1671 * _1671), _1671, 1.0f), float3((mad((_11[(_1669 + 2)]), 0.5f, (mad(_1676, -1.0f, _1681)))), (_1676 - _1673), (mad(_1676, 0.5f, _1681))))); - break; - } - } - _1691 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1695 = log2((max((((_1606 - _1608) * 0.9599999785423279f) + _1608), 1.000000013351432e-10f))); - float _1696 = _1695 * 0.3010300099849701f; - do { - if (!(!(_1696 <= _1622))) { - _1765 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1703 = log2((cb0_009x)); - float _1704 = _1703 * 0.3010300099849701f; - if ((((bool)((_1696 > _1622))) && ((bool)((_1696 < _1704))))) { - float _1712 = ((_1695 - _1621) * 0.9030900001525879f) / ((_1703 - _1621) * 0.3010300099849701f); - int _1713 = int(1713); - float _1715 = _1712 - (float(_1713)); - float _1717 = _10[_1713]; - float _1720 = _10[(_1713 + 1)]; - float _1725 = _1717 * 0.5f; - _1765 = (dot(float3((_1715 * _1715), _1715, 1.0f), float3((mad((_10[(_1713 + 2)]), 0.5f, (mad(_1720, -1.0f, _1725)))), (_1720 - _1717), (mad(_1720, 0.5f, _1725))))); - } else { - do { - if (!(!(_1696 >= _1704))) { - float _1734 = log2((cb0_008z)); - if (((_1696 < (_1734 * 0.3010300099849701f)))) { - float _1742 = ((_1695 - _1703) * 0.9030900001525879f) / ((_1734 - _1703) * 0.3010300099849701f); - int _1743 = int(1743); - float _1745 = _1742 - (float(_1743)); - float _1747 = _11[_1743]; - float _1750 = _11[(_1743 + 1)]; - float _1755 = _1747 * 0.5f; - _1765 = (dot(float3((_1745 * _1745), _1745, 1.0f), float3((mad((_11[(_1743 + 2)]), 0.5f, (mad(_1750, -1.0f, _1755)))), (_1750 - _1747), (mad(_1750, 0.5f, _1755))))); - break; - } - } - _1765 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1769 = log2((max((((_1607 - _1608) * 0.9599999785423279f) + _1608), 1.000000013351432e-10f))); - float _1770 = _1769 * 0.3010300099849701f; - do { - if (!(!(_1770 <= _1622))) { - _1839 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1777 = log2((cb0_009x)); - float _1778 = _1777 * 0.3010300099849701f; - if ((((bool)((_1770 > _1622))) && ((bool)((_1770 < _1778))))) { - float _1786 = ((_1769 - _1621) * 0.9030900001525879f) / ((_1777 - _1621) * 0.3010300099849701f); - int _1787 = int(1787); - float _1789 = _1786 - (float(_1787)); - float _1791 = _10[_1787]; - float _1794 = _10[(_1787 + 1)]; - float _1799 = _1791 * 0.5f; - _1839 = (dot(float3((_1789 * _1789), _1789, 1.0f), float3((mad((_10[(_1787 + 2)]), 0.5f, (mad(_1794, -1.0f, _1799)))), (_1794 - _1791), (mad(_1794, 0.5f, _1799))))); - } else { - do { - if (!(!(_1770 >= _1778))) { - float _1808 = log2((cb0_008z)); - if (((_1770 < (_1808 * 0.3010300099849701f)))) { - float _1816 = ((_1769 - _1777) * 0.9030900001525879f) / ((_1808 - _1777) * 0.3010300099849701f); - int _1817 = int(1817); - float _1819 = _1816 - (float(_1817)); - float _1821 = _11[_1817]; - float _1824 = _11[(_1817 + 1)]; - float _1829 = _1821 * 0.5f; - _1839 = (dot(float3((_1819 * _1819), _1819, 1.0f), float3((mad((_11[(_1817 + 2)]), 0.5f, (mad(_1824, -1.0f, _1829)))), (_1824 - _1821), (mad(_1824, 0.5f, _1829))))); - break; - } - } - _1839 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1843 = (cb0_008w) - (cb0_008y); - float _1844 = ((exp2((_1691 * 3.321928024291992f))) - (cb0_008y)) / _1843; - float _1846 = ((exp2((_1765 * 3.321928024291992f))) - (cb0_008y)) / _1843; - float _1848 = ((exp2((_1839 * 3.321928024291992f))) - (cb0_008y)) / _1843; - float _1851 = mad(0.15618768334388733f, _1848, (mad(0.13400420546531677f, _1846, (_1844 * 0.6624541878700256f)))); - float _1854 = mad(0.053689517080783844f, _1848, (mad(0.6740817427635193f, _1846, (_1844 * 0.2722287178039551f)))); - float _1857 = mad(1.0103391408920288f, _1848, (mad(0.00406073359772563f, _1846, (_1844 * -0.005574649665504694f)))); - float _1870 = min((max((mad(-0.23642469942569733f, _1857, (mad(-0.32480329275131226f, _1854, (_1851 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _1871 = min((max((mad(0.016756348311901093f, _1857, (mad(1.6153316497802734f, _1854, (_1851 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _1872 = min((max((mad(0.9883948564529419f, _1857, (mad(-0.008284442126750946f, _1854, (_1851 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _1875 = mad(0.15618768334388733f, _1872, (mad(0.13400420546531677f, _1871, (_1870 * 0.6624541878700256f)))); - float _1878 = mad(0.053689517080783844f, _1872, (mad(0.6740817427635193f, _1871, (_1870 * 0.2722287178039551f)))); - float _1881 = mad(1.0103391408920288f, _1872, (mad(0.00406073359772563f, _1871, (_1870 * -0.005574649665504694f)))); - float _1903 = min((max(((min((max((mad(-0.23642469942569733f, _1881, (mad(-0.32480329275131226f, _1878, (_1875 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1904 = min((max(((min((max((mad(0.016756348311901093f, _1881, (mad(1.6153316497802734f, _1878, (_1875 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1905 = min((max(((min((max((mad(0.9883948564529419f, _1881, (mad(-0.008284442126750946f, _1878, (_1875 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _1918 = _1903; - _1919 = _1904; - _1920 = _1905; - do { - if (!((((uint)(cb0_042w)) == 5))) { - _1918 = (mad(_45, _1905, (mad(_44, _1904, (_1903 * _43))))); - _1919 = (mad(_48, _1905, (mad(_47, _1904, (_1903 * _46))))); - _1920 = (mad(_51, _1905, (mad(_50, _1904, (_1903 * _49))))); - } - float _1930 = exp2(((log2((_1918 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1931 = exp2(((log2((_1919 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1932 = exp2(((log2((_1920 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2671 = (exp2(((log2(((1.0f / ((_1930 * 18.6875f) + 1.0f)) * ((_1930 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2672 = (exp2(((log2(((1.0f / ((_1931 * 18.6875f) + 1.0f)) * ((_1931 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2673 = (exp2(((log2(((1.0f / ((_1932 * 18.6875f) + 1.0f)) * ((_1932 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if ((((((uint)(cb0_042w)) & -3) == 4))) { - _8[0] = (cb0_010x); - _8[1] = (cb0_010y); - _8[2] = (cb0_010z); - _8[3] = (cb0_010w); - _8[4] = (cb0_012x); - _8[5] = (cb0_012x); - _9[0] = (cb0_011x); - _9[1] = (cb0_011y); - _9[2] = (cb0_011z); - _9[3] = (cb0_011w); - _9[4] = (cb0_012y); - _9[5] = (cb0_012y); - float _2009 = (cb0_012z)*_1210; - float _2010 = (cb0_012z)*_1211; - float _2011 = (cb0_012z)*_1212; - float _2014 = mad((UniformBufferConstants_WorkingColorSpace_016z), _2011, (mad((UniformBufferConstants_WorkingColorSpace_016y), _2010, ((UniformBufferConstants_WorkingColorSpace_016x)*_2009)))); - float _2017 = mad((UniformBufferConstants_WorkingColorSpace_017z), _2011, (mad((UniformBufferConstants_WorkingColorSpace_017y), _2010, ((UniformBufferConstants_WorkingColorSpace_017x)*_2009)))); - float _2020 = mad((UniformBufferConstants_WorkingColorSpace_018z), _2011, (mad((UniformBufferConstants_WorkingColorSpace_018y), _2010, ((UniformBufferConstants_WorkingColorSpace_018x)*_2009)))); - float _2024 = max((max(_2014, _2017)), _2020); - float _2029 = ((max(_2024, 1.000000013351432e-10f)) - (max((min((min(_2014, _2017)), _2020)), 1.000000013351432e-10f))) / (max(_2024, 0.009999999776482582f)); - float _2042 = ((_2017 + _2014) + _2020) + ((sqrt(((((_2020 - _2017) * _2020) + ((_2017 - _2014) * _2017)) + ((_2014 - _2020) * _2014)))) * 1.75f); - float _2043 = _2042 * 0.3333333432674408f; - float _2044 = _2029 + -0.4000000059604645f; - float _2045 = _2044 * 5.0f; - float _2049 = max((1.0f - (abs((_2044 * 2.5f)))), 0.0f); - float _2060 = (((float(((int(((bool)((_2045 > 0.0f))))) - (int(((bool)((_2045 < 0.0f)))))))) * (1.0f - (_2049 * _2049))) + 1.0f) * 0.02500000037252903f; - _2069 = _2060; - do { - if ((!(_2043 <= 0.0533333346247673f))) { - _2069 = 0.0f; - if ((!(_2043 >= 0.1599999964237213f))) { - _2069 = (((0.23999999463558197f / _2042) + -0.5f) * _2060); - } - } - float _2070 = _2069 + 1.0f; - float _2071 = _2070 * _2014; - float _2072 = _2070 * _2017; - float _2073 = _2070 * _2020; - _2102 = 0.0f; - do { - if (!(((bool)((_2071 == _2072))) && ((bool)((_2072 == _2073))))) { - float _2080 = ((_2071 * 2.0f) - _2072) - _2073; - float _2083 = ((_2017 - _2020) * 1.7320507764816284f) * _2070; - float _2085 = atan((_2083 / _2080)); - bool _2088 = (_2080 < 0.0f); - bool _2089 = (_2080 == 0.0f); - bool _2090 = (_2083 >= 0.0f); - bool _2091 = (_2083 < 0.0f); - _2102 = ((((bool)(_2090 && _2089)) ? 90.0f : ((((bool)(_2091 && _2089)) ? -90.0f : (((((bool)(_2091 && _2088)) ? (_2085 + -3.1415927410125732f) : ((((bool)(_2090 && _2088)) ? (_2085 + 3.1415927410125732f) : _2085)))) * 57.2957763671875f))))); - } - float _2107 = min((max(((((bool)((_2102 < 0.0f))) ? (_2102 + 360.0f) : _2102)), 0.0f)), 360.0f); - do { - if (((_2107 < -180.0f))) { - _2116 = (_2107 + 360.0f); - } else { - _2116 = _2107; - if (((_2107 > 180.0f))) { - _2116 = (_2107 + -360.0f); - } - } - _2155 = 0.0f; - do { - if ((((bool)((_2116 > -67.5f))) && ((bool)((_2116 < 67.5f))))) { - float _2122 = (_2116 + 67.5f) * 0.029629629105329514f; - int _2123 = int(2123); - float _2125 = _2122 - (float(_2123)); - float _2126 = _2125 * _2125; - float _2127 = _2126 * _2125; - if (((_2123 == 3))) { - _2155 = (((0.1666666716337204f - (_2125 * 0.5f)) + (_2126 * 0.5f)) - (_2127 * 0.1666666716337204f)); - } else { - if (((_2123 == 2))) { - _2155 = ((0.6666666865348816f - _2126) + (_2127 * 0.5f)); - } else { - if (((_2123 == 1))) { - _2155 = (((_2127 * -0.5f) + 0.1666666716337204f) + ((_2126 + _2125) * 0.5f)); - } else { - _2155 = ((((bool)((_2123 == 0))) ? (_2127 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _2164 = min((max(((((_2029 * 0.27000001072883606f) * (0.029999999329447746f - _2071)) * _2155) + _2071), 0.0f)), 65535.0f); - float _2165 = min((max(_2072, 0.0f)), 65535.0f); - float _2166 = min((max(_2073, 0.0f)), 65535.0f); - float _2179 = min((max((mad(-0.21492856740951538f, _2166, (mad(-0.2365107536315918f, _2165, (_2164 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _2180 = min((max((mad(-0.09967592358589172f, _2166, (mad(1.17622971534729f, _2165, (_2164 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _2181 = min((max((mad(0.9977163076400757f, _2166, (mad(-0.006032449658960104f, _2165, (_2164 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _2182 = dot(float3(_2179, _2180, _2181), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2193 = log2((max((((_2179 - _2182) * 0.9599999785423279f) + _2182), 1.000000013351432e-10f))); - float _2194 = _2193 * 0.3010300099849701f; - float _2195 = log2((cb0_008x)); - float _2196 = _2195 * 0.3010300099849701f; - do { - if (!(!(_2194 <= _2196))) { - _2265 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2203 = log2((cb0_009x)); - float _2204 = _2203 * 0.3010300099849701f; - if ((((bool)((_2194 > _2196))) && ((bool)((_2194 < _2204))))) { - float _2212 = ((_2193 - _2195) * 0.9030900001525879f) / ((_2203 - _2195) * 0.3010300099849701f); - int _2213 = int(2213); - float _2215 = _2212 - (float(_2213)); - float _2217 = _8[_2213]; - float _2220 = _8[(_2213 + 1)]; - float _2225 = _2217 * 0.5f; - _2265 = (dot(float3((_2215 * _2215), _2215, 1.0f), float3((mad((_8[(_2213 + 2)]), 0.5f, (mad(_2220, -1.0f, _2225)))), (_2220 - _2217), (mad(_2220, 0.5f, _2225))))); - } else { - do { - if (!(!(_2194 >= _2204))) { - float _2234 = log2((cb0_008z)); - if (((_2194 < (_2234 * 0.3010300099849701f)))) { - float _2242 = ((_2193 - _2203) * 0.9030900001525879f) / ((_2234 - _2203) * 0.3010300099849701f); - int _2243 = int(2243); - float _2245 = _2242 - (float(_2243)); - float _2247 = _9[_2243]; - float _2250 = _9[(_2243 + 1)]; - float _2255 = _2247 * 0.5f; - _2265 = (dot(float3((_2245 * _2245), _2245, 1.0f), float3((mad((_9[(_2243 + 2)]), 0.5f, (mad(_2250, -1.0f, _2255)))), (_2250 - _2247), (mad(_2250, 0.5f, _2255))))); - break; - } - } - _2265 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2269 = log2((max((((_2180 - _2182) * 0.9599999785423279f) + _2182), 1.000000013351432e-10f))); - float _2270 = _2269 * 0.3010300099849701f; - do { - if (!(!(_2270 <= _2196))) { - _2339 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2277 = log2((cb0_009x)); - float _2278 = _2277 * 0.3010300099849701f; - if ((((bool)((_2270 > _2196))) && ((bool)((_2270 < _2278))))) { - float _2286 = ((_2269 - _2195) * 0.9030900001525879f) / ((_2277 - _2195) * 0.3010300099849701f); - int _2287 = int(2287); - float _2289 = _2286 - (float(_2287)); - float _2291 = _8[_2287]; - float _2294 = _8[(_2287 + 1)]; - float _2299 = _2291 * 0.5f; - _2339 = (dot(float3((_2289 * _2289), _2289, 1.0f), float3((mad((_8[(_2287 + 2)]), 0.5f, (mad(_2294, -1.0f, _2299)))), (_2294 - _2291), (mad(_2294, 0.5f, _2299))))); - } else { - do { - if (!(!(_2270 >= _2278))) { - float _2308 = log2((cb0_008z)); - if (((_2270 < (_2308 * 0.3010300099849701f)))) { - float _2316 = ((_2269 - _2277) * 0.9030900001525879f) / ((_2308 - _2277) * 0.3010300099849701f); - int _2317 = int(2317); - float _2319 = _2316 - (float(_2317)); - float _2321 = _9[_2317]; - float _2324 = _9[(_2317 + 1)]; - float _2329 = _2321 * 0.5f; - _2339 = (dot(float3((_2319 * _2319), _2319, 1.0f), float3((mad((_9[(_2317 + 2)]), 0.5f, (mad(_2324, -1.0f, _2329)))), (_2324 - _2321), (mad(_2324, 0.5f, _2329))))); - break; - } - } - _2339 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2343 = log2((max((((_2181 - _2182) * 0.9599999785423279f) + _2182), 1.000000013351432e-10f))); - float _2344 = _2343 * 0.3010300099849701f; - do { - if (!(!(_2344 <= _2196))) { - _2413 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2351 = log2((cb0_009x)); - float _2352 = _2351 * 0.3010300099849701f; - if ((((bool)((_2344 > _2196))) && ((bool)((_2344 < _2352))))) { - float _2360 = ((_2343 - _2195) * 0.9030900001525879f) / ((_2351 - _2195) * 0.3010300099849701f); - int _2361 = int(2361); - float _2363 = _2360 - (float(_2361)); - float _2365 = _8[_2361]; - float _2368 = _8[(_2361 + 1)]; - float _2373 = _2365 * 0.5f; - _2413 = (dot(float3((_2363 * _2363), _2363, 1.0f), float3((mad((_8[(_2361 + 2)]), 0.5f, (mad(_2368, -1.0f, _2373)))), (_2368 - _2365), (mad(_2368, 0.5f, _2373))))); - } else { - do { - if (!(!(_2344 >= _2352))) { - float _2382 = log2((cb0_008z)); - if (((_2344 < (_2382 * 0.3010300099849701f)))) { - float _2390 = ((_2343 - _2351) * 0.9030900001525879f) / ((_2382 - _2351) * 0.3010300099849701f); - int _2391 = int(2391); - float _2393 = _2390 - (float(_2391)); - float _2395 = _9[_2391]; - float _2398 = _9[(_2391 + 1)]; - float _2403 = _2395 * 0.5f; - _2413 = (dot(float3((_2393 * _2393), _2393, 1.0f), float3((mad((_9[(_2391 + 2)]), 0.5f, (mad(_2398, -1.0f, _2403)))), (_2398 - _2395), (mad(_2398, 0.5f, _2403))))); - break; - } - } - _2413 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2417 = (cb0_008w) - (cb0_008y); - float _2418 = ((exp2((_2265 * 3.321928024291992f))) - (cb0_008y)) / _2417; - float _2420 = ((exp2((_2339 * 3.321928024291992f))) - (cb0_008y)) / _2417; - float _2422 = ((exp2((_2413 * 3.321928024291992f))) - (cb0_008y)) / _2417; - float _2425 = mad(0.15618768334388733f, _2422, (mad(0.13400420546531677f, _2420, (_2418 * 0.6624541878700256f)))); - float _2428 = mad(0.053689517080783844f, _2422, (mad(0.6740817427635193f, _2420, (_2418 * 0.2722287178039551f)))); - float _2431 = mad(1.0103391408920288f, _2422, (mad(0.00406073359772563f, _2420, (_2418 * -0.005574649665504694f)))); - float _2444 = min((max((mad(-0.23642469942569733f, _2431, (mad(-0.32480329275131226f, _2428, (_2425 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _2445 = min((max((mad(0.016756348311901093f, _2431, (mad(1.6153316497802734f, _2428, (_2425 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _2446 = min((max((mad(0.9883948564529419f, _2431, (mad(-0.008284442126750946f, _2428, (_2425 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _2449 = mad(0.15618768334388733f, _2446, (mad(0.13400420546531677f, _2445, (_2444 * 0.6624541878700256f)))); - float _2452 = mad(0.053689517080783844f, _2446, (mad(0.6740817427635193f, _2445, (_2444 * 0.2722287178039551f)))); - float _2455 = mad(1.0103391408920288f, _2446, (mad(0.00406073359772563f, _2445, (_2444 * -0.005574649665504694f)))); - float _2477 = min((max(((min((max((mad(-0.23642469942569733f, _2455, (mad(-0.32480329275131226f, _2452, (_2449 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2478 = min((max(((min((max((mad(0.016756348311901093f, _2455, (mad(1.6153316497802734f, _2452, (_2449 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2479 = min((max(((min((max((mad(0.9883948564529419f, _2455, (mad(-0.008284442126750946f, _2452, (_2449 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2492 = _2477; - _2493 = _2478; - _2494 = _2479; - do { - if (!((((uint)(cb0_042w)) == 6))) { - _2492 = (mad(_45, _2479, (mad(_44, _2478, (_2477 * _43))))); - _2493 = (mad(_48, _2479, (mad(_47, _2478, (_2477 * _46))))); - _2494 = (mad(_51, _2479, (mad(_50, _2478, (_2477 * _49))))); - } - float _2504 = exp2(((log2((_2492 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2505 = exp2(((log2((_2493 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2506 = exp2(((log2((_2494 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2671 = (exp2(((log2(((1.0f / ((_2504 * 18.6875f) + 1.0f)) * ((_2504 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2672 = (exp2(((log2(((1.0f / ((_2505 * 18.6875f) + 1.0f)) * ((_2505 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2673 = (exp2(((log2(((1.0f / ((_2506 * 18.6875f) + 1.0f)) * ((_2506 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 7))) { - float _2551 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1212, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1211, ((UniformBufferConstants_WorkingColorSpace_008x)*_1210)))); - float _2554 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1212, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1211, ((UniformBufferConstants_WorkingColorSpace_009x)*_1210)))); - float _2557 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1212, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1211, ((UniformBufferConstants_WorkingColorSpace_010x)*_1210)))); - float _2576 = exp2(((log2(((mad(_45, _2557, (mad(_44, _2554, (_2551 * _43))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2577 = exp2(((log2(((mad(_48, _2557, (mad(_47, _2554, (_2551 * _46))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2578 = exp2(((log2(((mad(_51, _2557, (mad(_50, _2554, (_2551 * _49))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2671 = (exp2(((log2(((1.0f / ((_2576 * 18.6875f) + 1.0f)) * ((_2576 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2672 = (exp2(((log2(((1.0f / ((_2577 * 18.6875f) + 1.0f)) * ((_2577 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2673 = (exp2(((log2(((1.0f / ((_2578 * 18.6875f) + 1.0f)) * ((_2578 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } else { - _2671 = _1210; - _2672 = _1211; - _2673 = _1212; - if (!((((uint)(cb0_042w)) == 8))) { - if (((((uint)(cb0_042w)) == 9))) { - float _2625 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1200, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1199, ((UniformBufferConstants_WorkingColorSpace_008x)*_1198)))); - float _2628 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1200, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1199, ((UniformBufferConstants_WorkingColorSpace_009x)*_1198)))); - float _2631 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1200, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1199, ((UniformBufferConstants_WorkingColorSpace_010x)*_1198)))); - _2671 = (mad(_45, _2631, (mad(_44, _2628, (_2625 * _43))))); - _2672 = (mad(_48, _2631, (mad(_47, _2628, (_2625 * _46))))); - _2673 = (mad(_51, _2631, (mad(_50, _2628, (_2625 * _49))))); - } else { - float _2644 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1225, ((UniformBufferConstants_WorkingColorSpace_008x)*_1224)))); - float _2647 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1225, ((UniformBufferConstants_WorkingColorSpace_009x)*_1224)))); - float _2650 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1226, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1225, ((UniformBufferConstants_WorkingColorSpace_010x)*_1224)))); - _2671 = (exp2(((log2((mad(_45, _2650, (mad(_44, _2647, (_2644 * _43))))))) * (cb0_042z)))); - _2672 = (exp2(((log2((mad(_48, _2650, (mad(_47, _2647, (_2644 * _46))))))) * (cb0_042z)))); - _2673 = (exp2(((log2((mad(_51, _2650, (mad(_50, _2647, (_2644 * _49))))))) * (cb0_042z)))); - } - } - } - } - } - } - } - SV_Target.x = (_2671 * 0.9523810148239136f); - SV_Target.y = (_2672 * 0.9523810148239136f); - SV_Target.z = (_2673 * 0.9523810148239136f); - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0x5CAE0013.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x5CAE0013.ps_5_1.hlsl deleted file mode 100644 index 07a21e9c..00000000 --- a/src/games/ue-dx12/lutbuilder_0x5CAE0013.ps_5_1.hlsl +++ /dev/null @@ -1,1421 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 01:59:34 2024 -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r2.xyz = r0.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r0.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r0.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r2.xyz = r0.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r2.xyz; - r3.xyz = r0.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r3.xyz; - r4.xyz = r0.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.xyz = r0.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r2.xyz; - r3.xyz = r0.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r3.xyz; - r0.yzw = r0.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r0.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r2.xyz; - r3.xyz = r0.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r3.xyz; - r0.xyz = r0.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r0.yzw; - r0.w = cmp(asuint(cb0[40].w) >= 3); - r4.xyz = log2(r1.xyz); - r4.xyz = float3(0.0126833133, 0.0126833133, 0.0126833133) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r4.xyz; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r4.xyz = -r4.xyz * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r4.xyz = r5.xyz / r4.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = float3(6.27739477, 6.27739477, 6.27739477) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(100, 100, 100) * r4.xyz; - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.x = dot(cb1[8].xyz, r1.xyz); - r4.y = dot(cb1[9].xyz, r1.xyz); - r4.z = dot(cb1[10].xyz, r1.xyz); - r0.w = dot(r4.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r4.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r4.xyz); - r1.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r4.xyz); - r1.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r4.xyz); - r1.xyz = r1.xyz + -r4.xyz; - r1.xyz = r0.www * r1.xyz + r4.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz * r4.www; - r1.xyz = r1.xyz + -r0.www; - r4.xyz = r4.xyz * r1.xyz + r0.www; - r4.xyz = max(float3(0, 0, 0), r4.xyz); - r4.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r4.xyz; - r5.xyz = r5.xyz * r5.www; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r4.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r4.xyz = r4.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r1.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].y + -cb0[36].x; - r3.w = -cb0[36].x + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r1.xyz = r6.xyz * r1.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r6.xyz = r7.xyz * r7.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r1.xyz = r1.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r1.xyz = r1.xyz * r0.www; - r1.xyz = r4.xyz * r1.www + r1.xyz; - r1.xyz = r5.xyz * r4.www + r1.xyz; - - float3 untonemapped_ap1 = r1.xyz; - - r4.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r1.xyz); - r4.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r1.xyz); - r4.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r4.xyz = cb0[36].zzz * r4.xyz + r1.xyz; - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r4.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r4.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r4.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r6.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r6.xw = -cb0[37].zw + r6.xy; - r0.w = cmp(0.800000012 < cb0[37].z); - r7.xy = -cb0[37].zz + float2(0.819999993, 1); - r7.xy = r7.xy / cb0[37].yy; - r1.w = -0.744727492 + r7.x; - r2.w = r6.z / r6.x; - r3.w = -1 + r2.w; - r3.w = 1 + -r3.w; - r2.w = r2.w / r3.w; - r2.w = log2(r2.w); - r2.w = 0.346573591 * r2.w; - r3.w = r6.x / cb0[37].y; - r2.w = -r2.w * r3.w + -0.744727492; - r0.w = r0.w ? r1.w : r2.w; - r1.w = r7.y + -r0.w; - r2.w = cb0[37].w / cb0[37].y; - r2.w = r2.w + -r1.w; - r5.xyz = log2(r5.xyz); - r7.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r1.www; - r8.xyz = cb0[37].yyy * r8.xyz; - r9.xy = r6.xw + r6.xw; - r1.w = cb0[37].y * -2; - r1.w = r1.w / r6.x; - r10.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r11.xyz = r10.xyz * r1.www; - r11.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r11.xyz; - r11.xyz = exp2(r11.xyz); - r11.xyz = float3(1, 1, 1) + r11.xyz; - r9.xzw = r9.xxx / r11.xyz; - r9.xzw = -cb0[38].xxx + r9.xzw; - r1.w = cb0[37].y + cb0[37].y; - r1.w = r1.w / r6.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r2.www; - r5.xyz = r5.xyz * r1.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r9.yyy / r5.xyz; - r5.xyz = r6.yyy + -r5.xyz; - r6.xyz = cmp(r7.xyz < r0.www); - r6.xyz = r6.xyz ? r9.xzw : r8.xyz; - r7.xyz = cmp(r2.www < r7.xyz); - r5.xyz = r7.xyz ? r5.xyz : r8.xyz; - r1.w = r2.w + -r0.w; - r7.xyz = saturate(r10.xyz / r1.www); - r0.w = cmp(r2.w < r0.w); - r8.xyz = float3(1, 1, 1) + -r7.xyz; - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r8.xyz = -r7.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r7.xyz = r7.xyz * r7.xyz; - r7.xyz = r7.xyz * r8.xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r7.xyz * r5.xyz + r6.xyz; - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[37].xxx * r5.xyz + r4.xyz; - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r4.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r4.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r4.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[36].zzz * r5.xyz + r4.xyz; - r5.x = dot(cb1[12].xyz, r4.xyz); - r5.y = dot(cb1[13].xyz, r4.xyz); - r5.z = dot(cb1[14].xyz, r4.xyz); - r4.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r4.xyz * r4.xyz; - r4.xyz = cb0[39].yyy * r4.xyz; - r4.xyz = cb0[39].xxx * r5.xyz + r4.xyz; - r4.xyz = cb0[39].zzz + r4.xyz; - r5.xyz = cb0[14].xyz * r4.xyz; - r4.xyz = -r4.xyz * cb0[14].xyz + cb0[13].xyz; - r4.xyz = cb0[13].www * r4.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r4.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r2.xyz, r6.xyz); - r7.y = dot(r3.xyz, r6.xyz); - r7.z = dot(r0.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r1.xyz); - r7.y = dot(cb1[13].xyz, r1.xyz); - r7.z = dot(cb1[14].xyz, r1.xyz); - r1.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r7.xyz + r1.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r1.xyz); - r7.y = dot(cb1[9].xyz, r1.xyz); - r7.z = dot(cb1[10].xyz, r1.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r4.xyz); - r8.y = dot(cb1[9].xyz, r4.xyz); - r8.z = dot(cb1[10].xyz, r4.xyz); - r4.x = dot(r2.xyz, r8.xyz); - r4.y = dot(r3.xyz, r8.xyz); - r4.z = dot(r0.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r2.xyz, r8.xyz); - r1.w = dot(r3.xyz, r8.xyz); - r0.x = dot(r0.xyz, r8.xyz); - r2.x = log2(r0.w); - r2.y = log2(r1.w); - r2.z = log2(r0.x); - r0.xyz = cb0[40].zzz * r2.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r7.yyy ? r4.xyz : r0.xyz; - r6.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x61C2EA30.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x61C2EA30.ps_5_1.hlsl deleted file mode 100644 index 6df854ab..00000000 --- a/src/games/ue-dx12/lutbuilder_0x61C2EA30.ps_5_1.hlsl +++ /dev/null @@ -1,1490 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.3.16 on Tue Oct 8 22:20:45 2024 -cbuffer cb0 : register(b0) { - float4 cb0[67]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r0.w = 1.00055635 * cb0[44].z; - r0.w = 1 / r0.w; - r1.x = cmp(6996.10791 >= cb0[44].z); - r1.yz = -r0.ww * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r1.yz = r1.yz * r0.ww + float2(99.1100006, 247.479996); - r1.yz = r1.yz * r0.ww + float2(0.244063005, 0.237039998); - r1.x = r1.x ? r1.y : r1.z; - r0.w = r1.x * r1.x; - r1.z = 2.86999989 * r1.x; - r0.w = r0.w * -3 + r1.z; - r1.y = -0.275000006 + r0.w; - r2.xyz = cb0[44].zzz * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[44].z * cb0[44].z; - r2.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r2.xyz; - r2.x = r2.x / r2.y; - r1.z = -cb0[44].z * 2.8974182e-05 + 1; - r0.w = r0.w * 1.61456057e-07 + r1.z; - r2.y = r2.z / r0.w; - r1.zw = r2.xy + r2.xy; - r0.w = 3 * r2.x; - r1.z = -r2.y * 8 + r1.z; - r1.z = 4 + r1.z; - r3.x = r0.w / r1.z; - r3.y = r1.w / r1.z; - r0.w = cmp(cb0[44].z < 4000); - r1.xy = r0.ww ? r3.xy : r1.xy; - r0.w = dot(r2.xy, r2.xy); - r0.w = rsqrt(r0.w); - r1.zw = r2.xy * r0.ww; - r0.w = cb0[44].w * -r1.w; - r0.w = r0.w * 0.0500000007 + r2.x; - r1.z = cb0[44].w * r1.z; - r1.z = r1.z * 0.0500000007 + r2.y; - r1.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.z * 8 + r0.w; - r0.w = 4 + r0.w; - r1.z = r1.z + r1.z; - r2.xy = r1.wz / r0.ww; - r1.zw = r2.xy + -r3.xy; - r1.xy = r1.xy + r1.zw; - r1.zw = float2(0.312700003, 0.328999996); - r1.xyzw = cb0[44].xxxx ? r1.xyzw : r1.zwxy; - r2.xy = max(float2(1.00000001e-10, 1.00000001e-10), r1.yw); - r2.zw = float2(1, 1) + -r1.xz; - r1.yw = r2.zw + -r1.yw; - r3.xy = r1.xz / r2.xy; - r1.xy = r1.yw / r2.xy; - r3.z = 1; - r3.w = r1.x; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r3.xzw); - r1.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r3.xzw); - r2.x = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r3.xzw); - r1.zw = r3.yz; - r2.y = dot(float3(-0.161400005, 0.895099998, 0.266400009), r1.yzw); - r2.z = dot(float3(0.0366999991, -0.750199974, 1.71350002), r1.yzw); - r1.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r1.yzw); - r0.w = r2.y / r0.w; - r1.x = r2.z / r1.x; - r1.y = r1.y / r2.x; - r2.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r1.xzw = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.xxx; - r3.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r1.yyy; - r4.x = r2.x; - r4.y = r1.x; - r4.z = r3.x; - r5.x = dot(float3(0.986992896, -0.1470543, 0.159962699), r4.xyz); - r6.x = r2.y; - r6.y = r1.z; - r6.z = r3.y; - r5.y = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r3.x = r2.z; - r3.y = r1.w; - r5.z = dot(float3(0.986992896, -0.1470543, 0.159962699), r3.xyz); - r1.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r4.xyz); - r1.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r1.z = dot(float3(0.432305306, 0.518360317, 0.0492912009), r3.xyz); - r2.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r4.xyz); - r2.y = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r2.z = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r3.xyz); - r3.x = dot(r5.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.x = dot(r5.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.x = dot(r5.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.y = dot(r1.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.y = dot(r1.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.y = dot(r1.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.z = dot(r2.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.z = dot(r2.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.z = dot(r2.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r1.x = dot(float3(3.2409699, -1.5373832, -0.498610765), r3.xyz); - r1.y = dot(float3(3.2409699, -1.5373832, -0.498610765), r4.xyz); - r1.z = dot(float3(3.2409699, -1.5373832, -0.498610765), r5.xyz); - r2.x = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r3.xyz); - r2.y = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r4.xyz); - r2.z = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r5.xyz); - r3.x = dot(float3(0.0556300804, -0.203976959, 1.05697155), r3.xyz); - r3.y = dot(float3(0.0556300804, -0.203976959, 1.05697155), r4.xyz); - r3.z = dot(float3(0.0556300804, -0.203976959, 1.05697155), r5.xyz); - r1.x = dot(r1.xyz, r0.xyz); - r1.y = dot(r2.xyz, r0.xyz); - r1.z = dot(r3.xyz, r0.xyz); - r0.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r0.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r0.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r0.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[66].y * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r0.xyz); - r1.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r0.xyz); - r1.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = r0.www * r1.xyz + r0.xyz; - r0.xyz = cb0[44].yyy ? r0.xyz : r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - - float3 untonemapped_ap1 = r1.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - if (cb0[44].y != 0) { - r2.x = dot(r1.xyz, cb0[28].xyz); - r2.y = dot(r1.xyz, cb0[29].xyz); - r2.z = dot(r1.xyz, cb0[30].xyz); - r0.w = dot(r1.xyz, cb0[33].xyz); - r0.w = 1 + r0.w; - r0.w = rcp(r0.w); - r3.xyz = cb0[35].xyz * r0.www + cb0[34].xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r3.xyz = cb0[31].xxx + -r2.xyz; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r4.xyz = max(cb0[31].zzz, r2.xyz); - r2.xyz = max(cb0[31].xxx, r2.xyz); - r2.xyz = min(cb0[31].zzz, r2.xyz); - r5.xyz = r4.xyz * cb0[32].xxx + cb0[32].yyy; - r4.xyz = cb0[31].www + r4.xyz; - r4.xyz = rcp(r4.xyz); - r6.xyz = cb0[28].www * r3.xyz; - r3.xyz = cb0[31].yyy + r3.xyz; - r3.xyz = rcp(r3.xyz); - r3.xyz = r6.xyz * r3.xyz + cb0[29].www; - r2.xyz = r2.xyz * cb0[30].www + r3.xyz; - r2.xyz = r5.xyz * r4.xyz + r2.xyz; - r2.xyz = float3(-0.00200000009, -0.00200000009, -0.00200000009) + r2.xyz; - } else { - r3.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r3.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r3.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r3.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r3.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r0.w = min(r3.y, r3.z); - r0.w = min(r0.w, r3.w); - r1.w = max(r3.y, r3.z); - r1.w = max(r1.w, r3.w); - r4.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r4.x + -r0.w; - r0.w = r0.w / r4.y; - r4.xyz = r3.wzy + -r3.zyw; - r4.xy = r4.xy * r3.wz; - r1.w = r4.x + r4.y; - r1.w = r3.y * r4.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r3.w + r3.z; - r2.w = r2.w + r3.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.x = -0.400000006 + r0.w; - r4.x = 2.5 * r3.x; - r4.x = 1 + -abs(r4.x); - r4.x = max(0, r4.x); - r4.y = cmp(0 < r3.x); - r3.x = cmp(r3.x < 0); - r3.x = (int)-r4.y + (int)r3.x; - r3.x = (int)r3.x; - r4.x = -r4.x * r4.x + 1; - r3.x = r3.x * r4.x + 1; - r3.x = 0.0250000004 * r3.x; - r4.x = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.x * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.x ? r3.x : r1.w; - r1.w = 1 + r1.w; - r4.yzw = r3.yzw * r1.www; - r5.xy = cmp(r4.zw == r4.yz); - r2.w = r5.y ? r5.x : 0; - r3.x = r3.z * r1.w + -r4.w; - r3.x = 1.73205078 * r3.x; - r3.z = r4.y * 2 + -r4.z; - r3.z = -r3.w * r1.w + r3.z; - r3.w = min(abs(r3.x), abs(r3.z)); - r5.x = max(abs(r3.x), abs(r3.z)); - r5.x = 1 / r5.x; - r3.w = r5.x * r3.w; - r5.x = r3.w * r3.w; - r5.y = r5.x * 0.0208350997 + -0.0851330012; - r5.y = r5.x * r5.y + 0.180141002; - r5.y = r5.x * r5.y + -0.330299497; - r5.x = r5.x * r5.y + 0.999866009; - r5.y = r5.x * r3.w; - r5.z = cmp(abs(r3.z) < abs(r3.x)); - r5.y = r5.y * -2 + 1.57079637; - r5.y = r5.z ? r5.y : 0; - r3.w = r3.w * r5.x + r5.y; - r5.x = cmp(r3.z < -r3.z); - r5.x = r5.x ? -3.141593 : 0; - r3.w = r5.x + r3.w; - r5.x = min(r3.x, r3.z); - r3.x = max(r3.x, r3.z); - r3.z = cmp(r5.x < -r5.x); - r3.x = cmp(r3.x >= -r3.x); - r3.x = r3.x ? r3.z : 0; - r3.x = r3.x ? -r3.w : r3.w; - r3.x = 57.2957802 * r3.x; - r2.w = r2.w ? 0 : r3.x; - r3.x = cmp(r2.w < 0); - r3.z = 360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.x = cmp(180 < r2.w); - r3.z = -360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.x * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r3.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r4.x = r0.w * 0.180000007 + r4.y; - r3.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r4.xzw); - r3.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r4.xzw); - r3.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r4.xzw); - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r4.xy = float2(1, 0.180000007) + cb0[36].ww; - r0.w = -cb0[36].y + r4.x; - r1.w = 1 + cb0[37].x; - r2.w = -cb0[36].z + r1.w; - r3.w = cmp(0.800000012 < cb0[36].y); - r4.xz = float2(0.819999993, 1) + -cb0[36].yy; - r4.xz = r4.xz / cb0[36].xx; - r4.y = r4.y / r0.w; - r4.xw = float2(-0.744727492, -1) + r4.xy; - r4.w = 1 + -r4.w; - r4.y = r4.y / r4.w; - r4.y = log2(r4.y); - r4.y = 0.346573591 * r4.y; - r4.w = r0.w / cb0[36].x; - r4.y = -r4.y * r4.w + -0.744727492; - r3.w = r3.w ? r4.x : r4.y; - r4.x = r4.z + -r3.w; - r4.y = cb0[36].z / cb0[36].x; - r4.y = r4.y + -r4.x; - r3.xyz = log2(r3.xyz); - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r3.xyz; - r4.xzw = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.xxx; - r4.xzw = cb0[36].xxx * r4.xzw; - r5.w = r0.w + r0.w; - r6.x = -2 * cb0[36].x; - r0.w = r6.x / r0.w; - r6.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r7.xyz = r6.xyz * r0.www; - r7.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = float3(1, 1, 1) + r7.xyz; - r7.xyz = r5.www / r7.xyz; - r7.xyz = -cb0[36].www + r7.xyz; - r0.w = r2.w + r2.w; - r5.w = cb0[36].x + cb0[36].x; - r2.w = r5.w / r2.w; - r3.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r4.yyy; - r3.xyz = r3.xyz * r2.www; - r3.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r3.xyz = float3(1, 1, 1) + r3.xyz; - r3.xyz = r0.www / r3.xyz; - r3.xyz = -r3.xyz + r1.www; - r8.xyz = cmp(r5.xyz < r3.www); - r7.xyz = r8.xyz ? r7.xyz : r4.xzw; - r5.xyz = cmp(r4.yyy < r5.xyz); - r3.xyz = r5.xyz ? r3.xyz : r4.xzw; - r0.w = r4.y + -r3.w; - r4.xzw = saturate(r6.xyz / r0.www); - r0.w = cmp(r4.y < r3.w); - r5.xyz = float3(1, 1, 1) + -r4.xzw; - r4.xyz = r0.www ? r5.xyz : r4.xzw; - r5.xyz = -r4.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r4.xyz = r4.xyz * r4.xyz; - r4.xyz = r4.xyz * r5.xyz; - r3.xyz = r3.xyz + -r7.xyz; - r3.xyz = r4.xyz * r3.xyz + r7.xyz; - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].zzz * r3.xyz + r0.xyz; - r3.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r3.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r3.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r3.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r3.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r2.xyz = max(float3(0, 0, 0), r3.xyz); - } - r0.xyz = r2.xyz * r2.xyz; - r2.xyz = cb0[26].yyy * r2.xyz; - r0.xyz = cb0[26].xxx * r0.xyz + r2.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl deleted file mode 100644 index a899e430..00000000 --- a/src/games/ue-dx12/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl +++ /dev/null @@ -1,2844 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D Textures_1 : register(t0); - -cbuffer _RootShaderParameters : register(b0) { - float _RootShaderParameters_005x : packoffset(c005.x); - float _RootShaderParameters_005y : packoffset(c005.y); - float _RootShaderParameters_008x : packoffset(c008.x); - float _RootShaderParameters_008y : packoffset(c008.y); - float _RootShaderParameters_008z : packoffset(c008.z); - float _RootShaderParameters_008w : packoffset(c008.w); - float _RootShaderParameters_009x : packoffset(c009.x); - float _RootShaderParameters_010x : packoffset(c010.x); - float _RootShaderParameters_010y : packoffset(c010.y); - float _RootShaderParameters_010z : packoffset(c010.z); - float _RootShaderParameters_010w : packoffset(c010.w); - float _RootShaderParameters_011x : packoffset(c011.x); - float _RootShaderParameters_011y : packoffset(c011.y); - float _RootShaderParameters_011z : packoffset(c011.z); - float _RootShaderParameters_011w : packoffset(c011.w); - float _RootShaderParameters_012x : packoffset(c012.x); - float _RootShaderParameters_012y : packoffset(c012.y); - float _RootShaderParameters_012z : packoffset(c012.z); - float _RootShaderParameters_013x : packoffset(c013.x); - float _RootShaderParameters_013y : packoffset(c013.y); - float _RootShaderParameters_013z : packoffset(c013.z); - float _RootShaderParameters_013w : packoffset(c013.w); - float _RootShaderParameters_014x : packoffset(c014.x); - float _RootShaderParameters_014y : packoffset(c014.y); - float _RootShaderParameters_014z : packoffset(c014.z); - float _RootShaderParameters_015x : packoffset(c015.x); - float _RootShaderParameters_015y : packoffset(c015.y); - float _RootShaderParameters_015z : packoffset(c015.z); - float _RootShaderParameters_015w : packoffset(c015.w); - float _RootShaderParameters_016x : packoffset(c016.x); - float _RootShaderParameters_016y : packoffset(c016.y); - float _RootShaderParameters_016z : packoffset(c016.z); - float _RootShaderParameters_016w : packoffset(c016.w); - float _RootShaderParameters_017x : packoffset(c017.x); - float _RootShaderParameters_017y : packoffset(c017.y); - float _RootShaderParameters_017z : packoffset(c017.z); - float _RootShaderParameters_017w : packoffset(c017.w); - float _RootShaderParameters_018x : packoffset(c018.x); - float _RootShaderParameters_018y : packoffset(c018.y); - float _RootShaderParameters_018z : packoffset(c018.z); - float _RootShaderParameters_018w : packoffset(c018.w); - float _RootShaderParameters_019x : packoffset(c019.x); - float _RootShaderParameters_019y : packoffset(c019.y); - float _RootShaderParameters_019z : packoffset(c019.z); - float _RootShaderParameters_019w : packoffset(c019.w); - float _RootShaderParameters_020x : packoffset(c020.x); - float _RootShaderParameters_020y : packoffset(c020.y); - float _RootShaderParameters_020z : packoffset(c020.z); - float _RootShaderParameters_020w : packoffset(c020.w); - float _RootShaderParameters_021x : packoffset(c021.x); - float _RootShaderParameters_021y : packoffset(c021.y); - float _RootShaderParameters_021z : packoffset(c021.z); - float _RootShaderParameters_021w : packoffset(c021.w); - float _RootShaderParameters_022x : packoffset(c022.x); - float _RootShaderParameters_022y : packoffset(c022.y); - float _RootShaderParameters_022z : packoffset(c022.z); - float _RootShaderParameters_022w : packoffset(c022.w); - float _RootShaderParameters_023x : packoffset(c023.x); - float _RootShaderParameters_023y : packoffset(c023.y); - float _RootShaderParameters_023z : packoffset(c023.z); - float _RootShaderParameters_023w : packoffset(c023.w); - float _RootShaderParameters_024x : packoffset(c024.x); - float _RootShaderParameters_024y : packoffset(c024.y); - float _RootShaderParameters_024z : packoffset(c024.z); - float _RootShaderParameters_024w : packoffset(c024.w); - float _RootShaderParameters_025x : packoffset(c025.x); - float _RootShaderParameters_025y : packoffset(c025.y); - float _RootShaderParameters_025z : packoffset(c025.z); - float _RootShaderParameters_025w : packoffset(c025.w); - float _RootShaderParameters_026x : packoffset(c026.x); - float _RootShaderParameters_026y : packoffset(c026.y); - float _RootShaderParameters_026z : packoffset(c026.z); - float _RootShaderParameters_026w : packoffset(c026.w); - float _RootShaderParameters_027x : packoffset(c027.x); - float _RootShaderParameters_027y : packoffset(c027.y); - float _RootShaderParameters_027z : packoffset(c027.z); - float _RootShaderParameters_027w : packoffset(c027.w); - float _RootShaderParameters_028x : packoffset(c028.x); - float _RootShaderParameters_028y : packoffset(c028.y); - float _RootShaderParameters_028z : packoffset(c028.z); - float _RootShaderParameters_028w : packoffset(c028.w); - float _RootShaderParameters_029x : packoffset(c029.x); - float _RootShaderParameters_029y : packoffset(c029.y); - float _RootShaderParameters_029z : packoffset(c029.z); - float _RootShaderParameters_029w : packoffset(c029.w); - float _RootShaderParameters_030x : packoffset(c030.x); - float _RootShaderParameters_030y : packoffset(c030.y); - float _RootShaderParameters_030z : packoffset(c030.z); - float _RootShaderParameters_030w : packoffset(c030.w); - float _RootShaderParameters_031x : packoffset(c031.x); - float _RootShaderParameters_031y : packoffset(c031.y); - float _RootShaderParameters_031z : packoffset(c031.z); - float _RootShaderParameters_031w : packoffset(c031.w); - float _RootShaderParameters_032x : packoffset(c032.x); - float _RootShaderParameters_032y : packoffset(c032.y); - float _RootShaderParameters_032z : packoffset(c032.z); - float _RootShaderParameters_032w : packoffset(c032.w); - float _RootShaderParameters_033x : packoffset(c033.x); - float _RootShaderParameters_033y : packoffset(c033.y); - float _RootShaderParameters_033z : packoffset(c033.z); - float _RootShaderParameters_033w : packoffset(c033.w); - float _RootShaderParameters_034x : packoffset(c034.x); - float _RootShaderParameters_034y : packoffset(c034.y); - float _RootShaderParameters_034z : packoffset(c034.z); - float _RootShaderParameters_034w : packoffset(c034.w); - float _RootShaderParameters_035z : packoffset(c035.z); - float _RootShaderParameters_035w : packoffset(c035.w); - float _RootShaderParameters_036x : packoffset(c036.x); - float _RootShaderParameters_036y : packoffset(c036.y); - float _RootShaderParameters_036z : packoffset(c036.z); - float _RootShaderParameters_036w : packoffset(c036.w); - float _RootShaderParameters_037x : packoffset(c037.x); - float _RootShaderParameters_037y : packoffset(c037.y); - float _RootShaderParameters_037z : packoffset(c037.z); - float _RootShaderParameters_037w : packoffset(c037.w); - float _RootShaderParameters_038x : packoffset(c038.x); - float _RootShaderParameters_039x : packoffset(c039.x); - float _RootShaderParameters_039y : packoffset(c039.y); - float _RootShaderParameters_039z : packoffset(c039.z); - float _RootShaderParameters_040y : packoffset(c040.y); - float _RootShaderParameters_040z : packoffset(c040.z); - uint _RootShaderParameters_040w : packoffset(c040.w); - uint _RootShaderParameters_041x : packoffset(c041.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -SamplerState Samplers_1 : register(s0); - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - // texture _1 = Textures_1; - // SamplerState _2 = Samplers_1; - // cbuffer _3 = UniformBufferConstants_WorkingColorSpace; - // cbuffer _4 = _RootShaderParameters; - // _5 = _3; - // _6 = _4; - - uint _7 = SV_RenderTargetArrayIndex; - float _8 = TEXCOORD.x; - float _9 = TEXCOORD.y; - float _10[6]; - float _11[6]; - float _12[6]; - float _13[6]; - float _14 = _8 + -0.015625f; - float _15 = _9 + -0.015625f; - float _16 = _14 * 1.0322580337524414f; - float _17 = _15 * 1.0322580337524414f; - float _18 = float(_7); - float _19 = _18 * 0.032258063554763794f; - uint _21 = _RootShaderParameters_041x; - bool _22 = (_21 == 1); - float _39 = 1.379158854484558f; - float _40 = -0.3088507056236267f; - float _41 = -0.07034677267074585f; - float _42 = -0.06933528929948807f; - float _43 = 1.0822921991348267f; - float _44 = -0.012962047010660172f; - float _45 = -0.002159259282052517f; - float _46 = -0.045465391129255295f; - float _47 = 1.0477596521377563f; - float _105; - float _106; - float _107; - float _631; - float _667; - float _678; - float _742; - float _921; - float _932; - float _943; - float _1116; - float _1117; - float _1118; - float _1129; - float _1140; - float _1322; - float _1358; - float _1369; - float _1408; - float _1518; - float _1592; - float _1666; - float _1745; - float _1746; - float _1747; - float _1898; - float _1934; - float _1945; - float _1984; - float _2094; - float _2168; - float _2242; - float _2321; - float _2322; - float _2323; - float _2500; - float _2501; - float _2502; - if (!_22) { - bool _24 = (_21 == 2); - _39 = 1.02579927444458f; - _40 = -0.020052503794431686f; - _41 = -0.0057713985443115234f; - _42 = -0.0022350111976265907f; - _43 = 1.0045825242996216f; - _44 = -0.002352306619286537f; - _45 = -0.005014004185795784f; - _46 = -0.025293385609984398f; - _47 = 1.0304402112960815f; - if (!_24) { - bool _26 = (_21 == 3); - _39 = 0.6954522132873535f; - _40 = 0.14067870378494263f; - _41 = 0.16386906802654266f; - _42 = 0.044794563204050064f; - _43 = 0.8596711158752441f; - _44 = 0.0955343171954155f; - _45 = -0.005525882821530104f; - _46 = 0.004025210160762072f; - _47 = 1.0015007257461548f; - if (!_26) { - bool _28 = (_21 == 4); - float _29 = _28 ? 1.0f : 1.7050515413284302f; - float _30 = _28 ? 0.0f : -0.6217905879020691f; - float _31 = _28 ? 0.0f : -0.0832584798336029f; - float _32 = _28 ? 0.0f : -0.13025718927383423f; - float _33 = _28 ? 1.0f : 1.1408027410507202f; - float _34 = _28 ? 0.0f : -0.010548528283834457f; - float _35 = _28 ? 0.0f : -0.024003278464078903f; - float _36 = _28 ? 0.0f : -0.1289687603712082f; - float _37 = _28 ? 1.0f : 1.152971863746643f; - _39 = _29; - _40 = _30; - _41 = _31; - _42 = _32; - _43 = _33; - _44 = _34; - _45 = _35; - _46 = _36; - _47 = _37; - } - } - } - uint _49 = _RootShaderParameters_040w; - bool _50 = (_49 > 2); - if (_50) { - float _52 = log2(_16); - float _53 = log2(_17); - float _54 = log2(_19); - float _55 = _52 * 0.012683313339948654f; - float _56 = _53 * 0.012683313339948654f; - float _57 = _54 * 0.012683313339948654f; - float _58 = exp2(_55); - float _59 = exp2(_56); - float _60 = exp2(_57); - float _61 = _58 + -0.8359375f; - float _62 = _59 + -0.8359375f; - float _63 = _60 + -0.8359375f; - float _64 = max(0.0f, _61); - float _65 = max(0.0f, _62); - float _66 = max(0.0f, _63); - float _67 = _58 * 18.6875f; - float _68 = _59 * 18.6875f; - float _69 = _60 * 18.6875f; - float _70 = 18.8515625f - _67; - float _71 = 18.8515625f - _68; - float _72 = 18.8515625f - _69; - float _73 = _64 / _70; - float _74 = _65 / _71; - float _75 = _66 / _72; - float _76 = log2(_73); - float _77 = log2(_74); - float _78 = log2(_75); - float _79 = _76 * 6.277394771575928f; - float _80 = _77 * 6.277394771575928f; - float _81 = _78 * 6.277394771575928f; - float _82 = exp2(_79); - float _83 = exp2(_80); - float _84 = exp2(_81); - float _85 = _82 * 100.0f; - float _86 = _83 * 100.0f; - float _87 = _84 * 100.0f; - _105 = _85; - _106 = _86; - _107 = _87; - } else { - float _89 = _14 * 14.45161247253418f; - float _90 = _89 + -6.07624626159668f; - float _91 = _15 * 14.45161247253418f; - float _92 = _91 + -6.07624626159668f; - float _93 = _18 * 0.4516128897666931f; - float _94 = _93 + -6.07624626159668f; - float _95 = exp2(_90); - float _96 = exp2(_92); - float _97 = exp2(_94); - float _98 = _95 * 0.18000000715255737f; - float _99 = _96 * 0.18000000715255737f; - float _100 = _97 * 0.18000000715255737f; - float _101 = _98 + -0.002667719265446067f; - float _102 = _99 + -0.002667719265446067f; - float _103 = _100 + -0.002667719265446067f; - _105 = _101; - _106 = _102; - _107 = _103; - } - - float _109 = UniformBufferConstants_WorkingColorSpace_008x; - float _110 = UniformBufferConstants_WorkingColorSpace_008y; - float _111 = UniformBufferConstants_WorkingColorSpace_008z; - float _113 = UniformBufferConstants_WorkingColorSpace_009x; - float _114 = UniformBufferConstants_WorkingColorSpace_009y; - float _115 = UniformBufferConstants_WorkingColorSpace_009z; - float _117 = UniformBufferConstants_WorkingColorSpace_010x; - float _118 = UniformBufferConstants_WorkingColorSpace_010y; - float _119 = UniformBufferConstants_WorkingColorSpace_010z; - float _120 = _109 * _105; - float _121 = mad(_110, _106, _120); - float _122 = mad(_111, _107, _121); - float _123 = _113 * _105; - float _124 = mad(_114, _106, _123); - float _125 = mad(_115, _107, _124); - float _126 = _117 * _105; - float _127 = mad(_118, _106, _126); - float _128 = mad(_119, _107, _127); - float _129 = dot(float3(_122, _125, _128), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _130 = _122 / _129; - float _131 = _125 / _129; - float _132 = _128 / _129; - float _133 = _130 + -1.0f; - float _134 = _131 + -1.0f; - float _135 = _132 + -1.0f; - float _136 = dot(float3(_133, _134, _135), float3(_133, _134, _135)); - float _137 = _136 * -4.0f; - float _138 = exp2(_137); - float _139 = 1.0f - _138; - float _141 = _RootShaderParameters_036z; - float _142 = _129 * _129; - float _143 = _142 * -4.0f; - float _144 = _143 * _141; - float _145 = exp2(_144); - float _146 = 1.0f - _145; - float _147 = _146 * _139; - float _148 = _122 * 1.370412826538086f; - float _149 = mad(-0.32929131388664246f, _125, _148); - float _150 = mad(-0.06368283927440643f, _128, _149); - float _151 = _122 * -0.08343426138162613f; - float _152 = mad(1.0970908403396606f, _125, _151); - float _153 = mad(-0.010861567221581936f, _128, _152); - float _154 = _122 * -0.02579325996339321f; - float _155 = mad(-0.09862564504146576f, _125, _154); - float _156 = mad(1.203694462776184f, _128, _155); - float _157 = _150 - _122; - float _158 = _153 - _125; - float _159 = _156 - _128; - float _160 = _157 * _147; - float _161 = _158 * _147; - float _162 = _159 * _147; - float _163 = _160 + _122; - float _164 = _161 + _125; - float _165 = _162 + _128; - float _166 = dot(float3(_163, _164, _165), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _168 = _RootShaderParameters_024x; - float _169 = _RootShaderParameters_024y; - float _170 = _RootShaderParameters_024z; - float _171 = _RootShaderParameters_024w; - float _173 = _RootShaderParameters_019x; - float _174 = _RootShaderParameters_019y; - float _175 = _RootShaderParameters_019z; - float _176 = _RootShaderParameters_019w; - float _177 = _173 + _168; - float _178 = _174 + _169; - float _179 = _175 + _170; - float _180 = _176 + _171; - float _182 = _RootShaderParameters_023x; - float _183 = _RootShaderParameters_023y; - float _184 = _RootShaderParameters_023z; - float _185 = _RootShaderParameters_023w; - float _187 = _RootShaderParameters_018x; - float _188 = _RootShaderParameters_018y; - float _189 = _RootShaderParameters_018z; - float _190 = _RootShaderParameters_018w; - float _191 = _187 * _182; - float _192 = _188 * _183; - float _193 = _189 * _184; - float _194 = _190 * _185; - float _196 = _RootShaderParameters_022x; - float _197 = _RootShaderParameters_022y; - float _198 = _RootShaderParameters_022z; - float _199 = _RootShaderParameters_022w; - float _201 = _RootShaderParameters_017x; - float _202 = _RootShaderParameters_017y; - float _203 = _RootShaderParameters_017z; - float _204 = _RootShaderParameters_017w; - float _205 = _201 * _196; - float _206 = _202 * _197; - float _207 = _203 * _198; - float _208 = _204 * _199; - float _210 = _RootShaderParameters_021x; - float _211 = _RootShaderParameters_021y; - float _212 = _RootShaderParameters_021z; - float _213 = _RootShaderParameters_021w; - float _215 = _RootShaderParameters_016x; - float _216 = _RootShaderParameters_016y; - float _217 = _RootShaderParameters_016z; - float _218 = _RootShaderParameters_016w; - float _219 = _215 * _210; - float _220 = _216 * _211; - float _221 = _217 * _212; - float _222 = _218 * _213; - float _224 = _RootShaderParameters_020x; - float _225 = _RootShaderParameters_020y; - float _226 = _RootShaderParameters_020z; - float _227 = _RootShaderParameters_020w; - float _229 = _RootShaderParameters_015x; - float _230 = _RootShaderParameters_015y; - float _231 = _RootShaderParameters_015z; - float _232 = _RootShaderParameters_015w; - float _233 = _229 * _224; - float _234 = _230 * _225; - float _235 = _231 * _226; - float _236 = _232 * _227; - float _237 = _233 * _236; - float _238 = _234 * _236; - float _239 = _235 * _236; - float _240 = _163 - _166; - float _241 = _164 - _166; - float _242 = _165 - _166; - float _243 = _237 * _240; - float _244 = _238 * _241; - float _245 = _239 * _242; - float _246 = _243 + _166; - float _247 = _244 + _166; - float _248 = _245 + _166; - float _249 = max(0.0f, _246); - float _250 = max(0.0f, _247); - float _251 = max(0.0f, _248); - float _252 = _219 * _222; - float _253 = _220 * _222; - float _254 = _221 * _222; - float _255 = _249 * 5.55555534362793f; - float _256 = _250 * 5.55555534362793f; - float _257 = _251 * 5.55555534362793f; - float _258 = log2(_255); - float _259 = log2(_256); - float _260 = log2(_257); - float _261 = _252 * _258; - float _262 = _253 * _259; - float _263 = _254 * _260; - float _264 = exp2(_261); - float _265 = exp2(_262); - float _266 = exp2(_263); - float _267 = _264 * 0.18000000715255737f; - float _268 = _265 * 0.18000000715255737f; - float _269 = _266 * 0.18000000715255737f; - float _270 = _205 * _208; - float _271 = _206 * _208; - float _272 = _207 * _208; - float _273 = 1.0f / _270; - float _274 = 1.0f / _271; - float _275 = 1.0f / _272; - float _276 = log2(_267); - float _277 = log2(_268); - float _278 = log2(_269); - float _279 = _276 * _273; - float _280 = _277 * _274; - float _281 = _278 * _275; - float _282 = exp2(_279); - float _283 = exp2(_280); - float _284 = exp2(_281); - float _285 = _191 * _194; - float _286 = _192 * _194; - float _287 = _193 * _194; - float _288 = _285 * _282; - float _289 = _286 * _283; - float _290 = _287 * _284; - float _291 = _177 + _180; - float _292 = _178 + _180; - float _293 = _179 + _180; - float _294 = _291 + _288; - float _295 = _292 + _289; - float _296 = _293 + _290; - float _298 = _RootShaderParameters_035z; - float _299 = _166 / _298; - float _300 = saturate(_299); - float _301 = _300 * 2.0f; - float _302 = 3.0f - _301; - float _303 = _300 * _300; - float _304 = _303 * _302; - float _305 = 1.0f - _304; - float _307 = _RootShaderParameters_034x; - float _308 = _RootShaderParameters_034y; - float _309 = _RootShaderParameters_034z; - float _310 = _RootShaderParameters_034w; - float _311 = _173 + _307; - float _312 = _174 + _308; - float _313 = _175 + _309; - float _314 = _176 + _310; - float _316 = _RootShaderParameters_033x; - float _317 = _RootShaderParameters_033y; - float _318 = _RootShaderParameters_033z; - float _319 = _RootShaderParameters_033w; - float _320 = _187 * _316; - float _321 = _188 * _317; - float _322 = _189 * _318; - float _323 = _190 * _319; - float _325 = _RootShaderParameters_032x; - float _326 = _RootShaderParameters_032y; - float _327 = _RootShaderParameters_032z; - float _328 = _RootShaderParameters_032w; - float _329 = _201 * _325; - float _330 = _202 * _326; - float _331 = _203 * _327; - float _332 = _204 * _328; - float _334 = _RootShaderParameters_031x; - float _335 = _RootShaderParameters_031y; - float _336 = _RootShaderParameters_031z; - float _337 = _RootShaderParameters_031w; - float _338 = _215 * _334; - float _339 = _216 * _335; - float _340 = _217 * _336; - float _341 = _218 * _337; - float _343 = _RootShaderParameters_030x; - float _344 = _RootShaderParameters_030y; - float _345 = _RootShaderParameters_030z; - float _346 = _RootShaderParameters_030w; - float _347 = _229 * _343; - float _348 = _230 * _344; - float _349 = _231 * _345; - float _350 = _232 * _346; - float _351 = _347 * _350; - float _352 = _348 * _350; - float _353 = _349 * _350; - float _354 = _351 * _240; - float _355 = _352 * _241; - float _356 = _353 * _242; - float _357 = _354 + _166; - float _358 = _355 + _166; - float _359 = _356 + _166; - float _360 = max(0.0f, _357); - float _361 = max(0.0f, _358); - float _362 = max(0.0f, _359); - float _363 = _338 * _341; - float _364 = _339 * _341; - float _365 = _340 * _341; - float _366 = _360 * 5.55555534362793f; - float _367 = _361 * 5.55555534362793f; - float _368 = _362 * 5.55555534362793f; - float _369 = log2(_366); - float _370 = log2(_367); - float _371 = log2(_368); - float _372 = _363 * _369; - float _373 = _364 * _370; - float _374 = _365 * _371; - float _375 = exp2(_372); - float _376 = exp2(_373); - float _377 = exp2(_374); - float _378 = _375 * 0.18000000715255737f; - float _379 = _376 * 0.18000000715255737f; - float _380 = _377 * 0.18000000715255737f; - float _381 = _329 * _332; - float _382 = _330 * _332; - float _383 = _331 * _332; - float _384 = 1.0f / _381; - float _385 = 1.0f / _382; - float _386 = 1.0f / _383; - float _387 = log2(_378); - float _388 = log2(_379); - float _389 = log2(_380); - float _390 = _387 * _384; - float _391 = _388 * _385; - float _392 = _389 * _386; - float _393 = exp2(_390); - float _394 = exp2(_391); - float _395 = exp2(_392); - float _396 = _320 * _323; - float _397 = _321 * _323; - float _398 = _322 * _323; - float _399 = _396 * _393; - float _400 = _397 * _394; - float _401 = _398 * _395; - float _402 = _311 + _314; - float _403 = _312 + _314; - float _404 = _313 + _314; - float _405 = _402 + _399; - float _406 = _403 + _400; - float _407 = _404 + _401; - float _408 = _RootShaderParameters_036x; - float _409 = _RootShaderParameters_035w; - float _410 = _408 - _409; - float _411 = _166 - _409; - float _412 = _411 / _410; - float _413 = saturate(_412); - float _414 = _413 * 2.0f; - float _415 = 3.0f - _414; - float _416 = _413 * _413; - float _417 = _416 * _415; - float _419 = _RootShaderParameters_029x; - float _420 = _RootShaderParameters_029y; - float _421 = _RootShaderParameters_029z; - float _422 = _RootShaderParameters_029w; - float _423 = _173 + _419; - float _424 = _174 + _420; - float _425 = _175 + _421; - float _426 = _176 + _422; - float _428 = _RootShaderParameters_028x; - float _429 = _RootShaderParameters_028y; - float _430 = _RootShaderParameters_028z; - float _431 = _RootShaderParameters_028w; - float _432 = _187 * _428; - float _433 = _188 * _429; - float _434 = _189 * _430; - float _435 = _190 * _431; - float _437 = _RootShaderParameters_027x; - float _438 = _RootShaderParameters_027y; - float _439 = _RootShaderParameters_027z; - float _440 = _RootShaderParameters_027w; - float _441 = _201 * _437; - float _442 = _202 * _438; - float _443 = _203 * _439; - float _444 = _204 * _440; - float _446 = _RootShaderParameters_026x; - float _447 = _RootShaderParameters_026y; - float _448 = _RootShaderParameters_026z; - float _449 = _RootShaderParameters_026w; - float _450 = _215 * _446; - float _451 = _216 * _447; - float _452 = _217 * _448; - float _453 = _218 * _449; - float _455 = _RootShaderParameters_025x; - float _456 = _RootShaderParameters_025y; - float _457 = _RootShaderParameters_025z; - float _458 = _RootShaderParameters_025w; - float _459 = _229 * _455; - float _460 = _230 * _456; - float _461 = _231 * _457; - float _462 = _232 * _458; - float _463 = _459 * _462; - float _464 = _460 * _462; - float _465 = _461 * _462; - float _466 = _463 * _240; - float _467 = _464 * _241; - float _468 = _465 * _242; - float _469 = _466 + _166; - float _470 = _467 + _166; - float _471 = _468 + _166; - float _472 = max(0.0f, _469); - float _473 = max(0.0f, _470); - float _474 = max(0.0f, _471); - float _475 = _450 * _453; - float _476 = _451 * _453; - float _477 = _452 * _453; - float _478 = _472 * 5.55555534362793f; - float _479 = _473 * 5.55555534362793f; - float _480 = _474 * 5.55555534362793f; - float _481 = log2(_478); - float _482 = log2(_479); - float _483 = log2(_480); - float _484 = _475 * _481; - float _485 = _476 * _482; - float _486 = _477 * _483; - float _487 = exp2(_484); - float _488 = exp2(_485); - float _489 = exp2(_486); - float _490 = _487 * 0.18000000715255737f; - float _491 = _488 * 0.18000000715255737f; - float _492 = _489 * 0.18000000715255737f; - float _493 = _441 * _444; - float _494 = _442 * _444; - float _495 = _443 * _444; - float _496 = 1.0f / _493; - float _497 = 1.0f / _494; - float _498 = 1.0f / _495; - float _499 = log2(_490); - float _500 = log2(_491); - float _501 = log2(_492); - float _502 = _499 * _496; - float _503 = _500 * _497; - float _504 = _501 * _498; - float _505 = exp2(_502); - float _506 = exp2(_503); - float _507 = exp2(_504); - float _508 = _432 * _435; - float _509 = _433 * _435; - float _510 = _434 * _435; - float _511 = _508 * _505; - float _512 = _509 * _506; - float _513 = _510 * _507; - float _514 = _423 + _426; - float _515 = _424 + _426; - float _516 = _425 + _426; - float _517 = _514 + _511; - float _518 = _515 + _512; - float _519 = _516 + _513; - float _520 = _304 - _417; - float _521 = _305 * _294; - float _522 = _305 * _295; - float _523 = _305 * _296; - float _524 = _517 * _520; - float _525 = _518 * _520; - float _526 = _519 * _520; - float _527 = _417 * _405; - float _528 = _417 * _406; - float _529 = _417 * _407; - float _530 = _527 + _521; - float _531 = _530 + _524; - float _532 = _528 + _522; - float _533 = _532 + _525; - float _534 = _529 + _523; - float _535 = _534 + _526; - float _537 = UniformBufferConstants_WorkingColorSpace_012x; - float _538 = UniformBufferConstants_WorkingColorSpace_012y; - float _539 = UniformBufferConstants_WorkingColorSpace_012z; - float _541 = UniformBufferConstants_WorkingColorSpace_013x; - float _542 = UniformBufferConstants_WorkingColorSpace_013y; - float _543 = UniformBufferConstants_WorkingColorSpace_013z; - float _545 = UniformBufferConstants_WorkingColorSpace_014x; - float _546 = UniformBufferConstants_WorkingColorSpace_014y; - float _547 = UniformBufferConstants_WorkingColorSpace_014z; - float _548 = _531 * _537; - float _549 = mad(_538, _533, _548); - float _550 = mad(_539, _535, _549); - float _551 = _541 * _531; - float _552 = mad(_542, _533, _551); - float _553 = mad(_543, _535, _552); - float _554 = _545 * _531; - float _555 = mad(_546, _533, _554); - float _556 = mad(_547, _535, _555); - float _557 = _RootShaderParameters_036y; - - float3 untonemapped_ap1 = float3(_531, _533, _535); // CustomEdit - - float _558 = _531 * 0.9386394023895264f; - float _559 = mad(-4.540197551250458e-09f, _533, _558); - float _560 = mad(0.061360642313957214f, _535, _559); - float _561 = _531 * 6.775371730327606e-08f; - float _562 = mad(0.8307942152023315f, _533, _561); - float _563 = mad(0.169205904006958f, _535, _562); - float _564 = _531 * -9.313225746154785e-10f; - float _565 = mad(-2.3283064365386963e-10f, _533, _564); - float _566 = _560 - _531; - float _567 = _563 - _533; - float _568 = _566 * _557; - float _569 = _567 * _557; - float _570 = _565 * _557; - float _571 = _568 + _531; - float _572 = _569 + _533; - float _573 = _570 + _535; - - float _574 = _571 * 0.6954522132873535f; - float _575 = mad(0.14067868888378143f, _572, _574); - float _576 = mad(0.16386905312538147f, _573, _575); - float _577 = _571 * 0.044794581830501556f; - float _578 = mad(0.8596711158752441f, _572, _577); - float _579 = mad(0.0955343246459961f, _573, _578); - float _580 = _571 * -0.005525882821530104f; - float _581 = mad(0.004025210160762072f, _572, _580); - float _582 = mad(1.0015007257461548f, _573, _581); - float _583 = min(_576, _579); - float _584 = min(_583, _582); - float _585 = max(_576, _579); - float _586 = max(_585, _582); - float _587 = max(_586, 1.000000013351432e-10f); - float _588 = max(_584, 1.000000013351432e-10f); - float _589 = _587 - _588; - float _590 = max(_586, 0.009999999776482582f); - float _591 = _589 / _590; - float _592 = _582 - _579; - float _593 = _592 * _582; - float _594 = _579 - _576; - float _595 = _594 * _579; - float _596 = _593 + _595; - float _597 = _576 - _582; - float _598 = _597 * _576; - float _599 = _596 + _598; - float _600 = sqrt(_599); - float _601 = _600 * 1.75f; - float _602 = _579 + _576; - float _603 = _602 + _582; - float _604 = _603 + _601; - float _605 = _604 * 0.3333333432674408f; - float _606 = _591 + -0.4000000059604645f; - float _607 = _606 * 5.0f; - float _608 = _606 * 2.5f; - float _609 = abs(_608); - float _610 = 1.0f - _609; - float _611 = max(_610, 0.0f); - bool _612 = (_607 > 0.0f); - bool _613 = (_607 < 0.0f); - int _614 = int(_612); - int _615 = int(_613); - int _616 = _614 - _615; - float _617 = float(_616); - float _618 = _611 * _611; - float _619 = 1.0f - _618; - float _620 = _617 * _619; - float _621 = _620 + 1.0f; - float _622 = _621 * 0.02500000037252903f; - bool _623 = !(_605 <= 0.0533333346247673f); - _631 = _622; - if (_623) { - bool _625 = !(_605 >= 0.1599999964237213f); - _631 = 0.0f; - if (_625) { - float _627 = 0.23999999463558197f / _604; - float _628 = _627 + -0.5f; - float _629 = _628 * _622; - _631 = _629; - } - } - float _632 = _631 + 1.0f; - float _633 = _632 * _576; - float _634 = _632 * _579; - float _635 = _632 * _582; - bool _636 = (_633 == _634); - bool _637 = (_634 == _635); - bool _638 = _636 && _637; - _667 = 0.0f; - if (!_638) { - float _640 = _633 * 2.0f; - float _641 = _640 - _634; - float _642 = _641 - _635; - float _643 = _579 - _582; - float _644 = _643 * 1.7320507764816284f; - float _645 = _644 * _632; - float _646 = _645 / _642; - float _647 = atan(_646); - float _648 = _647 + 3.1415927410125732f; - float _649 = _647 + -3.1415927410125732f; - bool _650 = (_642 < 0.0f); - bool _651 = (_642 == 0.0f); - bool _652 = (_645 >= 0.0f); - bool _653 = (_645 < 0.0f); - bool _654 = _652 && _650; - float _655 = _654 ? _648 : _647; - bool _656 = _653 && _650; - float _657 = _656 ? _649 : _655; - bool _658 = _653 && _651; - bool _659 = _652 && _651; - float _660 = _657 * 57.2957763671875f; - float _661 = _658 ? -90.0f : _660; - float _662 = _659 ? 90.0f : _661; - bool _663 = (_662 < 0.0f); - _667 = _662; - if (_663) { - float _665 = _662 + 360.0f; - _667 = _665; - } - } - float _668 = max(_667, 0.0f); - float _669 = min(_668, 360.0f); - bool _670 = (_669 < -180.0f); - if (_670) { - float _672 = _669 + 360.0f; - _678 = _672; - } else { - bool _674 = (_669 > 180.0f); - _678 = _669; - if (_674) { - float _676 = _669 + -360.0f; - _678 = _676; - } - } - float _679 = _678 * 0.014814814552664757f; - float _680 = abs(_679); - float _681 = 1.0f - _680; - float _682 = saturate(_681); - float _683 = _682 * 2.0f; - float _684 = 3.0f - _683; - float _685 = _682 * _682; - float _686 = _685 * _684; - float _687 = 0.029999999329447746f - _633; - float _688 = _591 * 0.18000000715255737f; - float _689 = _688 * _687; - float _690 = _686 * _686; - float _691 = _690 * _689; - float _692 = _691 + _633; - float _693 = _692 * 1.4514392614364624f; - float _694 = mad(-0.2365107536315918f, _634, _693); - float _695 = mad(-0.21492856740951538f, _635, _694); - float _696 = _692 * -0.07655377686023712f; - float _697 = mad(1.17622971534729f, _634, _696); - float _698 = mad(-0.09967592358589172f, _635, _697); - float _699 = _692 * 0.008316148072481155f; - float _700 = mad(-0.006032449658960104f, _634, _699); - float _701 = mad(0.9977163076400757f, _635, _700); - float _702 = max(0.0f, _695); - float _703 = max(0.0f, _698); - float _704 = max(0.0f, _701); - float _705 = dot(float3(_702, _703, _704), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _706 = _702 - _705; - float _707 = _703 - _705; - float _708 = _704 - _705; - float _709 = _706 * 0.9599999785423279f; - float _710 = _707 * 0.9599999785423279f; - float _711 = _708 * 0.9599999785423279f; - float _712 = _709 + _705; - float _713 = _710 + _705; - float _714 = _711 + _705; - - float _716 = _RootShaderParameters_037w; - float _717 = _716 + 1.0f; - float _718 = _RootShaderParameters_037y; - float _719 = _717 - _718; - float _721 = _RootShaderParameters_038x; - float _722 = _721 + 1.0f; - float _723 = _RootShaderParameters_037z; - float _724 = _722 - _723; - - bool _725 = (_718 > 0.800000011920929f); - float _726 = _RootShaderParameters_037x; - if (_725) { - float _728 = 0.8199999928474426f - _718; - float _729 = _728 / _726; - float _730 = _729 + -0.7447274923324585f; - _742 = _730; - } else { - float _732 = _716 + 0.18000000715255737f; - float _733 = _732 / _719; - float _734 = 2.0f - _733; - float _735 = _733 / _734; - float _736 = log2(_735); - float _737 = _736 * 0.3465735912322998f; - float _738 = _719 / _726; - float _739 = _737 * _738; - float _740 = -0.7447274923324585f - _739; - _742 = _740; - } - float _743 = 1.0f - _718; - float _744 = _743 / _726; - float _745 = _744 - _742; - float _746 = _723 / _726; - float _747 = _746 - _745; - float _748 = log2(_712); - float _749 = log2(_713); - float _750 = log2(_714); - float _751 = _748 * 0.3010300099849701f; - float _752 = _749 * 0.3010300099849701f; - float _753 = _750 * 0.3010300099849701f; - float _754 = _751 + _745; - float _755 = _752 + _745; - float _756 = _753 + _745; - float _757 = _726 * _754; - float _758 = _726 * _755; - float _759 = _726 * _756; - float _760 = _719 * 2.0f; - float _761 = _726 * -2.0f; - float _762 = _761 / _719; - float _763 = _751 - _742; - float _764 = _752 - _742; - float _765 = _753 - _742; - float _766 = _763 * 1.4426950216293335f; - float _767 = _766 * _762; - float _768 = _764 * 1.4426950216293335f; - float _769 = _768 * _762; - float _770 = _765 * 1.4426950216293335f; - float _771 = _770 * _762; - float _772 = exp2(_767); - float _773 = exp2(_769); - float _774 = exp2(_771); - float _775 = _772 + 1.0f; - float _776 = _773 + 1.0f; - float _777 = _774 + 1.0f; - float _778 = _760 / _775; - float _779 = _760 / _776; - float _780 = _760 / _777; - float _781 = _778 - _716; - float _782 = _779 - _716; - float _783 = _780 - _716; - float _784 = _724 * 2.0f; - float _785 = _726 * 2.0f; - float _786 = _785 / _724; - float _787 = _751 - _747; - float _788 = _752 - _747; - float _789 = _753 - _747; - float _790 = _787 * 1.4426950216293335f; - float _791 = _790 * _786; - float _792 = _788 * 1.4426950216293335f; - float _793 = _792 * _786; - float _794 = _789 * 1.4426950216293335f; - float _795 = _794 * _786; - float _796 = exp2(_791); - float _797 = exp2(_793); - float _798 = exp2(_795); - float _799 = _796 + 1.0f; - float _800 = _797 + 1.0f; - float _801 = _798 + 1.0f; - float _802 = _784 / _799; - float _803 = _784 / _800; - float _804 = _784 / _801; - float _805 = _722 - _802; - float _806 = _722 - _803; - float _807 = _722 - _804; - bool _808 = (_751 < _742); - bool _809 = (_752 < _742); - bool _810 = (_753 < _742); - float _811 = _808 ? _781 : _757; - float _812 = _809 ? _782 : _758; - float _813 = _810 ? _783 : _759; - bool _814 = (_751 > _747); - bool _815 = (_752 > _747); - bool _816 = (_753 > _747); - float _817 = _814 ? _805 : _757; - float _818 = _815 ? _806 : _758; - float _819 = _816 ? _807 : _759; - float _820 = _747 - _742; - float _821 = _763 / _820; - float _822 = _764 / _820; - float _823 = _765 / _820; - float _824 = saturate(_821); - float _825 = saturate(_822); - float _826 = saturate(_823); - bool _827 = (_747 < _742); - float _828 = 1.0f - _824; - float _829 = 1.0f - _825; - float _830 = 1.0f - _826; - float _831 = _827 ? _828 : _824; - float _832 = _827 ? _829 : _825; - float _833 = _827 ? _830 : _826; - float _834 = _831 * 2.0f; - float _835 = _832 * 2.0f; - float _836 = _833 * 2.0f; - float _837 = 3.0f - _834; - float _838 = 3.0f - _835; - float _839 = 3.0f - _836; - float _840 = _817 - _811; - float _841 = _818 - _812; - float _842 = _819 - _813; - float _843 = _831 * _831; - float _844 = _843 * _840; - float _845 = _844 * _837; - float _846 = _832 * _832; - float _847 = _846 * _841; - float _848 = _847 * _838; - float _849 = _833 * _833; - float _850 = _849 * _842; - float _851 = _850 * _839; - float _852 = _845 + _811; - float _853 = _848 + _812; - float _854 = _851 + _813; - float _855 = dot(float3(_852, _853, _854), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _856 = _852 - _855; - float _857 = _853 - _855; - float _858 = _854 - _855; - float _859 = _856 * 0.9300000071525574f; - float _860 = _857 * 0.9300000071525574f; - float _861 = _858 * 0.9300000071525574f; - float _862 = _859 + _855; - float _863 = _860 + _855; - float _864 = _861 + _855; - float _865 = max(0.0f, _862); - float _866 = max(0.0f, _863); - float _867 = max(0.0f, _864); - - float _868 = _RootShaderParameters_036w; - float _869 = _865 - _571; - float _870 = _866 - _572; - float _871 = _867 - _573; - - float _872 = _868 * _869; - float _873 = _868 * _870; - float _874 = _868 * _871; - float _875 = _872 + _571; - float _876 = _873 + _572; - float _877 = _874 + _573; - float _878 = _875 * 1.065374732017517f; - float _879 = mad(1.451815478503704e-06f, _876, _878); - float _880 = mad(-0.06537103652954102f, _877, _879); - float _881 = _875 * -2.57161445915699e-07f; - float _882 = mad(1.2036634683609009f, _876, _881); - float _883 = mad(-0.20366770029067993f, _877, _882); - float _884 = _875 * 1.862645149230957e-08f; - float _885 = mad(2.0954757928848267e-08f, _876, _884); - float _886 = mad(0.9999996423721313f, _877, _885); - float _887 = _880 - _875; - float _888 = _883 - _876; - float _889 = _886 - _877; - float _890 = _887 * _557; - float _891 = _888 * _557; - float _892 = _889 * _557; - float _893 = _890 + _875; - float _894 = _891 + _876; - float _895 = _892 + _877; - float _896 = _537 * _893; - float _897 = mad(_538, _894, _896); - float _898 = mad(_539, _895, _897); - float _899 = _541 * _893; - float _900 = mad(_542, _894, _899); - float _901 = mad(_543, _895, _900); - float _902 = _545 * _893; - float _903 = mad(_546, _894, _902); - float _904 = mad(_547, _895, _903); - float _905 = max(0.0f, _898); - float _906 = max(0.0f, _901); - float _907 = max(0.0f, _904); - - float _908 = saturate(_905); - float _909 = saturate(_906); - float _910 = saturate(_907); - bool _911 = (_908 < 0.0031306699384003878f); - if (_911) { - float _913 = _908 * 12.920000076293945f; - _921 = _913; - } else { - float _915 = log2(_908); - float _916 = _915 * 0.4166666567325592f; - float _917 = exp2(_916); - float _918 = _917 * 1.0549999475479126f; - float _919 = _918 + -0.054999999701976776f; - _921 = _919; - } - bool _922 = (_909 < 0.0031306699384003878f); - if (_922) { - float _924 = _909 * 12.920000076293945f; - _932 = _924; - } else { - float _926 = log2(_909); - float _927 = _926 * 0.4166666567325592f; - float _928 = exp2(_927); - float _929 = _928 * 1.0549999475479126f; - float _930 = _929 + -0.054999999701976776f; - _932 = _930; - } - bool _933 = (_910 < 0.0031306699384003878f); - if (_933) { - float _935 = _910 * 12.920000076293945f; - _943 = _935; - } else { - float _937 = log2(_910); - float _938 = _937 * 0.4166666567325592f; - float _939 = exp2(_938); - float _940 = _939 * 1.0549999475479126f; - float _941 = _940 + -0.054999999701976776f; - _943 = _941; - } - float _944 = _921 * 0.9375f; - float _945 = _932 * 0.9375f; - float _946 = _944 + 0.03125f; - float _947 = _945 + 0.03125f; - float _949 = _RootShaderParameters_005x; - float _950 = _949 * _921; - float _951 = _949 * _932; - float _952 = _949 * _943; - float _953 = _RootShaderParameters_005y; - float _954 = _943 * 15.0f; - float _955 = floor(_954); - float _956 = _954 - _955; - float _957 = _946 + _955; - float _958 = _957 * 0.0625f; - // _959 = _1; - // _960 = _2; - float4 _961 = Textures_1.Sample(Samplers_1, float2(_958, _947)); - float _962 = _961.x; - float _963 = _961.y; - float _964 = _961.z; - float _965 = _958 + 0.0625f; - // _966 = _1; - // _967 = _2; - float4 _968 = Textures_1.Sample(Samplers_1, float2(_965, _947)); - float _969 = _968.x; - float _970 = _968.y; - float _971 = _968.z; - float _972 = _969 - _962; - float _973 = _970 - _963; - float _974 = _971 - _964; - float _975 = _972 * _956; - float _976 = _973 * _956; - float _977 = _974 * _956; - float _978 = _975 + _962; - float _979 = _976 + _963; - float _980 = _977 + _964; - float _981 = _978 * _953; - float _982 = _979 * _953; - float _983 = _980 * _953; - float _984 = _981 + _950; - float _985 = _982 + _951; - float _986 = _983 + _952; - float _987 = max(6.103519990574569e-05f, _984); - float _988 = max(6.103519990574569e-05f, _985); - float _989 = max(6.103519990574569e-05f, _986); - float _990 = _987 * 0.07739938050508499f; - float _991 = _988 * 0.07739938050508499f; - float _992 = _989 * 0.07739938050508499f; - float _993 = _987 * 0.9478672742843628f; - float _994 = _988 * 0.9478672742843628f; - float _995 = _989 * 0.9478672742843628f; - float _996 = _993 + 0.05213269963860512f; - float _997 = _994 + 0.05213269963860512f; - float _998 = _995 + 0.05213269963860512f; - float _999 = log2(_996); - float _1000 = log2(_997); - float _1001 = log2(_998); - float _1002 = _999 * 2.4000000953674316f; - float _1003 = _1000 * 2.4000000953674316f; - float _1004 = _1001 * 2.4000000953674316f; - float _1005 = exp2(_1002); - float _1006 = exp2(_1003); - float _1007 = exp2(_1004); - bool _1008 = (_987 > 0.040449999272823334f); - bool _1009 = (_988 > 0.040449999272823334f); - bool _1010 = (_989 > 0.040449999272823334f); - float _1011 = _1008 ? _1005 : _990; - float _1012 = _1009 ? _1006 : _991; - float _1013 = _1010 ? _1007 : _992; - - float _1015 = _RootShaderParameters_039x; - float _1016 = _1015 * _1011; - float _1017 = _1015 * _1012; - float _1018 = _1015 * _1013; - float _1019 = _RootShaderParameters_039y; // Main brightness value - - float _1020 = _RootShaderParameters_039z; - - float _1021 = _1019 + _1016; - float _1022 = _1021 * _1011; - float _1023 = _1022 + _1020; - float _1024 = _1019 + _1017; - float _1025 = _1024 * _1012; - float _1026 = _1025 + _1020; - float _1027 = _1019 + _1018; - float _1028 = _1027 * _1013; - float _1029 = _1028 + _1020; - - float _1031 = _RootShaderParameters_013w; - float _1032 = _RootShaderParameters_013x; - float _1033 = _RootShaderParameters_013y; - float _1034 = _RootShaderParameters_013z; - float _1036 = _RootShaderParameters_014x; - float _1037 = _RootShaderParameters_014y; - float _1038 = _RootShaderParameters_014z; - - float _1039 = _1036 * _1023; - float _1040 = _1037 * _1026; - float _1041 = _1038 * _1029; - float _1042 = _1032 - _1039; - float _1043 = _1033 - _1040; - float _1044 = _1034 - _1041; - float _1045 = _1042 * _1031; - float _1046 = _1043 * _1031; - float _1047 = _1044 * _1031; - float _1048 = _1045 + _1039; - float _1049 = _1046 + _1040; - float _1050 = _1047 + _1041; - float _1051 = _1036 * _550; - float _1052 = _1037 * _553; - float _1053 = _1038 * _556; - float _1054 = _1032 - _1051; - float _1055 = _1033 - _1052; - float _1056 = _1034 - _1053; - float _1057 = _1054 * _1031; - float _1058 = _1055 * _1031; - float _1059 = _1056 * _1031; - float _1060 = _1057 + _1051; - float _1061 = _1058 + _1052; - float _1062 = _1059 + _1053; - - float _1064 = _RootShaderParameters_040y; - float _1065 = max(0.0f, _1048); - float _1066 = max(0.0f, _1049); - float _1067 = max(0.0f, _1050); - float _1068 = log2(_1065); - float _1069 = log2(_1066); - float _1070 = log2(_1067); - float _1071 = _1068 * _1064; - float _1072 = _1069 * _1064; - float _1073 = _1070 * _1064; - float _1074 = exp2(_1071); - float _1075 = exp2(_1072); - float _1076 = exp2(_1073); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_1074, _1075, _1076)); - } - - uint _1078 = _RootShaderParameters_040w; - bool _1079 = (_1078 == 0); - if (_1079) { - uint _1082 = UniformBufferConstants_WorkingColorSpace_020x; - bool _1083 = (_1082 == 0); - _1116 = _1074; - _1117 = _1075; - _1118 = _1076; - do { - if (_1083) { - float _1086 = UniformBufferConstants_WorkingColorSpace_008x; - float _1087 = UniformBufferConstants_WorkingColorSpace_008y; - float _1088 = UniformBufferConstants_WorkingColorSpace_008z; - float _1090 = UniformBufferConstants_WorkingColorSpace_009x; - float _1091 = UniformBufferConstants_WorkingColorSpace_009y; - float _1092 = UniformBufferConstants_WorkingColorSpace_009z; - float _1094 = UniformBufferConstants_WorkingColorSpace_010x; - float _1095 = UniformBufferConstants_WorkingColorSpace_010y; - float _1096 = UniformBufferConstants_WorkingColorSpace_010z; - float _1097 = _1086 * _1074; - float _1098 = mad(_1087, _1075, _1097); - float _1099 = mad(_1088, _1076, _1098); - float _1100 = _1090 * _1074; - float _1101 = mad(_1091, _1075, _1100); - float _1102 = mad(_1092, _1076, _1101); - float _1103 = _1094 * _1074; - float _1104 = mad(_1095, _1075, _1103); - float _1105 = mad(_1096, _1076, _1104); - float _1106 = _1099 * _39; - float _1107 = mad(_40, _1102, _1106); - float _1108 = mad(_41, _1105, _1107); - float _1109 = _1099 * _42; - float _1110 = mad(_43, _1102, _1109); - float _1111 = mad(_44, _1105, _1110); - float _1112 = _1099 * _45; - float _1113 = mad(_46, _1102, _1112); - float _1114 = mad(_47, _1105, _1113); - _1116 = _1108; - _1117 = _1111; - _1118 = _1114; - } - bool _1119 = (_1116 < 0.0031306699384003878f); - do { - if (_1119) { - float _1121 = _1116 * 12.920000076293945f; - _1129 = _1121; - } else { - float _1123 = log2(_1116); - float _1124 = _1123 * 0.4166666567325592f; - float _1125 = exp2(_1124); - float _1126 = _1125 * 1.0549999475479126f; - float _1127 = _1126 + -0.054999999701976776f; - _1129 = _1127; - } - bool _1130 = (_1117 < 0.0031306699384003878f); - do { - if (_1130) { - float _1132 = _1117 * 12.920000076293945f; - _1140 = _1132; - } else { - float _1134 = log2(_1117); - float _1135 = _1134 * 0.4166666567325592f; - float _1136 = exp2(_1135); - float _1137 = _1136 * 1.0549999475479126f; - float _1138 = _1137 + -0.054999999701976776f; - _1140 = _1138; - } - bool _1141 = (_1118 < 0.0031306699384003878f); - if (_1141) { - float _1143 = _1118 * 12.920000076293945f; - _2500 = _1129; - _2501 = _1140; - _2502 = _1143; - } else { - float _1145 = log2(_1118); - float _1146 = _1145 * 0.4166666567325592f; - float _1147 = exp2(_1146); - float _1148 = _1147 * 1.0549999475479126f; - float _1149 = _1148 + -0.054999999701976776f; - _2500 = _1129; - _2501 = _1140; - _2502 = _1149; - } - } while (false); - } while (false); - } while (false); - } else { - bool _1151 = (_1078 == 1); - if (_1151) { - float _1154 = UniformBufferConstants_WorkingColorSpace_008x; - float _1155 = UniformBufferConstants_WorkingColorSpace_008y; - float _1156 = UniformBufferConstants_WorkingColorSpace_008z; - float _1158 = UniformBufferConstants_WorkingColorSpace_009x; - float _1159 = UniformBufferConstants_WorkingColorSpace_009y; - float _1160 = UniformBufferConstants_WorkingColorSpace_009z; - float _1162 = UniformBufferConstants_WorkingColorSpace_010x; - float _1163 = UniformBufferConstants_WorkingColorSpace_010y; - float _1164 = UniformBufferConstants_WorkingColorSpace_010z; - float _1165 = _1154 * _1074; - float _1166 = mad(_1155, _1075, _1165); - float _1167 = mad(_1156, _1076, _1166); - float _1168 = _1158 * _1074; - float _1169 = mad(_1159, _1075, _1168); - float _1170 = mad(_1160, _1076, _1169); - float _1171 = _1162 * _1074; - float _1172 = mad(_1163, _1075, _1171); - float _1173 = mad(_1164, _1076, _1172); - float _1174 = _1167 * _39; - float _1175 = mad(_40, _1170, _1174); - float _1176 = mad(_41, _1173, _1175); - float _1177 = _1167 * _42; - float _1178 = mad(_43, _1170, _1177); - float _1179 = mad(_44, _1173, _1178); - float _1180 = _1167 * _45; - float _1181 = mad(_46, _1170, _1180); - float _1182 = mad(_47, _1173, _1181); - float _1183 = max(6.103519990574569e-05f, _1176); - float _1184 = max(6.103519990574569e-05f, _1179); - float _1185 = max(6.103519990574569e-05f, _1182); - float _1186 = max(_1183, 0.017999999225139618f); - float _1187 = max(_1184, 0.017999999225139618f); - float _1188 = max(_1185, 0.017999999225139618f); - float _1189 = log2(_1186); - float _1190 = log2(_1187); - float _1191 = log2(_1188); - float _1192 = _1189 * 0.44999998807907104f; - float _1193 = _1190 * 0.44999998807907104f; - float _1194 = _1191 * 0.44999998807907104f; - float _1195 = exp2(_1192); - float _1196 = exp2(_1193); - float _1197 = exp2(_1194); - float _1198 = _1195 * 1.0989999771118164f; - float _1199 = _1196 * 1.0989999771118164f; - float _1200 = _1197 * 1.0989999771118164f; - float _1201 = _1198 + -0.0989999994635582f; - float _1202 = _1199 + -0.0989999994635582f; - float _1203 = _1200 + -0.0989999994635582f; - float _1204 = _1183 * 4.5f; - float _1205 = _1184 * 4.5f; - float _1206 = _1185 * 4.5f; - float _1207 = min(_1204, _1201); - float _1208 = min(_1205, _1202); - float _1209 = min(_1206, _1203); - _2500 = _1207; - _2501 = _1208; - _2502 = _1209; - } else { - bool _1211 = (_1078 == 3); - bool _1212 = (_1078 == 5); - bool _1213 = _1211 || _1212; - if (_1213) { - // %1215 = bitcast [6 x float]* %12 to i8* - // %1216 = bitcast [6 x float]* %13 to i8* - float _1218 = _RootShaderParameters_012z; - float _1219 = _RootShaderParameters_012y; - float _1220 = _RootShaderParameters_012x; - float _1222 = _RootShaderParameters_011x; - float _1223 = _RootShaderParameters_011y; - float _1224 = _RootShaderParameters_011z; - float _1225 = _RootShaderParameters_011w; - float _1227 = _RootShaderParameters_010x; - float _1228 = _RootShaderParameters_010y; - float _1229 = _RootShaderParameters_010z; - float _1230 = _RootShaderParameters_010w; - float _1232 = _RootShaderParameters_009x; - float _1234 = _RootShaderParameters_008x; - float _1235 = _RootShaderParameters_008y; - float _1236 = _RootShaderParameters_008z; - float _1237 = _RootShaderParameters_008w; - _12[0] = _1227; - _12[1] = _1228; - _12[2] = _1229; - _12[3] = _1230; - _12[4] = _1220; - _12[5] = _1220; - _13[0] = _1222; - _13[1] = _1223; - _13[2] = _1224; - _13[3] = _1225; - _13[4] = _1219; - _13[5] = _1219; - float _1251 = UniformBufferConstants_WorkingColorSpace_016x; - float _1252 = UniformBufferConstants_WorkingColorSpace_016y; - float _1253 = UniformBufferConstants_WorkingColorSpace_016z; - float _1255 = UniformBufferConstants_WorkingColorSpace_017x; - float _1256 = UniformBufferConstants_WorkingColorSpace_017y; - float _1257 = UniformBufferConstants_WorkingColorSpace_017z; - float _1259 = UniformBufferConstants_WorkingColorSpace_018x; - float _1260 = UniformBufferConstants_WorkingColorSpace_018y; - float _1261 = UniformBufferConstants_WorkingColorSpace_018z; - float _1262 = _1218 * _1060; - float _1263 = _1218 * _1061; - float _1264 = _1218 * _1062; - float _1265 = _1251 * _1262; - float _1266 = mad(_1252, _1263, _1265); - float _1267 = mad(_1253, _1264, _1266); - float _1268 = _1255 * _1262; - float _1269 = mad(_1256, _1263, _1268); - float _1270 = mad(_1257, _1264, _1269); - float _1271 = _1259 * _1262; - float _1272 = mad(_1260, _1263, _1271); - float _1273 = mad(_1261, _1264, _1272); - float _1274 = min(_1267, _1270); - float _1275 = min(_1274, _1273); - float _1276 = max(_1267, _1270); - float _1277 = max(_1276, _1273); - float _1278 = max(_1277, 1.000000013351432e-10f); - float _1279 = max(_1275, 1.000000013351432e-10f); - float _1280 = _1278 - _1279; - float _1281 = max(_1277, 0.009999999776482582f); - float _1282 = _1280 / _1281; - float _1283 = _1273 - _1270; - float _1284 = _1283 * _1273; - float _1285 = _1270 - _1267; - float _1286 = _1285 * _1270; - float _1287 = _1284 + _1286; - float _1288 = _1267 - _1273; - float _1289 = _1288 * _1267; - float _1290 = _1287 + _1289; - float _1291 = sqrt(_1290); - float _1292 = _1291 * 1.75f; - float _1293 = _1270 + _1267; - float _1294 = _1293 + _1273; - float _1295 = _1294 + _1292; - float _1296 = _1295 * 0.3333333432674408f; - float _1297 = _1282 + -0.4000000059604645f; - float _1298 = _1297 * 5.0f; - float _1299 = _1297 * 2.5f; - float _1300 = abs(_1299); - float _1301 = 1.0f - _1300; - float _1302 = max(_1301, 0.0f); - bool _1303 = (_1298 > 0.0f); - bool _1304 = (_1298 < 0.0f); - int _1305 = int(_1303); - int _1306 = int(_1304); - int _1307 = _1305 - _1306; - float _1308 = float(_1307); - float _1309 = _1302 * _1302; - float _1310 = 1.0f - _1309; - float _1311 = _1308 * _1310; - float _1312 = _1311 + 1.0f; - float _1313 = _1312 * 0.02500000037252903f; - bool _1314 = !(_1296 <= 0.0533333346247673f); - _1322 = _1313; - do { - if (_1314) { - bool _1316 = !(_1296 >= 0.1599999964237213f); - _1322 = 0.0f; - if (_1316) { - float _1318 = 0.23999999463558197f / _1295; - float _1319 = _1318 + -0.5f; - float _1320 = _1319 * _1313; - _1322 = _1320; - } - } - float _1323 = _1322 + 1.0f; - float _1324 = _1323 * _1267; - float _1325 = _1323 * _1270; - float _1326 = _1323 * _1273; - bool _1327 = (_1324 == _1325); - bool _1328 = (_1325 == _1326); - bool _1329 = _1327 && _1328; - _1358 = 0.0f; - do { - if (!_1329) { - float _1331 = _1324 * 2.0f; - float _1332 = _1331 - _1325; - float _1333 = _1332 - _1326; - float _1334 = _1270 - _1273; - float _1335 = _1334 * 1.7320507764816284f; - float _1336 = _1335 * _1323; - float _1337 = _1336 / _1333; - float _1338 = atan(_1337); - float _1339 = _1338 + 3.1415927410125732f; - float _1340 = _1338 + -3.1415927410125732f; - bool _1341 = (_1333 < 0.0f); - bool _1342 = (_1333 == 0.0f); - bool _1343 = (_1336 >= 0.0f); - bool _1344 = (_1336 < 0.0f); - bool _1345 = _1343 && _1341; - float _1346 = _1345 ? _1339 : _1338; - bool _1347 = _1344 && _1341; - float _1348 = _1347 ? _1340 : _1346; - bool _1349 = _1344 && _1342; - bool _1350 = _1343 && _1342; - float _1351 = _1348 * 57.2957763671875f; - float _1352 = _1349 ? -90.0f : _1351; - float _1353 = _1350 ? 90.0f : _1352; - bool _1354 = (_1353 < 0.0f); - _1358 = _1353; - if (_1354) { - float _1356 = _1353 + 360.0f; - _1358 = _1356; - } - } - float _1359 = max(_1358, 0.0f); - float _1360 = min(_1359, 360.0f); - bool _1361 = (_1360 < -180.0f); - do { - if (_1361) { - float _1363 = _1360 + 360.0f; - _1369 = _1363; - } else { - bool _1365 = (_1360 > 180.0f); - _1369 = _1360; - if (_1365) { - float _1367 = _1360 + -360.0f; - _1369 = _1367; - } - } - bool _1370 = (_1369 > -67.5f); - bool _1371 = (_1369 < 67.5f); - bool _1372 = _1370 && _1371; - _1408 = 0.0f; - do { - if (_1372) { - float _1374 = _1369 + 67.5f; - float _1375 = _1374 * 0.029629629105329514f; - int _1376 = int(_1375); - float _1377 = float(_1376); - float _1378 = _1375 - _1377; - float _1379 = _1378 * _1378; - float _1380 = _1379 * _1378; - bool _1381 = (_1376 == 3); - if (_1381) { - float _1383 = _1380 * 0.1666666716337204f; - float _1384 = _1379 * 0.5f; - float _1385 = _1378 * 0.5f; - float _1386 = 0.1666666716337204f - _1385; - float _1387 = _1386 + _1384; - float _1388 = _1387 - _1383; - _1408 = _1388; - } else { - bool _1390 = (_1376 == 2); - if (_1390) { - float _1392 = _1380 * 0.5f; - float _1393 = 0.6666666865348816f - _1379; - float _1394 = _1393 + _1392; - _1408 = _1394; - } else { - bool _1396 = (_1376 == 1); - if (_1396) { - float _1398 = _1380 * -0.5f; - float _1399 = _1379 + _1378; - float _1400 = _1399 * 0.5f; - float _1401 = _1398 + 0.1666666716337204f; - float _1402 = _1401 + _1400; - _1408 = _1402; - } else { - bool _1404 = (_1376 == 0); - float _1405 = _1380 * 0.1666666716337204f; - float _1406 = _1404 ? _1405 : 0.0f; - _1408 = _1406; - } - } - } - } - float _1409 = 0.029999999329447746f - _1324; - float _1410 = _1282 * 0.27000001072883606f; - float _1411 = _1410 * _1409; - float _1412 = _1411 * _1408; - float _1413 = _1412 + _1324; - float _1414 = max(_1413, 0.0f); - float _1415 = max(_1325, 0.0f); - float _1416 = max(_1326, 0.0f); - float _1417 = min(_1414, 65535.0f); - float _1418 = min(_1415, 65535.0f); - float _1419 = min(_1416, 65535.0f); - float _1420 = _1417 * 1.4514392614364624f; - float _1421 = mad(-0.2365107536315918f, _1418, _1420); - float _1422 = mad(-0.21492856740951538f, _1419, _1421); - float _1423 = _1417 * -0.07655377686023712f; - float _1424 = mad(1.17622971534729f, _1418, _1423); - float _1425 = mad(-0.09967592358589172f, _1419, _1424); - float _1426 = _1417 * 0.008316148072481155f; - float _1427 = mad(-0.006032449658960104f, _1418, _1426); - float _1428 = mad(0.9977163076400757f, _1419, _1427); - float _1429 = max(_1422, 0.0f); - float _1430 = max(_1425, 0.0f); - float _1431 = max(_1428, 0.0f); - float _1432 = min(_1429, 65504.0f); - float _1433 = min(_1430, 65504.0f); - float _1434 = min(_1431, 65504.0f); - float _1435 = dot(float3(_1432, _1433, _1434), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1436 = _1432 - _1435; - float _1437 = _1433 - _1435; - float _1438 = _1434 - _1435; - float _1439 = _1436 * 0.9599999785423279f; - float _1440 = _1437 * 0.9599999785423279f; - float _1441 = _1438 * 0.9599999785423279f; - float _1442 = _1439 + _1435; - float _1443 = _1440 + _1435; - float _1444 = _1441 + _1435; - float _1445 = max(_1442, 1.000000013351432e-10f); - float _1446 = log2(_1445); - float _1447 = _1446 * 0.3010300099849701f; - float _1448 = log2(_1234); - float _1449 = _1448 * 0.3010300099849701f; - bool _1450 = !(_1447 <= _1449); - do { - if (!_1450) { - float _1452 = log2(_1235); - float _1453 = _1452 * 0.3010300099849701f; - _1518 = _1453; - } else { - bool _1455 = (_1447 > _1449); - float _1456 = log2(_1232); - float _1457 = _1456 * 0.3010300099849701f; - bool _1458 = (_1447 < _1457); - bool _1459 = _1455 && _1458; - if (_1459) { - float _1461 = _1446 - _1448; - float _1462 = _1461 * 0.9030900001525879f; - float _1463 = _1456 - _1448; - float _1464 = _1463 * 0.3010300099849701f; - float _1465 = _1462 / _1464; - int _1466 = int(_1465); - float _1467 = float(_1466); - float _1468 = _1465 - _1467; - float _1470 = _12[_1466]; - int _1471 = _1466 + 1; - float _1473 = _12[_1471]; - int _1474 = _1466 + 2; - float _1476 = _12[_1474]; - float _1477 = _1468 * _1468; - float _1478 = _1470 * 0.5f; - float _1479 = mad(_1473, -1.0f, _1478); - float _1480 = mad(_1476, 0.5f, _1479); - float _1481 = _1473 - _1470; - float _1482 = mad(_1473, 0.5f, _1478); - float _1483 = dot(float3(_1477, _1468, 1.0f), float3(_1480, _1481, _1482)); - _1518 = _1483; - } else { - bool _1485 = !(_1447 >= _1457); - do { - if (!_1485) { - float _1487 = log2(_1236); - float _1488 = _1487 * 0.3010300099849701f; - bool _1489 = (_1447 < _1488); - if (_1489) { - float _1491 = _1446 - _1456; - float _1492 = _1491 * 0.9030900001525879f; - float _1493 = _1487 - _1456; - float _1494 = _1493 * 0.3010300099849701f; - float _1495 = _1492 / _1494; - int _1496 = int(_1495); - float _1497 = float(_1496); - float _1498 = _1495 - _1497; - float _1500 = _13[_1496]; - int _1501 = _1496 + 1; - float _1503 = _13[_1501]; - int _1504 = _1496 + 2; - float _1506 = _13[_1504]; - float _1507 = _1498 * _1498; - float _1508 = _1500 * 0.5f; - float _1509 = mad(_1503, -1.0f, _1508); - float _1510 = mad(_1506, 0.5f, _1509); - float _1511 = _1503 - _1500; - float _1512 = mad(_1503, 0.5f, _1508); - float _1513 = dot(float3(_1507, _1498, 1.0f), float3(_1510, _1511, _1512)); - _1518 = _1513; - break; - } - } - float _1515 = log2(_1237); - float _1516 = _1515 * 0.3010300099849701f; - _1518 = _1516; - } while (false); - } - } - float _1519 = _1518 * 3.321928024291992f; - float _1520 = exp2(_1519); - float _1521 = max(_1443, 1.000000013351432e-10f); - float _1522 = log2(_1521); - float _1523 = _1522 * 0.3010300099849701f; - bool _1524 = !(_1523 <= _1449); - do { - if (!_1524) { - float _1526 = log2(_1235); - float _1527 = _1526 * 0.3010300099849701f; - _1592 = _1527; - } else { - bool _1529 = (_1523 > _1449); - float _1530 = log2(_1232); - float _1531 = _1530 * 0.3010300099849701f; - bool _1532 = (_1523 < _1531); - bool _1533 = _1529 && _1532; - if (_1533) { - float _1535 = _1522 - _1448; - float _1536 = _1535 * 0.9030900001525879f; - float _1537 = _1530 - _1448; - float _1538 = _1537 * 0.3010300099849701f; - float _1539 = _1536 / _1538; - int _1540 = int(_1539); - float _1541 = float(_1540); - float _1542 = _1539 - _1541; - float _1544 = _12[_1540]; - int _1545 = _1540 + 1; - float _1547 = _12[_1545]; - int _1548 = _1540 + 2; - float _1550 = _12[_1548]; - float _1551 = _1542 * _1542; - float _1552 = _1544 * 0.5f; - float _1553 = mad(_1547, -1.0f, _1552); - float _1554 = mad(_1550, 0.5f, _1553); - float _1555 = _1547 - _1544; - float _1556 = mad(_1547, 0.5f, _1552); - float _1557 = dot(float3(_1551, _1542, 1.0f), float3(_1554, _1555, _1556)); - _1592 = _1557; - } else { - bool _1559 = !(_1523 >= _1531); - do { - if (!_1559) { - float _1561 = log2(_1236); - float _1562 = _1561 * 0.3010300099849701f; - bool _1563 = (_1523 < _1562); - if (_1563) { - float _1565 = _1522 - _1530; - float _1566 = _1565 * 0.9030900001525879f; - float _1567 = _1561 - _1530; - float _1568 = _1567 * 0.3010300099849701f; - float _1569 = _1566 / _1568; - int _1570 = int(_1569); - float _1571 = float(_1570); - float _1572 = _1569 - _1571; - float _1574 = _13[_1570]; - int _1575 = _1570 + 1; - float _1577 = _13[_1575]; - int _1578 = _1570 + 2; - float _1580 = _13[_1578]; - float _1581 = _1572 * _1572; - float _1582 = _1574 * 0.5f; - float _1583 = mad(_1577, -1.0f, _1582); - float _1584 = mad(_1580, 0.5f, _1583); - float _1585 = _1577 - _1574; - float _1586 = mad(_1577, 0.5f, _1582); - float _1587 = dot(float3(_1581, _1572, 1.0f), float3(_1584, _1585, _1586)); - _1592 = _1587; - break; - } - } - float _1589 = log2(_1237); - float _1590 = _1589 * 0.3010300099849701f; - _1592 = _1590; - } while (false); - } - } - float _1593 = _1592 * 3.321928024291992f; - float _1594 = exp2(_1593); - float _1595 = max(_1444, 1.000000013351432e-10f); - float _1596 = log2(_1595); - float _1597 = _1596 * 0.3010300099849701f; - bool _1598 = !(_1597 <= _1449); - do { - if (!_1598) { - float _1600 = log2(_1235); - float _1601 = _1600 * 0.3010300099849701f; - _1666 = _1601; - } else { - bool _1603 = (_1597 > _1449); - float _1604 = log2(_1232); - float _1605 = _1604 * 0.3010300099849701f; - bool _1606 = (_1597 < _1605); - bool _1607 = _1603 && _1606; - if (_1607) { - float _1609 = _1596 - _1448; - float _1610 = _1609 * 0.9030900001525879f; - float _1611 = _1604 - _1448; - float _1612 = _1611 * 0.3010300099849701f; - float _1613 = _1610 / _1612; - int _1614 = int(_1613); - float _1615 = float(_1614); - float _1616 = _1613 - _1615; - float _1618 = _12[_1614]; - int _1619 = _1614 + 1; - float _1621 = _12[_1619]; - int _1622 = _1614 + 2; - float _1624 = _12[_1622]; - float _1625 = _1616 * _1616; - float _1626 = _1618 * 0.5f; - float _1627 = mad(_1621, -1.0f, _1626); - float _1628 = mad(_1624, 0.5f, _1627); - float _1629 = _1621 - _1618; - float _1630 = mad(_1621, 0.5f, _1626); - float _1631 = dot(float3(_1625, _1616, 1.0f), float3(_1628, _1629, _1630)); - _1666 = _1631; - } else { - bool _1633 = !(_1597 >= _1605); - do { - if (!_1633) { - float _1635 = log2(_1236); - float _1636 = _1635 * 0.3010300099849701f; - bool _1637 = (_1597 < _1636); - if (_1637) { - float _1639 = _1596 - _1604; - float _1640 = _1639 * 0.9030900001525879f; - float _1641 = _1635 - _1604; - float _1642 = _1641 * 0.3010300099849701f; - float _1643 = _1640 / _1642; - int _1644 = int(_1643); - float _1645 = float(_1644); - float _1646 = _1643 - _1645; - float _1648 = _13[_1644]; - int _1649 = _1644 + 1; - float _1651 = _13[_1649]; - int _1652 = _1644 + 2; - float _1654 = _13[_1652]; - float _1655 = _1646 * _1646; - float _1656 = _1648 * 0.5f; - float _1657 = mad(_1651, -1.0f, _1656); - float _1658 = mad(_1654, 0.5f, _1657); - float _1659 = _1651 - _1648; - float _1660 = mad(_1651, 0.5f, _1656); - float _1661 = dot(float3(_1655, _1646, 1.0f), float3(_1658, _1659, _1660)); - _1666 = _1661; - break; - } - } - float _1663 = log2(_1237); - float _1664 = _1663 * 0.3010300099849701f; - _1666 = _1664; - } while (false); - } - } - float _1667 = _1666 * 3.321928024291992f; - float _1668 = exp2(_1667); - float _1669 = _1520 - _1235; - float _1670 = _1237 - _1235; - float _1671 = _1669 / _1670; - float _1672 = _1594 - _1235; - float _1673 = _1672 / _1670; - float _1674 = _1668 - _1235; - float _1675 = _1674 / _1670; - float _1676 = _1671 * 0.6624541878700256f; - float _1677 = mad(0.13400420546531677f, _1673, _1676); - float _1678 = mad(0.15618768334388733f, _1675, _1677); - float _1679 = _1671 * 0.2722287178039551f; - float _1680 = mad(0.6740817427635193f, _1673, _1679); - float _1681 = mad(0.053689517080783844f, _1675, _1680); - float _1682 = _1671 * -0.005574649665504694f; - float _1683 = mad(0.00406073359772563f, _1673, _1682); - float _1684 = mad(1.0103391408920288f, _1675, _1683); - float _1685 = _1678 * 1.6410233974456787f; - float _1686 = mad(-0.32480329275131226f, _1681, _1685); - float _1687 = mad(-0.23642469942569733f, _1684, _1686); - float _1688 = _1678 * -0.663662850856781f; - float _1689 = mad(1.6153316497802734f, _1681, _1688); - float _1690 = mad(0.016756348311901093f, _1684, _1689); - float _1691 = _1678 * 0.011721894145011902f; - float _1692 = mad(-0.008284442126750946f, _1681, _1691); - float _1693 = mad(0.9883948564529419f, _1684, _1692); - float _1694 = max(_1687, 0.0f); - float _1695 = max(_1690, 0.0f); - float _1696 = max(_1693, 0.0f); - float _1697 = min(_1694, 1.0f); - float _1698 = min(_1695, 1.0f); - float _1699 = min(_1696, 1.0f); - float _1700 = _1697 * 0.6624541878700256f; - float _1701 = mad(0.13400420546531677f, _1698, _1700); - float _1702 = mad(0.15618768334388733f, _1699, _1701); - float _1703 = _1697 * 0.2722287178039551f; - float _1704 = mad(0.6740817427635193f, _1698, _1703); - float _1705 = mad(0.053689517080783844f, _1699, _1704); - float _1706 = _1697 * -0.005574649665504694f; - float _1707 = mad(0.00406073359772563f, _1698, _1706); - float _1708 = mad(1.0103391408920288f, _1699, _1707); - float _1709 = _1702 * 1.6410233974456787f; - float _1710 = mad(-0.32480329275131226f, _1705, _1709); - float _1711 = mad(-0.23642469942569733f, _1708, _1710); - float _1712 = _1702 * -0.663662850856781f; - float _1713 = mad(1.6153316497802734f, _1705, _1712); - float _1714 = mad(0.016756348311901093f, _1708, _1713); - float _1715 = _1702 * 0.011721894145011902f; - float _1716 = mad(-0.008284442126750946f, _1705, _1715); - float _1717 = mad(0.9883948564529419f, _1708, _1716); - float _1718 = max(_1711, 0.0f); - float _1719 = max(_1714, 0.0f); - float _1720 = max(_1717, 0.0f); - float _1721 = min(_1718, 65535.0f); - float _1722 = min(_1719, 65535.0f); - float _1723 = min(_1720, 65535.0f); - float _1724 = _1721 * _1237; - float _1725 = _1722 * _1237; - float _1726 = _1723 * _1237; - float _1727 = max(_1724, 0.0f); - float _1728 = max(_1725, 0.0f); - float _1729 = max(_1726, 0.0f); - float _1730 = min(_1727, 65535.0f); - float _1731 = min(_1728, 65535.0f); - float _1732 = min(_1729, 65535.0f); - bool _1733 = (_1078 == 5); - _1745 = _1730; - _1746 = _1731; - _1747 = _1732; - do { - if (!_1733) { - float _1735 = _1730 * _39; - float _1736 = mad(_40, _1731, _1735); - float _1737 = mad(_41, _1732, _1736); - float _1738 = _1730 * _42; - float _1739 = mad(_43, _1731, _1738); - float _1740 = mad(_44, _1732, _1739); - float _1741 = _1730 * _45; - float _1742 = mad(_46, _1731, _1741); - float _1743 = mad(_47, _1732, _1742); - _1745 = _1737; - _1746 = _1740; - _1747 = _1743; - } - float _1748 = _1745 * 9.999999747378752e-05f; - float _1749 = _1746 * 9.999999747378752e-05f; - float _1750 = _1747 * 9.999999747378752e-05f; - float _1751 = log2(_1748); - float _1752 = log2(_1749); - float _1753 = log2(_1750); - float _1754 = _1751 * 0.1593017578125f; - float _1755 = _1752 * 0.1593017578125f; - float _1756 = _1753 * 0.1593017578125f; - float _1757 = exp2(_1754); - float _1758 = exp2(_1755); - float _1759 = exp2(_1756); - float _1760 = _1757 * 18.8515625f; - float _1761 = _1758 * 18.8515625f; - float _1762 = _1759 * 18.8515625f; - float _1763 = _1760 + 0.8359375f; - float _1764 = _1761 + 0.8359375f; - float _1765 = _1762 + 0.8359375f; - float _1766 = _1757 * 18.6875f; - float _1767 = _1758 * 18.6875f; - float _1768 = _1759 * 18.6875f; - float _1769 = _1766 + 1.0f; - float _1770 = _1767 + 1.0f; - float _1771 = _1768 + 1.0f; - float _1772 = 1.0f / _1769; - float _1773 = 1.0f / _1770; - float _1774 = 1.0f / _1771; - float _1775 = _1772 * _1763; - float _1776 = _1773 * _1764; - float _1777 = _1774 * _1765; - float _1778 = log2(_1775); - float _1779 = log2(_1776); - float _1780 = log2(_1777); - float _1781 = _1778 * 78.84375f; - float _1782 = _1779 * 78.84375f; - float _1783 = _1780 * 78.84375f; - float _1784 = exp2(_1781); - float _1785 = exp2(_1782); - float _1786 = exp2(_1783); - _2500 = _1784; - _2501 = _1785; - _2502 = _1786; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - int _1788 = _1078 & -3; - bool _1789 = (_1788 == 4); - if (_1789) { - // %1791 = bitcast [6 x float]* %10 to i8* - // %1792 = bitcast [6 x float]* %11 to i8* - float _1794 = _RootShaderParameters_012z; - float _1795 = _RootShaderParameters_012y; - float _1796 = _RootShaderParameters_012x; - float _1798 = _RootShaderParameters_011x; - float _1799 = _RootShaderParameters_011y; - float _1800 = _RootShaderParameters_011z; - float _1801 = _RootShaderParameters_011w; - float _1803 = _RootShaderParameters_010x; - float _1804 = _RootShaderParameters_010y; - float _1805 = _RootShaderParameters_010z; - float _1806 = _RootShaderParameters_010w; - float _1808 = _RootShaderParameters_009x; - float _1810 = _RootShaderParameters_008x; - float _1811 = _RootShaderParameters_008y; - float _1812 = _RootShaderParameters_008z; - float _1813 = _RootShaderParameters_008w; - _10[0] = _1803; - _10[1] = _1804; - _10[2] = _1805; - _10[3] = _1806; - _10[4] = _1796; - _10[5] = _1796; - _11[0] = _1798; - _11[1] = _1799; - _11[2] = _1800; - _11[3] = _1801; - _11[4] = _1795; - _11[5] = _1795; - float _1827 = UniformBufferConstants_WorkingColorSpace_016x; - float _1828 = UniformBufferConstants_WorkingColorSpace_016y; - float _1829 = UniformBufferConstants_WorkingColorSpace_016z; - float _1831 = UniformBufferConstants_WorkingColorSpace_017x; - float _1832 = UniformBufferConstants_WorkingColorSpace_017y; - float _1833 = UniformBufferConstants_WorkingColorSpace_017z; - float _1835 = UniformBufferConstants_WorkingColorSpace_018x; - float _1836 = UniformBufferConstants_WorkingColorSpace_018y; - float _1837 = UniformBufferConstants_WorkingColorSpace_018z; - float _1838 = _1794 * _1060; - float _1839 = _1794 * _1061; - float _1840 = _1794 * _1062; - float _1841 = _1827 * _1838; - float _1842 = mad(_1828, _1839, _1841); - float _1843 = mad(_1829, _1840, _1842); - float _1844 = _1831 * _1838; - float _1845 = mad(_1832, _1839, _1844); - float _1846 = mad(_1833, _1840, _1845); - float _1847 = _1835 * _1838; - float _1848 = mad(_1836, _1839, _1847); - float _1849 = mad(_1837, _1840, _1848); - float _1850 = min(_1843, _1846); - float _1851 = min(_1850, _1849); - float _1852 = max(_1843, _1846); - float _1853 = max(_1852, _1849); - float _1854 = max(_1853, 1.000000013351432e-10f); - float _1855 = max(_1851, 1.000000013351432e-10f); - float _1856 = _1854 - _1855; - float _1857 = max(_1853, 0.009999999776482582f); - float _1858 = _1856 / _1857; - float _1859 = _1849 - _1846; - float _1860 = _1859 * _1849; - float _1861 = _1846 - _1843; - float _1862 = _1861 * _1846; - float _1863 = _1860 + _1862; - float _1864 = _1843 - _1849; - float _1865 = _1864 * _1843; - float _1866 = _1863 + _1865; - float _1867 = sqrt(_1866); - float _1868 = _1867 * 1.75f; - float _1869 = _1846 + _1843; - float _1870 = _1869 + _1849; - float _1871 = _1870 + _1868; - float _1872 = _1871 * 0.3333333432674408f; - float _1873 = _1858 + -0.4000000059604645f; - float _1874 = _1873 * 5.0f; - float _1875 = _1873 * 2.5f; - float _1876 = abs(_1875); - float _1877 = 1.0f - _1876; - float _1878 = max(_1877, 0.0f); - bool _1879 = (_1874 > 0.0f); - bool _1880 = (_1874 < 0.0f); - int _1881 = int(_1879); - int _1882 = int(_1880); - int _1883 = _1881 - _1882; - float _1884 = float(_1883); - float _1885 = _1878 * _1878; - float _1886 = 1.0f - _1885; - float _1887 = _1884 * _1886; - float _1888 = _1887 + 1.0f; - float _1889 = _1888 * 0.02500000037252903f; - bool _1890 = !(_1872 <= 0.0533333346247673f); - _1898 = _1889; - do { - if (_1890) { - bool _1892 = !(_1872 >= 0.1599999964237213f); - _1898 = 0.0f; - if (_1892) { - float _1894 = 0.23999999463558197f / _1871; - float _1895 = _1894 + -0.5f; - float _1896 = _1895 * _1889; - _1898 = _1896; - } - } - float _1899 = _1898 + 1.0f; - float _1900 = _1899 * _1843; - float _1901 = _1899 * _1846; - float _1902 = _1899 * _1849; - bool _1903 = (_1900 == _1901); - bool _1904 = (_1901 == _1902); - bool _1905 = _1903 && _1904; - _1934 = 0.0f; - do { - if (!_1905) { - float _1907 = _1900 * 2.0f; - float _1908 = _1907 - _1901; - float _1909 = _1908 - _1902; - float _1910 = _1846 - _1849; - float _1911 = _1910 * 1.7320507764816284f; - float _1912 = _1911 * _1899; - float _1913 = _1912 / _1909; - float _1914 = atan(_1913); - float _1915 = _1914 + 3.1415927410125732f; - float _1916 = _1914 + -3.1415927410125732f; - bool _1917 = (_1909 < 0.0f); - bool _1918 = (_1909 == 0.0f); - bool _1919 = (_1912 >= 0.0f); - bool _1920 = (_1912 < 0.0f); - bool _1921 = _1919 && _1917; - float _1922 = _1921 ? _1915 : _1914; - bool _1923 = _1920 && _1917; - float _1924 = _1923 ? _1916 : _1922; - bool _1925 = _1920 && _1918; - bool _1926 = _1919 && _1918; - float _1927 = _1924 * 57.2957763671875f; - float _1928 = _1925 ? -90.0f : _1927; - float _1929 = _1926 ? 90.0f : _1928; - bool _1930 = (_1929 < 0.0f); - _1934 = _1929; - if (_1930) { - float _1932 = _1929 + 360.0f; - _1934 = _1932; - } - } - float _1935 = max(_1934, 0.0f); - float _1936 = min(_1935, 360.0f); - bool _1937 = (_1936 < -180.0f); - do { - if (_1937) { - float _1939 = _1936 + 360.0f; - _1945 = _1939; - } else { - bool _1941 = (_1936 > 180.0f); - _1945 = _1936; - if (_1941) { - float _1943 = _1936 + -360.0f; - _1945 = _1943; - } - } - bool _1946 = (_1945 > -67.5f); - bool _1947 = (_1945 < 67.5f); - bool _1948 = _1946 && _1947; - _1984 = 0.0f; - do { - if (_1948) { - float _1950 = _1945 + 67.5f; - float _1951 = _1950 * 0.029629629105329514f; - int _1952 = int(_1951); - float _1953 = float(_1952); - float _1954 = _1951 - _1953; - float _1955 = _1954 * _1954; - float _1956 = _1955 * _1954; - bool _1957 = (_1952 == 3); - if (_1957) { - float _1959 = _1956 * 0.1666666716337204f; - float _1960 = _1955 * 0.5f; - float _1961 = _1954 * 0.5f; - float _1962 = 0.1666666716337204f - _1961; - float _1963 = _1962 + _1960; - float _1964 = _1963 - _1959; - _1984 = _1964; - } else { - bool _1966 = (_1952 == 2); - if (_1966) { - float _1968 = _1956 * 0.5f; - float _1969 = 0.6666666865348816f - _1955; - float _1970 = _1969 + _1968; - _1984 = _1970; - } else { - bool _1972 = (_1952 == 1); - if (_1972) { - float _1974 = _1956 * -0.5f; - float _1975 = _1955 + _1954; - float _1976 = _1975 * 0.5f; - float _1977 = _1974 + 0.1666666716337204f; - float _1978 = _1977 + _1976; - _1984 = _1978; - } else { - bool _1980 = (_1952 == 0); - float _1981 = _1956 * 0.1666666716337204f; - float _1982 = _1980 ? _1981 : 0.0f; - _1984 = _1982; - } - } - } - } - float _1985 = 0.029999999329447746f - _1900; - float _1986 = _1858 * 0.27000001072883606f; - float _1987 = _1986 * _1985; - float _1988 = _1987 * _1984; - float _1989 = _1988 + _1900; - float _1990 = max(_1989, 0.0f); - float _1991 = max(_1901, 0.0f); - float _1992 = max(_1902, 0.0f); - float _1993 = min(_1990, 65535.0f); - float _1994 = min(_1991, 65535.0f); - float _1995 = min(_1992, 65535.0f); - float _1996 = _1993 * 1.4514392614364624f; - float _1997 = mad(-0.2365107536315918f, _1994, _1996); - float _1998 = mad(-0.21492856740951538f, _1995, _1997); - float _1999 = _1993 * -0.07655377686023712f; - float _2000 = mad(1.17622971534729f, _1994, _1999); - float _2001 = mad(-0.09967592358589172f, _1995, _2000); - float _2002 = _1993 * 0.008316148072481155f; - float _2003 = mad(-0.006032449658960104f, _1994, _2002); - float _2004 = mad(0.9977163076400757f, _1995, _2003); - float _2005 = max(_1998, 0.0f); - float _2006 = max(_2001, 0.0f); - float _2007 = max(_2004, 0.0f); - float _2008 = min(_2005, 65504.0f); - float _2009 = min(_2006, 65504.0f); - float _2010 = min(_2007, 65504.0f); - float _2011 = dot(float3(_2008, _2009, _2010), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2012 = _2008 - _2011; - float _2013 = _2009 - _2011; - float _2014 = _2010 - _2011; - float _2015 = _2012 * 0.9599999785423279f; - float _2016 = _2013 * 0.9599999785423279f; - float _2017 = _2014 * 0.9599999785423279f; - float _2018 = _2015 + _2011; - float _2019 = _2016 + _2011; - float _2020 = _2017 + _2011; - float _2021 = max(_2018, 1.000000013351432e-10f); - float _2022 = log2(_2021); - float _2023 = _2022 * 0.3010300099849701f; - float _2024 = log2(_1810); - float _2025 = _2024 * 0.3010300099849701f; - bool _2026 = !(_2023 <= _2025); - do { - if (!_2026) { - float _2028 = log2(_1811); - float _2029 = _2028 * 0.3010300099849701f; - _2094 = _2029; - } else { - bool _2031 = (_2023 > _2025); - float _2032 = log2(_1808); - float _2033 = _2032 * 0.3010300099849701f; - bool _2034 = (_2023 < _2033); - bool _2035 = _2031 && _2034; - if (_2035) { - float _2037 = _2022 - _2024; - float _2038 = _2037 * 0.9030900001525879f; - float _2039 = _2032 - _2024; - float _2040 = _2039 * 0.3010300099849701f; - float _2041 = _2038 / _2040; - int _2042 = int(_2041); - float _2043 = float(_2042); - float _2044 = _2041 - _2043; - float _2046 = _10[_2042]; - int _2047 = _2042 + 1; - float _2049 = _10[_2047]; - int _2050 = _2042 + 2; - float _2052 = _10[_2050]; - float _2053 = _2044 * _2044; - float _2054 = _2046 * 0.5f; - float _2055 = mad(_2049, -1.0f, _2054); - float _2056 = mad(_2052, 0.5f, _2055); - float _2057 = _2049 - _2046; - float _2058 = mad(_2049, 0.5f, _2054); - float _2059 = dot(float3(_2053, _2044, 1.0f), float3(_2056, _2057, _2058)); - _2094 = _2059; - } else { - bool _2061 = !(_2023 >= _2033); - do { - if (!_2061) { - float _2063 = log2(_1812); - float _2064 = _2063 * 0.3010300099849701f; - bool _2065 = (_2023 < _2064); - if (_2065) { - float _2067 = _2022 - _2032; - float _2068 = _2067 * 0.9030900001525879f; - float _2069 = _2063 - _2032; - float _2070 = _2069 * 0.3010300099849701f; - float _2071 = _2068 / _2070; - int _2072 = int(_2071); - float _2073 = float(_2072); - float _2074 = _2071 - _2073; - float _2076 = _11[_2072]; - int _2077 = _2072 + 1; - float _2079 = _11[_2077]; - int _2080 = _2072 + 2; - float _2082 = _11[_2080]; - float _2083 = _2074 * _2074; - float _2084 = _2076 * 0.5f; - float _2085 = mad(_2079, -1.0f, _2084); - float _2086 = mad(_2082, 0.5f, _2085); - float _2087 = _2079 - _2076; - float _2088 = mad(_2079, 0.5f, _2084); - float _2089 = dot(float3(_2083, _2074, 1.0f), float3(_2086, _2087, _2088)); - _2094 = _2089; - break; - } - } - float _2091 = log2(_1813); - float _2092 = _2091 * 0.3010300099849701f; - _2094 = _2092; - } while (false); - } - } - float _2095 = _2094 * 3.321928024291992f; - float _2096 = exp2(_2095); - float _2097 = max(_2019, 1.000000013351432e-10f); - float _2098 = log2(_2097); - float _2099 = _2098 * 0.3010300099849701f; - bool _2100 = !(_2099 <= _2025); - do { - if (!_2100) { - float _2102 = log2(_1811); - float _2103 = _2102 * 0.3010300099849701f; - _2168 = _2103; - } else { - bool _2105 = (_2099 > _2025); - float _2106 = log2(_1808); - float _2107 = _2106 * 0.3010300099849701f; - bool _2108 = (_2099 < _2107); - bool _2109 = _2105 && _2108; - if (_2109) { - float _2111 = _2098 - _2024; - float _2112 = _2111 * 0.9030900001525879f; - float _2113 = _2106 - _2024; - float _2114 = _2113 * 0.3010300099849701f; - float _2115 = _2112 / _2114; - int _2116 = int(_2115); - float _2117 = float(_2116); - float _2118 = _2115 - _2117; - float _2120 = _10[_2116]; - int _2121 = _2116 + 1; - float _2123 = _10[_2121]; - int _2124 = _2116 + 2; - float _2126 = _10[_2124]; - float _2127 = _2118 * _2118; - float _2128 = _2120 * 0.5f; - float _2129 = mad(_2123, -1.0f, _2128); - float _2130 = mad(_2126, 0.5f, _2129); - float _2131 = _2123 - _2120; - float _2132 = mad(_2123, 0.5f, _2128); - float _2133 = dot(float3(_2127, _2118, 1.0f), float3(_2130, _2131, _2132)); - _2168 = _2133; - } else { - bool _2135 = !(_2099 >= _2107); - do { - if (!_2135) { - float _2137 = log2(_1812); - float _2138 = _2137 * 0.3010300099849701f; - bool _2139 = (_2099 < _2138); - if (_2139) { - float _2141 = _2098 - _2106; - float _2142 = _2141 * 0.9030900001525879f; - float _2143 = _2137 - _2106; - float _2144 = _2143 * 0.3010300099849701f; - float _2145 = _2142 / _2144; - int _2146 = int(_2145); - float _2147 = float(_2146); - float _2148 = _2145 - _2147; - float _2150 = _11[_2146]; - int _2151 = _2146 + 1; - float _2153 = _11[_2151]; - int _2154 = _2146 + 2; - float _2156 = _11[_2154]; - float _2157 = _2148 * _2148; - float _2158 = _2150 * 0.5f; - float _2159 = mad(_2153, -1.0f, _2158); - float _2160 = mad(_2156, 0.5f, _2159); - float _2161 = _2153 - _2150; - float _2162 = mad(_2153, 0.5f, _2158); - float _2163 = dot(float3(_2157, _2148, 1.0f), float3(_2160, _2161, _2162)); - _2168 = _2163; - break; - } - } - float _2165 = log2(_1813); - float _2166 = _2165 * 0.3010300099849701f; - _2168 = _2166; - } while (false); - } - } - float _2169 = _2168 * 3.321928024291992f; - float _2170 = exp2(_2169); - float _2171 = max(_2020, 1.000000013351432e-10f); - float _2172 = log2(_2171); - float _2173 = _2172 * 0.3010300099849701f; - bool _2174 = !(_2173 <= _2025); - do { - if (!_2174) { - float _2176 = log2(_1811); - float _2177 = _2176 * 0.3010300099849701f; - _2242 = _2177; - } else { - bool _2179 = (_2173 > _2025); - float _2180 = log2(_1808); - float _2181 = _2180 * 0.3010300099849701f; - bool _2182 = (_2173 < _2181); - bool _2183 = _2179 && _2182; - if (_2183) { - float _2185 = _2172 - _2024; - float _2186 = _2185 * 0.9030900001525879f; - float _2187 = _2180 - _2024; - float _2188 = _2187 * 0.3010300099849701f; - float _2189 = _2186 / _2188; - int _2190 = int(_2189); - float _2191 = float(_2190); - float _2192 = _2189 - _2191; - float _2194 = _10[_2190]; - int _2195 = _2190 + 1; - float _2197 = _10[_2195]; - int _2198 = _2190 + 2; - float _2200 = _10[_2198]; - float _2201 = _2192 * _2192; - float _2202 = _2194 * 0.5f; - float _2203 = mad(_2197, -1.0f, _2202); - float _2204 = mad(_2200, 0.5f, _2203); - float _2205 = _2197 - _2194; - float _2206 = mad(_2197, 0.5f, _2202); - float _2207 = dot(float3(_2201, _2192, 1.0f), float3(_2204, _2205, _2206)); - _2242 = _2207; - } else { - bool _2209 = !(_2173 >= _2181); - do { - if (!_2209) { - float _2211 = log2(_1812); - float _2212 = _2211 * 0.3010300099849701f; - bool _2213 = (_2173 < _2212); - if (_2213) { - float _2215 = _2172 - _2180; - float _2216 = _2215 * 0.9030900001525879f; - float _2217 = _2211 - _2180; - float _2218 = _2217 * 0.3010300099849701f; - float _2219 = _2216 / _2218; - int _2220 = int(_2219); - float _2221 = float(_2220); - float _2222 = _2219 - _2221; - float _2224 = _11[_2220]; - int _2225 = _2220 + 1; - float _2227 = _11[_2225]; - int _2228 = _2220 + 2; - float _2230 = _11[_2228]; - float _2231 = _2222 * _2222; - float _2232 = _2224 * 0.5f; - float _2233 = mad(_2227, -1.0f, _2232); - float _2234 = mad(_2230, 0.5f, _2233); - float _2235 = _2227 - _2224; - float _2236 = mad(_2227, 0.5f, _2232); - float _2237 = dot(float3(_2231, _2222, 1.0f), float3(_2234, _2235, _2236)); - _2242 = _2237; - break; - } - } - float _2239 = log2(_1813); - float _2240 = _2239 * 0.3010300099849701f; - _2242 = _2240; - } while (false); - } - } - float _2243 = _2242 * 3.321928024291992f; - float _2244 = exp2(_2243); - float _2245 = _2096 - _1811; - float _2246 = _1813 - _1811; - float _2247 = _2245 / _2246; - float _2248 = _2170 - _1811; - float _2249 = _2248 / _2246; - float _2250 = _2244 - _1811; - float _2251 = _2250 / _2246; - float _2252 = _2247 * 0.6624541878700256f; - float _2253 = mad(0.13400420546531677f, _2249, _2252); - float _2254 = mad(0.15618768334388733f, _2251, _2253); - float _2255 = _2247 * 0.2722287178039551f; - float _2256 = mad(0.6740817427635193f, _2249, _2255); - float _2257 = mad(0.053689517080783844f, _2251, _2256); - float _2258 = _2247 * -0.005574649665504694f; - float _2259 = mad(0.00406073359772563f, _2249, _2258); - float _2260 = mad(1.0103391408920288f, _2251, _2259); - float _2261 = _2254 * 1.6410233974456787f; - float _2262 = mad(-0.32480329275131226f, _2257, _2261); - float _2263 = mad(-0.23642469942569733f, _2260, _2262); - float _2264 = _2254 * -0.663662850856781f; - float _2265 = mad(1.6153316497802734f, _2257, _2264); - float _2266 = mad(0.016756348311901093f, _2260, _2265); - float _2267 = _2254 * 0.011721894145011902f; - float _2268 = mad(-0.008284442126750946f, _2257, _2267); - float _2269 = mad(0.9883948564529419f, _2260, _2268); - float _2270 = max(_2263, 0.0f); - float _2271 = max(_2266, 0.0f); - float _2272 = max(_2269, 0.0f); - float _2273 = min(_2270, 1.0f); - float _2274 = min(_2271, 1.0f); - float _2275 = min(_2272, 1.0f); - float _2276 = _2273 * 0.6624541878700256f; - float _2277 = mad(0.13400420546531677f, _2274, _2276); - float _2278 = mad(0.15618768334388733f, _2275, _2277); - float _2279 = _2273 * 0.2722287178039551f; - float _2280 = mad(0.6740817427635193f, _2274, _2279); - float _2281 = mad(0.053689517080783844f, _2275, _2280); - float _2282 = _2273 * -0.005574649665504694f; - float _2283 = mad(0.00406073359772563f, _2274, _2282); - float _2284 = mad(1.0103391408920288f, _2275, _2283); - float _2285 = _2278 * 1.6410233974456787f; - float _2286 = mad(-0.32480329275131226f, _2281, _2285); - float _2287 = mad(-0.23642469942569733f, _2284, _2286); - float _2288 = _2278 * -0.663662850856781f; - float _2289 = mad(1.6153316497802734f, _2281, _2288); - float _2290 = mad(0.016756348311901093f, _2284, _2289); - float _2291 = _2278 * 0.011721894145011902f; - float _2292 = mad(-0.008284442126750946f, _2281, _2291); - float _2293 = mad(0.9883948564529419f, _2284, _2292); - float _2294 = max(_2287, 0.0f); - float _2295 = max(_2290, 0.0f); - float _2296 = max(_2293, 0.0f); - float _2297 = min(_2294, 65535.0f); - float _2298 = min(_2295, 65535.0f); - float _2299 = min(_2296, 65535.0f); - float _2300 = _2297 * _1813; - float _2301 = _2298 * _1813; - float _2302 = _2299 * _1813; - float _2303 = max(_2300, 0.0f); - float _2304 = max(_2301, 0.0f); - float _2305 = max(_2302, 0.0f); - float _2306 = min(_2303, 65535.0f); - float _2307 = min(_2304, 65535.0f); - float _2308 = min(_2305, 65535.0f); - bool _2309 = (_1078 == 6); - _2321 = _2306; - _2322 = _2307; - _2323 = _2308; - do { - if (!_2309) { - float _2311 = _2306 * _39; - float _2312 = mad(_40, _2307, _2311); - float _2313 = mad(_41, _2308, _2312); - float _2314 = _2306 * _42; - float _2315 = mad(_43, _2307, _2314); - float _2316 = mad(_44, _2308, _2315); - float _2317 = _2306 * _45; - float _2318 = mad(_46, _2307, _2317); - float _2319 = mad(_47, _2308, _2318); - _2321 = _2313; - _2322 = _2316; - _2323 = _2319; - } - float _2324 = _2321 * 9.999999747378752e-05f; - float _2325 = _2322 * 9.999999747378752e-05f; - float _2326 = _2323 * 9.999999747378752e-05f; - float _2327 = log2(_2324); - float _2328 = log2(_2325); - float _2329 = log2(_2326); - float _2330 = _2327 * 0.1593017578125f; - float _2331 = _2328 * 0.1593017578125f; - float _2332 = _2329 * 0.1593017578125f; - float _2333 = exp2(_2330); - float _2334 = exp2(_2331); - float _2335 = exp2(_2332); - float _2336 = _2333 * 18.8515625f; - float _2337 = _2334 * 18.8515625f; - float _2338 = _2335 * 18.8515625f; - float _2339 = _2336 + 0.8359375f; - float _2340 = _2337 + 0.8359375f; - float _2341 = _2338 + 0.8359375f; - float _2342 = _2333 * 18.6875f; - float _2343 = _2334 * 18.6875f; - float _2344 = _2335 * 18.6875f; - float _2345 = _2342 + 1.0f; - float _2346 = _2343 + 1.0f; - float _2347 = _2344 + 1.0f; - float _2348 = 1.0f / _2345; - float _2349 = 1.0f / _2346; - float _2350 = 1.0f / _2347; - float _2351 = _2348 * _2339; - float _2352 = _2349 * _2340; - float _2353 = _2350 * _2341; - float _2354 = log2(_2351); - float _2355 = log2(_2352); - float _2356 = log2(_2353); - float _2357 = _2354 * 78.84375f; - float _2358 = _2355 * 78.84375f; - float _2359 = _2356 * 78.84375f; - float _2360 = exp2(_2357); - float _2361 = exp2(_2358); - float _2362 = exp2(_2359); - _2500 = _2360; - _2501 = _2361; - _2502 = _2362; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - bool _2364 = (_1078 == 7); - if (_2364) { - float _2367 = UniformBufferConstants_WorkingColorSpace_008x; - float _2368 = UniformBufferConstants_WorkingColorSpace_008y; - float _2369 = UniformBufferConstants_WorkingColorSpace_008z; - float _2371 = UniformBufferConstants_WorkingColorSpace_009x; - float _2372 = UniformBufferConstants_WorkingColorSpace_009y; - float _2373 = UniformBufferConstants_WorkingColorSpace_009z; - float _2375 = UniformBufferConstants_WorkingColorSpace_010x; - float _2376 = UniformBufferConstants_WorkingColorSpace_010y; - float _2377 = UniformBufferConstants_WorkingColorSpace_010z; - float _2378 = _2367 * _1060; - float _2379 = mad(_2368, _1061, _2378); - float _2380 = mad(_2369, _1062, _2379); - float _2381 = _2371 * _1060; - float _2382 = mad(_2372, _1061, _2381); - float _2383 = mad(_2373, _1062, _2382); - float _2384 = _2375 * _1060; - float _2385 = mad(_2376, _1061, _2384); - float _2386 = mad(_2377, _1062, _2385); - float _2387 = _2380 * _39; - float _2388 = mad(_40, _2383, _2387); - float _2389 = mad(_41, _2386, _2388); - float _2390 = _2380 * _42; - float _2391 = mad(_43, _2383, _2390); - float _2392 = mad(_44, _2386, _2391); - float _2393 = _2380 * _45; - float _2394 = mad(_46, _2383, _2393); - float _2395 = mad(_47, _2386, _2394); - float _2396 = _2389 * 9.999999747378752e-05f; - float _2397 = _2392 * 9.999999747378752e-05f; - float _2398 = _2395 * 9.999999747378752e-05f; - float _2399 = log2(_2396); - float _2400 = log2(_2397); - float _2401 = log2(_2398); - float _2402 = _2399 * 0.1593017578125f; - float _2403 = _2400 * 0.1593017578125f; - float _2404 = _2401 * 0.1593017578125f; - float _2405 = exp2(_2402); - float _2406 = exp2(_2403); - float _2407 = exp2(_2404); - float _2408 = _2405 * 18.8515625f; - float _2409 = _2406 * 18.8515625f; - float _2410 = _2407 * 18.8515625f; - float _2411 = _2408 + 0.8359375f; - float _2412 = _2409 + 0.8359375f; - float _2413 = _2410 + 0.8359375f; - float _2414 = _2405 * 18.6875f; - float _2415 = _2406 * 18.6875f; - float _2416 = _2407 * 18.6875f; - float _2417 = _2414 + 1.0f; - float _2418 = _2415 + 1.0f; - float _2419 = _2416 + 1.0f; - float _2420 = 1.0f / _2417; - float _2421 = 1.0f / _2418; - float _2422 = 1.0f / _2419; - float _2423 = _2420 * _2411; - float _2424 = _2421 * _2412; - float _2425 = _2422 * _2413; - float _2426 = log2(_2423); - float _2427 = log2(_2424); - float _2428 = log2(_2425); - float _2429 = _2426 * 78.84375f; - float _2430 = _2427 * 78.84375f; - float _2431 = _2428 * 78.84375f; - float _2432 = exp2(_2429); - float _2433 = exp2(_2430); - float _2434 = exp2(_2431); - _2500 = _2432; - _2501 = _2433; - _2502 = _2434; - } else { - bool _2436 = (_1078 == 8); - _2500 = _1060; - _2501 = _1061; - _2502 = _1062; - if (!_2436) { - bool _2438 = (_1078 == 9); - float _2440 = UniformBufferConstants_WorkingColorSpace_008x; - float _2441 = UniformBufferConstants_WorkingColorSpace_008y; - float _2442 = UniformBufferConstants_WorkingColorSpace_008z; - float _2444 = UniformBufferConstants_WorkingColorSpace_009x; - float _2445 = UniformBufferConstants_WorkingColorSpace_009y; - float _2446 = UniformBufferConstants_WorkingColorSpace_009z; - float _2448 = UniformBufferConstants_WorkingColorSpace_010x; - float _2449 = UniformBufferConstants_WorkingColorSpace_010y; - float _2450 = UniformBufferConstants_WorkingColorSpace_010z; - if (_2438) { - float _2452 = _2440 * _1048; - float _2453 = mad(_2441, _1049, _2452); - float _2454 = mad(_2442, _1050, _2453); - float _2455 = _2444 * _1048; - float _2456 = mad(_2445, _1049, _2455); - float _2457 = mad(_2446, _1050, _2456); - float _2458 = _2448 * _1048; - float _2459 = mad(_2449, _1049, _2458); - float _2460 = mad(_2450, _1050, _2459); - float _2461 = _2454 * _39; - float _2462 = mad(_40, _2457, _2461); - float _2463 = mad(_41, _2460, _2462); - float _2464 = _2454 * _42; - float _2465 = mad(_43, _2457, _2464); - float _2466 = mad(_44, _2460, _2465); - float _2467 = _2454 * _45; - float _2468 = mad(_46, _2457, _2467); - float _2469 = mad(_47, _2460, _2468); - _2500 = _2463; - _2501 = _2466; - _2502 = _2469; - } else { - float _2471 = _2440 * _1074; - float _2472 = mad(_2441, _1075, _2471); - float _2473 = mad(_2442, _1076, _2472); - float _2474 = _2444 * _1074; - float _2475 = mad(_2445, _1075, _2474); - float _2476 = mad(_2446, _1076, _2475); - float _2477 = _2448 * _1074; - float _2478 = mad(_2449, _1075, _2477); - float _2479 = mad(_2450, _1076, _2478); - float _2480 = _2473 * _39; - float _2481 = mad(_40, _2476, _2480); - float _2482 = mad(_41, _2479, _2481); - float _2483 = _2473 * _42; - float _2484 = mad(_43, _2476, _2483); - float _2485 = mad(_44, _2479, _2484); - float _2486 = _2473 * _45; - float _2487 = mad(_46, _2476, _2486); - float _2488 = mad(_47, _2479, _2487); - float _2489 = _RootShaderParameters_040z; - float _2490 = log2(_2482); - float _2491 = log2(_2485); - float _2492 = log2(_2488); - float _2493 = _2490 * _2489; - float _2494 = _2491 * _2489; - float _2495 = _2492 * _2489; - float _2496 = exp2(_2493); - float _2497 = exp2(_2494); - float _2498 = exp2(_2495); - _2500 = _2496; - _2501 = _2497; - _2502 = _2498; - } - } - } - } - } - } - } - float _2503 = _2500 * 0.9523810148239136f; - float _2504 = _2501 * 0.9523810148239136f; - float _2505 = _2502 * 0.9523810148239136f; - SV_Target.x = _2503; - SV_Target.y = _2504; - SV_Target.z = _2505; - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0x73B2BA54.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x73B2BA54.ps_5_1.hlsl deleted file mode 100644 index 1d34c303..00000000 --- a/src/games/ue-dx12/lutbuilder_0x73B2BA54.ps_5_1.hlsl +++ /dev/null @@ -1,1564 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:00:26 2024 -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r2.xyz = r0.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r0.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r0.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r2.xyz = r0.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r2.xyz; - r3.xyz = r0.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r3.xyz; - r4.xyz = r0.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.xyz = r0.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r2.xyz; - r3.xyz = r0.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r3.xyz; - r0.yzw = r0.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r0.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r2.xyz; - r3.xyz = r0.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r3.xyz; - r0.xyz = r0.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r0.yzw; - r0.w = cmp(asuint(cb0[40].w) >= 3); - r4.xyz = log2(r1.xyz); - r4.xyz = float3(0.0126833133, 0.0126833133, 0.0126833133) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r4.xyz; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r4.xyz = -r4.xyz * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r4.xyz = r5.xyz / r4.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = float3(6.27739477, 6.27739477, 6.27739477) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(100, 100, 100) * r4.xyz; - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r0.w = cb0[35].y * 1.00055635; - r0.w = 1 / r0.w; - r1.w = cmp(6996.10791 >= cb0[35].y); - r4.xy = -r0.ww * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r4.xy = r4.xy * r0.ww + float2(99.1100006, 247.479996); - r4.xy = r4.xy * r0.ww + float2(0.244063005, 0.237039998); - r4.x = r1.w ? r4.x : r4.y; - r0.w = r4.x * r4.x; - r1.w = 2.86999989 * r4.x; - r0.w = r0.w * -3 + r1.w; - r4.y = -0.275000006 + r0.w; - r5.xyz = cb0[35].yyy * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[35].y * cb0[35].y; - r5.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r5.xyz; - r1.w = r5.x / r5.y; - r5.xyw = -cb0[35].yyy * float3(2.8974182e-05, 1916156.25, 705674) + float3(1, -1.13758118e+09, 1.97471539e+09); - r2.w = r0.w * 1.61456057e-07 + r5.x; - r2.w = r5.z / r2.w; - r3.w = 3 * r1.w; - r4.z = r1.w + r1.w; - r4.z = -r2.w * 8 + r4.z; - r4.z = 4 + r4.z; - r6.x = r3.w / r4.z; - r3.w = r2.w + r2.w; - r6.y = r3.w / r4.z; - r3.w = cmp(cb0[35].y < 4000); - r4.xy = r3.ww ? r6.xy : r4.xy; - r4.zw = -r0.ww * float2(1.53176999, 308.606995) + r5.yw; - r3.w = cb0[35].y * 1189.62 + r0.w; - r3.w = 1412139.88 + r3.w; - r3.w = r3.w * r3.w; - r5.x = r4.z / r3.w; - r0.w = -cb0[35].y * 179.455994 + r0.w; - r0.w = 6193636 + r0.w; - r0.w = r0.w * r0.w; - r5.y = r4.w / r0.w; - r0.w = dot(r5.xy, r5.xy); - r0.w = rsqrt(r0.w); - r4.zw = r5.xy * r0.ww; - r0.w = cb0[35].z * r4.w; - r0.w = r0.w * 0.0500000007 + r1.w; - r1.w = cb0[35].z * -r4.z; - r1.w = r1.w * 0.0500000007 + r2.w; - r2.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.w * 8 + r0.w; - r0.w = 4 + r0.w; - r5.x = r2.w / r0.w; - r1.w = r1.w + r1.w; - r5.y = r1.w / r0.w; - r4.zw = r5.xy + -r6.xy; - r4.xy = r4.xy + r4.zw; - r4.zw = float2(0.312700003, 0.328999996); - r4.xyzw = cb0[38].wwww ? r4.xyzw : r4.zwxy; - r5.xy = max(float2(1.00000001e-10, 1.00000001e-10), r4.yw); - r5.zw = float2(1, 1) + -r4.xz; - r4.yw = r5.zw + -r4.yw; - r6.xy = r4.xz / r5.xy; - r4.xy = r4.yw / r5.xy; - r6.z = 1; - r6.w = r4.x; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r6.xzw); - r1.w = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r6.xzw); - r2.w = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r6.xzw); - r4.zw = r6.yz; - r3.w = dot(float3(-0.161400005, 0.895099998, 0.266400009), r4.yzw); - r4.x = dot(float3(0.0366999991, -0.750199974, 1.71350002), r4.yzw); - r4.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r4.yzw); - r0.w = r3.w / r0.w; - r1.w = r4.x / r1.w; - r2.w = r4.y / r2.w; - r4.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r5.xyz = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.www; - r6.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r2.www; - r7.x = r4.x; - r7.y = r5.x; - r7.z = r6.x; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r7.xyz); - r8.x = r4.y; - r8.y = r5.y; - r8.z = r6.y; - r1.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r8.xyz); - r6.x = r4.z; - r6.y = r5.z; - r2.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r3.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r7.xyz); - r4.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r8.xyz); - r4.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r4.z = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r7.xyz); - r4.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r8.xyz); - r5.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r5.yzw = cb1[1].xyz * r1.www; - r5.yzw = r0.www * cb1[0].xyz + r5.yzw; - r5.yzw = r2.www * cb1[2].xyz + r5.yzw; - r6.xyz = cb1[1].xyz * r4.xxx; - r6.xyz = r3.www * cb1[0].xyz + r6.xyz; - r6.xyz = r4.yyy * cb1[2].xyz + r6.xyz; - r4.xyw = cb1[1].xyz * r4.www; - r4.xyz = r4.zzz * cb1[0].xyz + r4.xyw; - r4.xyz = r5.xxx * cb1[2].xyz + r4.xyz; - r7.xyz = cb1[4].yyy * r6.xyz; - r7.xyz = cb1[4].xxx * r5.yzw + r7.xyz; - r7.xyz = cb1[4].zzz * r4.xyz + r7.xyz; - r8.xyz = cb1[5].yyy * r6.xyz; - r8.xyz = cb1[5].xxx * r5.yzw + r8.xyz; - r8.xyz = cb1[5].zzz * r4.xyz + r8.xyz; - r6.xyz = cb1[6].yyy * r6.xyz; - r5.xyz = cb1[6].xxx * r5.yzw + r6.xyz; - r4.xyz = cb1[6].zzz * r4.xyz + r5.xyz; - r5.x = dot(r7.xyz, r1.xyz); - r5.y = dot(r8.xyz, r1.xyz); - r5.z = dot(r4.xyz, r1.xyz); - r1.x = dot(cb1[8].xyz, r5.xyz); - r1.y = dot(cb1[9].xyz, r5.xyz); - r1.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyz = r1.xyz / r0.www; - r4.xyz = float3(-1, -1, -1) + r4.xyz; - r1.w = dot(r4.xyz, r4.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.w * r0.w; - r4.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r1.xyz); - r4.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r1.xyz); - r4.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r1.xyz = r0.www * r4.xyz + r1.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz * r4.www; - r1.xyz = r1.xyz + -r0.www; - r4.xyz = r4.xyz * r1.xyz + r0.www; - r4.xyz = max(float3(0, 0, 0), r4.xyz); - r4.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r4.xyz; - r5.xyz = r5.xyz * r5.www; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r4.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r4.xyz = r4.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r1.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].y + -cb0[36].x; - r3.w = -cb0[36].x + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r1.xyz = r6.xyz * r1.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r6.xyz = r7.xyz * r7.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r1.xyz = r1.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r1.xyz = r1.xyz * r0.www; - r1.xyz = r4.xyz * r1.www + r1.xyz; - r1.xyz = r5.xyz * r4.www + r1.xyz; - - float3 untonemapped_ap1 = r1.xyz; - - r4.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r1.xyz); - r4.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r1.xyz); - r4.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r4.xyz = cb0[36].zzz * r4.xyz + r1.xyz; - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r4.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r4.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r4.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r6.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r6.xw = -cb0[37].zw + r6.xy; - r0.w = cmp(0.800000012 < cb0[37].z); - r7.xy = -cb0[37].zz + float2(0.819999993, 1); - r7.xy = r7.xy / cb0[37].yy; - r1.w = -0.744727492 + r7.x; - r2.w = r6.z / r6.x; - r3.w = -1 + r2.w; - r3.w = 1 + -r3.w; - r2.w = r2.w / r3.w; - r2.w = log2(r2.w); - r2.w = 0.346573591 * r2.w; - r3.w = r6.x / cb0[37].y; - r2.w = -r2.w * r3.w + -0.744727492; - r0.w = r0.w ? r1.w : r2.w; - r1.w = r7.y + -r0.w; - r2.w = cb0[37].w / cb0[37].y; - r2.w = r2.w + -r1.w; - r5.xyz = log2(r5.xyz); - r7.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r1.www; - r8.xyz = cb0[37].yyy * r8.xyz; - r9.xy = r6.xw + r6.xw; - r1.w = cb0[37].y * -2; - r1.w = r1.w / r6.x; - r10.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r11.xyz = r10.xyz * r1.www; - r11.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r11.xyz; - r11.xyz = exp2(r11.xyz); - r11.xyz = float3(1, 1, 1) + r11.xyz; - r9.xzw = r9.xxx / r11.xyz; - r9.xzw = -cb0[38].xxx + r9.xzw; - r1.w = cb0[37].y + cb0[37].y; - r1.w = r1.w / r6.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r2.www; - r5.xyz = r5.xyz * r1.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r9.yyy / r5.xyz; - r5.xyz = r6.yyy + -r5.xyz; - r6.xyz = cmp(r7.xyz < r0.www); - r6.xyz = r6.xyz ? r9.xzw : r8.xyz; - r7.xyz = cmp(r2.www < r7.xyz); - r5.xyz = r7.xyz ? r5.xyz : r8.xyz; - r1.w = r2.w + -r0.w; - r7.xyz = saturate(r10.xyz / r1.www); - r0.w = cmp(r2.w < r0.w); - r8.xyz = float3(1, 1, 1) + -r7.xyz; - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r8.xyz = -r7.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r7.xyz = r7.xyz * r7.xyz; - r7.xyz = r7.xyz * r8.xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r7.xyz * r5.xyz + r6.xyz; - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[37].xxx * r5.xyz + r4.xyz; - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r4.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r4.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r4.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[36].zzz * r5.xyz + r4.xyz; - r5.x = saturate(dot(cb1[12].xyz, r4.xyz)); - r5.y = saturate(dot(cb1[13].xyz, r4.xyz)); - r5.z = saturate(dot(cb1[14].xyz, r4.xyz)); - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r5.xyz; - r6.xyz = cmp(r5.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r5.xyz = log2(r5.xyz); - r5.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = r5.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r4.xyz = r6.xyz ? r5.xyz : r4.xyz; - r5.yzw = r4.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r5.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r5.y + r1.w; - r5.x = 0.0625 * r1.w; - r6.xyz = t0.Sample(s0_s, r5.xz).xyz; - r5.xy = float2(0.0625, 0) + r5.xz; - r5.xyz = t0.Sample(s0_s, r5.xy).xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r0.www * r5.xyz + r6.xyz; - r5.xyz = cb0[5].yyy * r5.xyz; - r4.xyz = cb0[5].xxx * r4.xyz + r5.xyz; - r4.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r4.xyz); - r5.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r4.xyz); - r6.xyz = r4.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r4.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r4.xyz; - r4.xyz = r5.xyz ? r6.xyz : r4.xyz; - r5.xyz = r4.xyz * r4.xyz; - r4.xyz = cb0[39].yyy * r4.xyz; - r4.xyz = cb0[39].xxx * r5.xyz + r4.xyz; - r4.xyz = cb0[39].zzz + r4.xyz; - r5.xyz = cb0[14].xyz * r4.xyz; - r4.xyz = -r4.xyz * cb0[14].xyz + cb0[13].xyz; - r4.xyz = cb0[13].www * r4.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r4.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r2.xyz, r6.xyz); - r7.y = dot(r3.xyz, r6.xyz); - r7.z = dot(r0.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r1.xyz); - r7.y = dot(cb1[13].xyz, r1.xyz); - r7.z = dot(cb1[14].xyz, r1.xyz); - r1.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r7.xyz + r1.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r1.xyz); - r7.y = dot(cb1[9].xyz, r1.xyz); - r7.z = dot(cb1[10].xyz, r1.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r4.xyz); - r8.y = dot(cb1[9].xyz, r4.xyz); - r8.z = dot(cb1[10].xyz, r4.xyz); - r4.x = dot(r2.xyz, r8.xyz); - r4.y = dot(r3.xyz, r8.xyz); - r4.z = dot(r0.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r2.xyz, r8.xyz); - r1.w = dot(r3.xyz, r8.xyz); - r0.x = dot(r0.xyz, r8.xyz); - r2.x = log2(r0.w); - r2.y = log2(r1.w); - r2.z = log2(r0.x); - r0.xyz = cb0[40].zzz * r2.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r7.yyy ? r4.xyz : r0.xyz; - r6.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x7570E7B1.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x7570E7B1.ps_5_1.hlsl deleted file mode 100644 index 30e7791f..00000000 --- a/src/games/ue-dx12/lutbuilder_0x7570E7B1.ps_5_1.hlsl +++ /dev/null @@ -1,394 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:00:30 2024 -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r0.xyz = float3(14, 14, 14) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r1.xyz); - r0.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r1.xyz); - r0.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r1.xyz); - r0.xyz = r0.xyz + -r1.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r2.xyz = r1.xyz / r0.www; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r1.w = dot(r2.xyz, r2.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r1.w * r0.w; - r0.xyz = r0.www * r0.xyz + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.xyz = r0.xyz + -r0.www; - r1.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r1.xyz = r1.xyz * r1.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r3.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.x = 1 + -r1.w; - r2.y = -cb0[36].x + r0.w; - r2.z = cb0[36].y + -cb0[36].x; - r2.z = 1 / r2.z; - r2.y = saturate(r2.y * r2.z); - r2.z = r2.y * -2 + 3; - r2.y = r2.y * r2.y; - r2.x = -r2.z * r2.y + r2.x; - r2.y = r2.z * r2.y; - r1.xyz = r2.xxx * r1.xyz; - r3.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = r2.xzw * r0.xyz + r0.www; - r2.xzw = max(float3(0, 0, 0), r2.xzw); - r2.xzw = float3(5.55555534, 5.55555534, 5.55555534) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r3.xyz = r3.xyz * r3.www; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r2.xzw = float3(0.180000007, 0.180000007, 0.180000007) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r3.xyz = r3.xyz * r3.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r3.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r3.xyz = r3.xyz * r3.www; - r4.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz + r4.www; - r2.xzw = r2.xzw * r3.xyz + r4.xyz; - r1.xyz = r2.xzw * r1.www + r1.xyz; - r3.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = float3(1, 1, 1) / r2.xzw; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r3.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r2.xzw = r3.xyz * r3.www; - r3.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r0.xyz = r0.xyz * r2.xzw + r3.xyz; - r0.xyz = r0.xyz * r2.yyy + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r1.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r1.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r2.xyz = r1.wzy + -r1.zyw; - r2.xy = r2.xy * r1.wz; - r0.w = r2.x + r2.y; - r0.w = r1.y * r2.z + r0.w; - r0.w = sqrt(r0.w); - r1.x = r1.w + r1.z; - r1.x = r1.x + r1.y; - r0.w = r0.w * 1.75 + r1.x; - r1.x = 0.333333343 * r0.w; - r1.x = 0.0799999982 / r1.x; - r1.x = -0.5 + r1.x; - r2.x = min(r1.y, r1.z); - r2.x = min(r2.x, r1.w); - r2.y = max(r1.y, r1.z); - r2.y = max(r2.y, r1.w); - r2.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 0.00999999978), r2.xyy); - r2.x = r2.y + -r2.x; - r2.x = r2.x / r2.z; - r2.y = -0.400000006 + r2.x; - r2.z = cmp(0 < r2.y); - r2.w = cmp(r2.y < 0); - r2.y = 2.5 * r2.y; - r2.y = 1 + -abs(r2.y); - r2.y = max(0, r2.y); - r2.y = -r2.y * r2.y + 1; - r2.z = (int)-r2.z + (int)r2.w; - r2.z = (int)r2.z; - r2.y = r2.z * r2.y + 1; - r2.y = 0.0250000004 * r2.y; - r1.x = r2.y * r1.x; - r2.z = cmp(r0.w >= 0.479999989); - r0.w = cmp(0.159999996 >= r0.w); - r1.x = r2.z ? 0 : r1.x; - r0.w = r0.w ? r2.y : r1.x; - r0.w = 1 + r0.w; - r3.yzw = r1.yzw * r0.www; - r1.x = -r1.y * r0.w + 0.0299999993; - r1.y = r1.z * r0.w + -r3.w; - r1.y = 1.73205078 * r1.y; - r1.z = r3.y * 2 + -r3.z; - r0.w = -r1.w * r0.w + r1.z; - r1.z = max(abs(r1.y), abs(r0.w)); - r1.z = 1 / r1.z; - r1.w = min(abs(r1.y), abs(r0.w)); - r1.z = r1.w * r1.z; - r1.w = r1.z * r1.z; - r2.y = r1.w * 0.0208350997 + -0.0851330012; - r2.y = r1.w * r2.y + 0.180141002; - r2.y = r1.w * r2.y + -0.330299497; - r1.w = r1.w * r2.y + 0.999866009; - r2.y = r1.z * r1.w; - r2.y = r2.y * -2 + 1.57079637; - r2.z = cmp(abs(r0.w) < abs(r1.y)); - r2.y = r2.z ? r2.y : 0; - r1.z = r1.z * r1.w + r2.y; - r1.w = cmp(r0.w < -r0.w); - r1.w = r1.w ? -3.141593 : 0; - r1.z = r1.z + r1.w; - r1.w = min(r1.y, r0.w); - r0.w = max(r1.y, r0.w); - r0.w = cmp(r0.w >= -r0.w); - r1.y = cmp(r1.w < -r1.w); - r0.w = r0.w ? r1.y : 0; - r0.w = r0.w ? -r1.z : r1.z; - r0.w = 57.2957802 * r0.w; - r1.yz = cmp(r3.zw == r3.yz); - r1.y = r1.z ? r1.y : 0; - r0.w = r1.y ? 0 : r0.w; - r1.y = cmp(r0.w < 0); - r1.z = 360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = max(0, r0.w); - r0.w = min(360, r0.w); - r1.y = cmp(180 < r0.w); - r1.z = -360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = 0.0148148146 * r0.w; - r0.w = 1 + -abs(r0.w); - r0.w = max(0, r0.w); - r1.y = r0.w * -2 + 3; - r0.w = r0.w * r0.w; - r0.w = r1.y * r0.w; - r0.w = r0.w * r0.w; - r0.w = r0.w * r2.x; - r0.w = r0.w * r1.x; - r3.x = r0.w * 0.180000007 + r3.y; - r1.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r3.xzw); - r1.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r3.xzw); - r1.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r3.xzw); - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r1.xyz = log2(r1.xyz); - r0.w = cb0[37].w / cb0[37].y; - r2.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r2.xw = -cb0[37].zw + r2.xy; - r1.w = r2.z / r2.x; - r2.z = -1 + r1.w; - r2.z = 1 + -r2.z; - r1.w = r1.w / r2.z; - r1.w = log2(r1.w); - r1.w = 0.346573591 * r1.w; - r2.z = r2.x / cb0[37].y; - r1.w = -r1.w * r2.z + -0.744727492; - r2.z = cmp(0.800000012 < cb0[37].z); - r3.xy = -cb0[37].zz + float2(0.819999993, 1); - r3.xy = r3.xy / cb0[37].yy; - r3.x = -0.744727492 + r3.x; - r1.w = r2.z ? r3.x : r1.w; - r2.z = r3.y + -r1.w; - r0.w = -r2.z + r0.w; - r3.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r2.zzz; - r3.xyz = cb0[37].yyy * r3.xyz; - r4.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r2.z = cb0[37].y + cb0[37].y; - r2.z = r2.z / r2.w; - r4.xyz = r2.zzz * r4.xyz; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(1, 1, 1) + r4.xyz; - r2.zw = r2.xw + r2.xw; - r4.xyz = r2.www / r4.xyz; - r4.xyz = -r4.xyz + r2.yyy; - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r1.xyz; - r1.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r1.www; - r6.xyz = cmp(r0.www < r5.xyz); - r5.xyz = cmp(r5.xyz < r1.www); - r4.xyz = r6.xyz ? r4.xyz : r3.xyz; - r2.y = cb0[37].y * -2; - r2.x = r2.y / r2.x; - r2.xyw = r2.xxx * r1.xyz; - r2.xyw = float3(1.44269502, 1.44269502, 1.44269502) * r2.xyw; - r2.xyw = exp2(r2.xyw); - r2.xyw = float3(1, 1, 1) + r2.xyw; - r2.xyz = r2.zzz / r2.xyw; - r2.xyz = -cb0[38].xxx + r2.xyz; - r2.xyz = r5.xyz ? r2.xyz : r3.xyz; - r3.xyz = r4.xyz + -r2.xyz; - r2.w = r0.w + -r1.w; - r0.w = cmp(r0.w < r1.w); - r1.xyz = saturate(r1.xyz / r2.www); - r4.xyz = float3(1, 1, 1) + -r1.xyz; - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.xyz = -r1.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r1.xyz = r1.xyz * r1.xyz; - r1.xyz = r1.xyz * r4.xyz; - r1.xyz = r1.xyz * r3.xyz + r2.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[37].xxx * r1.xyz + r0.xyz; - r1.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r1.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r1.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.x = saturate(dot(cb1[12].xyz, r0.xyz)); - r1.y = saturate(dot(cb1[13].xyz, r0.xyz)); - r1.z = saturate(dot(cb1[14].xyz, r0.xyz)); - r0.xyz = log2(r1.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r1.xyz; - r1.xyz = cmp(r1.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = r1.xyz ? r0.xyz : r2.xyz; - r1.yzw = r0.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r1.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.y = r1.y + r1.w; - r1.x = 0.0625 * r1.y; - r1.yw = float2(0.0625, 0) + r1.xz; - r2.xyz = t0.Sample(s0_s, r1.xz).xyz; - r1.xyz = t0.Sample(s0_s, r1.yw).xyz; - r1.xyz = r1.xyz + -r2.xyz; - r1.xyz = r0.www * r1.xyz + r2.xyz; - r1.xyz = cb0[5].yyy * r1.xyz; - r0.xyz = cb0[5].xxx * r0.xyz + r1.xyz; - r0.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r0.xyz); - r1.xyz = r0.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r1.xyz = log2(r1.xyz); - r1.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r0.xyz); - r0.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r0.xyz; - r0.xyz = r2.xyz ? r1.xyz : r0.xyz; - r1.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[39].yyy * r0.xyz; - r0.xyz = cb0[39].xxx * r1.xyz + r0.xyz; - r0.xyz = cb0[39].zzz + r0.xyz; - r1.xyz = cb0[14].xyz * r0.xyz; - r0.xyz = -r0.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r0.xyz + r1.xyz; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = log2(r0.xyz); - r0.xyz = cb0[40].yyy * r0.xyz; - r0.xyz = exp2(r0.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r0.xyz); - return; - } - - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r3.xyz = r2.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r3.xyz; - r3.xyz = r2.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r3.xyz; - r3.x = dot(r3.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r4.xyz = r2.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r4.xyz; - r4.xyz = r2.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r4.xyz; - r3.y = dot(r4.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r4.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r2.yzw; - r3.z = dot(r2.xyz, r1.xyz); - r0.xyz = cb1[20].xxx ? r0.xyz : r3.xyz; - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r0.xyz; - r2.xyz = cmp(r0.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = log2(r0.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r2.xyz ? r0.xyz : r1.xyz; - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r0.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x80CD76B6.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0x80CD76B6.ps_5_1.hlsl deleted file mode 100644 index e0917655..00000000 --- a/src/games/ue-dx12/lutbuilder_0x80CD76B6.ps_5_1.hlsl +++ /dev/null @@ -1,363 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:00:59 2024 -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r0.xyz = float3(14, 14, 14) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r1.xyz); - r0.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r1.xyz); - r0.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r1.xyz); - r0.xyz = r0.xyz + -r1.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r2.xyz = r1.xyz / r0.www; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r1.w = dot(r2.xyz, r2.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r1.w * r0.w; - r0.xyz = r0.www * r0.xyz + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.xyz = r0.xyz + -r0.www; - r1.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r1.xyz = r1.xyz * r1.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r3.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.x = 1 + -r1.w; - r2.y = -cb0[36].x + r0.w; - r2.z = cb0[36].y + -cb0[36].x; - r2.z = 1 / r2.z; - r2.y = saturate(r2.y * r2.z); - r2.z = r2.y * -2 + 3; - r2.y = r2.y * r2.y; - r2.x = -r2.z * r2.y + r2.x; - r2.y = r2.z * r2.y; - r1.xyz = r2.xxx * r1.xyz; - r3.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = r2.xzw * r0.xyz + r0.www; - r2.xzw = max(float3(0, 0, 0), r2.xzw); - r2.xzw = float3(5.55555534, 5.55555534, 5.55555534) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r3.xyz = r3.xyz * r3.www; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r2.xzw = float3(0.180000007, 0.180000007, 0.180000007) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r3.xyz = r3.xyz * r3.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r3.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r3.xyz = r3.xyz * r3.www; - r4.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz + r4.www; - r2.xzw = r2.xzw * r3.xyz + r4.xyz; - r1.xyz = r2.xzw * r1.www + r1.xyz; - r3.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = float3(1, 1, 1) / r2.xzw; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r3.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r2.xzw = r3.xyz * r3.www; - r3.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r0.xyz = r0.xyz * r2.xzw + r3.xyz; - r0.xyz = r0.xyz * r2.yyy + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r1.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r1.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r2.xyz = r1.wzy + -r1.zyw; - r2.xy = r2.xy * r1.wz; - r0.w = r2.x + r2.y; - r0.w = r1.y * r2.z + r0.w; - r0.w = sqrt(r0.w); - r1.x = r1.w + r1.z; - r1.x = r1.x + r1.y; - r0.w = r0.w * 1.75 + r1.x; - r1.x = 0.333333343 * r0.w; - r1.x = 0.0799999982 / r1.x; - r1.x = -0.5 + r1.x; - r2.x = min(r1.y, r1.z); - r2.x = min(r2.x, r1.w); - r2.y = max(r1.y, r1.z); - r2.y = max(r2.y, r1.w); - r2.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 0.00999999978), r2.xyy); - r2.x = r2.y + -r2.x; - r2.x = r2.x / r2.z; - r2.y = -0.400000006 + r2.x; - r2.z = cmp(0 < r2.y); - r2.w = cmp(r2.y < 0); - r2.y = 2.5 * r2.y; - r2.y = 1 + -abs(r2.y); - r2.y = max(0, r2.y); - r2.y = -r2.y * r2.y + 1; - r2.z = (int)-r2.z + (int)r2.w; - r2.z = (int)r2.z; - r2.y = r2.z * r2.y + 1; - r2.y = 0.0250000004 * r2.y; - r1.x = r2.y * r1.x; - r2.z = cmp(r0.w >= 0.479999989); - r0.w = cmp(0.159999996 >= r0.w); - r1.x = r2.z ? 0 : r1.x; - r0.w = r0.w ? r2.y : r1.x; - r0.w = 1 + r0.w; - r3.yzw = r1.yzw * r0.www; - r1.x = -r1.y * r0.w + 0.0299999993; - r1.y = r1.z * r0.w + -r3.w; - r1.y = 1.73205078 * r1.y; - r1.z = r3.y * 2 + -r3.z; - r0.w = -r1.w * r0.w + r1.z; - r1.z = max(abs(r1.y), abs(r0.w)); - r1.z = 1 / r1.z; - r1.w = min(abs(r1.y), abs(r0.w)); - r1.z = r1.w * r1.z; - r1.w = r1.z * r1.z; - r2.y = r1.w * 0.0208350997 + -0.0851330012; - r2.y = r1.w * r2.y + 0.180141002; - r2.y = r1.w * r2.y + -0.330299497; - r1.w = r1.w * r2.y + 0.999866009; - r2.y = r1.z * r1.w; - r2.y = r2.y * -2 + 1.57079637; - r2.z = cmp(abs(r0.w) < abs(r1.y)); - r2.y = r2.z ? r2.y : 0; - r1.z = r1.z * r1.w + r2.y; - r1.w = cmp(r0.w < -r0.w); - r1.w = r1.w ? -3.141593 : 0; - r1.z = r1.z + r1.w; - r1.w = min(r1.y, r0.w); - r0.w = max(r1.y, r0.w); - r0.w = cmp(r0.w >= -r0.w); - r1.y = cmp(r1.w < -r1.w); - r0.w = r0.w ? r1.y : 0; - r0.w = r0.w ? -r1.z : r1.z; - r0.w = 57.2957802 * r0.w; - r1.yz = cmp(r3.zw == r3.yz); - r1.y = r1.z ? r1.y : 0; - r0.w = r1.y ? 0 : r0.w; - r1.y = cmp(r0.w < 0); - r1.z = 360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = max(0, r0.w); - r0.w = min(360, r0.w); - r1.y = cmp(180 < r0.w); - r1.z = -360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = 0.0148148146 * r0.w; - r0.w = 1 + -abs(r0.w); - r0.w = max(0, r0.w); - r1.y = r0.w * -2 + 3; - r0.w = r0.w * r0.w; - r0.w = r1.y * r0.w; - r0.w = r0.w * r0.w; - r0.w = r0.w * r2.x; - r0.w = r0.w * r1.x; - r3.x = r0.w * 0.180000007 + r3.y; - r1.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r3.xzw); - r1.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r3.xzw); - r1.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r3.xzw); - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r1.xyz = log2(r1.xyz); - r0.w = cb0[37].w / cb0[37].y; - r2.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r2.xw = -cb0[37].zw + r2.xy; - r1.w = r2.z / r2.x; - r2.z = -1 + r1.w; - r2.z = 1 + -r2.z; - r1.w = r1.w / r2.z; - r1.w = log2(r1.w); - r1.w = 0.346573591 * r1.w; - r2.z = r2.x / cb0[37].y; - r1.w = -r1.w * r2.z + -0.744727492; - r2.z = cmp(0.800000012 < cb0[37].z); - r3.xy = -cb0[37].zz + float2(0.819999993, 1); - r3.xy = r3.xy / cb0[37].yy; - r3.x = -0.744727492 + r3.x; - r1.w = r2.z ? r3.x : r1.w; - r2.z = r3.y + -r1.w; - r0.w = -r2.z + r0.w; - r3.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r2.zzz; - r3.xyz = cb0[37].yyy * r3.xyz; - r4.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r2.z = cb0[37].y + cb0[37].y; - r2.z = r2.z / r2.w; - r4.xyz = r2.zzz * r4.xyz; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(1, 1, 1) + r4.xyz; - r2.zw = r2.xw + r2.xw; - r4.xyz = r2.www / r4.xyz; - r4.xyz = -r4.xyz + r2.yyy; - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r1.xyz; - r1.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r1.www; - r6.xyz = cmp(r0.www < r5.xyz); - r5.xyz = cmp(r5.xyz < r1.www); - r4.xyz = r6.xyz ? r4.xyz : r3.xyz; - r2.y = cb0[37].y * -2; - r2.x = r2.y / r2.x; - r2.xyw = r2.xxx * r1.xyz; - r2.xyw = float3(1.44269502, 1.44269502, 1.44269502) * r2.xyw; - r2.xyw = exp2(r2.xyw); - r2.xyw = float3(1, 1, 1) + r2.xyw; - r2.xyz = r2.zzz / r2.xyw; - r2.xyz = -cb0[38].xxx + r2.xyz; - r2.xyz = r5.xyz ? r2.xyz : r3.xyz; - r3.xyz = r4.xyz + -r2.xyz; - r2.w = r0.w + -r1.w; - r0.w = cmp(r0.w < r1.w); - r1.xyz = saturate(r1.xyz / r2.www); - r4.xyz = float3(1, 1, 1) + -r1.xyz; - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.xyz = -r1.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r1.xyz = r1.xyz * r1.xyz; - r1.xyz = r1.xyz * r4.xyz; - r1.xyz = r1.xyz * r3.xyz + r2.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[37].xxx * r1.xyz + r0.xyz; - r1.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r1.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r1.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.x = dot(cb1[12].xyz, r0.xyz); - r1.y = dot(cb1[13].xyz, r0.xyz); - r1.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[39].yyy * r0.xyz; - r0.xyz = cb0[39].xxx * r1.xyz + r0.xyz; - r0.xyz = cb0[39].zzz + r0.xyz; - r1.xyz = cb0[14].xyz * r0.xyz; - r0.xyz = -r0.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r0.xyz + r1.xyz; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = log2(r0.xyz); - r0.xyz = cb0[40].yyy * r0.xyz; - r0.xyz = exp2(r0.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r0.xyz); - return; - } - - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r3.xyz = r2.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r3.xyz; - r3.xyz = r2.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r3.xyz; - r3.x = dot(r3.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r4.xyz = r2.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r4.xyz; - r4.xyz = r2.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r4.xyz; - r3.y = dot(r4.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r4.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r2.yzw; - r3.z = dot(r2.xyz, r1.xyz); - r0.xyz = cb1[20].xxx ? r0.xyz : r3.xyz; - r1.xyz = log2(r0.xyz); - r1.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r0.xyz; - r0.xyz = cmp(r0.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r1.xyz = r1.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r0.xyz ? r1.xyz : r2.xyz; - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r0.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0x94D26E3A.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0x94D26E3A.ps_6_6.hlsl deleted file mode 100644 index 433b09b8..00000000 --- a/src/games/ue-dx12/lutbuilder_0x94D26E3A.ps_6_6.hlsl +++ /dev/null @@ -1,1041 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D Textures_1 : register(t0); - -cbuffer cb0 : register(b0) { - float cb0_005x : packoffset(c005.x); - float cb0_005y : packoffset(c005.y); - float cb0_008x : packoffset(c008.x); - float cb0_008y : packoffset(c008.y); - float cb0_008z : packoffset(c008.z); - float cb0_008w : packoffset(c008.w); - float cb0_009x : packoffset(c009.x); - float cb0_010x : packoffset(c010.x); - float cb0_010y : packoffset(c010.y); - float cb0_010z : packoffset(c010.z); - float cb0_010w : packoffset(c010.w); - float cb0_011x : packoffset(c011.x); - float cb0_011y : packoffset(c011.y); - float cb0_011z : packoffset(c011.z); - float cb0_011w : packoffset(c011.w); - float cb0_012x : packoffset(c012.x); - float cb0_012y : packoffset(c012.y); - float cb0_012z : packoffset(c012.z); - float cb0_013x : packoffset(c013.x); - float cb0_013y : packoffset(c013.y); - float cb0_013z : packoffset(c013.z); - float cb0_013w : packoffset(c013.w); - float cb0_014x : packoffset(c014.x); - float cb0_014y : packoffset(c014.y); - float cb0_014z : packoffset(c014.z); - float cb0_015x : packoffset(c015.x); - float cb0_015y : packoffset(c015.y); - float cb0_015z : packoffset(c015.z); - float cb0_015w : packoffset(c015.w); - float cb0_016x : packoffset(c016.x); - float cb0_016y : packoffset(c016.y); - float cb0_016z : packoffset(c016.z); - float cb0_016w : packoffset(c016.w); - float cb0_017x : packoffset(c017.x); - float cb0_017y : packoffset(c017.y); - float cb0_017z : packoffset(c017.z); - float cb0_017w : packoffset(c017.w); - float cb0_018x : packoffset(c018.x); - float cb0_018y : packoffset(c018.y); - float cb0_018z : packoffset(c018.z); - float cb0_018w : packoffset(c018.w); - float cb0_019x : packoffset(c019.x); - float cb0_019y : packoffset(c019.y); - float cb0_019z : packoffset(c019.z); - float cb0_019w : packoffset(c019.w); - float cb0_020x : packoffset(c020.x); - float cb0_020y : packoffset(c020.y); - float cb0_020z : packoffset(c020.z); - float cb0_020w : packoffset(c020.w); - float cb0_021x : packoffset(c021.x); - float cb0_021y : packoffset(c021.y); - float cb0_021z : packoffset(c021.z); - float cb0_021w : packoffset(c021.w); - float cb0_022x : packoffset(c022.x); - float cb0_022y : packoffset(c022.y); - float cb0_022z : packoffset(c022.z); - float cb0_022w : packoffset(c022.w); - float cb0_023x : packoffset(c023.x); - float cb0_023y : packoffset(c023.y); - float cb0_023z : packoffset(c023.z); - float cb0_023w : packoffset(c023.w); - float cb0_024x : packoffset(c024.x); - float cb0_024y : packoffset(c024.y); - float cb0_024z : packoffset(c024.z); - float cb0_024w : packoffset(c024.w); - float cb0_025x : packoffset(c025.x); - float cb0_025y : packoffset(c025.y); - float cb0_025z : packoffset(c025.z); - float cb0_025w : packoffset(c025.w); - float cb0_026x : packoffset(c026.x); - float cb0_026y : packoffset(c026.y); - float cb0_026z : packoffset(c026.z); - float cb0_026w : packoffset(c026.w); - float cb0_027x : packoffset(c027.x); - float cb0_027y : packoffset(c027.y); - float cb0_027z : packoffset(c027.z); - float cb0_027w : packoffset(c027.w); - float cb0_028x : packoffset(c028.x); - float cb0_028y : packoffset(c028.y); - float cb0_028z : packoffset(c028.z); - float cb0_028w : packoffset(c028.w); - float cb0_029x : packoffset(c029.x); - float cb0_029y : packoffset(c029.y); - float cb0_029z : packoffset(c029.z); - float cb0_029w : packoffset(c029.w); - float cb0_030x : packoffset(c030.x); - float cb0_030y : packoffset(c030.y); - float cb0_030z : packoffset(c030.z); - float cb0_030w : packoffset(c030.w); - float cb0_031x : packoffset(c031.x); - float cb0_031y : packoffset(c031.y); - float cb0_031z : packoffset(c031.z); - float cb0_031w : packoffset(c031.w); - float cb0_032x : packoffset(c032.x); - float cb0_032y : packoffset(c032.y); - float cb0_032z : packoffset(c032.z); - float cb0_032w : packoffset(c032.w); - float cb0_033x : packoffset(c033.x); - float cb0_033y : packoffset(c033.y); - float cb0_033z : packoffset(c033.z); - float cb0_033w : packoffset(c033.w); - float cb0_034x : packoffset(c034.x); - float cb0_034y : packoffset(c034.y); - float cb0_034z : packoffset(c034.z); - float cb0_034w : packoffset(c034.w); - float cb0_035x : packoffset(c035.x); - float cb0_035y : packoffset(c035.y); - float cb0_036x : packoffset(c036.x); - float cb0_036y : packoffset(c036.y); - float cb0_036z : packoffset(c036.z); - float cb0_037x : packoffset(c037.x); - float cb0_037w : packoffset(c037.w); - float cb0_038x : packoffset(c038.x); - float cb0_038y : packoffset(c038.y); - float cb0_038z : packoffset(c038.z); - float cb0_038w : packoffset(c038.w); - float cb0_039x : packoffset(c039.x); - float cb0_039y : packoffset(c039.y); - float cb0_039z : packoffset(c039.z); - float cb0_039w : packoffset(c039.w); - float cb0_040x : packoffset(c040.x); - float cb0_040y : packoffset(c040.y); - float cb0_041x : packoffset(c041.x); - float cb0_041y : packoffset(c041.y); - float cb0_041z : packoffset(c041.z); - float cb0_042y : packoffset(c042.y); - float cb0_042z : packoffset(c042.z); - uint cb0_042w : packoffset(c042.w); - uint cb0_043x : packoffset(c043.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -SamplerState Samplers_1 : register(s0); - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - - float _10[6]; - float _11[6]; - float _12[6]; - float _13[6]; - float _16 = 0.5f / (cb0_037x); - float _21 = (cb0_037x) + -1.0f; - float _22 = ((cb0_037x) * ((TEXCOORD.x) - _16)) / _21; - float _23 = ((cb0_037x) * ((TEXCOORD.y) - _16)) / _21; - float _25 = (float((uint)(SV_RenderTargetArrayIndex))) / _21; - float _45 = 1.379158854484558f; - float _46 = -0.3088507056236267f; - float _47 = -0.07034677267074585f; - float _48 = -0.06933528929948807f; - float _49 = 1.0822921991348267f; - float _50 = -0.012962047010660172f; - float _51 = -0.002159259282052517f; - float _52 = -0.045465391129255295f; - float _53 = 1.0477596521377563f; - float _111; - float _112; - float _113; - float _636; - float _669; - float _683; - float _747; - float _926; - float _937; - float _948; - float _1146; - float _1147; - float _1148; - float _1159; - float _1170; - float _1350; - float _1383; - float _1397; - float _1436; - float _1546; - float _1620; - float _1694; - float _1773; - float _1774; - float _1775; - float _1924; - float _1957; - float _1971; - float _2010; - float _2120; - float _2194; - float _2268; - float _2347; - float _2348; - float _2349; - float _2526; - float _2527; - float _2528; - if (!((((uint)(cb0_043x)) == 1))) { - _45 = 1.02579927444458f; - _46 = -0.020052503794431686f; - _47 = -0.0057713985443115234f; - _48 = -0.0022350111976265907f; - _49 = 1.0045825242996216f; - _50 = -0.002352306619286537f; - _51 = -0.005014004185795784f; - _52 = -0.025293385609984398f; - _53 = 1.0304402112960815f; - if (!((((uint)(cb0_043x)) == 2))) { - _45 = 0.6954522132873535f; - _46 = 0.14067870378494263f; - _47 = 0.16386906802654266f; - _48 = 0.044794563204050064f; - _49 = 0.8596711158752441f; - _50 = 0.0955343171954155f; - _51 = -0.005525882821530104f; - _52 = 0.004025210160762072f; - _53 = 1.0015007257461548f; - if (!((((uint)(cb0_043x)) == 3))) { - bool _34 = (((uint)(cb0_043x)) == 4); - _45 = ((_34 ? 1.0f : 1.7050515413284302f)); - _46 = ((_34 ? 0.0f : -0.6217905879020691f)); - _47 = ((_34 ? 0.0f : -0.0832584798336029f)); - _48 = ((_34 ? 0.0f : -0.13025718927383423f)); - _49 = ((_34 ? 1.0f : 1.1408027410507202f)); - _50 = ((_34 ? 0.0f : -0.010548528283834457f)); - _51 = ((_34 ? 0.0f : -0.024003278464078903f)); - _52 = ((_34 ? 0.0f : -0.1289687603712082f)); - _53 = ((_34 ? 1.0f : 1.152971863746643f)); - } - } - } - if (((((uint)(cb0_042w)) > 2))) { - float _64 = exp2(((log2(_22)) * 0.012683313339948654f)); - float _65 = exp2(((log2(_23)) * 0.012683313339948654f)); - float _66 = exp2(((log2(_25)) * 0.012683313339948654f)); - _111 = ((exp2(((log2(((max(0.0f, (_64 + -0.8359375f))) / (18.8515625f - (_64 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _112 = ((exp2(((log2(((max(0.0f, (_65 + -0.8359375f))) / (18.8515625f - (_65 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _113 = ((exp2(((log2(((max(0.0f, (_66 + -0.8359375f))) / (18.8515625f - (_66 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - } else { - _111 = (((exp2(((_22 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _112 = (((exp2(((_23 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _113 = (((exp2(((_25 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - } - float _128 = mad((UniformBufferConstants_WorkingColorSpace_008z), _113, (mad((UniformBufferConstants_WorkingColorSpace_008y), _112, ((UniformBufferConstants_WorkingColorSpace_008x)*_111)))); - float _131 = mad((UniformBufferConstants_WorkingColorSpace_009z), _113, (mad((UniformBufferConstants_WorkingColorSpace_009y), _112, ((UniformBufferConstants_WorkingColorSpace_009x)*_111)))); - float _134 = mad((UniformBufferConstants_WorkingColorSpace_010z), _113, (mad((UniformBufferConstants_WorkingColorSpace_010y), _112, ((UniformBufferConstants_WorkingColorSpace_010x)*_111)))); - float _135 = dot(float3(_128, _131, _134), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _139 = (_128 / _135) + -1.0f; - float _140 = (_131 / _135) + -1.0f; - float _141 = (_134 / _135) + -1.0f; - float _153 = (1.0f - (exp2((((_135 * _135) * -4.0f) * (cb0_038w))))) * (1.0f - (exp2(((dot(float3(_139, _140, _141), float3(_139, _140, _141))) * -4.0f)))); - float _169 = (((mad(-0.06368283927440643f, _134, (mad(-0.32929131388664246f, _131, (_128 * 1.370412826538086f))))) - _128) * _153) + _128; - float _170 = (((mad(-0.010861567221581936f, _134, (mad(1.0970908403396606f, _131, (_128 * -0.08343426138162613f))))) - _131) * _153) + _131; - float _171 = (((mad(1.203694462776184f, _134, (mad(-0.09862564504146576f, _131, (_128 * -0.02579325996339321f))))) - _134) * _153) + _134; - float _172 = dot(float3(_169, _170, _171), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _186 = (cb0_019w) + (cb0_024w); - float _200 = (cb0_018w) * (cb0_023w); - float _214 = (cb0_017w) * (cb0_022w); - float _228 = (cb0_016w) * (cb0_021w); - float _242 = (cb0_015w) * (cb0_020w); - float _246 = _169 - _172; - float _247 = _170 - _172; - float _248 = _171 - _172; - float _305 = saturate((_172 / (cb0_037w))); - float _309 = (_305 * _305) * (3.0f - (_305 * 2.0f)); - float _310 = 1.0f - _309; - float _319 = (cb0_019w) + (cb0_034w); - float _328 = (cb0_018w) * (cb0_033w); - float _337 = (cb0_017w) * (cb0_032w); - float _346 = (cb0_016w) * (cb0_031w); - float _355 = (cb0_015w) * (cb0_030w); - float _418 = saturate(((_172 - (cb0_038x)) / ((cb0_038y) - (cb0_038x)))); - float _422 = (_418 * _418) * (3.0f - (_418 * 2.0f)); - float _431 = (cb0_019w) + (cb0_029w); - float _440 = (cb0_018w) * (cb0_028w); - float _449 = (cb0_017w) * (cb0_027w); - float _458 = (cb0_016w) * (cb0_026w); - float _467 = (cb0_015w) * (cb0_025w); - float _525 = _309 - _422; - float _536 = ((_422 * ((((cb0_019x) + (cb0_034x)) + _319) + ((((cb0_018x) * (cb0_033x)) * _328) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_031x)) * _346) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_030x)) * _355) * _246) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_032x)) * _337)))))))) + (_310 * ((((cb0_019x) + (cb0_024x)) + _186) + ((((cb0_018x) * (cb0_023x)) * _200) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_021x)) * _228) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_020x)) * _242) * _246) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_022x)) * _214))))))))) + (((((cb0_019x) + (cb0_029x)) + _431) + ((((cb0_018x) * (cb0_028x)) * _440) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_026x)) * _458) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_025x)) * _467) * _246) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_027x)) * _449))))))) * _525); - float _538 = ((_422 * ((((cb0_019y) + (cb0_034y)) + _319) + ((((cb0_018y) * (cb0_033y)) * _328) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_031y)) * _346) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_030y)) * _355) * _247) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_032y)) * _337)))))))) + (_310 * ((((cb0_019y) + (cb0_024y)) + _186) + ((((cb0_018y) * (cb0_023y)) * _200) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_021y)) * _228) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_020y)) * _242) * _247) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_022y)) * _214))))))))) + (((((cb0_019y) + (cb0_029y)) + _431) + ((((cb0_018y) * (cb0_028y)) * _440) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_026y)) * _458) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_025y)) * _467) * _247) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_027y)) * _449))))))) * _525); - float _540 = ((_422 * ((((cb0_019z) + (cb0_034z)) + _319) + ((((cb0_018z) * (cb0_033z)) * _328) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_031z)) * _346) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_030z)) * _355) * _248) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_032z)) * _337)))))))) + (_310 * ((((cb0_019z) + (cb0_024z)) + _186) + ((((cb0_018z) * (cb0_023z)) * _200) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_021z)) * _228) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_020z)) * _242) * _248) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_022z)) * _214))))))))) + (((((cb0_019z) + (cb0_029z)) + _431) + ((((cb0_018z) * (cb0_028z)) * _440) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_026z)) * _458) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_025z)) * _467) * _248) + _172))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_027z)) * _449))))))) * _525); - - float3 untonemapped_ap1 = float3(_536, _538, _540); // CustomEdit - - float _576 = (((mad(0.061360642313957214f, _540, (mad(-4.540197551250458e-09f, _538, (_536 * 0.9386394023895264f))))) - _536) * (cb0_038z)) + _536; - float _577 = (((mad(0.169205904006958f, _540, (mad(0.8307942152023315f, _538, (_536 * 6.775371730327606e-08f))))) - _538) * (cb0_038z)) + _538; - float _578 = ((mad(-2.3283064365386963e-10f, _538, (_536 * -9.313225746154785e-10f))) * (cb0_038z)) + _540; - - float _581 = mad(0.16386905312538147f, _578, (mad(0.14067868888378143f, _577, (_576 * 0.6954522132873535f)))); - float _584 = mad(0.0955343246459961f, _578, (mad(0.8596711158752441f, _577, (_576 * 0.044794581830501556f)))); - float _587 = mad(1.0015007257461548f, _578, (mad(0.004025210160762072f, _577, (_576 * -0.005525882821530104f)))); - float _591 = max((max(_581, _584)), _587); - float _596 = ((max(_591, 1.000000013351432e-10f)) - (max((min((min(_581, _584)), _587)), 1.000000013351432e-10f))) / (max(_591, 0.009999999776482582f)); - float _609 = ((_584 + _581) + _587) + ((sqrt(((((_587 - _584) * _587) + ((_584 - _581) * _584)) + ((_581 - _587) * _581)))) * 1.75f); - float _610 = _609 * 0.3333333432674408f; - float _611 = _596 + -0.4000000059604645f; - float _612 = _611 * 5.0f; - float _616 = max((1.0f - (abs((_611 * 2.5f)))), 0.0f); - float _627 = (((float(((int(((bool)((_612 > 0.0f))))) - (int(((bool)((_612 < 0.0f)))))))) * (1.0f - (_616 * _616))) + 1.0f) * 0.02500000037252903f; - _636 = _627; - if ((!(_610 <= 0.0533333346247673f))) { - _636 = 0.0f; - if ((!(_610 >= 0.1599999964237213f))) { - _636 = (((0.23999999463558197f / _609) + -0.5f) * _627); - } - } - float _637 = _636 + 1.0f; - float _638 = _637 * _581; - float _639 = _637 * _584; - float _640 = _637 * _587; - _669 = 0.0f; - if (!(((bool)((_638 == _639))) && ((bool)((_639 == _640))))) { - float _647 = ((_638 * 2.0f) - _639) - _640; - float _650 = ((_584 - _587) * 1.7320507764816284f) * _637; - float _652 = atan((_650 / _647)); - bool _655 = (_647 < 0.0f); - bool _656 = (_647 == 0.0f); - bool _657 = (_650 >= 0.0f); - bool _658 = (_650 < 0.0f); - _669 = ((((bool)(_657 && _656)) ? 90.0f : ((((bool)(_658 && _656)) ? -90.0f : (((((bool)(_658 && _655)) ? (_652 + -3.1415927410125732f) : ((((bool)(_657 && _655)) ? (_652 + 3.1415927410125732f) : _652)))) * 57.2957763671875f))))); - } - float _674 = min((max(((((bool)((_669 < 0.0f))) ? (_669 + 360.0f) : _669)), 0.0f)), 360.0f); - if (((_674 < -180.0f))) { - _683 = (_674 + 360.0f); - } else { - _683 = _674; - if (((_674 > 180.0f))) { - _683 = (_674 + -360.0f); - } - } - float _687 = saturate((1.0f - (abs((_683 * 0.014814814552664757f))))); - float _691 = (_687 * _687) * (3.0f - (_687 * 2.0f)); - float _697 = ((_691 * _691) * ((_596 * 0.18000000715255737f) * (0.029999999329447746f - _638))) + _638; - float _707 = max(0.0f, (mad(-0.21492856740951538f, _640, (mad(-0.2365107536315918f, _639, (_697 * 1.4514392614364624f)))))); - float _708 = max(0.0f, (mad(-0.09967592358589172f, _640, (mad(1.17622971534729f, _639, (_697 * -0.07655377686023712f)))))); - float _709 = max(0.0f, (mad(0.9977163076400757f, _640, (mad(-0.006032449658960104f, _639, (_697 * 0.008316148072481155f)))))); - float _710 = dot(float3(_707, _708, _709), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _725 = ((cb0_040x) + 1.0f) - (cb0_039z); - float _727 = (cb0_040y) + 1.0f; - float _729 = _727 - (cb0_039w); - if ((((cb0_039z) > 0.800000011920929f))) { - _747 = (((0.8199999928474426f - (cb0_039z)) / (cb0_039y)) + -0.7447274923324585f); - } else { - float _738 = ((cb0_040x) + 0.18000000715255737f) / _725; - _747 = (-0.7447274923324585f - (((log2((_738 / (2.0f - _738)))) * 0.3465735912322998f) * (_725 / (cb0_039y)))); - } - float _750 = ((1.0f - (cb0_039z)) / (cb0_039y)) - _747; - float _752 = ((cb0_039w) / (cb0_039y)) - _750; - float _756 = (log2((((_707 - _710) * 0.9599999785423279f) + _710))) * 0.3010300099849701f; - float _757 = (log2((((_708 - _710) * 0.9599999785423279f) + _710))) * 0.3010300099849701f; - float _758 = (log2((((_709 - _710) * 0.9599999785423279f) + _710))) * 0.3010300099849701f; - float _762 = (cb0_039y) * (_756 + _750); - float _763 = (cb0_039y) * (_757 + _750); - float _764 = (cb0_039y) * (_758 + _750); - float _765 = _725 * 2.0f; - float _767 = ((cb0_039y) * -2.0f) / _725; - float _768 = _756 - _747; - float _769 = _757 - _747; - float _770 = _758 - _747; - float _789 = _729 * 2.0f; - float _791 = ((cb0_039y) * 2.0f) / _729; - float _816 = (((bool)((_756 < _747))) ? ((_765 / ((exp2(((_768 * 1.4426950216293335f) * _767))) + 1.0f)) - (cb0_040x)) : _762); - float _817 = (((bool)((_757 < _747))) ? ((_765 / ((exp2(((_769 * 1.4426950216293335f) * _767))) + 1.0f)) - (cb0_040x)) : _763); - float _818 = (((bool)((_758 < _747))) ? ((_765 / ((exp2(((_770 * 1.4426950216293335f) * _767))) + 1.0f)) - (cb0_040x)) : _764); - float _825 = _752 - _747; - float _829 = saturate((_768 / _825)); - float _830 = saturate((_769 / _825)); - float _831 = saturate((_770 / _825)); - bool _832 = (_752 < _747); - float _836 = (_832 ? (1.0f - _829) : _829); - float _837 = (_832 ? (1.0f - _830) : _830); - float _838 = (_832 ? (1.0f - _831) : _831); - float _857 = (((_836 * _836) * (((((bool)((_756 > _752))) ? (_727 - (_789 / ((exp2((((_756 - _752) * 1.4426950216293335f) * _791))) + 1.0f))) : _762)) - _816)) * (3.0f - (_836 * 2.0f))) + _816; - float _858 = (((_837 * _837) * (((((bool)((_757 > _752))) ? (_727 - (_789 / ((exp2((((_757 - _752) * 1.4426950216293335f) * _791))) + 1.0f))) : _763)) - _817)) * (3.0f - (_837 * 2.0f))) + _817; - float _859 = (((_838 * _838) * (((((bool)((_758 > _752))) ? (_727 - (_789 / ((exp2((((_758 - _752) * 1.4426950216293335f) * _791))) + 1.0f))) : _764)) - _818)) * (3.0f - (_838 * 2.0f))) + _818; - float _860 = dot(float3(_857, _858, _859), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _880 = ((cb0_039x) * ((max(0.0f, (((_857 - _860) * 0.9300000071525574f) + _860))) - _576)) + _576; - float _881 = ((cb0_039x) * ((max(0.0f, (((_858 - _860) * 0.9300000071525574f) + _860))) - _577)) + _577; - float _882 = ((cb0_039x) * ((max(0.0f, (((_859 - _860) * 0.9300000071525574f) + _860))) - _578)) + _578; - float _898 = (((mad(-0.06537103652954102f, _882, (mad(1.451815478503704e-06f, _881, (_880 * 1.065374732017517f))))) - _880) * (cb0_038z)) + _880; - float _899 = (((mad(-0.20366770029067993f, _882, (mad(1.2036634683609009f, _881, (_880 * -2.57161445915699e-07f))))) - _881) * (cb0_038z)) + _881; - float _900 = (((mad(0.9999996423721313f, _882, (mad(2.0954757928848267e-08f, _881, (_880 * 1.862645149230957e-08f))))) - _882) * (cb0_038z)) + _882; - float _913 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_012z), _900, (mad((UniformBufferConstants_WorkingColorSpace_012y), _899, ((UniformBufferConstants_WorkingColorSpace_012x)*_898)))))))); - float _914 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_013z), _900, (mad((UniformBufferConstants_WorkingColorSpace_013y), _899, ((UniformBufferConstants_WorkingColorSpace_013x)*_898)))))))); - float _915 = saturate((max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_014z), _900, (mad((UniformBufferConstants_WorkingColorSpace_014y), _899, ((UniformBufferConstants_WorkingColorSpace_014x)*_898)))))))); - if (((_913 < 0.0031306699384003878f))) { - _926 = (_913 * 12.920000076293945f); - } else { - _926 = (((exp2(((log2(_913)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_914 < 0.0031306699384003878f))) { - _937 = (_914 * 12.920000076293945f); - } else { - _937 = (((exp2(((log2(_914)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_915 < 0.0031306699384003878f))) { - _948 = (_915 * 12.920000076293945f); - } else { - _948 = (((exp2(((log2(_915)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - float _952 = (_937 * 0.9375f) + 0.03125f; - float _959 = _948 * 15.0f; - float _960 = floor(_959); - float _961 = _959 - _960; - float _963 = (((_926 * 0.9375f) + 0.03125f) + _960) * 0.0625f; - float4 _966 = Textures_1.Sample(Samplers_1, float2(_963, _952)); - float4 _973 = Textures_1.Sample(Samplers_1, float2((_963 + 0.0625f), _952)); - float _992 = max(6.103519990574569e-05f, ((((((_973.x) - (_966.x)) * _961) + (_966.x)) * (cb0_005y)) + ((cb0_005x)*_926))); - float _993 = max(6.103519990574569e-05f, ((((((_973.y) - (_966.y)) * _961) + (_966.y)) * (cb0_005y)) + ((cb0_005x)*_937))); - float _994 = max(6.103519990574569e-05f, ((((((_973.z) - (_966.z)) * _961) + (_966.z)) * (cb0_005y)) + ((cb0_005x)*_948))); - float _1016 = (((bool)((_992 > 0.040449999272823334f))) ? (exp2(((log2(((_992 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_992 * 0.07739938050508499f)); - float _1017 = (((bool)((_993 > 0.040449999272823334f))) ? (exp2(((log2(((_993 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_993 * 0.07739938050508499f)); - float _1018 = (((bool)((_994 > 0.040449999272823334f))) ? (exp2(((log2(((_994 * 0.9478672742843628f) + 0.05213269963860512f))) * 2.4000000953674316f))) : (_994 * 0.07739938050508499f)); - float _1044 = (cb0_014x) * ((((cb0_041y) + ((cb0_041x)*_1016)) * _1016) + (cb0_041z)); - float _1045 = (cb0_014y) * ((((cb0_041y) + ((cb0_041x)*_1017)) * _1017) + (cb0_041z)); - float _1046 = (cb0_014z) * ((((cb0_041y) + ((cb0_041x)*_1018)) * _1018) + (cb0_041z)); - float _1053 = (((cb0_013x)-_1044) * (cb0_013w)) + _1044; - float _1054 = (((cb0_013y)-_1045) * (cb0_013w)) + _1045; - float _1055 = (((cb0_013z)-_1046) * (cb0_013w)) + _1046; - float _1056 = (cb0_014x) * (mad((UniformBufferConstants_WorkingColorSpace_012z), _540, (mad((UniformBufferConstants_WorkingColorSpace_012y), _538, (_536 * (UniformBufferConstants_WorkingColorSpace_012x)))))); - float _1057 = (cb0_014y) * (mad((UniformBufferConstants_WorkingColorSpace_013z), _540, (mad((UniformBufferConstants_WorkingColorSpace_013y), _538, ((UniformBufferConstants_WorkingColorSpace_013x)*_536))))); - float _1058 = (cb0_014z) * (mad((UniformBufferConstants_WorkingColorSpace_014z), _540, (mad((UniformBufferConstants_WorkingColorSpace_014y), _538, ((UniformBufferConstants_WorkingColorSpace_014x)*_536))))); - float _1065 = (((cb0_013x)-_1056) * (cb0_013w)) + _1056; - float _1066 = (((cb0_013y)-_1057) * (cb0_013w)) + _1057; - float _1067 = (((cb0_013z)-_1058) * (cb0_013w)) + _1058; - float _1079 = exp2(((log2((max(0.0f, _1053)))) * (cb0_042y))); - float _1080 = exp2(((log2((max(0.0f, _1054)))) * (cb0_042y))); - float _1081 = exp2(((log2((max(0.0f, _1055)))) * (cb0_042y))); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_1079, _1080, _1081)); - } - - if (((((uint)(cb0_042w)) == 0))) { - float _1087 = max((dot(float3(_1079, _1080, _1081), float3(0.2126390039920807f, 0.7151690125465393f, 0.0721919983625412f))), 9.999999747378752e-05f); - float _1107 = ((((((bool)((_1087 < (cb0_036z)))) ? 0.0f : 1.0f)) * (((cb0_035y)-_1087) + ((-0.0f - (cb0_036x)) / ((cb0_035x) + _1087)))) + _1087) * (cb0_036y); - float _1108 = _1107 * (_1079 / _1087); - float _1109 = _1107 * (_1080 / _1087); - float _1110 = _1107 * (_1081 / _1087); - _1146 = _1108; - _1147 = _1109; - _1148 = _1110; - do { - if (((((uint)(UniformBufferConstants_WorkingColorSpace_020x)) == 0))) { - float _1129 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1110, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1109, ((UniformBufferConstants_WorkingColorSpace_008x)*_1108)))); - float _1132 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1110, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1109, ((UniformBufferConstants_WorkingColorSpace_009x)*_1108)))); - float _1135 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1110, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1109, ((UniformBufferConstants_WorkingColorSpace_010x)*_1108)))); - _1146 = (mad(_47, _1135, (mad(_46, _1132, (_1129 * _45))))); - _1147 = (mad(_50, _1135, (mad(_49, _1132, (_1129 * _48))))); - _1148 = (mad(_53, _1135, (mad(_52, _1132, (_1129 * _51))))); - } - do { - if (((_1146 < 0.0031306699384003878f))) { - _1159 = (_1146 * 12.920000076293945f); - } else { - _1159 = (((exp2(((log2(_1146)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - do { - if (((_1147 < 0.0031306699384003878f))) { - _1170 = (_1147 * 12.920000076293945f); - } else { - _1170 = (((exp2(((log2(_1147)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1148 < 0.0031306699384003878f))) { - _2526 = _1159; - _2527 = _1170; - _2528 = (_1148 * 12.920000076293945f); - } else { - _2526 = _1159; - _2527 = _1170; - _2528 = (((exp2(((log2(_1148)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 1))) { - float _1197 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1080, ((UniformBufferConstants_WorkingColorSpace_008x)*_1079)))); - float _1200 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1080, ((UniformBufferConstants_WorkingColorSpace_009x)*_1079)))); - float _1203 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1080, ((UniformBufferConstants_WorkingColorSpace_010x)*_1079)))); - float _1213 = max(6.103519990574569e-05f, (mad(_47, _1203, (mad(_46, _1200, (_1197 * _45)))))); - float _1214 = max(6.103519990574569e-05f, (mad(_50, _1203, (mad(_49, _1200, (_1197 * _48)))))); - float _1215 = max(6.103519990574569e-05f, (mad(_53, _1203, (mad(_52, _1200, (_1197 * _51)))))); - _2526 = (min((_1213 * 4.5f), (((exp2(((log2((max(_1213, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2527 = (min((_1214 * 4.5f), (((exp2(((log2((max(_1214, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2528 = (min((_1215 * 4.5f), (((exp2(((log2((max(_1215, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - } else { - if ((((bool)((((uint)(cb0_042w)) == 3))) || ((bool)((((uint)(cb0_042w)) == 5))))) { - _12[0] = (cb0_010x); - _12[1] = (cb0_010y); - _12[2] = (cb0_010z); - _12[3] = (cb0_010w); - _12[4] = (cb0_012x); - _12[5] = (cb0_012x); - _13[0] = (cb0_011x); - _13[1] = (cb0_011y); - _13[2] = (cb0_011z); - _13[3] = (cb0_011w); - _13[4] = (cb0_012y); - _13[5] = (cb0_012y); - float _1290 = (cb0_012z)*_1065; - float _1291 = (cb0_012z)*_1066; - float _1292 = (cb0_012z)*_1067; - float _1295 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1292, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1291, ((UniformBufferConstants_WorkingColorSpace_016x)*_1290)))); - float _1298 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1292, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1291, ((UniformBufferConstants_WorkingColorSpace_017x)*_1290)))); - float _1301 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1292, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1291, ((UniformBufferConstants_WorkingColorSpace_018x)*_1290)))); - float _1305 = max((max(_1295, _1298)), _1301); - float _1310 = ((max(_1305, 1.000000013351432e-10f)) - (max((min((min(_1295, _1298)), _1301)), 1.000000013351432e-10f))) / (max(_1305, 0.009999999776482582f)); - float _1323 = ((_1298 + _1295) + _1301) + ((sqrt(((((_1301 - _1298) * _1301) + ((_1298 - _1295) * _1298)) + ((_1295 - _1301) * _1295)))) * 1.75f); - float _1324 = _1323 * 0.3333333432674408f; - float _1325 = _1310 + -0.4000000059604645f; - float _1326 = _1325 * 5.0f; - float _1330 = max((1.0f - (abs((_1325 * 2.5f)))), 0.0f); - float _1341 = (((float(((int(((bool)((_1326 > 0.0f))))) - (int(((bool)((_1326 < 0.0f)))))))) * (1.0f - (_1330 * _1330))) + 1.0f) * 0.02500000037252903f; - _1350 = _1341; - do { - if ((!(_1324 <= 0.0533333346247673f))) { - _1350 = 0.0f; - if ((!(_1324 >= 0.1599999964237213f))) { - _1350 = (((0.23999999463558197f / _1323) + -0.5f) * _1341); - } - } - float _1351 = _1350 + 1.0f; - float _1352 = _1351 * _1295; - float _1353 = _1351 * _1298; - float _1354 = _1351 * _1301; - _1383 = 0.0f; - do { - if (!(((bool)((_1352 == _1353))) && ((bool)((_1353 == _1354))))) { - float _1361 = ((_1352 * 2.0f) - _1353) - _1354; - float _1364 = ((_1298 - _1301) * 1.7320507764816284f) * _1351; - float _1366 = atan((_1364 / _1361)); - bool _1369 = (_1361 < 0.0f); - bool _1370 = (_1361 == 0.0f); - bool _1371 = (_1364 >= 0.0f); - bool _1372 = (_1364 < 0.0f); - _1383 = ((((bool)(_1371 && _1370)) ? 90.0f : ((((bool)(_1372 && _1370)) ? -90.0f : (((((bool)(_1372 && _1369)) ? (_1366 + -3.1415927410125732f) : ((((bool)(_1371 && _1369)) ? (_1366 + 3.1415927410125732f) : _1366)))) * 57.2957763671875f))))); - } - float _1388 = min((max(((((bool)((_1383 < 0.0f))) ? (_1383 + 360.0f) : _1383)), 0.0f)), 360.0f); - do { - if (((_1388 < -180.0f))) { - _1397 = (_1388 + 360.0f); - } else { - _1397 = _1388; - if (((_1388 > 180.0f))) { - _1397 = (_1388 + -360.0f); - } - } - _1436 = 0.0f; - do { - if ((((bool)((_1397 > -67.5f))) && ((bool)((_1397 < 67.5f))))) { - float _1403 = (_1397 + 67.5f) * 0.029629629105329514f; - int _1404 = int(1404); - float _1406 = _1403 - (float(_1404)); - float _1407 = _1406 * _1406; - float _1408 = _1407 * _1406; - if (((_1404 == 3))) { - _1436 = (((0.1666666716337204f - (_1406 * 0.5f)) + (_1407 * 0.5f)) - (_1408 * 0.1666666716337204f)); - } else { - if (((_1404 == 2))) { - _1436 = ((0.6666666865348816f - _1407) + (_1408 * 0.5f)); - } else { - if (((_1404 == 1))) { - _1436 = (((_1408 * -0.5f) + 0.1666666716337204f) + ((_1407 + _1406) * 0.5f)); - } else { - _1436 = ((((bool)((_1404 == 0))) ? (_1408 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1445 = min((max(((((_1310 * 0.27000001072883606f) * (0.029999999329447746f - _1352)) * _1436) + _1352), 0.0f)), 65535.0f); - float _1446 = min((max(_1353, 0.0f)), 65535.0f); - float _1447 = min((max(_1354, 0.0f)), 65535.0f); - float _1460 = min((max((mad(-0.21492856740951538f, _1447, (mad(-0.2365107536315918f, _1446, (_1445 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1461 = min((max((mad(-0.09967592358589172f, _1447, (mad(1.17622971534729f, _1446, (_1445 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1462 = min((max((mad(0.9977163076400757f, _1447, (mad(-0.006032449658960104f, _1446, (_1445 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1463 = dot(float3(_1460, _1461, _1462), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1474 = log2((max((((_1460 - _1463) * 0.9599999785423279f) + _1463), 1.000000013351432e-10f))); - float _1475 = _1474 * 0.3010300099849701f; - float _1476 = log2((cb0_008x)); - float _1477 = _1476 * 0.3010300099849701f; - do { - if (!(!(_1475 <= _1477))) { - _1546 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1484 = log2((cb0_009x)); - float _1485 = _1484 * 0.3010300099849701f; - if ((((bool)((_1475 > _1477))) && ((bool)((_1475 < _1485))))) { - float _1493 = ((_1474 - _1476) * 0.9030900001525879f) / ((_1484 - _1476) * 0.3010300099849701f); - int _1494 = int(1494); - float _1496 = _1493 - (float(_1494)); - float _1498 = _12[_1494]; - float _1501 = _12[(_1494 + 1)]; - float _1506 = _1498 * 0.5f; - _1546 = (dot(float3((_1496 * _1496), _1496, 1.0f), float3((mad((_12[(_1494 + 2)]), 0.5f, (mad(_1501, -1.0f, _1506)))), (_1501 - _1498), (mad(_1501, 0.5f, _1506))))); - } else { - do { - if (!(!(_1475 >= _1485))) { - float _1515 = log2((cb0_008z)); - if (((_1475 < (_1515 * 0.3010300099849701f)))) { - float _1523 = ((_1474 - _1484) * 0.9030900001525879f) / ((_1515 - _1484) * 0.3010300099849701f); - int _1524 = int(1524); - float _1526 = _1523 - (float(_1524)); - float _1528 = _13[_1524]; - float _1531 = _13[(_1524 + 1)]; - float _1536 = _1528 * 0.5f; - _1546 = (dot(float3((_1526 * _1526), _1526, 1.0f), float3((mad((_13[(_1524 + 2)]), 0.5f, (mad(_1531, -1.0f, _1536)))), (_1531 - _1528), (mad(_1531, 0.5f, _1536))))); - break; - } - } - _1546 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1550 = log2((max((((_1461 - _1463) * 0.9599999785423279f) + _1463), 1.000000013351432e-10f))); - float _1551 = _1550 * 0.3010300099849701f; - do { - if (!(!(_1551 <= _1477))) { - _1620 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1558 = log2((cb0_009x)); - float _1559 = _1558 * 0.3010300099849701f; - if ((((bool)((_1551 > _1477))) && ((bool)((_1551 < _1559))))) { - float _1567 = ((_1550 - _1476) * 0.9030900001525879f) / ((_1558 - _1476) * 0.3010300099849701f); - int _1568 = int(1568); - float _1570 = _1567 - (float(_1568)); - float _1572 = _12[_1568]; - float _1575 = _12[(_1568 + 1)]; - float _1580 = _1572 * 0.5f; - _1620 = (dot(float3((_1570 * _1570), _1570, 1.0f), float3((mad((_12[(_1568 + 2)]), 0.5f, (mad(_1575, -1.0f, _1580)))), (_1575 - _1572), (mad(_1575, 0.5f, _1580))))); - } else { - do { - if (!(!(_1551 >= _1559))) { - float _1589 = log2((cb0_008z)); - if (((_1551 < (_1589 * 0.3010300099849701f)))) { - float _1597 = ((_1550 - _1558) * 0.9030900001525879f) / ((_1589 - _1558) * 0.3010300099849701f); - int _1598 = int(1598); - float _1600 = _1597 - (float(_1598)); - float _1602 = _13[_1598]; - float _1605 = _13[(_1598 + 1)]; - float _1610 = _1602 * 0.5f; - _1620 = (dot(float3((_1600 * _1600), _1600, 1.0f), float3((mad((_13[(_1598 + 2)]), 0.5f, (mad(_1605, -1.0f, _1610)))), (_1605 - _1602), (mad(_1605, 0.5f, _1610))))); - break; - } - } - _1620 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1624 = log2((max((((_1462 - _1463) * 0.9599999785423279f) + _1463), 1.000000013351432e-10f))); - float _1625 = _1624 * 0.3010300099849701f; - do { - if (!(!(_1625 <= _1477))) { - _1694 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1632 = log2((cb0_009x)); - float _1633 = _1632 * 0.3010300099849701f; - if ((((bool)((_1625 > _1477))) && ((bool)((_1625 < _1633))))) { - float _1641 = ((_1624 - _1476) * 0.9030900001525879f) / ((_1632 - _1476) * 0.3010300099849701f); - int _1642 = int(1642); - float _1644 = _1641 - (float(_1642)); - float _1646 = _12[_1642]; - float _1649 = _12[(_1642 + 1)]; - float _1654 = _1646 * 0.5f; - _1694 = (dot(float3((_1644 * _1644), _1644, 1.0f), float3((mad((_12[(_1642 + 2)]), 0.5f, (mad(_1649, -1.0f, _1654)))), (_1649 - _1646), (mad(_1649, 0.5f, _1654))))); - } else { - do { - if (!(!(_1625 >= _1633))) { - float _1663 = log2((cb0_008z)); - if (((_1625 < (_1663 * 0.3010300099849701f)))) { - float _1671 = ((_1624 - _1632) * 0.9030900001525879f) / ((_1663 - _1632) * 0.3010300099849701f); - int _1672 = int(1672); - float _1674 = _1671 - (float(_1672)); - float _1676 = _13[_1672]; - float _1679 = _13[(_1672 + 1)]; - float _1684 = _1676 * 0.5f; - _1694 = (dot(float3((_1674 * _1674), _1674, 1.0f), float3((mad((_13[(_1672 + 2)]), 0.5f, (mad(_1679, -1.0f, _1684)))), (_1679 - _1676), (mad(_1679, 0.5f, _1684))))); - break; - } - } - _1694 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1698 = (cb0_008w) - (cb0_008y); - float _1699 = ((exp2((_1546 * 3.321928024291992f))) - (cb0_008y)) / _1698; - float _1701 = ((exp2((_1620 * 3.321928024291992f))) - (cb0_008y)) / _1698; - float _1703 = ((exp2((_1694 * 3.321928024291992f))) - (cb0_008y)) / _1698; - float _1706 = mad(0.15618768334388733f, _1703, (mad(0.13400420546531677f, _1701, (_1699 * 0.6624541878700256f)))); - float _1709 = mad(0.053689517080783844f, _1703, (mad(0.6740817427635193f, _1701, (_1699 * 0.2722287178039551f)))); - float _1712 = mad(1.0103391408920288f, _1703, (mad(0.00406073359772563f, _1701, (_1699 * -0.005574649665504694f)))); - float _1725 = min((max((mad(-0.23642469942569733f, _1712, (mad(-0.32480329275131226f, _1709, (_1706 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _1726 = min((max((mad(0.016756348311901093f, _1712, (mad(1.6153316497802734f, _1709, (_1706 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _1727 = min((max((mad(0.9883948564529419f, _1712, (mad(-0.008284442126750946f, _1709, (_1706 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _1730 = mad(0.15618768334388733f, _1727, (mad(0.13400420546531677f, _1726, (_1725 * 0.6624541878700256f)))); - float _1733 = mad(0.053689517080783844f, _1727, (mad(0.6740817427635193f, _1726, (_1725 * 0.2722287178039551f)))); - float _1736 = mad(1.0103391408920288f, _1727, (mad(0.00406073359772563f, _1726, (_1725 * -0.005574649665504694f)))); - float _1758 = min((max(((min((max((mad(-0.23642469942569733f, _1736, (mad(-0.32480329275131226f, _1733, (_1730 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1759 = min((max(((min((max((mad(0.016756348311901093f, _1736, (mad(1.6153316497802734f, _1733, (_1730 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1760 = min((max(((min((max((mad(0.9883948564529419f, _1736, (mad(-0.008284442126750946f, _1733, (_1730 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _1773 = _1758; - _1774 = _1759; - _1775 = _1760; - do { - if (!((((uint)(cb0_042w)) == 5))) { - _1773 = (mad(_47, _1760, (mad(_46, _1759, (_1758 * _45))))); - _1774 = (mad(_50, _1760, (mad(_49, _1759, (_1758 * _48))))); - _1775 = (mad(_53, _1760, (mad(_52, _1759, (_1758 * _51))))); - } - float _1785 = exp2(((log2((_1773 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1786 = exp2(((log2((_1774 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1787 = exp2(((log2((_1775 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2526 = (exp2(((log2(((1.0f / ((_1785 * 18.6875f) + 1.0f)) * ((_1785 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2527 = (exp2(((log2(((1.0f / ((_1786 * 18.6875f) + 1.0f)) * ((_1786 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2528 = (exp2(((log2(((1.0f / ((_1787 * 18.6875f) + 1.0f)) * ((_1787 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if ((((((uint)(cb0_042w)) & -3) == 4))) { - _10[0] = (cb0_010x); - _10[1] = (cb0_010y); - _10[2] = (cb0_010z); - _10[3] = (cb0_010w); - _10[4] = (cb0_012x); - _10[5] = (cb0_012x); - _11[0] = (cb0_011x); - _11[1] = (cb0_011y); - _11[2] = (cb0_011z); - _11[3] = (cb0_011w); - _11[4] = (cb0_012y); - _11[5] = (cb0_012y); - float _1864 = (cb0_012z)*_1065; - float _1865 = (cb0_012z)*_1066; - float _1866 = (cb0_012z)*_1067; - float _1869 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1866, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1865, ((UniformBufferConstants_WorkingColorSpace_016x)*_1864)))); - float _1872 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1866, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1865, ((UniformBufferConstants_WorkingColorSpace_017x)*_1864)))); - float _1875 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1866, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1865, ((UniformBufferConstants_WorkingColorSpace_018x)*_1864)))); - float _1879 = max((max(_1869, _1872)), _1875); - float _1884 = ((max(_1879, 1.000000013351432e-10f)) - (max((min((min(_1869, _1872)), _1875)), 1.000000013351432e-10f))) / (max(_1879, 0.009999999776482582f)); - float _1897 = ((_1872 + _1869) + _1875) + ((sqrt(((((_1875 - _1872) * _1875) + ((_1872 - _1869) * _1872)) + ((_1869 - _1875) * _1869)))) * 1.75f); - float _1898 = _1897 * 0.3333333432674408f; - float _1899 = _1884 + -0.4000000059604645f; - float _1900 = _1899 * 5.0f; - float _1904 = max((1.0f - (abs((_1899 * 2.5f)))), 0.0f); - float _1915 = (((float(((int(((bool)((_1900 > 0.0f))))) - (int(((bool)((_1900 < 0.0f)))))))) * (1.0f - (_1904 * _1904))) + 1.0f) * 0.02500000037252903f; - _1924 = _1915; - do { - if ((!(_1898 <= 0.0533333346247673f))) { - _1924 = 0.0f; - if ((!(_1898 >= 0.1599999964237213f))) { - _1924 = (((0.23999999463558197f / _1897) + -0.5f) * _1915); - } - } - float _1925 = _1924 + 1.0f; - float _1926 = _1925 * _1869; - float _1927 = _1925 * _1872; - float _1928 = _1925 * _1875; - _1957 = 0.0f; - do { - if (!(((bool)((_1926 == _1927))) && ((bool)((_1927 == _1928))))) { - float _1935 = ((_1926 * 2.0f) - _1927) - _1928; - float _1938 = ((_1872 - _1875) * 1.7320507764816284f) * _1925; - float _1940 = atan((_1938 / _1935)); - bool _1943 = (_1935 < 0.0f); - bool _1944 = (_1935 == 0.0f); - bool _1945 = (_1938 >= 0.0f); - bool _1946 = (_1938 < 0.0f); - _1957 = ((((bool)(_1945 && _1944)) ? 90.0f : ((((bool)(_1946 && _1944)) ? -90.0f : (((((bool)(_1946 && _1943)) ? (_1940 + -3.1415927410125732f) : ((((bool)(_1945 && _1943)) ? (_1940 + 3.1415927410125732f) : _1940)))) * 57.2957763671875f))))); - } - float _1962 = min((max(((((bool)((_1957 < 0.0f))) ? (_1957 + 360.0f) : _1957)), 0.0f)), 360.0f); - do { - if (((_1962 < -180.0f))) { - _1971 = (_1962 + 360.0f); - } else { - _1971 = _1962; - if (((_1962 > 180.0f))) { - _1971 = (_1962 + -360.0f); - } - } - _2010 = 0.0f; - do { - if ((((bool)((_1971 > -67.5f))) && ((bool)((_1971 < 67.5f))))) { - float _1977 = (_1971 + 67.5f) * 0.029629629105329514f; - int _1978 = int(1978); - float _1980 = _1977 - (float(_1978)); - float _1981 = _1980 * _1980; - float _1982 = _1981 * _1980; - if (((_1978 == 3))) { - _2010 = (((0.1666666716337204f - (_1980 * 0.5f)) + (_1981 * 0.5f)) - (_1982 * 0.1666666716337204f)); - } else { - if (((_1978 == 2))) { - _2010 = ((0.6666666865348816f - _1981) + (_1982 * 0.5f)); - } else { - if (((_1978 == 1))) { - _2010 = (((_1982 * -0.5f) + 0.1666666716337204f) + ((_1981 + _1980) * 0.5f)); - } else { - _2010 = ((((bool)((_1978 == 0))) ? (_1982 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _2019 = min((max(((((_1884 * 0.27000001072883606f) * (0.029999999329447746f - _1926)) * _2010) + _1926), 0.0f)), 65535.0f); - float _2020 = min((max(_1927, 0.0f)), 65535.0f); - float _2021 = min((max(_1928, 0.0f)), 65535.0f); - float _2034 = min((max((mad(-0.21492856740951538f, _2021, (mad(-0.2365107536315918f, _2020, (_2019 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _2035 = min((max((mad(-0.09967592358589172f, _2021, (mad(1.17622971534729f, _2020, (_2019 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _2036 = min((max((mad(0.9977163076400757f, _2021, (mad(-0.006032449658960104f, _2020, (_2019 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _2037 = dot(float3(_2034, _2035, _2036), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2048 = log2((max((((_2034 - _2037) * 0.9599999785423279f) + _2037), 1.000000013351432e-10f))); - float _2049 = _2048 * 0.3010300099849701f; - float _2050 = log2((cb0_008x)); - float _2051 = _2050 * 0.3010300099849701f; - do { - if (!(!(_2049 <= _2051))) { - _2120 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2058 = log2((cb0_009x)); - float _2059 = _2058 * 0.3010300099849701f; - if ((((bool)((_2049 > _2051))) && ((bool)((_2049 < _2059))))) { - float _2067 = ((_2048 - _2050) * 0.9030900001525879f) / ((_2058 - _2050) * 0.3010300099849701f); - int _2068 = int(2068); - float _2070 = _2067 - (float(_2068)); - float _2072 = _10[_2068]; - float _2075 = _10[(_2068 + 1)]; - float _2080 = _2072 * 0.5f; - _2120 = (dot(float3((_2070 * _2070), _2070, 1.0f), float3((mad((_10[(_2068 + 2)]), 0.5f, (mad(_2075, -1.0f, _2080)))), (_2075 - _2072), (mad(_2075, 0.5f, _2080))))); - } else { - do { - if (!(!(_2049 >= _2059))) { - float _2089 = log2((cb0_008z)); - if (((_2049 < (_2089 * 0.3010300099849701f)))) { - float _2097 = ((_2048 - _2058) * 0.9030900001525879f) / ((_2089 - _2058) * 0.3010300099849701f); - int _2098 = int(2098); - float _2100 = _2097 - (float(_2098)); - float _2102 = _11[_2098]; - float _2105 = _11[(_2098 + 1)]; - float _2110 = _2102 * 0.5f; - _2120 = (dot(float3((_2100 * _2100), _2100, 1.0f), float3((mad((_11[(_2098 + 2)]), 0.5f, (mad(_2105, -1.0f, _2110)))), (_2105 - _2102), (mad(_2105, 0.5f, _2110))))); - break; - } - } - _2120 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2124 = log2((max((((_2035 - _2037) * 0.9599999785423279f) + _2037), 1.000000013351432e-10f))); - float _2125 = _2124 * 0.3010300099849701f; - do { - if (!(!(_2125 <= _2051))) { - _2194 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2132 = log2((cb0_009x)); - float _2133 = _2132 * 0.3010300099849701f; - if ((((bool)((_2125 > _2051))) && ((bool)((_2125 < _2133))))) { - float _2141 = ((_2124 - _2050) * 0.9030900001525879f) / ((_2132 - _2050) * 0.3010300099849701f); - int _2142 = int(2142); - float _2144 = _2141 - (float(_2142)); - float _2146 = _10[_2142]; - float _2149 = _10[(_2142 + 1)]; - float _2154 = _2146 * 0.5f; - _2194 = (dot(float3((_2144 * _2144), _2144, 1.0f), float3((mad((_10[(_2142 + 2)]), 0.5f, (mad(_2149, -1.0f, _2154)))), (_2149 - _2146), (mad(_2149, 0.5f, _2154))))); - } else { - do { - if (!(!(_2125 >= _2133))) { - float _2163 = log2((cb0_008z)); - if (((_2125 < (_2163 * 0.3010300099849701f)))) { - float _2171 = ((_2124 - _2132) * 0.9030900001525879f) / ((_2163 - _2132) * 0.3010300099849701f); - int _2172 = int(2172); - float _2174 = _2171 - (float(_2172)); - float _2176 = _11[_2172]; - float _2179 = _11[(_2172 + 1)]; - float _2184 = _2176 * 0.5f; - _2194 = (dot(float3((_2174 * _2174), _2174, 1.0f), float3((mad((_11[(_2172 + 2)]), 0.5f, (mad(_2179, -1.0f, _2184)))), (_2179 - _2176), (mad(_2179, 0.5f, _2184))))); - break; - } - } - _2194 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2198 = log2((max((((_2036 - _2037) * 0.9599999785423279f) + _2037), 1.000000013351432e-10f))); - float _2199 = _2198 * 0.3010300099849701f; - do { - if (!(!(_2199 <= _2051))) { - _2268 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2206 = log2((cb0_009x)); - float _2207 = _2206 * 0.3010300099849701f; - if ((((bool)((_2199 > _2051))) && ((bool)((_2199 < _2207))))) { - float _2215 = ((_2198 - _2050) * 0.9030900001525879f) / ((_2206 - _2050) * 0.3010300099849701f); - int _2216 = int(2216); - float _2218 = _2215 - (float(_2216)); - float _2220 = _10[_2216]; - float _2223 = _10[(_2216 + 1)]; - float _2228 = _2220 * 0.5f; - _2268 = (dot(float3((_2218 * _2218), _2218, 1.0f), float3((mad((_10[(_2216 + 2)]), 0.5f, (mad(_2223, -1.0f, _2228)))), (_2223 - _2220), (mad(_2223, 0.5f, _2228))))); - } else { - do { - if (!(!(_2199 >= _2207))) { - float _2237 = log2((cb0_008z)); - if (((_2199 < (_2237 * 0.3010300099849701f)))) { - float _2245 = ((_2198 - _2206) * 0.9030900001525879f) / ((_2237 - _2206) * 0.3010300099849701f); - int _2246 = int(2246); - float _2248 = _2245 - (float(_2246)); - float _2250 = _11[_2246]; - float _2253 = _11[(_2246 + 1)]; - float _2258 = _2250 * 0.5f; - _2268 = (dot(float3((_2248 * _2248), _2248, 1.0f), float3((mad((_11[(_2246 + 2)]), 0.5f, (mad(_2253, -1.0f, _2258)))), (_2253 - _2250), (mad(_2253, 0.5f, _2258))))); - break; - } - } - _2268 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2272 = (cb0_008w) - (cb0_008y); - float _2273 = ((exp2((_2120 * 3.321928024291992f))) - (cb0_008y)) / _2272; - float _2275 = ((exp2((_2194 * 3.321928024291992f))) - (cb0_008y)) / _2272; - float _2277 = ((exp2((_2268 * 3.321928024291992f))) - (cb0_008y)) / _2272; - float _2280 = mad(0.15618768334388733f, _2277, (mad(0.13400420546531677f, _2275, (_2273 * 0.6624541878700256f)))); - float _2283 = mad(0.053689517080783844f, _2277, (mad(0.6740817427635193f, _2275, (_2273 * 0.2722287178039551f)))); - float _2286 = mad(1.0103391408920288f, _2277, (mad(0.00406073359772563f, _2275, (_2273 * -0.005574649665504694f)))); - float _2299 = min((max((mad(-0.23642469942569733f, _2286, (mad(-0.32480329275131226f, _2283, (_2280 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _2300 = min((max((mad(0.016756348311901093f, _2286, (mad(1.6153316497802734f, _2283, (_2280 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _2301 = min((max((mad(0.9883948564529419f, _2286, (mad(-0.008284442126750946f, _2283, (_2280 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _2304 = mad(0.15618768334388733f, _2301, (mad(0.13400420546531677f, _2300, (_2299 * 0.6624541878700256f)))); - float _2307 = mad(0.053689517080783844f, _2301, (mad(0.6740817427635193f, _2300, (_2299 * 0.2722287178039551f)))); - float _2310 = mad(1.0103391408920288f, _2301, (mad(0.00406073359772563f, _2300, (_2299 * -0.005574649665504694f)))); - float _2332 = min((max(((min((max((mad(-0.23642469942569733f, _2310, (mad(-0.32480329275131226f, _2307, (_2304 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2333 = min((max(((min((max((mad(0.016756348311901093f, _2310, (mad(1.6153316497802734f, _2307, (_2304 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2334 = min((max(((min((max((mad(0.9883948564529419f, _2310, (mad(-0.008284442126750946f, _2307, (_2304 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2347 = _2332; - _2348 = _2333; - _2349 = _2334; - do { - if (!((((uint)(cb0_042w)) == 6))) { - _2347 = (mad(_47, _2334, (mad(_46, _2333, (_2332 * _45))))); - _2348 = (mad(_50, _2334, (mad(_49, _2333, (_2332 * _48))))); - _2349 = (mad(_53, _2334, (mad(_52, _2333, (_2332 * _51))))); - } - float _2359 = exp2(((log2((_2347 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2360 = exp2(((log2((_2348 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2361 = exp2(((log2((_2349 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2526 = (exp2(((log2(((1.0f / ((_2359 * 18.6875f) + 1.0f)) * ((_2359 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2527 = (exp2(((log2(((1.0f / ((_2360 * 18.6875f) + 1.0f)) * ((_2360 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2528 = (exp2(((log2(((1.0f / ((_2361 * 18.6875f) + 1.0f)) * ((_2361 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 7))) { - float _2406 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1067, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1066, ((UniformBufferConstants_WorkingColorSpace_008x)*_1065)))); - float _2409 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1067, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1066, ((UniformBufferConstants_WorkingColorSpace_009x)*_1065)))); - float _2412 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1067, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1066, ((UniformBufferConstants_WorkingColorSpace_010x)*_1065)))); - float _2431 = exp2(((log2(((mad(_47, _2412, (mad(_46, _2409, (_2406 * _45))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2432 = exp2(((log2(((mad(_50, _2412, (mad(_49, _2409, (_2406 * _48))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2433 = exp2(((log2(((mad(_53, _2412, (mad(_52, _2409, (_2406 * _51))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2526 = (exp2(((log2(((1.0f / ((_2431 * 18.6875f) + 1.0f)) * ((_2431 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2527 = (exp2(((log2(((1.0f / ((_2432 * 18.6875f) + 1.0f)) * ((_2432 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2528 = (exp2(((log2(((1.0f / ((_2433 * 18.6875f) + 1.0f)) * ((_2433 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } else { - _2526 = _1065; - _2527 = _1066; - _2528 = _1067; - if (!((((uint)(cb0_042w)) == 8))) { - if (((((uint)(cb0_042w)) == 9))) { - float _2480 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1055, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1054, ((UniformBufferConstants_WorkingColorSpace_008x)*_1053)))); - float _2483 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1055, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1054, ((UniformBufferConstants_WorkingColorSpace_009x)*_1053)))); - float _2486 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1055, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1054, ((UniformBufferConstants_WorkingColorSpace_010x)*_1053)))); - _2526 = (mad(_47, _2486, (mad(_46, _2483, (_2480 * _45))))); - _2527 = (mad(_50, _2486, (mad(_49, _2483, (_2480 * _48))))); - _2528 = (mad(_53, _2486, (mad(_52, _2483, (_2480 * _51))))); - } else { - float _2499 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1080, ((UniformBufferConstants_WorkingColorSpace_008x)*_1079)))); - float _2502 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1080, ((UniformBufferConstants_WorkingColorSpace_009x)*_1079)))); - float _2505 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1081, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1080, ((UniformBufferConstants_WorkingColorSpace_010x)*_1079)))); - _2526 = (exp2(((log2((mad(_47, _2505, (mad(_46, _2502, (_2499 * _45))))))) * (cb0_042z)))); - _2527 = (exp2(((log2((mad(_50, _2505, (mad(_49, _2502, (_2499 * _48))))))) * (cb0_042z)))); - _2528 = (exp2(((log2((mad(_53, _2505, (mad(_52, _2502, (_2499 * _51))))))) * (cb0_042z)))); - } - } - } - } - } - } - } - SV_Target.x = (_2526 * 0.9523810148239136f); - SV_Target.y = (_2527 * 0.9523810148239136f); - SV_Target.z = (_2528 * 0.9523810148239136f); - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0xA918F0C8.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xA918F0C8.ps_5_1.hlsl deleted file mode 100644 index 2edf24d2..00000000 --- a/src/games/ue-dx12/lutbuilder_0xA918F0C8.ps_5_1.hlsl +++ /dev/null @@ -1,1533 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:02:22 2024 -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r2.xyz = r0.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r0.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r0.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r2.xyz = r0.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r2.xyz; - r3.xyz = r0.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r3.xyz; - r4.xyz = r0.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.xyz = r0.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r2.xyz; - r3.xyz = r0.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r3.xyz; - r0.yzw = r0.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r0.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r2.xyz; - r3.xyz = r0.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r3.xyz; - r0.xyz = r0.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r0.yzw; - r0.w = cmp(asuint(cb0[40].w) >= 3); - r4.xyz = log2(r1.xyz); - r4.xyz = float3(0.0126833133, 0.0126833133, 0.0126833133) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r4.xyz; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r4.xyz = -r4.xyz * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r4.xyz = r5.xyz / r4.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = float3(6.27739477, 6.27739477, 6.27739477) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(100, 100, 100) * r4.xyz; - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r0.w = cb0[35].y * 1.00055635; - r0.w = 1 / r0.w; - r1.w = cmp(6996.10791 >= cb0[35].y); - r4.xy = -r0.ww * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r4.xy = r4.xy * r0.ww + float2(99.1100006, 247.479996); - r4.xy = r4.xy * r0.ww + float2(0.244063005, 0.237039998); - r4.x = r1.w ? r4.x : r4.y; - r0.w = r4.x * r4.x; - r1.w = 2.86999989 * r4.x; - r0.w = r0.w * -3 + r1.w; - r4.y = -0.275000006 + r0.w; - r5.xyz = cb0[35].yyy * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[35].y * cb0[35].y; - r5.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r5.xyz; - r1.w = r5.x / r5.y; - r5.xyw = -cb0[35].yyy * float3(2.8974182e-05, 1916156.25, 705674) + float3(1, -1.13758118e+09, 1.97471539e+09); - r2.w = r0.w * 1.61456057e-07 + r5.x; - r2.w = r5.z / r2.w; - r3.w = 3 * r1.w; - r4.z = r1.w + r1.w; - r4.z = -r2.w * 8 + r4.z; - r4.z = 4 + r4.z; - r6.x = r3.w / r4.z; - r3.w = r2.w + r2.w; - r6.y = r3.w / r4.z; - r3.w = cmp(cb0[35].y < 4000); - r4.xy = r3.ww ? r6.xy : r4.xy; - r4.zw = -r0.ww * float2(1.53176999, 308.606995) + r5.yw; - r3.w = cb0[35].y * 1189.62 + r0.w; - r3.w = 1412139.88 + r3.w; - r3.w = r3.w * r3.w; - r5.x = r4.z / r3.w; - r0.w = -cb0[35].y * 179.455994 + r0.w; - r0.w = 6193636 + r0.w; - r0.w = r0.w * r0.w; - r5.y = r4.w / r0.w; - r0.w = dot(r5.xy, r5.xy); - r0.w = rsqrt(r0.w); - r4.zw = r5.xy * r0.ww; - r0.w = cb0[35].z * r4.w; - r0.w = r0.w * 0.0500000007 + r1.w; - r1.w = cb0[35].z * -r4.z; - r1.w = r1.w * 0.0500000007 + r2.w; - r2.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.w * 8 + r0.w; - r0.w = 4 + r0.w; - r5.x = r2.w / r0.w; - r1.w = r1.w + r1.w; - r5.y = r1.w / r0.w; - r4.zw = r5.xy + -r6.xy; - r4.xy = r4.xy + r4.zw; - r4.zw = float2(0.312700003, 0.328999996); - r4.xyzw = cb0[38].wwww ? r4.xyzw : r4.zwxy; - r5.xy = max(float2(1.00000001e-10, 1.00000001e-10), r4.yw); - r5.zw = float2(1, 1) + -r4.xz; - r4.yw = r5.zw + -r4.yw; - r6.xy = r4.xz / r5.xy; - r4.xy = r4.yw / r5.xy; - r6.z = 1; - r6.w = r4.x; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r6.xzw); - r1.w = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r6.xzw); - r2.w = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r6.xzw); - r4.zw = r6.yz; - r3.w = dot(float3(-0.161400005, 0.895099998, 0.266400009), r4.yzw); - r4.x = dot(float3(0.0366999991, -0.750199974, 1.71350002), r4.yzw); - r4.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r4.yzw); - r0.w = r3.w / r0.w; - r1.w = r4.x / r1.w; - r2.w = r4.y / r2.w; - r4.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r5.xyz = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.www; - r6.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r2.www; - r7.x = r4.x; - r7.y = r5.x; - r7.z = r6.x; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r7.xyz); - r8.x = r4.y; - r8.y = r5.y; - r8.z = r6.y; - r1.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r8.xyz); - r6.x = r4.z; - r6.y = r5.z; - r2.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r3.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r7.xyz); - r4.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r8.xyz); - r4.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r4.z = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r7.xyz); - r4.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r8.xyz); - r5.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r5.yzw = cb1[1].xyz * r1.www; - r5.yzw = r0.www * cb1[0].xyz + r5.yzw; - r5.yzw = r2.www * cb1[2].xyz + r5.yzw; - r6.xyz = cb1[1].xyz * r4.xxx; - r6.xyz = r3.www * cb1[0].xyz + r6.xyz; - r6.xyz = r4.yyy * cb1[2].xyz + r6.xyz; - r4.xyw = cb1[1].xyz * r4.www; - r4.xyz = r4.zzz * cb1[0].xyz + r4.xyw; - r4.xyz = r5.xxx * cb1[2].xyz + r4.xyz; - r7.xyz = cb1[4].yyy * r6.xyz; - r7.xyz = cb1[4].xxx * r5.yzw + r7.xyz; - r7.xyz = cb1[4].zzz * r4.xyz + r7.xyz; - r8.xyz = cb1[5].yyy * r6.xyz; - r8.xyz = cb1[5].xxx * r5.yzw + r8.xyz; - r8.xyz = cb1[5].zzz * r4.xyz + r8.xyz; - r6.xyz = cb1[6].yyy * r6.xyz; - r5.xyz = cb1[6].xxx * r5.yzw + r6.xyz; - r4.xyz = cb1[6].zzz * r4.xyz + r5.xyz; - r5.x = dot(r7.xyz, r1.xyz); - r5.y = dot(r8.xyz, r1.xyz); - r5.z = dot(r4.xyz, r1.xyz); - r1.x = dot(cb1[8].xyz, r5.xyz); - r1.y = dot(cb1[9].xyz, r5.xyz); - r1.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyz = r1.xyz / r0.www; - r4.xyz = float3(-1, -1, -1) + r4.xyz; - r1.w = dot(r4.xyz, r4.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.w * r0.w; - r4.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r1.xyz); - r4.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r1.xyz); - r4.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r1.xyz = r0.www * r4.xyz + r1.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz * r4.www; - r1.xyz = r1.xyz + -r0.www; - r4.xyz = r4.xyz * r1.xyz + r0.www; - r4.xyz = max(float3(0, 0, 0), r4.xyz); - r4.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r4.xyz; - r5.xyz = r5.xyz * r5.www; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r4.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r4.xyz = r4.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r1.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].y + -cb0[36].x; - r3.w = -cb0[36].x + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r1.xyz = r6.xyz * r1.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r6.xyz = r7.xyz * r7.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r1.xyz = r1.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r1.xyz = r1.xyz * r0.www; - r1.xyz = r4.xyz * r1.www + r1.xyz; - r1.xyz = r5.xyz * r4.www + r1.xyz; - - float3 untonemapped_ap1 = r1.xyz; - - r4.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r1.xyz); - r4.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r1.xyz); - r4.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r4.xyz = cb0[36].zzz * r4.xyz + r1.xyz; - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r4.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r4.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r4.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r6.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r6.xw = -cb0[37].zw + r6.xy; - r0.w = cmp(0.800000012 < cb0[37].z); - r7.xy = -cb0[37].zz + float2(0.819999993, 1); - r7.xy = r7.xy / cb0[37].yy; - r1.w = -0.744727492 + r7.x; - r2.w = r6.z / r6.x; - r3.w = -1 + r2.w; - r3.w = 1 + -r3.w; - r2.w = r2.w / r3.w; - r2.w = log2(r2.w); - r2.w = 0.346573591 * r2.w; - r3.w = r6.x / cb0[37].y; - r2.w = -r2.w * r3.w + -0.744727492; - r0.w = r0.w ? r1.w : r2.w; - r1.w = r7.y + -r0.w; - r2.w = cb0[37].w / cb0[37].y; - r2.w = r2.w + -r1.w; - r5.xyz = log2(r5.xyz); - r7.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r1.www; - r8.xyz = cb0[37].yyy * r8.xyz; - r9.xy = r6.xw + r6.xw; - r1.w = cb0[37].y * -2; - r1.w = r1.w / r6.x; - r10.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r11.xyz = r10.xyz * r1.www; - r11.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r11.xyz; - r11.xyz = exp2(r11.xyz); - r11.xyz = float3(1, 1, 1) + r11.xyz; - r9.xzw = r9.xxx / r11.xyz; - r9.xzw = -cb0[38].xxx + r9.xzw; - r1.w = cb0[37].y + cb0[37].y; - r1.w = r1.w / r6.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r2.www; - r5.xyz = r5.xyz * r1.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r9.yyy / r5.xyz; - r5.xyz = r6.yyy + -r5.xyz; - r6.xyz = cmp(r7.xyz < r0.www); - r6.xyz = r6.xyz ? r9.xzw : r8.xyz; - r7.xyz = cmp(r2.www < r7.xyz); - r5.xyz = r7.xyz ? r5.xyz : r8.xyz; - r1.w = r2.w + -r0.w; - r7.xyz = saturate(r10.xyz / r1.www); - r0.w = cmp(r2.w < r0.w); - r8.xyz = float3(1, 1, 1) + -r7.xyz; - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r8.xyz = -r7.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r7.xyz = r7.xyz * r7.xyz; - r7.xyz = r7.xyz * r8.xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r7.xyz * r5.xyz + r6.xyz; - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[37].xxx * r5.xyz + r4.xyz; - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r4.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r4.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r4.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[36].zzz * r5.xyz + r4.xyz; - r5.x = dot(cb1[12].xyz, r4.xyz); - r5.y = dot(cb1[13].xyz, r4.xyz); - r5.z = dot(cb1[14].xyz, r4.xyz); - r4.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r4.xyz * r4.xyz; - r4.xyz = cb0[39].yyy * r4.xyz; - r4.xyz = cb0[39].xxx * r5.xyz + r4.xyz; - r4.xyz = cb0[39].zzz + r4.xyz; - r5.xyz = cb0[14].xyz * r4.xyz; - r4.xyz = -r4.xyz * cb0[14].xyz + cb0[13].xyz; - r4.xyz = cb0[13].www * r4.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r4.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r2.xyz, r6.xyz); - r7.y = dot(r3.xyz, r6.xyz); - r7.z = dot(r0.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r1.xyz); - r7.y = dot(cb1[13].xyz, r1.xyz); - r7.z = dot(cb1[14].xyz, r1.xyz); - r1.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r7.xyz + r1.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r1.xyz); - r7.y = dot(cb1[9].xyz, r1.xyz); - r7.z = dot(cb1[10].xyz, r1.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r4.xyz); - r8.y = dot(cb1[9].xyz, r4.xyz); - r8.z = dot(cb1[10].xyz, r4.xyz); - r4.x = dot(r2.xyz, r8.xyz); - r4.y = dot(r3.xyz, r8.xyz); - r4.z = dot(r0.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r2.xyz, r8.xyz); - r1.w = dot(r3.xyz, r8.xyz); - r0.x = dot(r0.xyz, r8.xyz); - r2.x = log2(r0.w); - r2.y = log2(r1.w); - r2.z = log2(r0.x); - r0.xyz = cb0[40].zzz * r2.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r7.yyy ? r4.xyz : r0.xyz; - r6.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xB1614732.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xB1614732.ps_5_1.hlsl deleted file mode 100644 index 7b406929..00000000 --- a/src/games/ue-dx12/lutbuilder_0xB1614732.ps_5_1.hlsl +++ /dev/null @@ -1,503 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:02:35 2024 -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = cb0[35].y * cb0[35].y; - r0.y = cb0[35].y * 1189.62 + r0.x; - r0.y = 1412139.88 + r0.y; - r0.y = r0.y * r0.y; - r1.xyz = -cb0[35].yyy * float3(2.8974182e-05, 1916156.25, 705674) + float3(1, -1.13758118e+09, 1.97471539e+09); - r0.zw = -r0.xx * float2(1.53176999, 308.606995) + r1.yz; - r1.x = r0.x * 1.61456057e-07 + r1.x; - r2.x = r0.z / r0.y; - r0.y = -cb0[35].y * 179.455994 + r0.x; - r0.y = 6193636 + r0.y; - r0.y = r0.y * r0.y; - r2.y = r0.w / r0.y; - r0.y = dot(r2.xy, r2.xy); - r0.y = rsqrt(r0.y); - r0.yz = r2.xy * r0.yy; - r0.y = cb0[35].z * -r0.y; - r0.z = cb0[35].z * r0.z; - r1.yzw = cb0[35].yyy * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r1.yzw = r0.xxx * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r1.yzw; - r0.xw = r1.wy / r1.xz; - r0.y = r0.y * 0.0500000007 + r0.x; - r0.z = r0.z * 0.0500000007 + r0.w; - r1.x = r0.z + r0.z; - r0.z = 3 * r0.z; - r1.x = -r0.y * 8 + r1.x; - r0.y = r0.y + r0.y; - r1.x = 4 + r1.x; - r2.xy = r0.zy / r1.xx; - r0.y = 3 * r0.w; - r0.z = r0.w + r0.w; - r0.z = -r0.x * 8 + r0.z; - r0.x = r0.x + r0.x; - r0.z = 4 + r0.z; - r1.xy = r0.yx / r0.zz; - r0.xy = r2.xy + -r1.xy; - r0.z = cb0[35].y * 1.00055635; - r0.z = 1 / r0.z; - r1.zw = -r0.zz * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r1.zw = r1.zw * r0.zz + float2(99.1100006, 247.479996); - r0.zw = r1.zw * r0.zz + float2(0.244063005, 0.237039998); - r1.z = cmp(6996.10791 >= cb0[35].y); - r2.x = r1.z ? r0.z : r0.w; - r0.z = r2.x * r2.x; - r0.w = 2.86999989 * r2.x; - r0.z = r0.z * -3 + r0.w; - r2.y = -0.275000006 + r0.z; - r0.z = cmp(cb0[35].y < 4000); - r0.zw = r0.zz ? r1.xy : r2.xy; - r0.xy = r0.zw + r0.xy; - r0.zw = float2(0.312700003, 0.328999996); - r0.xyzw = cb0[38].wwww ? r0.xyzw : r0.zwxy; - r1.xy = max(float2(1.00000001e-10, 1.00000001e-10), r0.yw); - r2.xy = r0.xz / r1.xy; - r0.xz = float2(1, 1) + -r0.xz; - r0.xy = r0.xz + -r0.yw; - r0.xy = r0.xy / r1.xy; - r2.w = r0.x; - r2.z = 1; - r0.x = dot(float3(0.895099998, 0.266400009, -0.161400005), r2.xzw); - r0.zw = r2.yz; - r1.x = dot(float3(-0.161400005, 0.895099998, 0.266400009), r0.yzw); - r0.x = r1.x / r0.x; - r1.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.xxx; - r3.x = r1.z; - r0.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r2.xzw); - r1.w = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r2.xzw); - r2.x = dot(float3(0.0366999991, -0.750199974, 1.71350002), r0.yzw); - r0.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r0.yzw); - r0.y = r0.y / r1.w; - r0.yzw = float3(0.0388999991, -0.0684999973, 1.02960002) * r0.yyy; - r0.x = r2.x / r0.x; - r2.xyz = float3(-0.750199974, 1.71350002, 0.0366999991) * r0.xxx; - r3.y = r2.z; - r3.z = r0.w; - r0.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r3.xyz); - r4.x = r1.y; - r4.y = r2.y; - r1.y = r2.x; - r4.z = r0.z; - r1.z = r0.y; - r0.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r4.xyz); - r0.yzw = cb1[1].xyz * r0.yyy; - r1.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r1.xyz); - r0.yzw = r1.www * cb1[0].xyz + r0.yzw; - r0.xyz = r0.xxx * cb1[2].xyz + r0.yzw; - r2.xyz = cb1[4].yyy * r0.xyz; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r4.xyz); - r1.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r4.xyz); - r4.xyz = cb1[1].xyz * r1.www; - r5.xyz = cb1[1].xyz * r0.www; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r1.xyz); - r1.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r1.xyz); - r1.xyz = r1.xxx * cb1[0].xyz + r4.xyz; - r4.xyz = r0.www * cb1[0].xyz + r5.xyz; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r3.xyz); - r1.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r3.xyz); - r1.xyz = r1.www * cb1[2].xyz + r1.xyz; - r3.xyz = r0.www * cb1[2].xyz + r4.xyz; - r2.xyz = cb1[4].xxx * r3.xyz + r2.xyz; - r2.xyz = cb1[4].zzz * r1.xyz + r2.xyz; - r0.w = 0.5 / cb0[35].x; - r4.xy = v0.xy + -r0.ww; - r4.xy = cb0[35].xx * r4.xy; - r0.w = cb0[35].x + -1; - r4.xy = r4.xy / r0.ww; - r1.w = (uint)v2.x; - r4.z = r1.w / r0.w; - r4.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r4.xyz; - r4.xyz = float3(14, 14, 14) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = r4.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r2.x = dot(r2.xyz, r4.xyz); - r5.xyz = cb1[5].yyy * r0.xyz; - r0.xyz = cb1[6].yyy * r0.xyz; - r0.xyz = cb1[6].xxx * r3.xyz + r0.xyz; - r3.xyz = cb1[5].xxx * r3.xyz + r5.xyz; - r3.xyz = cb1[5].zzz * r1.xyz + r3.xyz; - r0.xyz = cb1[6].zzz * r1.xyz + r0.xyz; - r2.z = dot(r0.xyz, r4.xyz); - r2.y = dot(r3.xyz, r4.xyz); - r0.x = dot(cb1[8].xyz, r2.xyz); - r0.y = dot(cb1[9].xyz, r2.xyz); - r0.z = dot(cb1[10].xyz, r2.xyz); - r1.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r0.xyz); - r1.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r0.xyz); - r1.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r2.xyz = r0.xyz / r0.www; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r1.w = dot(r2.xyz, r2.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r1.w * r0.w; - r0.xyz = r0.www * r1.xyz + r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.xyz = r0.xyz + -r0.www; - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r1.xyz = r1.xyz * r1.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r3.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r2.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r2.xyz = log2(r2.xyz); - r3.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r3.xyz = r3.xyz * r3.www; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r2.xyz = log2(r2.xyz); - r3.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r3.xyz = r3.xyz * r3.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r3.xyz = r3.xyz * r3.www; - r4.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz + r4.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r2.w = 1 + -r1.w; - r3.x = -cb0[36].x + r0.w; - r3.y = cb0[36].y + -cb0[36].x; - r3.y = 1 / r3.y; - r3.x = saturate(r3.x * r3.y); - r3.y = r3.x * -2 + 3; - r3.x = r3.x * r3.x; - r2.w = -r3.y * r3.x + r2.w; - r3.x = r3.y * r3.x; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r1.xyz * r1.www + r2.xyz; - r2.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r2.xyz = r2.xyz * r2.www; - r0.xyz = r2.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r0.xyz = log2(r0.xyz); - r2.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r0.xyz = r2.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r0.xyz = log2(r0.xyz); - r2.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r0.xyz = r2.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r2.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r4.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r3.yzw = r4.xyz + r4.www; - r0.xyz = r0.xyz * r2.xyz + r3.yzw; - r0.xyz = r0.xyz * r3.xxx + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r1.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r1.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r2.xyz = r1.wzy + -r1.zyw; - r2.xy = r2.xy * r1.wz; - r0.w = r2.x + r2.y; - r0.w = r1.y * r2.z + r0.w; - r0.w = sqrt(r0.w); - r1.x = r1.w + r1.z; - r1.x = r1.x + r1.y; - r0.w = r0.w * 1.75 + r1.x; - r1.x = 0.333333343 * r0.w; - r1.x = 0.0799999982 / r1.x; - r1.x = -0.5 + r1.x; - r2.x = min(r1.y, r1.z); - r2.x = min(r2.x, r1.w); - r2.y = max(r1.y, r1.z); - r2.y = max(r2.y, r1.w); - r2.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 0.00999999978), r2.xyy); - r2.x = r2.y + -r2.x; - r2.x = r2.x / r2.z; - r2.y = -0.400000006 + r2.x; - r2.z = cmp(0 < r2.y); - r2.w = cmp(r2.y < 0); - r2.y = 2.5 * r2.y; - r2.y = 1 + -abs(r2.y); - r2.y = max(0, r2.y); - r2.y = -r2.y * r2.y + 1; - r2.z = (int)-r2.z + (int)r2.w; - r2.z = (int)r2.z; - r2.y = r2.z * r2.y + 1; - r2.y = 0.0250000004 * r2.y; - r1.x = r2.y * r1.x; - r2.z = cmp(r0.w >= 0.479999989); - r0.w = cmp(0.159999996 >= r0.w); - r1.x = r2.z ? 0 : r1.x; - r0.w = r0.w ? r2.y : r1.x; - r0.w = 1 + r0.w; - r3.yzw = r1.yzw * r0.www; - r1.x = -r1.y * r0.w + 0.0299999993; - r1.y = r1.z * r0.w + -r3.w; - r1.y = 1.73205078 * r1.y; - r1.z = r3.y * 2 + -r3.z; - r0.w = -r1.w * r0.w + r1.z; - r1.z = max(abs(r1.y), abs(r0.w)); - r1.z = 1 / r1.z; - r1.w = min(abs(r1.y), abs(r0.w)); - r1.z = r1.w * r1.z; - r1.w = r1.z * r1.z; - r2.y = r1.w * 0.0208350997 + -0.0851330012; - r2.y = r1.w * r2.y + 0.180141002; - r2.y = r1.w * r2.y + -0.330299497; - r1.w = r1.w * r2.y + 0.999866009; - r2.y = r1.z * r1.w; - r2.y = r2.y * -2 + 1.57079637; - r2.z = cmp(abs(r0.w) < abs(r1.y)); - r2.y = r2.z ? r2.y : 0; - r1.z = r1.z * r1.w + r2.y; - r1.w = cmp(r0.w < -r0.w); - r1.w = r1.w ? -3.141593 : 0; - r1.z = r1.z + r1.w; - r1.w = min(r1.y, r0.w); - r0.w = max(r1.y, r0.w); - r0.w = cmp(r0.w >= -r0.w); - r1.y = cmp(r1.w < -r1.w); - r0.w = r0.w ? r1.y : 0; - r0.w = r0.w ? -r1.z : r1.z; - r0.w = 57.2957802 * r0.w; - r1.yz = cmp(r3.zw == r3.yz); - r1.y = r1.z ? r1.y : 0; - r0.w = r1.y ? 0 : r0.w; - r1.y = cmp(r0.w < 0); - r1.z = 360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = max(0, r0.w); - r0.w = min(360, r0.w); - r1.y = cmp(180 < r0.w); - r1.z = -360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = 0.0148148146 * r0.w; - r0.w = 1 + -abs(r0.w); - r0.w = max(0, r0.w); - r1.y = r0.w * -2 + 3; - r0.w = r0.w * r0.w; - r0.w = r1.y * r0.w; - r0.w = r0.w * r0.w; - r0.w = r0.w * r2.x; - r0.w = r0.w * r1.x; - r3.x = r0.w * 0.180000007 + r3.y; - r1.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r3.xzw); - r1.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r3.xzw); - r1.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r3.xzw); - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r1.xyz = log2(r1.xyz); - r0.w = cb0[37].w / cb0[37].y; - r2.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r2.xw = -cb0[37].zw + r2.xy; - r1.w = r2.z / r2.x; - r2.z = -1 + r1.w; - r2.z = 1 + -r2.z; - r1.w = r1.w / r2.z; - r1.w = log2(r1.w); - r1.w = 0.346573591 * r1.w; - r2.z = r2.x / cb0[37].y; - r1.w = -r1.w * r2.z + -0.744727492; - r2.z = cmp(0.800000012 < cb0[37].z); - r3.xy = -cb0[37].zz + float2(0.819999993, 1); - r3.xy = r3.xy / cb0[37].yy; - r3.x = -0.744727492 + r3.x; - r1.w = r2.z ? r3.x : r1.w; - r2.z = r3.y + -r1.w; - r0.w = -r2.z + r0.w; - r3.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r2.zzz; - r3.xyz = cb0[37].yyy * r3.xyz; - r4.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r2.z = cb0[37].y + cb0[37].y; - r2.z = r2.z / r2.w; - r4.xyz = r2.zzz * r4.xyz; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(1, 1, 1) + r4.xyz; - r2.zw = r2.xw + r2.xw; - r4.xyz = r2.www / r4.xyz; - r4.xyz = -r4.xyz + r2.yyy; - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r1.xyz; - r1.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r1.www; - r6.xyz = cmp(r0.www < r5.xyz); - r5.xyz = cmp(r5.xyz < r1.www); - r4.xyz = r6.xyz ? r4.xyz : r3.xyz; - r2.y = cb0[37].y * -2; - r2.x = r2.y / r2.x; - r2.xyw = r2.xxx * r1.xyz; - r2.xyw = float3(1.44269502, 1.44269502, 1.44269502) * r2.xyw; - r2.xyw = exp2(r2.xyw); - r2.xyw = float3(1, 1, 1) + r2.xyw; - r2.xyz = r2.zzz / r2.xyw; - r2.xyz = -cb0[38].xxx + r2.xyz; - r2.xyz = r5.xyz ? r2.xyz : r3.xyz; - r3.xyz = r4.xyz + -r2.xyz; - r2.w = r0.w + -r1.w; - r0.w = cmp(r0.w < r1.w); - r1.xyz = saturate(r1.xyz / r2.www); - r4.xyz = float3(1, 1, 1) + -r1.xyz; - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.xyz = -r1.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r1.xyz = r1.xyz * r1.xyz; - r1.xyz = r1.xyz * r4.xyz; - r1.xyz = r1.xyz * r3.xyz + r2.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[37].xxx * r1.xyz + r0.xyz; - r1.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r1.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r1.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.x = saturate(dot(cb1[12].xyz, r0.xyz)); - r1.y = saturate(dot(cb1[13].xyz, r0.xyz)); - r1.z = saturate(dot(cb1[14].xyz, r0.xyz)); - r0.xyz = log2(r1.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r1.xyz; - r1.xyz = cmp(r1.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = r1.xyz ? r0.xyz : r2.xyz; - r1.yzw = r0.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r1.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.y = r1.y + r1.w; - r1.x = 0.0625 * r1.y; - r1.yw = float2(0.0625, 0) + r1.xz; - r2.xyz = t0.Sample(s0_s, r1.xz).xyz; - r1.xyz = t0.Sample(s0_s, r1.yw).xyz; - r1.xyz = r1.xyz + -r2.xyz; - r1.xyz = r0.www * r1.xyz + r2.xyz; - r1.xyz = cb0[5].yyy * r1.xyz; - r0.xyz = cb0[5].xxx * r0.xyz + r1.xyz; - r0.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r0.xyz); - r1.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r0.xyz); - r2.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r0.xyz; - r0.xyz = r0.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r0.xyz = log2(r0.xyz); - r0.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r1.xyz ? r0.xyz : r2.xyz; - r1.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[39].yyy * r0.xyz; - r0.xyz = cb0[39].xxx * r1.xyz + r0.xyz; - r0.xyz = cb0[39].zzz + r0.xyz; - r1.xyz = cb0[14].xyz * r0.xyz; - r0.xyz = -r0.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r0.xyz + r1.xyz; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = log2(r0.xyz); - r0.xyz = cb0[40].yyy * r0.xyz; - r0.xyz = exp2(r0.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r0.xyz); - return; - } - - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r3.xyz = r2.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r3.xyz; - r3.xyz = r2.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r3.xyz; - r3.x = dot(r3.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r4.xyz = r2.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r4.xyz; - r4.xyz = r2.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r4.xyz; - r3.y = dot(r4.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r4.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r2.yzw; - r3.z = dot(r2.xyz, r1.xyz); - r0.xyz = cb1[20].xxx ? r0.xyz : r3.xyz; - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r0.xyz; - r2.xyz = cmp(r0.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = log2(r0.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r2.xyz ? r0.xyz : r1.xyz; - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r0.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xB530B36A.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0xB530B36A.ps_6_6.hlsl deleted file mode 100644 index 3464420c..00000000 --- a/src/games/ue-dx12/lutbuilder_0xB530B36A.ps_6_6.hlsl +++ /dev/null @@ -1,1013 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -cbuffer cb0 : register(b0) { - float cb0_008x : packoffset(c008.x); - float cb0_008y : packoffset(c008.y); - float cb0_008z : packoffset(c008.z); - float cb0_008w : packoffset(c008.w); - float cb0_009x : packoffset(c009.x); - float cb0_010x : packoffset(c010.x); - float cb0_010y : packoffset(c010.y); - float cb0_010z : packoffset(c010.z); - float cb0_010w : packoffset(c010.w); - float cb0_011x : packoffset(c011.x); - float cb0_011y : packoffset(c011.y); - float cb0_011z : packoffset(c011.z); - float cb0_011w : packoffset(c011.w); - float cb0_012x : packoffset(c012.x); - float cb0_012y : packoffset(c012.y); - float cb0_012z : packoffset(c012.z); - float cb0_013x : packoffset(c013.x); - float cb0_013y : packoffset(c013.y); - float cb0_013z : packoffset(c013.z); - float cb0_013w : packoffset(c013.w); - float cb0_014x : packoffset(c014.x); - float cb0_014y : packoffset(c014.y); - float cb0_014z : packoffset(c014.z); - float cb0_015x : packoffset(c015.x); - float cb0_015y : packoffset(c015.y); - float cb0_015z : packoffset(c015.z); - float cb0_015w : packoffset(c015.w); - float cb0_016x : packoffset(c016.x); - float cb0_016y : packoffset(c016.y); - float cb0_016z : packoffset(c016.z); - float cb0_016w : packoffset(c016.w); - float cb0_017x : packoffset(c017.x); - float cb0_017y : packoffset(c017.y); - float cb0_017z : packoffset(c017.z); - float cb0_017w : packoffset(c017.w); - float cb0_018x : packoffset(c018.x); - float cb0_018y : packoffset(c018.y); - float cb0_018z : packoffset(c018.z); - float cb0_018w : packoffset(c018.w); - float cb0_019x : packoffset(c019.x); - float cb0_019y : packoffset(c019.y); - float cb0_019z : packoffset(c019.z); - float cb0_019w : packoffset(c019.w); - float cb0_020x : packoffset(c020.x); - float cb0_020y : packoffset(c020.y); - float cb0_020z : packoffset(c020.z); - float cb0_020w : packoffset(c020.w); - float cb0_021x : packoffset(c021.x); - float cb0_021y : packoffset(c021.y); - float cb0_021z : packoffset(c021.z); - float cb0_021w : packoffset(c021.w); - float cb0_022x : packoffset(c022.x); - float cb0_022y : packoffset(c022.y); - float cb0_022z : packoffset(c022.z); - float cb0_022w : packoffset(c022.w); - float cb0_023x : packoffset(c023.x); - float cb0_023y : packoffset(c023.y); - float cb0_023z : packoffset(c023.z); - float cb0_023w : packoffset(c023.w); - float cb0_024x : packoffset(c024.x); - float cb0_024y : packoffset(c024.y); - float cb0_024z : packoffset(c024.z); - float cb0_024w : packoffset(c024.w); - float cb0_025x : packoffset(c025.x); - float cb0_025y : packoffset(c025.y); - float cb0_025z : packoffset(c025.z); - float cb0_025w : packoffset(c025.w); - float cb0_026x : packoffset(c026.x); - float cb0_026y : packoffset(c026.y); - float cb0_026z : packoffset(c026.z); - float cb0_026w : packoffset(c026.w); - float cb0_027x : packoffset(c027.x); - float cb0_027y : packoffset(c027.y); - float cb0_027z : packoffset(c027.z); - float cb0_027w : packoffset(c027.w); - float cb0_028x : packoffset(c028.x); - float cb0_028y : packoffset(c028.y); - float cb0_028z : packoffset(c028.z); - float cb0_028w : packoffset(c028.w); - float cb0_029x : packoffset(c029.x); - float cb0_029y : packoffset(c029.y); - float cb0_029z : packoffset(c029.z); - float cb0_029w : packoffset(c029.w); - float cb0_030x : packoffset(c030.x); - float cb0_030y : packoffset(c030.y); - float cb0_030z : packoffset(c030.z); - float cb0_030w : packoffset(c030.w); - float cb0_031x : packoffset(c031.x); - float cb0_031y : packoffset(c031.y); - float cb0_031z : packoffset(c031.z); - float cb0_031w : packoffset(c031.w); - float cb0_032x : packoffset(c032.x); - float cb0_032y : packoffset(c032.y); - float cb0_032z : packoffset(c032.z); - float cb0_032w : packoffset(c032.w); - float cb0_033x : packoffset(c033.x); - float cb0_033y : packoffset(c033.y); - float cb0_033z : packoffset(c033.z); - float cb0_033w : packoffset(c033.w); - float cb0_034x : packoffset(c034.x); - float cb0_034y : packoffset(c034.y); - float cb0_034z : packoffset(c034.z); - float cb0_034w : packoffset(c034.w); - float cb0_035x : packoffset(c035.x); - float cb0_035y : packoffset(c035.y); - float cb0_036x : packoffset(c036.x); - float cb0_036y : packoffset(c036.y); - float cb0_036z : packoffset(c036.z); - float cb0_037x : packoffset(c037.x); - float cb0_037w : packoffset(c037.w); - float cb0_038x : packoffset(c038.x); - float cb0_038y : packoffset(c038.y); - float cb0_038z : packoffset(c038.z); - float cb0_038w : packoffset(c038.w); - float cb0_039x : packoffset(c039.x); - float cb0_039y : packoffset(c039.y); - float cb0_039z : packoffset(c039.z); - float cb0_039w : packoffset(c039.w); - float cb0_040x : packoffset(c040.x); - float cb0_040y : packoffset(c040.y); - float cb0_041x : packoffset(c041.x); - float cb0_041y : packoffset(c041.y); - float cb0_041z : packoffset(c041.z); - float cb0_042y : packoffset(c042.y); - float cb0_042z : packoffset(c042.z); - uint cb0_042w : packoffset(c042.w); - uint cb0_043x : packoffset(c043.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - - float _8[6]; - float _9[6]; - float _10[6]; - float _11[6]; - float _14 = 0.5f / (cb0_037x); - float _19 = (cb0_037x) + -1.0f; - float _20 = ((cb0_037x) * ((TEXCOORD.x) - _14)) / _19; - float _21 = ((cb0_037x) * ((TEXCOORD.y) - _14)) / _19; - float _23 = (float((uint)(SV_RenderTargetArrayIndex))) / _19; - float _43 = 1.379158854484558f; - float _44 = -0.3088507056236267f; - float _45 = -0.07034677267074585f; - float _46 = -0.06933528929948807f; - float _47 = 1.0822921991348267f; - float _48 = -0.012962047010660172f; - float _49 = -0.002159259282052517f; - float _50 = -0.045465391129255295f; - float _51 = 1.0477596521377563f; - float _109; - float _110; - float _111; - float _634; - float _667; - float _681; - float _745; - float _1038; - float _1039; - float _1040; - float _1051; - float _1062; - float _1242; - float _1275; - float _1289; - float _1328; - float _1438; - float _1512; - float _1586; - float _1665; - float _1666; - float _1667; - float _1816; - float _1849; - float _1863; - float _1902; - float _2012; - float _2086; - float _2160; - float _2239; - float _2240; - float _2241; - float _2418; - float _2419; - float _2420; - if (!((((uint)(cb0_043x)) == 1))) { - _43 = 1.02579927444458f; - _44 = -0.020052503794431686f; - _45 = -0.0057713985443115234f; - _46 = -0.0022350111976265907f; - _47 = 1.0045825242996216f; - _48 = -0.002352306619286537f; - _49 = -0.005014004185795784f; - _50 = -0.025293385609984398f; - _51 = 1.0304402112960815f; - if (!((((uint)(cb0_043x)) == 2))) { - _43 = 0.6954522132873535f; - _44 = 0.14067870378494263f; - _45 = 0.16386906802654266f; - _46 = 0.044794563204050064f; - _47 = 0.8596711158752441f; - _48 = 0.0955343171954155f; - _49 = -0.005525882821530104f; - _50 = 0.004025210160762072f; - _51 = 1.0015007257461548f; - if (!((((uint)(cb0_043x)) == 3))) { - bool _32 = (((uint)(cb0_043x)) == 4); - _43 = ((_32 ? 1.0f : 1.7050515413284302f)); - _44 = ((_32 ? 0.0f : -0.6217905879020691f)); - _45 = ((_32 ? 0.0f : -0.0832584798336029f)); - _46 = ((_32 ? 0.0f : -0.13025718927383423f)); - _47 = ((_32 ? 1.0f : 1.1408027410507202f)); - _48 = ((_32 ? 0.0f : -0.010548528283834457f)); - _49 = ((_32 ? 0.0f : -0.024003278464078903f)); - _50 = ((_32 ? 0.0f : -0.1289687603712082f)); - _51 = ((_32 ? 1.0f : 1.152971863746643f)); - } - } - } - if (((((uint)(cb0_042w)) > 2))) { - float _62 = exp2(((log2(_20)) * 0.012683313339948654f)); - float _63 = exp2(((log2(_21)) * 0.012683313339948654f)); - float _64 = exp2(((log2(_23)) * 0.012683313339948654f)); - _109 = ((exp2(((log2(((max(0.0f, (_62 + -0.8359375f))) / (18.8515625f - (_62 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _110 = ((exp2(((log2(((max(0.0f, (_63 + -0.8359375f))) / (18.8515625f - (_63 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - _111 = ((exp2(((log2(((max(0.0f, (_64 + -0.8359375f))) / (18.8515625f - (_64 * 18.6875f))))) * 6.277394771575928f))) * 100.0f); - } else { - _109 = (((exp2(((_20 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _110 = (((exp2(((_21 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - _111 = (((exp2(((_23 + -0.4340175986289978f) * 14.0f))) * 0.18000000715255737f) + -0.002667719265446067f); - } - float _126 = mad((UniformBufferConstants_WorkingColorSpace_008z), _111, (mad((UniformBufferConstants_WorkingColorSpace_008y), _110, ((UniformBufferConstants_WorkingColorSpace_008x)*_109)))); - float _129 = mad((UniformBufferConstants_WorkingColorSpace_009z), _111, (mad((UniformBufferConstants_WorkingColorSpace_009y), _110, ((UniformBufferConstants_WorkingColorSpace_009x)*_109)))); - float _132 = mad((UniformBufferConstants_WorkingColorSpace_010z), _111, (mad((UniformBufferConstants_WorkingColorSpace_010y), _110, ((UniformBufferConstants_WorkingColorSpace_010x)*_109)))); - float _133 = dot(float3(_126, _129, _132), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _137 = (_126 / _133) + -1.0f; - float _138 = (_129 / _133) + -1.0f; - float _139 = (_132 / _133) + -1.0f; - float _151 = (1.0f - (exp2((((_133 * _133) * -4.0f) * (cb0_038w))))) * (1.0f - (exp2(((dot(float3(_137, _138, _139), float3(_137, _138, _139))) * -4.0f)))); - float _167 = (((mad(-0.06368283927440643f, _132, (mad(-0.32929131388664246f, _129, (_126 * 1.370412826538086f))))) - _126) * _151) + _126; - float _168 = (((mad(-0.010861567221581936f, _132, (mad(1.0970908403396606f, _129, (_126 * -0.08343426138162613f))))) - _129) * _151) + _129; - float _169 = (((mad(1.203694462776184f, _132, (mad(-0.09862564504146576f, _129, (_126 * -0.02579325996339321f))))) - _132) * _151) + _132; - float _170 = dot(float3(_167, _168, _169), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _184 = (cb0_019w) + (cb0_024w); - float _198 = (cb0_018w) * (cb0_023w); - float _212 = (cb0_017w) * (cb0_022w); - float _226 = (cb0_016w) * (cb0_021w); - float _240 = (cb0_015w) * (cb0_020w); - float _244 = _167 - _170; - float _245 = _168 - _170; - float _246 = _169 - _170; - float _303 = saturate((_170 / (cb0_037w))); - float _307 = (_303 * _303) * (3.0f - (_303 * 2.0f)); - float _308 = 1.0f - _307; - float _317 = (cb0_019w) + (cb0_034w); - float _326 = (cb0_018w) * (cb0_033w); - float _335 = (cb0_017w) * (cb0_032w); - float _344 = (cb0_016w) * (cb0_031w); - float _353 = (cb0_015w) * (cb0_030w); - float _416 = saturate(((_170 - (cb0_038x)) / ((cb0_038y) - (cb0_038x)))); - float _420 = (_416 * _416) * (3.0f - (_416 * 2.0f)); - float _429 = (cb0_019w) + (cb0_029w); - float _438 = (cb0_018w) * (cb0_028w); - float _447 = (cb0_017w) * (cb0_027w); - float _456 = (cb0_016w) * (cb0_026w); - float _465 = (cb0_015w) * (cb0_025w); - float _523 = _307 - _420; - float _534 = ((_420 * ((((cb0_019x) + (cb0_034x)) + _317) + ((((cb0_018x) * (cb0_033x)) * _326) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_031x)) * _344) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_030x)) * _353) * _244) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_032x)) * _335)))))))) + (_308 * ((((cb0_019x) + (cb0_024x)) + _184) + ((((cb0_018x) * (cb0_023x)) * _198) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_021x)) * _226) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_020x)) * _240) * _244) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_022x)) * _212))))))))) + (((((cb0_019x) + (cb0_029x)) + _429) + ((((cb0_018x) * (cb0_028x)) * _438) * (exp2(((log2(((exp2(((((cb0_016x) * (cb0_026x)) * _456) * (log2(((max(0.0f, (((((cb0_015x) * (cb0_025x)) * _465) * _244) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017x) * (cb0_027x)) * _447))))))) * _523); - float _536 = ((_420 * ((((cb0_019y) + (cb0_034y)) + _317) + ((((cb0_018y) * (cb0_033y)) * _326) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_031y)) * _344) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_030y)) * _353) * _245) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_032y)) * _335)))))))) + (_308 * ((((cb0_019y) + (cb0_024y)) + _184) + ((((cb0_018y) * (cb0_023y)) * _198) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_021y)) * _226) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_020y)) * _240) * _245) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_022y)) * _212))))))))) + (((((cb0_019y) + (cb0_029y)) + _429) + ((((cb0_018y) * (cb0_028y)) * _438) * (exp2(((log2(((exp2(((((cb0_016y) * (cb0_026y)) * _456) * (log2(((max(0.0f, (((((cb0_015y) * (cb0_025y)) * _465) * _245) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017y) * (cb0_027y)) * _447))))))) * _523); - float _538 = ((_420 * ((((cb0_019z) + (cb0_034z)) + _317) + ((((cb0_018z) * (cb0_033z)) * _326) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_031z)) * _344) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_030z)) * _353) * _246) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_032z)) * _335)))))))) + (_308 * ((((cb0_019z) + (cb0_024z)) + _184) + ((((cb0_018z) * (cb0_023z)) * _198) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_021z)) * _226) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_020z)) * _240) * _246) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_022z)) * _212))))))))) + (((((cb0_019z) + (cb0_029z)) + _429) + ((((cb0_018z) * (cb0_028z)) * _438) * (exp2(((log2(((exp2(((((cb0_016z) * (cb0_026z)) * _456) * (log2(((max(0.0f, (((((cb0_015z) * (cb0_025z)) * _465) * _246) + _170))) * 5.55555534362793f)))))) * 0.18000000715255737f))) * (1.0f / (((cb0_017z) * (cb0_027z)) * _447))))))) * _523); - - float3 untonemapped_ap1 = float3(_534, _536, _538); // CustomEdit - - float _574 = (((mad(0.061360642313957214f, _538, (mad(-4.540197551250458e-09f, _536, (_534 * 0.9386394023895264f))))) - _534) * (cb0_038z)) + _534; - float _575 = (((mad(0.169205904006958f, _538, (mad(0.8307942152023315f, _536, (_534 * 6.775371730327606e-08f))))) - _536) * (cb0_038z)) + _536; - float _576 = ((mad(-2.3283064365386963e-10f, _536, (_534 * -9.313225746154785e-10f))) * (cb0_038z)) + _538; - float _579 = mad(0.16386905312538147f, _576, (mad(0.14067868888378143f, _575, (_574 * 0.6954522132873535f)))); - float _582 = mad(0.0955343246459961f, _576, (mad(0.8596711158752441f, _575, (_574 * 0.044794581830501556f)))); - float _585 = mad(1.0015007257461548f, _576, (mad(0.004025210160762072f, _575, (_574 * -0.005525882821530104f)))); - float _589 = max((max(_579, _582)), _585); - float _594 = ((max(_589, 1.000000013351432e-10f)) - (max((min((min(_579, _582)), _585)), 1.000000013351432e-10f))) / (max(_589, 0.009999999776482582f)); - float _607 = ((_582 + _579) + _585) + ((sqrt(((((_585 - _582) * _585) + ((_582 - _579) * _582)) + ((_579 - _585) * _579)))) * 1.75f); - float _608 = _607 * 0.3333333432674408f; - float _609 = _594 + -0.4000000059604645f; - float _610 = _609 * 5.0f; - float _614 = max((1.0f - (abs((_609 * 2.5f)))), 0.0f); - float _625 = (((float(((int(((bool)((_610 > 0.0f))))) - (int(((bool)((_610 < 0.0f)))))))) * (1.0f - (_614 * _614))) + 1.0f) * 0.02500000037252903f; - _634 = _625; - if ((!(_608 <= 0.0533333346247673f))) { - _634 = 0.0f; - if ((!(_608 >= 0.1599999964237213f))) { - _634 = (((0.23999999463558197f / _607) + -0.5f) * _625); - } - } - float _635 = _634 + 1.0f; - float _636 = _635 * _579; - float _637 = _635 * _582; - float _638 = _635 * _585; - _667 = 0.0f; - if (!(((bool)((_636 == _637))) && ((bool)((_637 == _638))))) { - float _645 = ((_636 * 2.0f) - _637) - _638; - float _648 = ((_582 - _585) * 1.7320507764816284f) * _635; - float _650 = atan((_648 / _645)); - bool _653 = (_645 < 0.0f); - bool _654 = (_645 == 0.0f); - bool _655 = (_648 >= 0.0f); - bool _656 = (_648 < 0.0f); - _667 = ((((bool)(_655 && _654)) ? 90.0f : ((((bool)(_656 && _654)) ? -90.0f : (((((bool)(_656 && _653)) ? (_650 + -3.1415927410125732f) : ((((bool)(_655 && _653)) ? (_650 + 3.1415927410125732f) : _650)))) * 57.2957763671875f))))); - } - float _672 = min((max(((((bool)((_667 < 0.0f))) ? (_667 + 360.0f) : _667)), 0.0f)), 360.0f); - if (((_672 < -180.0f))) { - _681 = (_672 + 360.0f); - } else { - _681 = _672; - if (((_672 > 180.0f))) { - _681 = (_672 + -360.0f); - } - } - float _685 = saturate((1.0f - (abs((_681 * 0.014814814552664757f))))); - float _689 = (_685 * _685) * (3.0f - (_685 * 2.0f)); - float _695 = ((_689 * _689) * ((_594 * 0.18000000715255737f) * (0.029999999329447746f - _636))) + _636; - float _705 = max(0.0f, (mad(-0.21492856740951538f, _638, (mad(-0.2365107536315918f, _637, (_695 * 1.4514392614364624f)))))); - float _706 = max(0.0f, (mad(-0.09967592358589172f, _638, (mad(1.17622971534729f, _637, (_695 * -0.07655377686023712f)))))); - float _707 = max(0.0f, (mad(0.9977163076400757f, _638, (mad(-0.006032449658960104f, _637, (_695 * 0.008316148072481155f)))))); - float _708 = dot(float3(_705, _706, _707), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - - float _723 = ((cb0_040x) + 1.0f) - (cb0_039z); - float _725 = (cb0_040y) + 1.0f; - float _727 = _725 - (cb0_039w); - - if ((((cb0_039z) > 0.800000011920929f))) { - _745 = (((0.8199999928474426f - (cb0_039z)) / (cb0_039y)) + -0.7447274923324585f); - } else { - float _736 = ((cb0_040x) + 0.18000000715255737f) / _723; - _745 = (-0.7447274923324585f - (((log2((_736 / (2.0f - _736)))) * 0.3465735912322998f) * (_723 / (cb0_039y)))); - } - float _748 = ((1.0f - (cb0_039z)) / (cb0_039y)) - _745; - float _750 = ((cb0_039w) / (cb0_039y)) - _748; - float _754 = (log2((((_705 - _708) * 0.9599999785423279f) + _708))) * 0.3010300099849701f; - float _755 = (log2((((_706 - _708) * 0.9599999785423279f) + _708))) * 0.3010300099849701f; - float _756 = (log2((((_707 - _708) * 0.9599999785423279f) + _708))) * 0.3010300099849701f; - float _760 = (cb0_039y) * (_754 + _748); - float _761 = (cb0_039y) * (_755 + _748); - float _762 = (cb0_039y) * (_756 + _748); - float _763 = _723 * 2.0f; - float _765 = ((cb0_039y) * -2.0f) / _723; - float _766 = _754 - _745; - float _767 = _755 - _745; - float _768 = _756 - _745; - float _787 = _727 * 2.0f; - float _789 = ((cb0_039y) * 2.0f) / _727; - float _814 = (((bool)((_754 < _745))) ? ((_763 / ((exp2(((_766 * 1.4426950216293335f) * _765))) + 1.0f)) - (cb0_040x)) : _760); - float _815 = (((bool)((_755 < _745))) ? ((_763 / ((exp2(((_767 * 1.4426950216293335f) * _765))) + 1.0f)) - (cb0_040x)) : _761); - float _816 = (((bool)((_756 < _745))) ? ((_763 / ((exp2(((_768 * 1.4426950216293335f) * _765))) + 1.0f)) - (cb0_040x)) : _762); - float _823 = _750 - _745; - float _827 = saturate((_766 / _823)); - float _828 = saturate((_767 / _823)); - float _829 = saturate((_768 / _823)); - bool _830 = (_750 < _745); - float _834 = (_830 ? (1.0f - _827) : _827); - float _835 = (_830 ? (1.0f - _828) : _828); - float _836 = (_830 ? (1.0f - _829) : _829); - float _855 = (((_834 * _834) * (((((bool)((_754 > _750))) ? (_725 - (_787 / ((exp2((((_754 - _750) * 1.4426950216293335f) * _789))) + 1.0f))) : _760)) - _814)) * (3.0f - (_834 * 2.0f))) + _814; - float _856 = (((_835 * _835) * (((((bool)((_755 > _750))) ? (_725 - (_787 / ((exp2((((_755 - _750) * 1.4426950216293335f) * _789))) + 1.0f))) : _761)) - _815)) * (3.0f - (_835 * 2.0f))) + _815; - float _857 = (((_836 * _836) * (((((bool)((_756 > _750))) ? (_725 - (_787 / ((exp2((((_756 - _750) * 1.4426950216293335f) * _789))) + 1.0f))) : _762)) - _816)) * (3.0f - (_836 * 2.0f))) + _816; - float _858 = dot(float3(_855, _856, _857), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - - float _878 = ((cb0_039x) * ((max(0.0f, (((_855 - _858) * 0.9300000071525574f) + _858))) - _574)) + _574; - float _879 = ((cb0_039x) * ((max(0.0f, (((_856 - _858) * 0.9300000071525574f) + _858))) - _575)) + _575; - float _880 = ((cb0_039x) * ((max(0.0f, (((_857 - _858) * 0.9300000071525574f) + _858))) - _576)) + _576; - - float _896 = (((mad(-0.06537103652954102f, _880, (mad(1.451815478503704e-06f, _879, (_878 * 1.065374732017517f))))) - _878) * (cb0_038z)) + _878; - float _897 = (((mad(-0.20366770029067993f, _880, (mad(1.2036634683609009f, _879, (_878 * -2.57161445915699e-07f))))) - _879) * (cb0_038z)) + _879; - float _898 = (((mad(0.9999996423721313f, _880, (mad(2.0954757928848267e-08f, _879, (_878 * 1.862645149230957e-08f))))) - _880) * (cb0_038z)) + _880; - float _908 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_012z), _898, (mad((UniformBufferConstants_WorkingColorSpace_012y), _897, ((UniformBufferConstants_WorkingColorSpace_012x)*_896)))))); - float _909 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_013z), _898, (mad((UniformBufferConstants_WorkingColorSpace_013y), _897, ((UniformBufferConstants_WorkingColorSpace_013x)*_896)))))); - float _910 = max(0.0f, (mad((UniformBufferConstants_WorkingColorSpace_014z), _898, (mad((UniformBufferConstants_WorkingColorSpace_014y), _897, ((UniformBufferConstants_WorkingColorSpace_014x)*_896)))))); - float _936 = (cb0_014x) * ((((cb0_041y) + ((cb0_041x)*_908)) * _908) + (cb0_041z)); - float _937 = (cb0_014y) * ((((cb0_041y) + ((cb0_041x)*_909)) * _909) + (cb0_041z)); - float _938 = (cb0_014z) * ((((cb0_041y) + ((cb0_041x)*_910)) * _910) + (cb0_041z)); - float _945 = (((cb0_013x)-_936) * (cb0_013w)) + _936; - float _946 = (((cb0_013y)-_937) * (cb0_013w)) + _937; - float _947 = (((cb0_013z)-_938) * (cb0_013w)) + _938; - float _948 = (cb0_014x) * (mad((UniformBufferConstants_WorkingColorSpace_012z), _538, (mad((UniformBufferConstants_WorkingColorSpace_012y), _536, (_534 * (UniformBufferConstants_WorkingColorSpace_012x)))))); - float _949 = (cb0_014y) * (mad((UniformBufferConstants_WorkingColorSpace_013z), _538, (mad((UniformBufferConstants_WorkingColorSpace_013y), _536, ((UniformBufferConstants_WorkingColorSpace_013x)*_534))))); - float _950 = (cb0_014z) * (mad((UniformBufferConstants_WorkingColorSpace_014z), _538, (mad((UniformBufferConstants_WorkingColorSpace_014y), _536, ((UniformBufferConstants_WorkingColorSpace_014x)*_534))))); - float _957 = (((cb0_013x)-_948) * (cb0_013w)) + _948; - float _958 = (((cb0_013y)-_949) * (cb0_013w)) + _949; - float _959 = (((cb0_013z)-_950) * (cb0_013w)) + _950; - float _971 = exp2(((log2((max(0.0f, _945)))) * (cb0_042y))); - float _972 = exp2(((log2((max(0.0f, _946)))) * (cb0_042y))); - float _973 = exp2(((log2((max(0.0f, _947)))) * (cb0_042y))); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_971, _972, _973)); - } - - if (((((uint)(cb0_042w)) == 0))) { - float _979 = max((dot(float3(_971, _972, _973), float3(0.2126390039920807f, 0.7151690125465393f, 0.0721919983625412f))), 9.999999747378752e-05f); - float _999 = ((((((bool)((_979 < (cb0_036z)))) ? 0.0f : 1.0f)) * (((cb0_035y)-_979) + ((-0.0f - (cb0_036x)) / ((cb0_035x) + _979)))) + _979) * (cb0_036y); - float _1000 = _999 * (_971 / _979); - float _1001 = _999 * (_972 / _979); - float _1002 = _999 * (_973 / _979); - _1038 = _1000; - _1039 = _1001; - _1040 = _1002; - do { - if (((((uint)(UniformBufferConstants_WorkingColorSpace_020x)) == 0))) { - float _1021 = mad((UniformBufferConstants_WorkingColorSpace_008z), _1002, (mad((UniformBufferConstants_WorkingColorSpace_008y), _1001, ((UniformBufferConstants_WorkingColorSpace_008x)*_1000)))); - float _1024 = mad((UniformBufferConstants_WorkingColorSpace_009z), _1002, (mad((UniformBufferConstants_WorkingColorSpace_009y), _1001, ((UniformBufferConstants_WorkingColorSpace_009x)*_1000)))); - float _1027 = mad((UniformBufferConstants_WorkingColorSpace_010z), _1002, (mad((UniformBufferConstants_WorkingColorSpace_010y), _1001, ((UniformBufferConstants_WorkingColorSpace_010x)*_1000)))); - _1038 = (mad(_45, _1027, (mad(_44, _1024, (_1021 * _43))))); - _1039 = (mad(_48, _1027, (mad(_47, _1024, (_1021 * _46))))); - _1040 = (mad(_51, _1027, (mad(_50, _1024, (_1021 * _49))))); - } - do { - if (((_1038 < 0.0031306699384003878f))) { - _1051 = (_1038 * 12.920000076293945f); - } else { - _1051 = (((exp2(((log2(_1038)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - do { - if (((_1039 < 0.0031306699384003878f))) { - _1062 = (_1039 * 12.920000076293945f); - } else { - _1062 = (((exp2(((log2(_1039)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - if (((_1040 < 0.0031306699384003878f))) { - _2418 = _1051; - _2419 = _1062; - _2420 = (_1040 * 12.920000076293945f); - } else { - _2418 = _1051; - _2419 = _1062; - _2420 = (((exp2(((log2(_1040)) * 0.4166666567325592f))) * 1.0549999475479126f) + -0.054999999701976776f); - } - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 1))) { - float _1089 = mad((UniformBufferConstants_WorkingColorSpace_008z), _973, (mad((UniformBufferConstants_WorkingColorSpace_008y), _972, ((UniformBufferConstants_WorkingColorSpace_008x)*_971)))); - float _1092 = mad((UniformBufferConstants_WorkingColorSpace_009z), _973, (mad((UniformBufferConstants_WorkingColorSpace_009y), _972, ((UniformBufferConstants_WorkingColorSpace_009x)*_971)))); - float _1095 = mad((UniformBufferConstants_WorkingColorSpace_010z), _973, (mad((UniformBufferConstants_WorkingColorSpace_010y), _972, ((UniformBufferConstants_WorkingColorSpace_010x)*_971)))); - float _1105 = max(6.103519990574569e-05f, (mad(_45, _1095, (mad(_44, _1092, (_1089 * _43)))))); - float _1106 = max(6.103519990574569e-05f, (mad(_48, _1095, (mad(_47, _1092, (_1089 * _46)))))); - float _1107 = max(6.103519990574569e-05f, (mad(_51, _1095, (mad(_50, _1092, (_1089 * _49)))))); - _2418 = (min((_1105 * 4.5f), (((exp2(((log2((max(_1105, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2419 = (min((_1106 * 4.5f), (((exp2(((log2((max(_1106, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - _2420 = (min((_1107 * 4.5f), (((exp2(((log2((max(_1107, 0.017999999225139618f)))) * 0.44999998807907104f))) * 1.0989999771118164f) + -0.0989999994635582f))); - } else { - if ((((bool)((((uint)(cb0_042w)) == 3))) || ((bool)((((uint)(cb0_042w)) == 5))))) { - _10[0] = (cb0_010x); - _10[1] = (cb0_010y); - _10[2] = (cb0_010z); - _10[3] = (cb0_010w); - _10[4] = (cb0_012x); - _10[5] = (cb0_012x); - _11[0] = (cb0_011x); - _11[1] = (cb0_011y); - _11[2] = (cb0_011z); - _11[3] = (cb0_011w); - _11[4] = (cb0_012y); - _11[5] = (cb0_012y); - float _1182 = (cb0_012z)*_957; - float _1183 = (cb0_012z)*_958; - float _1184 = (cb0_012z)*_959; - float _1187 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1184, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1183, ((UniformBufferConstants_WorkingColorSpace_016x)*_1182)))); - float _1190 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1184, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1183, ((UniformBufferConstants_WorkingColorSpace_017x)*_1182)))); - float _1193 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1184, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1183, ((UniformBufferConstants_WorkingColorSpace_018x)*_1182)))); - float _1197 = max((max(_1187, _1190)), _1193); - float _1202 = ((max(_1197, 1.000000013351432e-10f)) - (max((min((min(_1187, _1190)), _1193)), 1.000000013351432e-10f))) / (max(_1197, 0.009999999776482582f)); - float _1215 = ((_1190 + _1187) + _1193) + ((sqrt(((((_1193 - _1190) * _1193) + ((_1190 - _1187) * _1190)) + ((_1187 - _1193) * _1187)))) * 1.75f); - float _1216 = _1215 * 0.3333333432674408f; - float _1217 = _1202 + -0.4000000059604645f; - float _1218 = _1217 * 5.0f; - float _1222 = max((1.0f - (abs((_1217 * 2.5f)))), 0.0f); - float _1233 = (((float(((int(((bool)((_1218 > 0.0f))))) - (int(((bool)((_1218 < 0.0f)))))))) * (1.0f - (_1222 * _1222))) + 1.0f) * 0.02500000037252903f; - _1242 = _1233; - do { - if ((!(_1216 <= 0.0533333346247673f))) { - _1242 = 0.0f; - if ((!(_1216 >= 0.1599999964237213f))) { - _1242 = (((0.23999999463558197f / _1215) + -0.5f) * _1233); - } - } - float _1243 = _1242 + 1.0f; - float _1244 = _1243 * _1187; - float _1245 = _1243 * _1190; - float _1246 = _1243 * _1193; - _1275 = 0.0f; - do { - if (!(((bool)((_1244 == _1245))) && ((bool)((_1245 == _1246))))) { - float _1253 = ((_1244 * 2.0f) - _1245) - _1246; - float _1256 = ((_1190 - _1193) * 1.7320507764816284f) * _1243; - float _1258 = atan((_1256 / _1253)); - bool _1261 = (_1253 < 0.0f); - bool _1262 = (_1253 == 0.0f); - bool _1263 = (_1256 >= 0.0f); - bool _1264 = (_1256 < 0.0f); - _1275 = ((((bool)(_1263 && _1262)) ? 90.0f : ((((bool)(_1264 && _1262)) ? -90.0f : (((((bool)(_1264 && _1261)) ? (_1258 + -3.1415927410125732f) : ((((bool)(_1263 && _1261)) ? (_1258 + 3.1415927410125732f) : _1258)))) * 57.2957763671875f))))); - } - float _1280 = min((max(((((bool)((_1275 < 0.0f))) ? (_1275 + 360.0f) : _1275)), 0.0f)), 360.0f); - do { - if (((_1280 < -180.0f))) { - _1289 = (_1280 + 360.0f); - } else { - _1289 = _1280; - if (((_1280 > 180.0f))) { - _1289 = (_1280 + -360.0f); - } - } - _1328 = 0.0f; - do { - if ((((bool)((_1289 > -67.5f))) && ((bool)((_1289 < 67.5f))))) { - float _1295 = (_1289 + 67.5f) * 0.029629629105329514f; - int _1296 = int(1296); - float _1298 = _1295 - (float(_1296)); - float _1299 = _1298 * _1298; - float _1300 = _1299 * _1298; - if (_1296 == 3) { - _1328 = (((0.1666666716337204f - (_1298 * 0.5f)) + (_1299 * 0.5f)) - (_1300 * 0.1666666716337204f)); - } else { - if (_1296 == 2) { - _1328 = ((0.6666666865348816f - _1299) + (_1300 * 0.5f)); - } else { - if (_1296 == 1) { - _1328 = (((_1300 * -0.5f) + 0.1666666716337204f) + ((_1299 + _1298) * 0.5f)); - } else { - _1328 = ((((bool)((_1296 == 0))) ? (_1300 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1337 = min((max(((((_1202 * 0.27000001072883606f) * (0.029999999329447746f - _1244)) * _1328) + _1244), 0.0f)), 65535.0f); - float _1338 = min((max(_1245, 0.0f)), 65535.0f); - float _1339 = min((max(_1246, 0.0f)), 65535.0f); - float _1352 = min((max((mad(-0.21492856740951538f, _1339, (mad(-0.2365107536315918f, _1338, (_1337 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1353 = min((max((mad(-0.09967592358589172f, _1339, (mad(1.17622971534729f, _1338, (_1337 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1354 = min((max((mad(0.9977163076400757f, _1339, (mad(-0.006032449658960104f, _1338, (_1337 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1355 = dot(float3(_1352, _1353, _1354), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1366 = log2((max((((_1352 - _1355) * 0.9599999785423279f) + _1355), 1.000000013351432e-10f))); - float _1367 = _1366 * 0.3010300099849701f; - float _1368 = log2((cb0_008x)); - float _1369 = _1368 * 0.3010300099849701f; - do { - if (!(!(_1367 <= _1369))) { - _1438 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1376 = log2((cb0_009x)); - float _1377 = _1376 * 0.3010300099849701f; - if ((((bool)((_1367 > _1369))) && ((bool)((_1367 < _1377))))) { - float _1385 = ((_1366 - _1368) * 0.9030900001525879f) / ((_1376 - _1368) * 0.3010300099849701f); - int _1386 = int(1386); - float _1388 = _1385 - (float(_1386)); - float _1390 = _10[_1386]; - float _1393 = _10[(_1386 + 1)]; - float _1398 = _1390 * 0.5f; - _1438 = (dot(float3((_1388 * _1388), _1388, 1.0f), float3((mad((_10[(_1386 + 2)]), 0.5f, (mad(_1393, -1.0f, _1398)))), (_1393 - _1390), (mad(_1393, 0.5f, _1398))))); - } else { - do { - if (!(!(_1367 >= _1377))) { - float _1407 = log2((cb0_008z)); - if (((_1367 < (_1407 * 0.3010300099849701f)))) { - float _1415 = ((_1366 - _1376) * 0.9030900001525879f) / ((_1407 - _1376) * 0.3010300099849701f); - int _1416 = int(1416); - float _1418 = _1415 - (float(_1416)); - float _1420 = _11[_1416]; - float _1423 = _11[(_1416 + 1)]; - float _1428 = _1420 * 0.5f; - _1438 = (dot(float3((_1418 * _1418), _1418, 1.0f), float3((mad((_11[(_1416 + 2)]), 0.5f, (mad(_1423, -1.0f, _1428)))), (_1423 - _1420), (mad(_1423, 0.5f, _1428))))); - break; - } - } - _1438 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1442 = log2((max((((_1353 - _1355) * 0.9599999785423279f) + _1355), 1.000000013351432e-10f))); - float _1443 = _1442 * 0.3010300099849701f; - do { - if (!(!(_1443 <= _1369))) { - _1512 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1450 = log2((cb0_009x)); - float _1451 = _1450 * 0.3010300099849701f; - if ((((bool)((_1443 > _1369))) && ((bool)((_1443 < _1451))))) { - float _1459 = ((_1442 - _1368) * 0.9030900001525879f) / ((_1450 - _1368) * 0.3010300099849701f); - int _1460 = int(1460); - float _1462 = _1459 - (float(_1460)); - float _1464 = _10[_1460]; - float _1467 = _10[(_1460 + 1)]; - float _1472 = _1464 * 0.5f; - _1512 = (dot(float3((_1462 * _1462), _1462, 1.0f), float3((mad((_10[(_1460 + 2)]), 0.5f, (mad(_1467, -1.0f, _1472)))), (_1467 - _1464), (mad(_1467, 0.5f, _1472))))); - } else { - do { - if (!(!(_1443 >= _1451))) { - float _1481 = log2((cb0_008z)); - if (((_1443 < (_1481 * 0.3010300099849701f)))) { - float _1489 = ((_1442 - _1450) * 0.9030900001525879f) / ((_1481 - _1450) * 0.3010300099849701f); - int _1490 = int(1490); - float _1492 = _1489 - (float(_1490)); - float _1494 = _11[_1490]; - float _1497 = _11[(_1490 + 1)]; - float _1502 = _1494 * 0.5f; - _1512 = (dot(float3((_1492 * _1492), _1492, 1.0f), float3((mad((_11[(_1490 + 2)]), 0.5f, (mad(_1497, -1.0f, _1502)))), (_1497 - _1494), (mad(_1497, 0.5f, _1502))))); - break; - } - } - _1512 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1516 = log2((max((((_1354 - _1355) * 0.9599999785423279f) + _1355), 1.000000013351432e-10f))); - float _1517 = _1516 * 0.3010300099849701f; - do { - if (!(!(_1517 <= _1369))) { - _1586 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1524 = log2((cb0_009x)); - float _1525 = _1524 * 0.3010300099849701f; - if ((((bool)((_1517 > _1369))) && ((bool)((_1517 < _1525))))) { - float _1533 = ((_1516 - _1368) * 0.9030900001525879f) / ((_1524 - _1368) * 0.3010300099849701f); - int _1534 = int(1534); - float _1536 = _1533 - (float(_1534)); - float _1538 = _10[_1534]; - float _1541 = _10[(_1534 + 1)]; - float _1546 = _1538 * 0.5f; - _1586 = (dot(float3((_1536 * _1536), _1536, 1.0f), float3((mad((_10[(_1534 + 2)]), 0.5f, (mad(_1541, -1.0f, _1546)))), (_1541 - _1538), (mad(_1541, 0.5f, _1546))))); - } else { - do { - if (!(!(_1517 >= _1525))) { - float _1555 = log2((cb0_008z)); - if (((_1517 < (_1555 * 0.3010300099849701f)))) { - float _1563 = ((_1516 - _1524) * 0.9030900001525879f) / ((_1555 - _1524) * 0.3010300099849701f); - int _1564 = int(1564); - float _1566 = _1563 - (float(_1564)); - float _1568 = _11[_1564]; - float _1571 = _11[(_1564 + 1)]; - float _1576 = _1568 * 0.5f; - _1586 = (dot(float3((_1566 * _1566), _1566, 1.0f), float3((mad((_11[(_1564 + 2)]), 0.5f, (mad(_1571, -1.0f, _1576)))), (_1571 - _1568), (mad(_1571, 0.5f, _1576))))); - break; - } - } - _1586 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _1590 = (cb0_008w) - (cb0_008y); - float _1591 = ((exp2((_1438 * 3.321928024291992f))) - (cb0_008y)) / _1590; - float _1593 = ((exp2((_1512 * 3.321928024291992f))) - (cb0_008y)) / _1590; - float _1595 = ((exp2((_1586 * 3.321928024291992f))) - (cb0_008y)) / _1590; - float _1598 = mad(0.15618768334388733f, _1595, (mad(0.13400420546531677f, _1593, (_1591 * 0.6624541878700256f)))); - float _1601 = mad(0.053689517080783844f, _1595, (mad(0.6740817427635193f, _1593, (_1591 * 0.2722287178039551f)))); - float _1604 = mad(1.0103391408920288f, _1595, (mad(0.00406073359772563f, _1593, (_1591 * -0.005574649665504694f)))); - float _1617 = min((max((mad(-0.23642469942569733f, _1604, (mad(-0.32480329275131226f, _1601, (_1598 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _1618 = min((max((mad(0.016756348311901093f, _1604, (mad(1.6153316497802734f, _1601, (_1598 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _1619 = min((max((mad(0.9883948564529419f, _1604, (mad(-0.008284442126750946f, _1601, (_1598 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _1622 = mad(0.15618768334388733f, _1619, (mad(0.13400420546531677f, _1618, (_1617 * 0.6624541878700256f)))); - float _1625 = mad(0.053689517080783844f, _1619, (mad(0.6740817427635193f, _1618, (_1617 * 0.2722287178039551f)))); - float _1628 = mad(1.0103391408920288f, _1619, (mad(0.00406073359772563f, _1618, (_1617 * -0.005574649665504694f)))); - float _1650 = min((max(((min((max((mad(-0.23642469942569733f, _1628, (mad(-0.32480329275131226f, _1625, (_1622 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1651 = min((max(((min((max((mad(0.016756348311901093f, _1628, (mad(1.6153316497802734f, _1625, (_1622 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _1652 = min((max(((min((max((mad(0.9883948564529419f, _1628, (mad(-0.008284442126750946f, _1625, (_1622 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _1665 = _1650; - _1666 = _1651; - _1667 = _1652; - _2418 = 1.f; - _2419 = 1.f; - _2420 = 0.f; - - do { - if (!((((uint)(cb0_042w)) == 5))) { - _1665 = (mad(_45, _1652, (mad(_44, _1651, (_1650 * _43))))); - _1666 = (mad(_48, _1652, (mad(_47, _1651, (_1650 * _46))))); - _1667 = (mad(_51, _1652, (mad(_50, _1651, (_1650 * _49))))); - } - float _1677 = exp2(((log2((_1665 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1678 = exp2(((log2((_1666 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _1679 = exp2(((log2((_1667 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2418 = (exp2(((log2(((1.0f / ((_1677 * 18.6875f) + 1.0f)) * ((_1677 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2419 = (exp2(((log2(((1.0f / ((_1678 * 18.6875f) + 1.0f)) * ((_1678 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2420 = (exp2(((log2(((1.0f / ((_1679 * 18.6875f) + 1.0f)) * ((_1679 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if ((((((uint)(cb0_042w)) & -3) == 4))) { - _8[0] = (cb0_010x); - _8[1] = (cb0_010y); - _8[2] = (cb0_010z); - _8[3] = (cb0_010w); - _8[4] = (cb0_012x); - _8[5] = (cb0_012x); - _9[0] = (cb0_011x); - _9[1] = (cb0_011y); - _9[2] = (cb0_011z); - _9[3] = (cb0_011w); - _9[4] = (cb0_012y); - _9[5] = (cb0_012y); - float _1756 = (cb0_012z)*_957; - float _1757 = (cb0_012z)*_958; - float _1758 = (cb0_012z)*_959; - float _1761 = mad((UniformBufferConstants_WorkingColorSpace_016z), _1758, (mad((UniformBufferConstants_WorkingColorSpace_016y), _1757, ((UniformBufferConstants_WorkingColorSpace_016x)*_1756)))); - float _1764 = mad((UniformBufferConstants_WorkingColorSpace_017z), _1758, (mad((UniformBufferConstants_WorkingColorSpace_017y), _1757, ((UniformBufferConstants_WorkingColorSpace_017x)*_1756)))); - float _1767 = mad((UniformBufferConstants_WorkingColorSpace_018z), _1758, (mad((UniformBufferConstants_WorkingColorSpace_018y), _1757, ((UniformBufferConstants_WorkingColorSpace_018x)*_1756)))); - float _1771 = max((max(_1761, _1764)), _1767); - float _1776 = ((max(_1771, 1.000000013351432e-10f)) - (max((min((min(_1761, _1764)), _1767)), 1.000000013351432e-10f))) / (max(_1771, 0.009999999776482582f)); - float _1789 = ((_1764 + _1761) + _1767) + ((sqrt(((((_1767 - _1764) * _1767) + ((_1764 - _1761) * _1764)) + ((_1761 - _1767) * _1761)))) * 1.75f); - float _1790 = _1789 * 0.3333333432674408f; - float _1791 = _1776 + -0.4000000059604645f; - float _1792 = _1791 * 5.0f; - float _1796 = max((1.0f - (abs((_1791 * 2.5f)))), 0.0f); - float _1807 = (((float(((int(((bool)((_1792 > 0.0f))))) - (int(((bool)((_1792 < 0.0f)))))))) * (1.0f - (_1796 * _1796))) + 1.0f) * 0.02500000037252903f; - _1816 = _1807; - do { - if ((!(_1790 <= 0.0533333346247673f))) { - _1816 = 0.0f; - if ((!(_1790 >= 0.1599999964237213f))) { - _1816 = (((0.23999999463558197f / _1789) + -0.5f) * _1807); - } - } - float _1817 = _1816 + 1.0f; - float _1818 = _1817 * _1761; - float _1819 = _1817 * _1764; - float _1820 = _1817 * _1767; - _1849 = 0.0f; - do { - if (!(((bool)((_1818 == _1819))) && ((bool)((_1819 == _1820))))) { - float _1827 = ((_1818 * 2.0f) - _1819) - _1820; - float _1830 = ((_1764 - _1767) * 1.7320507764816284f) * _1817; - float _1832 = atan((_1830 / _1827)); - bool _1835 = (_1827 < 0.0f); - bool _1836 = (_1827 == 0.0f); - bool _1837 = (_1830 >= 0.0f); - bool _1838 = (_1830 < 0.0f); - _1849 = ((((bool)(_1837 && _1836)) ? 90.0f : ((((bool)(_1838 && _1836)) ? -90.0f : (((((bool)(_1838 && _1835)) ? (_1832 + -3.1415927410125732f) : ((((bool)(_1837 && _1835)) ? (_1832 + 3.1415927410125732f) : _1832)))) * 57.2957763671875f))))); - } - float _1854 = min((max(((((bool)((_1849 < 0.0f))) ? (_1849 + 360.0f) : _1849)), 0.0f)), 360.0f); - do { - if (((_1854 < -180.0f))) { - _1863 = (_1854 + 360.0f); - } else { - _1863 = _1854; - if (((_1854 > 180.0f))) { - _1863 = (_1854 + -360.0f); - } - } - _1902 = 0.0f; - do { - if ((((bool)((_1863 > -67.5f))) && ((bool)((_1863 < 67.5f))))) { - float _1869 = (_1863 + 67.5f) * 0.029629629105329514f; - int _1870 = int(1870); - float _1872 = _1869 - (float(_1870)); - float _1873 = _1872 * _1872; - float _1874 = _1873 * _1872; - if (_1870 == 3) { - _1902 = (((0.1666666716337204f - (_1872 * 0.5f)) + (_1873 * 0.5f)) - (_1874 * 0.1666666716337204f)); - } else { - if (_1870 == 2) { - _1902 = ((0.6666666865348816f - _1873) + (_1874 * 0.5f)); - } else { - if (_1870 == 1) { - _1902 = (((_1874 * -0.5f) + 0.1666666716337204f) + ((_1873 + _1872) * 0.5f)); - } else { - _1902 = ((((bool)((_1870 == 0))) ? (_1874 * 0.1666666716337204f) : 0.0f)); - } - } - } - } - float _1911 = min((max(((((_1776 * 0.27000001072883606f) * (0.029999999329447746f - _1818)) * _1902) + _1818), 0.0f)), 65535.0f); - float _1912 = min((max(_1819, 0.0f)), 65535.0f); - float _1913 = min((max(_1820, 0.0f)), 65535.0f); - float _1926 = min((max((mad(-0.21492856740951538f, _1913, (mad(-0.2365107536315918f, _1912, (_1911 * 1.4514392614364624f))))), 0.0f)), 65504.0f); - float _1927 = min((max((mad(-0.09967592358589172f, _1913, (mad(1.17622971534729f, _1912, (_1911 * -0.07655377686023712f))))), 0.0f)), 65504.0f); - float _1928 = min((max((mad(0.9977163076400757f, _1913, (mad(-0.006032449658960104f, _1912, (_1911 * 0.008316148072481155f))))), 0.0f)), 65504.0f); - float _1929 = dot(float3(_1926, _1927, _1928), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1940 = log2((max((((_1926 - _1929) * 0.9599999785423279f) + _1929), 1.000000013351432e-10f))); - float _1941 = _1940 * 0.3010300099849701f; - float _1942 = log2((cb0_008x)); - float _1943 = _1942 * 0.3010300099849701f; - do { - if (!(!(_1941 <= _1943))) { - _2012 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _1950 = log2((cb0_009x)); - float _1951 = _1950 * 0.3010300099849701f; - if ((((bool)((_1941 > _1943))) && ((bool)((_1941 < _1951))))) { - float _1959 = ((_1940 - _1942) * 0.9030900001525879f) / ((_1950 - _1942) * 0.3010300099849701f); - int _1960 = int(1960); - float _1962 = _1959 - (float(_1960)); - float _1964 = _8[_1960]; - float _1967 = _8[(_1960 + 1)]; - float _1972 = _1964 * 0.5f; - _2012 = (dot(float3((_1962 * _1962), _1962, 1.0f), float3((mad((_8[(_1960 + 2)]), 0.5f, (mad(_1967, -1.0f, _1972)))), (_1967 - _1964), (mad(_1967, 0.5f, _1972))))); - } else { - do { - if (!(!(_1941 >= _1951))) { - float _1981 = log2((cb0_008z)); - if (((_1941 < (_1981 * 0.3010300099849701f)))) { - float _1989 = ((_1940 - _1950) * 0.9030900001525879f) / ((_1981 - _1950) * 0.3010300099849701f); - int _1990 = int(1990); - float _1992 = _1989 - (float(_1990)); - float _1994 = _9[_1990]; - float _1997 = _9[(_1990 + 1)]; - float _2002 = _1994 * 0.5f; - _2012 = (dot(float3((_1992 * _1992), _1992, 1.0f), float3((mad((_9[(_1990 + 2)]), 0.5f, (mad(_1997, -1.0f, _2002)))), (_1997 - _1994), (mad(_1997, 0.5f, _2002))))); - break; - } - } - _2012 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2016 = log2((max((((_1927 - _1929) * 0.9599999785423279f) + _1929), 1.000000013351432e-10f))); - float _2017 = _2016 * 0.3010300099849701f; - do { - if (!(!(_2017 <= _1943))) { - _2086 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2024 = log2((cb0_009x)); - float _2025 = _2024 * 0.3010300099849701f; - if ((((bool)((_2017 > _1943))) && ((bool)((_2017 < _2025))))) { - float _2033 = ((_2016 - _1942) * 0.9030900001525879f) / ((_2024 - _1942) * 0.3010300099849701f); - int _2034 = int(2034); - float _2036 = _2033 - (float(_2034)); - float _2038 = _8[_2034]; - float _2041 = _8[(_2034 + 1)]; - float _2046 = _2038 * 0.5f; - _2086 = (dot(float3((_2036 * _2036), _2036, 1.0f), float3((mad((_8[(_2034 + 2)]), 0.5f, (mad(_2041, -1.0f, _2046)))), (_2041 - _2038), (mad(_2041, 0.5f, _2046))))); - } else { - do { - if (!(!(_2017 >= _2025))) { - float _2055 = log2((cb0_008z)); - if (((_2017 < (_2055 * 0.3010300099849701f)))) { - float _2063 = ((_2016 - _2024) * 0.9030900001525879f) / ((_2055 - _2024) * 0.3010300099849701f); - int _2064 = int(2064); - float _2066 = _2063 - (float(_2064)); - float _2068 = _9[_2064]; - float _2071 = _9[(_2064 + 1)]; - float _2076 = _2068 * 0.5f; - _2086 = (dot(float3((_2066 * _2066), _2066, 1.0f), float3((mad((_9[(_2064 + 2)]), 0.5f, (mad(_2071, -1.0f, _2076)))), (_2071 - _2068), (mad(_2071, 0.5f, _2076))))); - break; - } - } - _2086 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2090 = log2((max((((_1928 - _1929) * 0.9599999785423279f) + _1929), 1.000000013351432e-10f))); - float _2091 = _2090 * 0.3010300099849701f; - do { - if (!(!(_2091 <= _1943))) { - _2160 = ((log2((cb0_008y))) * 0.3010300099849701f); - } else { - float _2098 = log2((cb0_009x)); - float _2099 = _2098 * 0.3010300099849701f; - if ((((bool)((_2091 > _1943))) && ((bool)((_2091 < _2099))))) { - float _2107 = ((_2090 - _1942) * 0.9030900001525879f) / ((_2098 - _1942) * 0.3010300099849701f); - int _2108 = int(2108); - float _2110 = _2107 - (float(_2108)); - float _2112 = _8[_2108]; - float _2115 = _8[(_2108 + 1)]; - float _2120 = _2112 * 0.5f; - _2160 = (dot(float3((_2110 * _2110), _2110, 1.0f), float3((mad((_8[(_2108 + 2)]), 0.5f, (mad(_2115, -1.0f, _2120)))), (_2115 - _2112), (mad(_2115, 0.5f, _2120))))); - } else { - do { - if (!(!(_2091 >= _2099))) { - float _2129 = log2((cb0_008z)); - if (((_2091 < (_2129 * 0.3010300099849701f)))) { - float _2137 = ((_2090 - _2098) * 0.9030900001525879f) / ((_2129 - _2098) * 0.3010300099849701f); - int _2138 = int(2138); - float _2140 = _2137 - (float(_2138)); - float _2142 = _9[_2138]; - float _2145 = _9[(_2138 + 1)]; - float _2150 = _2142 * 0.5f; - _2160 = (dot(float3((_2140 * _2140), _2140, 1.0f), float3((mad((_9[(_2138 + 2)]), 0.5f, (mad(_2145, -1.0f, _2150)))), (_2145 - _2142), (mad(_2145, 0.5f, _2150))))); - break; - } - } - _2160 = ((log2((cb0_008w))) * 0.3010300099849701f); - } while (false); - } - } - float _2164 = (cb0_008w) - (cb0_008y); - float _2165 = ((exp2((_2012 * 3.321928024291992f))) - (cb0_008y)) / _2164; - float _2167 = ((exp2((_2086 * 3.321928024291992f))) - (cb0_008y)) / _2164; - float _2169 = ((exp2((_2160 * 3.321928024291992f))) - (cb0_008y)) / _2164; - float _2172 = mad(0.15618768334388733f, _2169, (mad(0.13400420546531677f, _2167, (_2165 * 0.6624541878700256f)))); - float _2175 = mad(0.053689517080783844f, _2169, (mad(0.6740817427635193f, _2167, (_2165 * 0.2722287178039551f)))); - float _2178 = mad(1.0103391408920288f, _2169, (mad(0.00406073359772563f, _2167, (_2165 * -0.005574649665504694f)))); - float _2191 = min((max((mad(-0.23642469942569733f, _2178, (mad(-0.32480329275131226f, _2175, (_2172 * 1.6410233974456787f))))), 0.0f)), 1.0f); - float _2192 = min((max((mad(0.016756348311901093f, _2178, (mad(1.6153316497802734f, _2175, (_2172 * -0.663662850856781f))))), 0.0f)), 1.0f); - float _2193 = min((max((mad(0.9883948564529419f, _2178, (mad(-0.008284442126750946f, _2175, (_2172 * 0.011721894145011902f))))), 0.0f)), 1.0f); - float _2196 = mad(0.15618768334388733f, _2193, (mad(0.13400420546531677f, _2192, (_2191 * 0.6624541878700256f)))); - float _2199 = mad(0.053689517080783844f, _2193, (mad(0.6740817427635193f, _2192, (_2191 * 0.2722287178039551f)))); - float _2202 = mad(1.0103391408920288f, _2193, (mad(0.00406073359772563f, _2192, (_2191 * -0.005574649665504694f)))); - float _2224 = min((max(((min((max((mad(-0.23642469942569733f, _2202, (mad(-0.32480329275131226f, _2199, (_2196 * 1.6410233974456787f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2225 = min((max(((min((max((mad(0.016756348311901093f, _2202, (mad(1.6153316497802734f, _2199, (_2196 * -0.663662850856781f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - float _2226 = min((max(((min((max((mad(0.9883948564529419f, _2202, (mad(-0.008284442126750946f, _2199, (_2196 * 0.011721894145011902f))))), 0.0f)), 65535.0f)) * (cb0_008w)), 0.0f)), 65535.0f); - _2239 = _2224; - _2240 = _2225; - _2241 = _2226; - do { - if (!((((uint)(cb0_042w)) == 6))) { - _2239 = (mad(_45, _2226, (mad(_44, _2225, (_2224 * _43))))); - _2240 = (mad(_48, _2226, (mad(_47, _2225, (_2224 * _46))))); - _2241 = (mad(_51, _2226, (mad(_50, _2225, (_2224 * _49))))); - } - float _2251 = exp2(((log2((_2239 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2252 = exp2(((log2((_2240 * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2253 = exp2(((log2((_2241 * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2418 = (exp2(((log2(((1.0f / ((_2251 * 18.6875f) + 1.0f)) * ((_2251 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2419 = (exp2(((log2(((1.0f / ((_2252 * 18.6875f) + 1.0f)) * ((_2252 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2420 = (exp2(((log2(((1.0f / ((_2253 * 18.6875f) + 1.0f)) * ((_2253 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - if (((((uint)(cb0_042w)) == 7))) { - float _2298 = mad((UniformBufferConstants_WorkingColorSpace_008z), _959, (mad((UniformBufferConstants_WorkingColorSpace_008y), _958, ((UniformBufferConstants_WorkingColorSpace_008x)*_957)))); - float _2301 = mad((UniformBufferConstants_WorkingColorSpace_009z), _959, (mad((UniformBufferConstants_WorkingColorSpace_009y), _958, ((UniformBufferConstants_WorkingColorSpace_009x)*_957)))); - float _2304 = mad((UniformBufferConstants_WorkingColorSpace_010z), _959, (mad((UniformBufferConstants_WorkingColorSpace_010y), _958, ((UniformBufferConstants_WorkingColorSpace_010x)*_957)))); - float _2323 = exp2(((log2(((mad(_45, _2304, (mad(_44, _2301, (_2298 * _43))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2324 = exp2(((log2(((mad(_48, _2304, (mad(_47, _2301, (_2298 * _46))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - float _2325 = exp2(((log2(((mad(_51, _2304, (mad(_50, _2301, (_2298 * _49))))) * 9.999999747378752e-05f))) * 0.1593017578125f)); - _2418 = (exp2(((log2(((1.0f / ((_2323 * 18.6875f) + 1.0f)) * ((_2323 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2419 = (exp2(((log2(((1.0f / ((_2324 * 18.6875f) + 1.0f)) * ((_2324 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - _2420 = (exp2(((log2(((1.0f / ((_2325 * 18.6875f) + 1.0f)) * ((_2325 * 18.8515625f) + 0.8359375f)))) * 78.84375f))); - } else { - _2418 = _957; - _2419 = _958; - _2420 = _959; - if (!((((uint)(cb0_042w)) == 8))) { - if (((((uint)(cb0_042w)) == 9))) { - float _2372 = mad((UniformBufferConstants_WorkingColorSpace_008z), _947, (mad((UniformBufferConstants_WorkingColorSpace_008y), _946, ((UniformBufferConstants_WorkingColorSpace_008x)*_945)))); - float _2375 = mad((UniformBufferConstants_WorkingColorSpace_009z), _947, (mad((UniformBufferConstants_WorkingColorSpace_009y), _946, ((UniformBufferConstants_WorkingColorSpace_009x)*_945)))); - float _2378 = mad((UniformBufferConstants_WorkingColorSpace_010z), _947, (mad((UniformBufferConstants_WorkingColorSpace_010y), _946, ((UniformBufferConstants_WorkingColorSpace_010x)*_945)))); - _2418 = (mad(_45, _2378, (mad(_44, _2375, (_2372 * _43))))); - _2419 = (mad(_48, _2378, (mad(_47, _2375, (_2372 * _46))))); - _2420 = (mad(_51, _2378, (mad(_50, _2375, (_2372 * _49))))); - } else { - float _2391 = mad((UniformBufferConstants_WorkingColorSpace_008z), _973, (mad((UniformBufferConstants_WorkingColorSpace_008y), _972, ((UniformBufferConstants_WorkingColorSpace_008x)*_971)))); - float _2394 = mad((UniformBufferConstants_WorkingColorSpace_009z), _973, (mad((UniformBufferConstants_WorkingColorSpace_009y), _972, ((UniformBufferConstants_WorkingColorSpace_009x)*_971)))); - float _2397 = mad((UniformBufferConstants_WorkingColorSpace_010z), _973, (mad((UniformBufferConstants_WorkingColorSpace_010y), _972, ((UniformBufferConstants_WorkingColorSpace_010x)*_971)))); - _2418 = (exp2(((log2((mad(_45, _2397, (mad(_44, _2394, (_2391 * _43))))))) * (cb0_042z)))); - _2419 = (exp2(((log2((mad(_48, _2397, (mad(_47, _2394, (_2391 * _46))))))) * (cb0_042z)))); - _2420 = (exp2(((log2((mad(_51, _2397, (mad(_50, _2394, (_2391 * _49))))))) * (cb0_042z)))); - } - } - } - } - } - } - } - SV_Target.x = (_2418 * 0.9523810148239136f); - SV_Target.y = (_2419 * 0.9523810148239136f); - SV_Target.z = (_2420 * 0.9523810148239136f); - SV_Target.w = 0.0f; - SV_Target.rgb *= 5; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl deleted file mode 100644 index 8cbef71d..00000000 --- a/src/games/ue-dx12/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl +++ /dev/null @@ -1,3114 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D Textures_1 : register(t0); - -cbuffer _RootShaderParameters : register(b0) { - float _RootShaderParameters_005x : packoffset(c005.x); - float _RootShaderParameters_005y : packoffset(c005.y); - float _RootShaderParameters_008x : packoffset(c008.x); - float _RootShaderParameters_008y : packoffset(c008.y); - float _RootShaderParameters_008z : packoffset(c008.z); - float _RootShaderParameters_008w : packoffset(c008.w); - float _RootShaderParameters_009x : packoffset(c009.x); - float _RootShaderParameters_010x : packoffset(c010.x); - float _RootShaderParameters_010y : packoffset(c010.y); - float _RootShaderParameters_010z : packoffset(c010.z); - float _RootShaderParameters_010w : packoffset(c010.w); - float _RootShaderParameters_011x : packoffset(c011.x); - float _RootShaderParameters_011y : packoffset(c011.y); - float _RootShaderParameters_011z : packoffset(c011.z); - float _RootShaderParameters_011w : packoffset(c011.w); - float _RootShaderParameters_012x : packoffset(c012.x); - float _RootShaderParameters_012y : packoffset(c012.y); - float _RootShaderParameters_012z : packoffset(c012.z); - float _RootShaderParameters_013x : packoffset(c013.x); - float _RootShaderParameters_013y : packoffset(c013.y); - float _RootShaderParameters_013z : packoffset(c013.z); - float _RootShaderParameters_013w : packoffset(c013.w); - float _RootShaderParameters_014x : packoffset(c014.x); - float _RootShaderParameters_014y : packoffset(c014.y); - float _RootShaderParameters_014z : packoffset(c014.z); - float _RootShaderParameters_015x : packoffset(c015.x); - float _RootShaderParameters_015y : packoffset(c015.y); - float _RootShaderParameters_015z : packoffset(c015.z); - float _RootShaderParameters_015w : packoffset(c015.w); - float _RootShaderParameters_016x : packoffset(c016.x); - float _RootShaderParameters_016y : packoffset(c016.y); - float _RootShaderParameters_016z : packoffset(c016.z); - float _RootShaderParameters_016w : packoffset(c016.w); - float _RootShaderParameters_017x : packoffset(c017.x); - float _RootShaderParameters_017y : packoffset(c017.y); - float _RootShaderParameters_017z : packoffset(c017.z); - float _RootShaderParameters_017w : packoffset(c017.w); - float _RootShaderParameters_018x : packoffset(c018.x); - float _RootShaderParameters_018y : packoffset(c018.y); - float _RootShaderParameters_018z : packoffset(c018.z); - float _RootShaderParameters_018w : packoffset(c018.w); - float _RootShaderParameters_019x : packoffset(c019.x); - float _RootShaderParameters_019y : packoffset(c019.y); - float _RootShaderParameters_019z : packoffset(c019.z); - float _RootShaderParameters_019w : packoffset(c019.w); - float _RootShaderParameters_020x : packoffset(c020.x); - float _RootShaderParameters_020y : packoffset(c020.y); - float _RootShaderParameters_020z : packoffset(c020.z); - float _RootShaderParameters_020w : packoffset(c020.w); - float _RootShaderParameters_021x : packoffset(c021.x); - float _RootShaderParameters_021y : packoffset(c021.y); - float _RootShaderParameters_021z : packoffset(c021.z); - float _RootShaderParameters_021w : packoffset(c021.w); - float _RootShaderParameters_022x : packoffset(c022.x); - float _RootShaderParameters_022y : packoffset(c022.y); - float _RootShaderParameters_022z : packoffset(c022.z); - float _RootShaderParameters_022w : packoffset(c022.w); - float _RootShaderParameters_023x : packoffset(c023.x); - float _RootShaderParameters_023y : packoffset(c023.y); - float _RootShaderParameters_023z : packoffset(c023.z); - float _RootShaderParameters_023w : packoffset(c023.w); - float _RootShaderParameters_024x : packoffset(c024.x); - float _RootShaderParameters_024y : packoffset(c024.y); - float _RootShaderParameters_024z : packoffset(c024.z); - float _RootShaderParameters_024w : packoffset(c024.w); - float _RootShaderParameters_025x : packoffset(c025.x); - float _RootShaderParameters_025y : packoffset(c025.y); - float _RootShaderParameters_025z : packoffset(c025.z); - float _RootShaderParameters_025w : packoffset(c025.w); - float _RootShaderParameters_026x : packoffset(c026.x); - float _RootShaderParameters_026y : packoffset(c026.y); - float _RootShaderParameters_026z : packoffset(c026.z); - float _RootShaderParameters_026w : packoffset(c026.w); - float _RootShaderParameters_027x : packoffset(c027.x); - float _RootShaderParameters_027y : packoffset(c027.y); - float _RootShaderParameters_027z : packoffset(c027.z); - float _RootShaderParameters_027w : packoffset(c027.w); - float _RootShaderParameters_028x : packoffset(c028.x); - float _RootShaderParameters_028y : packoffset(c028.y); - float _RootShaderParameters_028z : packoffset(c028.z); - float _RootShaderParameters_028w : packoffset(c028.w); - float _RootShaderParameters_029x : packoffset(c029.x); - float _RootShaderParameters_029y : packoffset(c029.y); - float _RootShaderParameters_029z : packoffset(c029.z); - float _RootShaderParameters_029w : packoffset(c029.w); - float _RootShaderParameters_030x : packoffset(c030.x); - float _RootShaderParameters_030y : packoffset(c030.y); - float _RootShaderParameters_030z : packoffset(c030.z); - float _RootShaderParameters_030w : packoffset(c030.w); - float _RootShaderParameters_031x : packoffset(c031.x); - float _RootShaderParameters_031y : packoffset(c031.y); - float _RootShaderParameters_031z : packoffset(c031.z); - float _RootShaderParameters_031w : packoffset(c031.w); - float _RootShaderParameters_032x : packoffset(c032.x); - float _RootShaderParameters_032y : packoffset(c032.y); - float _RootShaderParameters_032z : packoffset(c032.z); - float _RootShaderParameters_032w : packoffset(c032.w); - float _RootShaderParameters_033x : packoffset(c033.x); - float _RootShaderParameters_033y : packoffset(c033.y); - float _RootShaderParameters_033z : packoffset(c033.z); - float _RootShaderParameters_033w : packoffset(c033.w); - float _RootShaderParameters_034x : packoffset(c034.x); - float _RootShaderParameters_034y : packoffset(c034.y); - float _RootShaderParameters_034z : packoffset(c034.z); - float _RootShaderParameters_034w : packoffset(c034.w); - float _RootShaderParameters_035x : packoffset(c035.x); - float _RootShaderParameters_035y : packoffset(c035.y); - float _RootShaderParameters_035z : packoffset(c035.z); - float _RootShaderParameters_035w : packoffset(c035.w); - float _RootShaderParameters_036x : packoffset(c036.x); - float _RootShaderParameters_036y : packoffset(c036.y); - float _RootShaderParameters_036z : packoffset(c036.z); - float _RootShaderParameters_036w : packoffset(c036.w); - float _RootShaderParameters_037x : packoffset(c037.x); - float _RootShaderParameters_037y : packoffset(c037.y); - float _RootShaderParameters_037z : packoffset(c037.z); - float _RootShaderParameters_037w : packoffset(c037.w); - float _RootShaderParameters_038x : packoffset(c038.x); - uint _RootShaderParameters_038z : packoffset(c038.z); - float _RootShaderParameters_039x : packoffset(c039.x); - float _RootShaderParameters_039y : packoffset(c039.y); - float _RootShaderParameters_039z : packoffset(c039.z); - float _RootShaderParameters_040y : packoffset(c040.y); - float _RootShaderParameters_040z : packoffset(c040.z); - uint _RootShaderParameters_040w : packoffset(c040.w); - uint _RootShaderParameters_041x : packoffset(c041.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_000x : packoffset(c000.x); - float UniformBufferConstants_WorkingColorSpace_000y : packoffset(c000.y); - float UniformBufferConstants_WorkingColorSpace_000z : packoffset(c000.z); - float UniformBufferConstants_WorkingColorSpace_001x : packoffset(c001.x); - float UniformBufferConstants_WorkingColorSpace_001y : packoffset(c001.y); - float UniformBufferConstants_WorkingColorSpace_001z : packoffset(c001.z); - float UniformBufferConstants_WorkingColorSpace_002x : packoffset(c002.x); - float UniformBufferConstants_WorkingColorSpace_002y : packoffset(c002.y); - float UniformBufferConstants_WorkingColorSpace_002z : packoffset(c002.z); - float UniformBufferConstants_WorkingColorSpace_004x : packoffset(c004.x); - float UniformBufferConstants_WorkingColorSpace_004y : packoffset(c004.y); - float UniformBufferConstants_WorkingColorSpace_004z : packoffset(c004.z); - float UniformBufferConstants_WorkingColorSpace_005x : packoffset(c005.x); - float UniformBufferConstants_WorkingColorSpace_005y : packoffset(c005.y); - float UniformBufferConstants_WorkingColorSpace_005z : packoffset(c005.z); - float UniformBufferConstants_WorkingColorSpace_006x : packoffset(c006.x); - float UniformBufferConstants_WorkingColorSpace_006y : packoffset(c006.y); - float UniformBufferConstants_WorkingColorSpace_006z : packoffset(c006.z); - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -SamplerState Samplers_1 : register(s0); - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - // texture _1 = Textures_1; - // SamplerState _2 = Samplers_1; - // cbuffer _3 = UniformBufferConstants_WorkingColorSpace; - // cbuffer _4 = _RootShaderParameters; - // _5 = _3; - // _6 = _4; - uint _7 = SV_RenderTargetArrayIndex; - float _8 = TEXCOORD.x; - float _9 = TEXCOORD.y; - float _10[6]; - float _11[6]; - float _12[6]; - float _13[6]; - float _14 = _8 + -0.015625f; - float _15 = _9 + -0.015625f; - float _16 = _14 * 1.0322580337524414f; - float _17 = _15 * 1.0322580337524414f; - float _18 = float(_7); - float _19 = _18 * 0.032258063554763794f; - uint _21 = _RootShaderParameters_041x; - bool _22 = (_21 == 1); - float _39 = 1.379158854484558f; - float _40 = -0.3088507056236267f; - float _41 = -0.07034677267074585f; - float _42 = -0.06933528929948807f; - float _43 = 1.0822921991348267f; - float _44 = -0.012962047010660172f; - float _45 = -0.002159259282052517f; - float _46 = -0.045465391129255295f; - float _47 = 1.0477596521377563f; - float _105; - float _106; - float _107; - float _156; - float _885; - float _921; - float _932; - float _996; - float _1175; - float _1186; - float _1197; - float _1370; - float _1371; - float _1372; - float _1383; - float _1394; - float _1576; - float _1612; - float _1623; - float _1662; - float _1772; - float _1846; - float _1920; - float _1999; - float _2000; - float _2001; - float _2152; - float _2188; - float _2199; - float _2238; - float _2348; - float _2422; - float _2496; - float _2575; - float _2576; - float _2577; - float _2754; - float _2755; - float _2756; - if (!_22) { - bool _24 = (_21 == 2); - _39 = 1.02579927444458f; - _40 = -0.020052503794431686f; - _41 = -0.0057713985443115234f; - _42 = -0.0022350111976265907f; - _43 = 1.0045825242996216f; - _44 = -0.002352306619286537f; - _45 = -0.005014004185795784f; - _46 = -0.025293385609984398f; - _47 = 1.0304402112960815f; - if (!_24) { - bool _26 = (_21 == 3); - _39 = 0.6954522132873535f; - _40 = 0.14067870378494263f; - _41 = 0.16386906802654266f; - _42 = 0.044794563204050064f; - _43 = 0.8596711158752441f; - _44 = 0.0955343171954155f; - _45 = -0.005525882821530104f; - _46 = 0.004025210160762072f; - _47 = 1.0015007257461548f; - if (!_26) { - bool _28 = (_21 == 4); - float _29 = _28 ? 1.0f : 1.7050515413284302f; - float _30 = _28 ? 0.0f : -0.6217905879020691f; - float _31 = _28 ? 0.0f : -0.0832584798336029f; - float _32 = _28 ? 0.0f : -0.13025718927383423f; - float _33 = _28 ? 1.0f : 1.1408027410507202f; - float _34 = _28 ? 0.0f : -0.010548528283834457f; - float _35 = _28 ? 0.0f : -0.024003278464078903f; - float _36 = _28 ? 0.0f : -0.1289687603712082f; - float _37 = _28 ? 1.0f : 1.152971863746643f; - _39 = _29; - _40 = _30; - _41 = _31; - _42 = _32; - _43 = _33; - _44 = _34; - _45 = _35; - _46 = _36; - _47 = _37; - } - } - } - uint _49 = _RootShaderParameters_040w; - bool _50 = (_49 > 2); - if (_50) { - float _52 = log2(_16); - float _53 = log2(_17); - float _54 = log2(_19); - float _55 = _52 * 0.012683313339948654f; - float _56 = _53 * 0.012683313339948654f; - float _57 = _54 * 0.012683313339948654f; - float _58 = exp2(_55); - float _59 = exp2(_56); - float _60 = exp2(_57); - float _61 = _58 + -0.8359375f; - float _62 = _59 + -0.8359375f; - float _63 = _60 + -0.8359375f; - float _64 = max(0.0f, _61); - float _65 = max(0.0f, _62); - float _66 = max(0.0f, _63); - float _67 = _58 * 18.6875f; - float _68 = _59 * 18.6875f; - float _69 = _60 * 18.6875f; - float _70 = 18.8515625f - _67; - float _71 = 18.8515625f - _68; - float _72 = 18.8515625f - _69; - float _73 = _64 / _70; - float _74 = _65 / _71; - float _75 = _66 / _72; - float _76 = log2(_73); - float _77 = log2(_74); - float _78 = log2(_75); - float _79 = _76 * 6.277394771575928f; - float _80 = _77 * 6.277394771575928f; - float _81 = _78 * 6.277394771575928f; - float _82 = exp2(_79); - float _83 = exp2(_80); - float _84 = exp2(_81); - float _85 = _82 * 100.0f; - float _86 = _83 * 100.0f; - float _87 = _84 * 100.0f; - _105 = _85; - _106 = _86; - _107 = _87; - } else { - float _89 = _14 * 14.45161247253418f; - float _90 = _89 + -6.07624626159668f; - float _91 = _15 * 14.45161247253418f; - float _92 = _91 + -6.07624626159668f; - float _93 = _18 * 0.4516128897666931f; - float _94 = _93 + -6.07624626159668f; - float _95 = exp2(_90); - float _96 = exp2(_92); - float _97 = exp2(_94); - float _98 = _95 * 0.18000000715255737f; - float _99 = _96 * 0.18000000715255737f; - float _100 = _97 * 0.18000000715255737f; - float _101 = _98 + -0.002667719265446067f; - float _102 = _99 + -0.002667719265446067f; - float _103 = _100 + -0.002667719265446067f; - _105 = _101; - _106 = _102; - _107 = _103; - } - - float _109 = UniformBufferConstants_WorkingColorSpace_004x; - float _110 = UniformBufferConstants_WorkingColorSpace_004y; - float _111 = UniformBufferConstants_WorkingColorSpace_004z; - float _113 = UniformBufferConstants_WorkingColorSpace_005x; - float _114 = UniformBufferConstants_WorkingColorSpace_005y; - float _115 = UniformBufferConstants_WorkingColorSpace_005z; - float _117 = UniformBufferConstants_WorkingColorSpace_006x; - float _118 = UniformBufferConstants_WorkingColorSpace_006y; - float _119 = UniformBufferConstants_WorkingColorSpace_006z; - float _121 = UniformBufferConstants_WorkingColorSpace_000x; - float _122 = UniformBufferConstants_WorkingColorSpace_000y; - float _123 = UniformBufferConstants_WorkingColorSpace_000z; - float _125 = UniformBufferConstants_WorkingColorSpace_001x; - float _126 = UniformBufferConstants_WorkingColorSpace_001y; - float _127 = UniformBufferConstants_WorkingColorSpace_001z; - float _129 = UniformBufferConstants_WorkingColorSpace_002x; - float _130 = UniformBufferConstants_WorkingColorSpace_002y; - float _131 = UniformBufferConstants_WorkingColorSpace_002z; - uint _133 = _RootShaderParameters_038z; - bool _134 = (_133 != 0); - float _136 = _RootShaderParameters_035y; - float _137 = _RootShaderParameters_035x; - float _138 = _137 * 1.0005563497543335f; - float _139 = 0.9994439482688904f / _137; - bool _140 = !(_138 <= 7000.0f); - if (!_140) { - float _142 = _139 * 4607000064.0f; - float _143 = 2967800.0f - _142; - float _144 = _143 * _139; - float _145 = _144 + 99.11000061035156f; - float _146 = _145 * _139; - float _147 = _146 + 0.24406300485134125f; - _156 = _147; - } else { - float _149 = _139 * 2006400000.0f; - float _150 = 1901800.0f - _149; - float _151 = _150 * _139; - float _152 = _151 + 247.47999572753906f; - float _153 = _152 * _139; - float _154 = _153 + 0.23703999817371368f; - _156 = _154; - } - float _157 = _156 * _156; - float _158 = _157 * 3.0f; - float _159 = _156 * 2.869999885559082f; - float _160 = _159 + -0.2750000059604645f; - float _161 = _160 - _158; - float _162 = _137 * 1.2864121856637212e-07f; - float _163 = _162 + 0.00015411825734190643f; - float _164 = _163 * _137; - float _165 = _164 + 0.8601177334785461f; - float _166 = _137 * 7.081451371959702e-07f; - float _167 = _166 + 0.0008424202096648514f; - float _168 = _167 * _137; - float _169 = _168 + 1.0f; - float _170 = _165 / _169; - float _171 = _137 * 4.204816761443908e-08f; - float _172 = _171 + 4.228062607580796e-05f; - float _173 = _172 * _137; - float _174 = _173 + 0.31739872694015503f; - float _175 = _137 * 2.8974181986995973e-05f; - float _176 = 1.0f - _175; - float _177 = _137 * _137; - float _178 = _177 * 1.6145605741257896e-07f; - float _179 = _176 + _178; - float _180 = _174 / _179; - float _181 = _170 * 3.0f; - float _182 = _170 * 2.0f; - float _183 = _180 * 8.0f; - float _184 = _182 + 4.0f; - float _185 = _184 - _183; - float _186 = _181 / _185; - float _187 = _180 * 2.0f; - float _188 = _187 / _185; - bool _189 = (_137 < 4000.0f); - float _190 = _189 ? _186 : _156; - float _191 = _189 ? _188 : _161; - float _192 = _137 * 1916156.25f; - float _193 = -1137581184.0f - _192; - float _194 = _177 * 1.5317699909210205f; - float _195 = _193 - _194; - float _196 = _137 + 1189.6199951171875f; - float _197 = _196 * _137; - float _198 = _197 + 1412139.875f; - float _199 = _198 * _198; - float _200 = _195 / _199; - float _201 = _137 * 705674.0f; - float _202 = 1974715392.0f - _201; - float _203 = _177 * 308.60699462890625f; - float _204 = _202 - _203; - float _205 = _137 * 179.45599365234375f; - float _206 = 6193636.0f - _205; - float _207 = _206 + _177; - float _208 = _207 * _207; - float _209 = _204 / _208; - float _210 = dot(float2(_200, _209), float2(_200, _209)); - float _211 = rsqrt(_210); - float _212 = _136 * 0.05000000074505806f; - float _213 = _212 * _209; - float _214 = _213 * _211; - float _215 = _214 + _170; - float _216 = _212 * _200; - float _217 = _216 * _211; - float _218 = _180 - _217; - float _219 = _215 * 3.0f; - float _220 = _215 * 2.0f; - float _221 = _218 * 8.0f; - float _222 = 4.0f - _221; - float _223 = _222 + _220; - float _224 = _219 / _223; - float _225 = _218 * 2.0f; - float _226 = _225 / _223; - float _227 = _224 - _186; - float _228 = _226 - _188; - float _229 = _227 + _190; - float _230 = _228 + _191; - float _231 = _134 ? _229 : 0.3127000033855438f; - float _232 = _134 ? _230 : 0.32899999618530273f; - float _233 = _134 ? 0.3127000033855438f : _229; - float _234 = _134 ? 0.32899999618530273f : _230; - float _235 = max(_232, 1.000000013351432e-10f); - float _236 = _231 / _235; - float _237 = 1.0f - _231; - float _238 = _237 - _232; - float _239 = _238 / _235; - float _240 = max(_234, 1.000000013351432e-10f); - float _241 = _233 / _240; - float _242 = 1.0f - _233; - float _243 = _242 - _234; - float _244 = _243 / _240; - float _245 = _236 * 0.8950999975204468f; - float _246 = _245 + 0.266400009393692f; - float _247 = mad(-0.16140000522136688f, _239, _246); - float _248 = _236 * 0.7501999735832214f; - float _249 = 1.7135000228881836f - _248; - float _250 = mad(0.03669999912381172f, _239, _249); - float _251 = _236 * 0.03889999911189079f; - float _252 = _251 + -0.06849999725818634f; - float _253 = mad(1.0296000242233276f, _239, _252); - float _254 = _241 * 0.8950999975204468f; - float _255 = _254 + 0.266400009393692f; - float _256 = mad(-0.16140000522136688f, _244, _255); - float _257 = _241 * 0.7501999735832214f; - float _258 = 1.7135000228881836f - _257; - float _259 = mad(0.03669999912381172f, _244, _258); - float _260 = _241 * 0.03889999911189079f; - float _261 = _260 + -0.06849999725818634f; - float _262 = mad(1.0296000242233276f, _244, _261); - float _263 = _256 / _247; - float _264 = _259 / _250; - float _265 = _262 / _253; - float _266 = mad(_264, -0.7501999735832214f, 0.0f); - float _267 = mad(_264, 1.7135000228881836f, 0.0f); - float _268 = mad(_264, 0.03669999912381172f, -0.0f); - float _269 = mad(_265, 0.03889999911189079f, 0.0f); - float _270 = mad(_265, -0.06849999725818634f, 0.0f); - float _271 = mad(_265, 1.0296000242233276f, 0.0f); - float _272 = _263 * 0.883457362651825f; - float _273 = mad(-0.1470542997121811f, _266, _272); - float _274 = mad(0.1599626988172531f, _269, _273); - float _275 = _263 * 0.26293492317199707f; - float _276 = mad(-0.1470542997121811f, _267, _275); - float _277 = mad(0.1599626988172531f, _270, _276); - float _278 = _263 * -0.15930065512657166f; - float _279 = mad(-0.1470542997121811f, _268, _278); - float _280 = mad(0.1599626988172531f, _271, _279); - float _281 = _263 * 0.38695648312568665f; - float _282 = mad(0.5183603167533875f, _266, _281); - float _283 = mad(0.04929120093584061f, _269, _282); - float _284 = _263 * 0.11516613513231277f; - float _285 = mad(0.5183603167533875f, _267, _284); - float _286 = mad(0.04929120093584061f, _270, _285); - float _287 = _263 * -0.0697740763425827f; - float _288 = mad(0.5183603167533875f, _268, _287); - float _289 = mad(0.04929120093584061f, _271, _288); - float _290 = _263 * -0.007634039502590895f; - float _291 = mad(0.04004279896616936f, _266, _290); - float _292 = mad(0.9684867262840271f, _269, _291); - float _293 = _263 * -0.0022720457054674625f; - float _294 = mad(0.04004279896616936f, _267, _293); - float _295 = mad(0.9684867262840271f, _270, _294); - float _296 = _263 * 0.0013765322510153055f; - float _297 = mad(0.04004279896616936f, _268, _296); - float _298 = mad(0.9684867262840271f, _271, _297); - float _299 = _274 * _121; - float _300 = mad(_277, _125, _299); - float _301 = mad(_280, _129, _300); - float _302 = _274 * _122; - float _303 = mad(_277, _126, _302); - float _304 = mad(_280, _130, _303); - float _305 = _274 * _123; - float _306 = mad(_277, _127, _305); - float _307 = mad(_280, _131, _306); - float _308 = _283 * _121; - float _309 = mad(_286, _125, _308); - float _310 = mad(_289, _129, _309); - float _311 = _283 * _122; - float _312 = mad(_286, _126, _311); - float _313 = mad(_289, _130, _312); - float _314 = _283 * _123; - float _315 = mad(_286, _127, _314); - float _316 = mad(_289, _131, _315); - float _317 = _292 * _121; - float _318 = mad(_295, _125, _317); - float _319 = mad(_298, _129, _318); - float _320 = _292 * _122; - float _321 = mad(_295, _126, _320); - float _322 = mad(_298, _130, _321); - float _323 = _292 * _123; - float _324 = mad(_295, _127, _323); - float _325 = mad(_298, _131, _324); - float _326 = _301 * _109; - float _327 = mad(_110, _310, _326); - float _328 = mad(_111, _319, _327); - float _329 = _304 * _109; - float _330 = mad(_110, _313, _329); - float _331 = mad(_111, _322, _330); - float _332 = _307 * _109; - float _333 = mad(_110, _316, _332); - float _334 = mad(_111, _325, _333); - float _335 = _301 * _113; - float _336 = mad(_114, _310, _335); - float _337 = mad(_115, _319, _336); - float _338 = _304 * _113; - float _339 = mad(_114, _313, _338); - float _340 = mad(_115, _322, _339); - float _341 = _307 * _113; - float _342 = mad(_114, _316, _341); - float _343 = mad(_115, _325, _342); - float _344 = _301 * _117; - float _345 = mad(_118, _310, _344); - float _346 = mad(_119, _319, _345); - float _347 = _304 * _117; - float _348 = mad(_118, _313, _347); - float _349 = mad(_119, _322, _348); - float _350 = _307 * _117; - float _351 = mad(_118, _316, _350); - float _352 = mad(_119, _325, _351); - float _353 = _328 * _105; - float _354 = mad(_331, _106, _353); - float _355 = mad(_334, _107, _354); - float _356 = _337 * _105; - float _357 = mad(_340, _106, _356); - float _358 = mad(_343, _107, _357); - float _359 = _346 * _105; - float _360 = mad(_349, _106, _359); - float _361 = mad(_352, _107, _360); - - float _363 = UniformBufferConstants_WorkingColorSpace_008x; - float _364 = UniformBufferConstants_WorkingColorSpace_008y; - float _365 = UniformBufferConstants_WorkingColorSpace_008z; - float _367 = UniformBufferConstants_WorkingColorSpace_009x; - float _368 = UniformBufferConstants_WorkingColorSpace_009y; - float _369 = UniformBufferConstants_WorkingColorSpace_009z; - float _371 = UniformBufferConstants_WorkingColorSpace_010x; - float _372 = UniformBufferConstants_WorkingColorSpace_010y; - float _373 = UniformBufferConstants_WorkingColorSpace_010z; - float _374 = _363 * _355; - float _375 = mad(_364, _358, _374); - float _376 = mad(_365, _361, _375); - float _377 = _367 * _355; - float _378 = mad(_368, _358, _377); - float _379 = mad(_369, _361, _378); - float _380 = _371 * _355; - float _381 = mad(_372, _358, _380); - float _382 = mad(_373, _361, _381); - - // Gamut Expansion - float _383 = dot(float3(_376, _379, _382), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _384 = _376 / _383; - float _385 = _379 / _383; - float _386 = _382 / _383; - float _387 = _384 + -1.0f; - float _388 = _385 + -1.0f; - float _389 = _386 + -1.0f; - float _390 = dot(float3(_387, _388, _389), float3(_387, _388, _389)); - float _391 = _390 * -4.0f; - float _392 = exp2(_391); - float _393 = 1.0f - _392; - float _395 = _RootShaderParameters_036z; - float _396 = _383 * _383; - float _397 = _396 * -4.0f; - float _398 = _397 * _395; - float _399 = exp2(_398); - float _400 = 1.0f - _399; - float _401 = _400 * _393; - float _402 = _376 * 1.370412826538086f; - float _403 = mad(-0.32929131388664246f, _379, _402); - float _404 = mad(-0.06368283927440643f, _382, _403); - float _405 = _376 * -0.08343426138162613f; - float _406 = mad(1.0970908403396606f, _379, _405); - float _407 = mad(-0.010861567221581936f, _382, _406); - float _408 = _376 * -0.02579325996339321f; - float _409 = mad(-0.09862564504146576f, _379, _408); - float _410 = mad(1.203694462776184f, _382, _409); - float _411 = _404 - _376; - float _412 = _407 - _379; - float _413 = _410 - _382; - float _414 = _411 * _401; - float _415 = _412 * _401; - float _416 = _413 * _401; - float _417 = _414 + _376; - float _418 = _415 + _379; - float _419 = _416 + _382; - - // AP1_RGB2Y - float _420 = dot(float3(_376, _379, _382), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _422 = _RootShaderParameters_024x; - float _423 = _RootShaderParameters_024y; - float _424 = _RootShaderParameters_024z; - float _425 = _RootShaderParameters_024w; - float _427 = _RootShaderParameters_019x; - float _428 = _RootShaderParameters_019y; - float _429 = _RootShaderParameters_019z; - float _430 = _RootShaderParameters_019w; - float _431 = _427 + _422; - float _432 = _428 + _423; - float _433 = _429 + _424; - float _434 = _430 + _425; - float _436 = _RootShaderParameters_023x; - float _437 = _RootShaderParameters_023y; - float _438 = _RootShaderParameters_023z; - float _439 = _RootShaderParameters_023w; - float _441 = _RootShaderParameters_018x; - float _442 = _RootShaderParameters_018y; - float _443 = _RootShaderParameters_018z; - float _444 = _RootShaderParameters_018w; - float _445 = _441 * _436; - float _446 = _442 * _437; - float _447 = _443 * _438; - float _448 = _444 * _439; - float _450 = _RootShaderParameters_022x; - float _451 = _RootShaderParameters_022y; - float _452 = _RootShaderParameters_022z; - float _453 = _RootShaderParameters_022w; - float _455 = _RootShaderParameters_017x; - float _456 = _RootShaderParameters_017y; - float _457 = _RootShaderParameters_017z; - float _458 = _RootShaderParameters_017w; - float _459 = _455 * _450; - float _460 = _456 * _451; - float _461 = _457 * _452; - float _462 = _458 * _453; - float _464 = _RootShaderParameters_021x; - float _465 = _RootShaderParameters_021y; - float _466 = _RootShaderParameters_021z; - float _467 = _RootShaderParameters_021w; - float _469 = _RootShaderParameters_016x; - float _470 = _RootShaderParameters_016y; - float _471 = _RootShaderParameters_016z; - float _472 = _RootShaderParameters_016w; - float _473 = _469 * _464; - float _474 = _470 * _465; - float _475 = _471 * _466; - float _476 = _472 * _467; - float _478 = _RootShaderParameters_020x; - float _479 = _RootShaderParameters_020y; - float _480 = _RootShaderParameters_020z; - float _481 = _RootShaderParameters_020w; - float _483 = _RootShaderParameters_015x; - float _484 = _RootShaderParameters_015y; - float _485 = _RootShaderParameters_015z; - float _486 = _RootShaderParameters_015w; - float _487 = _483 * _478; - float _488 = _484 * _479; - float _489 = _485 * _480; - float _490 = _486 * _481; - float _491 = _487 * _490; - float _492 = _488 * _490; - float _493 = _489 * _490; - float _494 = _417 - _420; - float _495 = _418 - _420; - float _496 = _419 - _420; - float _497 = _491 * _494; - float _498 = _492 * _495; - float _499 = _493 * _496; - float _500 = _497 + _420; - float _501 = _498 + _420; - float _502 = _499 + _420; - float _503 = max(0.0f, _500); - float _504 = max(0.0f, _501); - float _505 = max(0.0f, _502); - float _506 = _473 * _476; - float _507 = _474 * _476; - float _508 = _475 * _476; - float _509 = _503 * 5.55555534362793f; - float _510 = _504 * 5.55555534362793f; - float _511 = _505 * 5.55555534362793f; - float _512 = log2(_509); - float _513 = log2(_510); - float _514 = log2(_511); - float _515 = _506 * _512; - float _516 = _507 * _513; - float _517 = _508 * _514; - float _518 = exp2(_515); - float _519 = exp2(_516); - float _520 = exp2(_517); - float _521 = _518 * 0.18000000715255737f; - float _522 = _519 * 0.18000000715255737f; - float _523 = _520 * 0.18000000715255737f; - float _524 = _459 * _462; - float _525 = _460 * _462; - float _526 = _461 * _462; - float _527 = 1.0f / _524; - float _528 = 1.0f / _525; - float _529 = 1.0f / _526; - float _530 = log2(_521); - float _531 = log2(_522); - float _532 = log2(_523); - float _533 = _530 * _527; - float _534 = _531 * _528; - float _535 = _532 * _529; - float _536 = exp2(_533); - float _537 = exp2(_534); - float _538 = exp2(_535); - float _539 = _445 * _448; - float _540 = _446 * _448; - float _541 = _447 * _448; - float _542 = _539 * _536; - float _543 = _540 * _537; - float _544 = _541 * _538; - float _545 = _431 + _434; - float _546 = _432 + _434; - float _547 = _433 + _434; - float _548 = _545 + _542; - float _549 = _546 + _543; - float _550 = _547 + _544; - float _551 = _RootShaderParameters_035z; - float _552 = _420 / _551; - float _553 = saturate(_552); - float _554 = _553 * 2.0f; - float _555 = 3.0f - _554; - float _556 = _553 * _553; - float _557 = _556 * _555; - float _558 = 1.0f - _557; - float _560 = _RootShaderParameters_034x; - float _561 = _RootShaderParameters_034y; - float _562 = _RootShaderParameters_034z; - float _563 = _RootShaderParameters_034w; - float _564 = _427 + _560; - float _565 = _428 + _561; - float _566 = _429 + _562; - float _567 = _430 + _563; - float _569 = _RootShaderParameters_033x; - float _570 = _RootShaderParameters_033y; - float _571 = _RootShaderParameters_033z; - float _572 = _RootShaderParameters_033w; - float _573 = _441 * _569; - float _574 = _442 * _570; - float _575 = _443 * _571; - float _576 = _444 * _572; - float _578 = _RootShaderParameters_032x; - float _579 = _RootShaderParameters_032y; - float _580 = _RootShaderParameters_032z; - float _581 = _RootShaderParameters_032w; - float _582 = _455 * _578; - float _583 = _456 * _579; - float _584 = _457 * _580; - float _585 = _458 * _581; - float _587 = _RootShaderParameters_031x; - float _588 = _RootShaderParameters_031y; - float _589 = _RootShaderParameters_031z; - float _590 = _RootShaderParameters_031w; - float _591 = _469 * _587; - float _592 = _470 * _588; - float _593 = _471 * _589; - float _594 = _472 * _590; - float _596 = _RootShaderParameters_030x; - float _597 = _RootShaderParameters_030y; - float _598 = _RootShaderParameters_030z; - float _599 = _RootShaderParameters_030w; - float _600 = _483 * _596; - float _601 = _484 * _597; - float _602 = _485 * _598; - float _603 = _486 * _599; - float _604 = _600 * _603; - float _605 = _601 * _603; - float _606 = _602 * _603; - float _607 = _604 * _494; - float _608 = _605 * _495; - float _609 = _606 * _496; - float _610 = _607 + _420; - float _611 = _608 + _420; - float _612 = _609 + _420; - float _613 = max(0.0f, _610); - float _614 = max(0.0f, _611); - float _615 = max(0.0f, _612); - float _616 = _591 * _594; - float _617 = _592 * _594; - float _618 = _593 * _594; - float _619 = _613 * 5.55555534362793f; - float _620 = _614 * 5.55555534362793f; - float _621 = _615 * 5.55555534362793f; - float _622 = log2(_619); - float _623 = log2(_620); - float _624 = log2(_621); - float _625 = _616 * _622; - float _626 = _617 * _623; - float _627 = _618 * _624; - float _628 = exp2(_625); - float _629 = exp2(_626); - float _630 = exp2(_627); - float _631 = _628 * 0.18000000715255737f; - float _632 = _629 * 0.18000000715255737f; - float _633 = _630 * 0.18000000715255737f; - float _634 = _582 * _585; - float _635 = _583 * _585; - float _636 = _584 * _585; - float _637 = 1.0f / _634; - float _638 = 1.0f / _635; - float _639 = 1.0f / _636; - float _640 = log2(_631); - float _641 = log2(_632); - float _642 = log2(_633); - float _643 = _640 * _637; - float _644 = _641 * _638; - float _645 = _642 * _639; - float _646 = exp2(_643); - float _647 = exp2(_644); - float _648 = exp2(_645); - float _649 = _573 * _576; - float _650 = _574 * _576; - float _651 = _575 * _576; - float _652 = _649 * _646; - float _653 = _650 * _647; - float _654 = _651 * _648; - float _655 = _564 + _567; - float _656 = _565 + _567; - float _657 = _566 + _567; - float _658 = _655 + _652; - float _659 = _656 + _653; - float _660 = _657 + _654; - float _661 = _RootShaderParameters_036x; - float _663 = _RootShaderParameters_035w; - float _664 = _661 - _663; - float _665 = _420 - _663; - float _666 = _665 / _664; - float _667 = saturate(_666); - float _668 = _667 * 2.0f; - float _669 = 3.0f - _668; - float _670 = _667 * _667; - float _671 = _670 * _669; - float _673 = _RootShaderParameters_029x; - float _674 = _RootShaderParameters_029y; - float _675 = _RootShaderParameters_029z; - float _676 = _RootShaderParameters_029w; - float _677 = _427 + _673; - float _678 = _428 + _674; - float _679 = _429 + _675; - float _680 = _430 + _676; - float _682 = _RootShaderParameters_028x; - float _683 = _RootShaderParameters_028y; - float _684 = _RootShaderParameters_028z; - float _685 = _RootShaderParameters_028w; - float _686 = _441 * _682; - float _687 = _442 * _683; - float _688 = _443 * _684; - float _689 = _444 * _685; - float _691 = _RootShaderParameters_027x; - float _692 = _RootShaderParameters_027y; - float _693 = _RootShaderParameters_027z; - float _694 = _RootShaderParameters_027w; - float _695 = _455 * _691; - float _696 = _456 * _692; - float _697 = _457 * _693; - float _698 = _458 * _694; - float _700 = _RootShaderParameters_026x; - float _701 = _RootShaderParameters_026y; - float _702 = _RootShaderParameters_026z; - float _703 = _RootShaderParameters_026w; - float _704 = _469 * _700; - float _705 = _470 * _701; - float _706 = _471 * _702; - float _707 = _472 * _703; - float _709 = _RootShaderParameters_025x; - float _710 = _RootShaderParameters_025y; - float _711 = _RootShaderParameters_025z; - float _712 = _RootShaderParameters_025w; - float _713 = _483 * _709; - float _714 = _484 * _710; - float _715 = _485 * _711; - float _716 = _486 * _712; - float _717 = _713 * _716; - float _718 = _714 * _716; - float _719 = _715 * _716; - float _720 = _717 * _494; - float _721 = _718 * _495; - float _722 = _719 * _496; - float _723 = _720 + _420; - float _724 = _721 + _420; - float _725 = _722 + _420; - float _726 = max(0.0f, _723); - float _727 = max(0.0f, _724); - float _728 = max(0.0f, _725); - float _729 = _704 * _707; - float _730 = _705 * _707; - float _731 = _706 * _707; - float _732 = _726 * 5.55555534362793f; - float _733 = _727 * 5.55555534362793f; - float _734 = _728 * 5.55555534362793f; - float _735 = log2(_732); - float _736 = log2(_733); - float _737 = log2(_734); - float _738 = _729 * _735; - float _739 = _730 * _736; - float _740 = _731 * _737; - float _741 = exp2(_738); - float _742 = exp2(_739); - float _743 = exp2(_740); - float _744 = _741 * 0.18000000715255737f; - float _745 = _742 * 0.18000000715255737f; - float _746 = _743 * 0.18000000715255737f; - float _747 = _695 * _698; - float _748 = _696 * _698; - float _749 = _697 * _698; - float _750 = 1.0f / _747; - float _751 = 1.0f / _748; - float _752 = 1.0f / _749; - float _753 = log2(_744); - float _754 = log2(_745); - float _755 = log2(_746); - float _756 = _753 * _750; - float _757 = _754 * _751; - float _758 = _755 * _752; - float _759 = exp2(_756); - float _760 = exp2(_757); - float _761 = exp2(_758); - float _762 = _686 * _689; - float _763 = _687 * _689; - float _764 = _688 * _689; - float _765 = _762 * _759; - float _766 = _763 * _760; - float _767 = _764 * _761; - float _768 = _677 + _680; - float _769 = _678 + _680; - float _770 = _679 + _680; - float _771 = _768 + _765; - float _772 = _769 + _766; - float _773 = _770 + _767; - float _774 = _557 - _671; - float _775 = _558 * _548; - float _776 = _558 * _549; - float _777 = _558 * _550; - float _778 = _771 * _774; - float _779 = _772 * _774; - float _780 = _773 * _774; - float _781 = _671 * _658; - float _782 = _671 * _659; - float _783 = _671 * _660; - float _784 = _781 + _775; - float _785 = _784 + _778; - float _786 = _782 + _776; - float _787 = _786 + _779; - float _788 = _783 + _777; - float _789 = _788 + _780; - float _791 = UniformBufferConstants_WorkingColorSpace_012x; - float _792 = UniformBufferConstants_WorkingColorSpace_012y; - float _793 = UniformBufferConstants_WorkingColorSpace_012z; - float _795 = UniformBufferConstants_WorkingColorSpace_013x; - float _796 = UniformBufferConstants_WorkingColorSpace_013y; - float _797 = UniformBufferConstants_WorkingColorSpace_013z; - float _799 = UniformBufferConstants_WorkingColorSpace_014x; - float _800 = UniformBufferConstants_WorkingColorSpace_014y; - float _801 = UniformBufferConstants_WorkingColorSpace_014z; - float _802 = _785 * _791; - float _803 = mad(_792, _787, _802); - float _804 = mad(_793, _789, _803); - float _805 = _795 * _785; - float _806 = mad(_796, _787, _805); - float _807 = mad(_797, _789, _806); - float _808 = _799 * _785; - float _809 = mad(_800, _787, _808); - float _810 = mad(_801, _789, _809); - float _811 = _RootShaderParameters_036y; - - float3 untonemapped_ap1 = float3(_785, _787, _789); // CustomEdit - - float _812 = _785 * 0.9386394023895264f; - float _813 = mad(-4.540197551250458e-09f, _787, _812); - float _814 = mad(0.061360642313957214f, _789, _813); - float _815 = _785 * 6.775371730327606e-08f; - float _816 = mad(0.8307942152023315f, _787, _815); - float _817 = mad(0.169205904006958f, _789, _816); - float _818 = _785 * -9.313225746154785e-10f; - float _819 = mad(-2.3283064365386963e-10f, _787, _818); - float _820 = _814 - _785; - float _821 = _817 - _787; - float _822 = _820 * _811; - float _823 = _821 * _811; - float _824 = _819 * _811; - float _825 = _822 + _785; - float _826 = _823 + _787; - float _827 = _824 + _789; - - float _828 = _825 * 0.6954522132873535f; - float _829 = mad(0.14067868888378143f, _826, _828); - float _830 = mad(0.16386905312538147f, _827, _829); - float _831 = _825 * 0.044794581830501556f; - float _832 = mad(0.8596711158752441f, _826, _831); - float _833 = mad(0.0955343246459961f, _827, _832); - float _834 = _825 * -0.005525882821530104f; - float _835 = mad(0.004025210160762072f, _826, _834); - float _836 = mad(1.0015007257461548f, _827, _835); - float _837 = min(_830, _833); - float _838 = min(_837, _836); - float _839 = max(_830, _833); - float _840 = max(_839, _836); - float _841 = max(_840, 1.000000013351432e-10f); - float _842 = max(_838, 1.000000013351432e-10f); - float _843 = _841 - _842; - float _844 = max(_840, 0.009999999776482582f); - float _845 = _843 / _844; - float _846 = _836 - _833; - float _847 = _846 * _836; - float _848 = _833 - _830; - float _849 = _848 * _833; - float _850 = _847 + _849; - float _851 = _830 - _836; - float _852 = _851 * _830; - float _853 = _850 + _852; - float _854 = sqrt(_853); - float _855 = _854 * 1.75f; - float _856 = _833 + _830; - float _857 = _856 + _836; - float _858 = _857 + _855; - float _859 = _858 * 0.3333333432674408f; - float _860 = _845 + -0.4000000059604645f; - float _861 = _860 * 5.0f; - float _862 = _860 * 2.5f; - float _863 = abs(_862); - float _864 = 1.0f - _863; - float _865 = max(_864, 0.0f); - bool _866 = (_861 > 0.0f); - bool _867 = (_861 < 0.0f); - int _868 = int(_866); - int _869 = int(_867); - int _870 = _868 - _869; - float _871 = float(_870); - float _872 = _865 * _865; - float _873 = 1.0f - _872; - float _874 = _871 * _873; - float _875 = _874 + 1.0f; - float _876 = _875 * 0.02500000037252903f; - bool _877 = !(_859 <= 0.0533333346247673f); - _885 = _876; - if (_877) { - bool _879 = !(_859 >= 0.1599999964237213f); - _885 = 0.0f; - if (_879) { - float _881 = 0.23999999463558197f / _858; - float _882 = _881 + -0.5f; - float _883 = _882 * _876; - _885 = _883; - } - } - float _886 = _885 + 1.0f; - float _887 = _886 * _830; - float _888 = _886 * _833; - float _889 = _886 * _836; - bool _890 = (_887 == _888); - bool _891 = (_888 == _889); - bool _892 = _890 && _891; - _921 = 0.0f; - if (!_892) { - float _894 = _887 * 2.0f; - float _895 = _894 - _888; - float _896 = _895 - _889; - float _897 = _833 - _836; - float _898 = _897 * 1.7320507764816284f; - float _899 = _898 * _886; - float _900 = _899 / _896; - float _901 = atan(_900); - float _902 = _901 + 3.1415927410125732f; - float _903 = _901 + -3.1415927410125732f; - bool _904 = (_896 < 0.0f); - bool _905 = (_896 == 0.0f); - bool _906 = (_899 >= 0.0f); - bool _907 = (_899 < 0.0f); - bool _908 = _906 && _904; - float _909 = _908 ? _902 : _901; - bool _910 = _907 && _904; - float _911 = _910 ? _903 : _909; - bool _912 = _907 && _905; - bool _913 = _906 && _905; - float _914 = _911 * 57.2957763671875f; - float _915 = _912 ? -90.0f : _914; - float _916 = _913 ? 90.0f : _915; - bool _917 = (_916 < 0.0f); - _921 = _916; - if (_917) { - float _919 = _916 + 360.0f; - _921 = _919; - } - } - float _922 = max(_921, 0.0f); - float _923 = min(_922, 360.0f); - bool _924 = (_923 < -180.0f); - if (_924) { - float _926 = _923 + 360.0f; - _932 = _926; - } else { - bool _928 = (_923 > 180.0f); - _932 = _923; - if (_928) { - float _930 = _923 + -360.0f; - _932 = _930; - } - } - float _933 = _932 * 0.014814814552664757f; - float _934 = abs(_933); - float _935 = 1.0f - _934; - float _936 = saturate(_935); - float _937 = _936 * 2.0f; - float _938 = 3.0f - _937; - float _939 = _936 * _936; - float _940 = _939 * _938; - float _941 = 0.029999999329447746f - _887; - float _942 = _845 * 0.18000000715255737f; - float _943 = _942 * _941; - float _944 = _940 * _940; - float _945 = _944 * _943; - float _946 = _945 + _887; - float _947 = _946 * 1.4514392614364624f; - float _948 = mad(-0.2365107536315918f, _888, _947); - float _949 = mad(-0.21492856740951538f, _889, _948); - float _950 = _946 * -0.07655377686023712f; - float _951 = mad(1.17622971534729f, _888, _950); - float _952 = mad(-0.09967592358589172f, _889, _951); - float _953 = _946 * 0.008316148072481155f; - float _954 = mad(-0.006032449658960104f, _888, _953); - float _955 = mad(0.9977163076400757f, _889, _954); - float _956 = max(0.0f, _949); - float _957 = max(0.0f, _952); - float _958 = max(0.0f, _955); - float _959 = dot(float3(_956, _957, _958), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _960 = _956 - _959; - float _961 = _957 - _959; - float _962 = _958 - _959; - float _963 = _960 * 0.9599999785423279f; - float _964 = _961 * 0.9599999785423279f; - float _965 = _962 * 0.9599999785423279f; - float _966 = _963 + _959; - float _967 = _964 + _959; - float _968 = _965 + _959; - - float _970 = _RootShaderParameters_037w; - float _971 = _970 + 1.0f; - float _972 = _RootShaderParameters_037y; - float _973 = _971 - _972; - float _975 = _RootShaderParameters_038x; - float _976 = _975 + 1.0f; - float _977 = _RootShaderParameters_037z; - float _978 = _976 - _977; - bool _979 = (_972 > 0.800000011920929f); - float _980 = _RootShaderParameters_037x; - if (_979) { - float _982 = 0.8199999928474426f - _972; - float _983 = _982 / _980; - float _984 = _983 + -0.7447274923324585f; - _996 = _984; - } else { - float _986 = _970 + 0.18000000715255737f; - float _987 = _986 / _973; - float _988 = 2.0f - _987; - float _989 = _987 / _988; - float _990 = log2(_989); - float _991 = _990 * 0.3465735912322998f; - float _992 = _973 / _980; - float _993 = _991 * _992; - float _994 = -0.7447274923324585f - _993; - _996 = _994; - } - float _997 = 1.0f - _972; - float _998 = _997 / _980; - float _999 = _998 - _996; - float _1000 = _977 / _980; - float _1001 = _1000 - _999; - float _1002 = log2(_966); - float _1003 = log2(_967); - float _1004 = log2(_968); - float _1005 = _1002 * 0.3010300099849701f; - float _1006 = _1003 * 0.3010300099849701f; - float _1007 = _1004 * 0.3010300099849701f; - float _1008 = _1005 + _999; - float _1009 = _1006 + _999; - float _1010 = _1007 + _999; - float _1011 = _980 * _1008; - float _1012 = _980 * _1009; - float _1013 = _980 * _1010; - float _1014 = _973 * 2.0f; - float _1015 = _980 * -2.0f; - float _1016 = _1015 / _973; - float _1017 = _1005 - _996; - float _1018 = _1006 - _996; - float _1019 = _1007 - _996; - float _1020 = _1017 * 1.4426950216293335f; - float _1021 = _1020 * _1016; - float _1022 = _1018 * 1.4426950216293335f; - float _1023 = _1022 * _1016; - float _1024 = _1019 * 1.4426950216293335f; - float _1025 = _1024 * _1016; - float _1026 = exp2(_1021); - float _1027 = exp2(_1023); - float _1028 = exp2(_1025); - float _1029 = _1026 + 1.0f; - float _1030 = _1027 + 1.0f; - float _1031 = _1028 + 1.0f; - float _1032 = _1014 / _1029; - float _1033 = _1014 / _1030; - float _1034 = _1014 / _1031; - float _1035 = _1032 - _970; - float _1036 = _1033 - _970; - float _1037 = _1034 - _970; - float _1038 = _978 * 2.0f; - float _1039 = _980 * 2.0f; - float _1040 = _1039 / _978; - float _1041 = _1005 - _1001; - float _1042 = _1006 - _1001; - float _1043 = _1007 - _1001; - float _1044 = _1041 * 1.4426950216293335f; - float _1045 = _1044 * _1040; - float _1046 = _1042 * 1.4426950216293335f; - float _1047 = _1046 * _1040; - float _1048 = _1043 * 1.4426950216293335f; - float _1049 = _1048 * _1040; - float _1050 = exp2(_1045); - float _1051 = exp2(_1047); - float _1052 = exp2(_1049); - float _1053 = _1050 + 1.0f; - float _1054 = _1051 + 1.0f; - float _1055 = _1052 + 1.0f; - float _1056 = _1038 / _1053; - float _1057 = _1038 / _1054; - float _1058 = _1038 / _1055; - float _1059 = _976 - _1056; - float _1060 = _976 - _1057; - float _1061 = _976 - _1058; - bool _1062 = (_1005 < _996); - bool _1063 = (_1006 < _996); - bool _1064 = (_1007 < _996); - float _1065 = _1062 ? _1035 : _1011; - float _1066 = _1063 ? _1036 : _1012; - float _1067 = _1064 ? _1037 : _1013; - bool _1068 = (_1005 > _1001); - bool _1069 = (_1006 > _1001); - bool _1070 = (_1007 > _1001); - float _1071 = _1068 ? _1059 : _1011; - float _1072 = _1069 ? _1060 : _1012; - float _1073 = _1070 ? _1061 : _1013; - float _1074 = _1001 - _996; - float _1075 = _1017 / _1074; - float _1076 = _1018 / _1074; - float _1077 = _1019 / _1074; - float _1078 = saturate(_1075); - float _1079 = saturate(_1076); - float _1080 = saturate(_1077); - bool _1081 = (_1001 < _996); - float _1082 = 1.0f - _1078; - float _1083 = 1.0f - _1079; - float _1084 = 1.0f - _1080; - float _1085 = _1081 ? _1082 : _1078; - float _1086 = _1081 ? _1083 : _1079; - float _1087 = _1081 ? _1084 : _1080; - float _1088 = _1085 * 2.0f; - float _1089 = _1086 * 2.0f; - float _1090 = _1087 * 2.0f; - float _1091 = 3.0f - _1088; - float _1092 = 3.0f - _1089; - float _1093 = 3.0f - _1090; - float _1094 = _1071 - _1065; - float _1095 = _1072 - _1066; - float _1096 = _1073 - _1067; - float _1097 = _1085 * _1085; - float _1098 = _1097 * _1094; - float _1099 = _1098 * _1091; - float _1100 = _1086 * _1086; - float _1101 = _1100 * _1095; - float _1102 = _1101 * _1092; - float _1103 = _1087 * _1087; - float _1104 = _1103 * _1096; - float _1105 = _1104 * _1093; - float _1106 = _1099 + _1065; - float _1107 = _1102 + _1066; - float _1108 = _1105 + _1067; - float _1109 = dot(float3(_1106, _1107, _1108), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1110 = _1106 - _1109; - float _1111 = _1107 - _1109; - float _1112 = _1108 - _1109; - float _1113 = _1110 * 0.9300000071525574f; - float _1114 = _1111 * 0.9300000071525574f; - float _1115 = _1112 * 0.9300000071525574f; - float _1116 = _1113 + _1109; - float _1117 = _1114 + _1109; - float _1118 = _1115 + _1109; - float _1119 = max(0.0f, _1116); - float _1120 = max(0.0f, _1117); - float _1121 = max(0.0f, _1118); - - float _1122 = _RootShaderParameters_036w; - float _1123 = _1119 - _825; - float _1124 = _1120 - _826; - float _1125 = _1121 - _827; - - float _1126 = _1122 * _1123; - float _1127 = _1122 * _1124; - float _1128 = _1122 * _1125; - float _1129 = _1126 + _825; - float _1130 = _1127 + _826; - float _1131 = _1128 + _827; - float _1132 = _1129 * 1.065374732017517f; - float _1133 = mad(1.451815478503704e-06f, _1130, _1132); - float _1134 = mad(-0.06537103652954102f, _1131, _1133); - float _1135 = _1129 * -2.57161445915699e-07f; - float _1136 = mad(1.2036634683609009f, _1130, _1135); - float _1137 = mad(-0.20366770029067993f, _1131, _1136); - float _1138 = _1129 * 1.862645149230957e-08f; - float _1139 = mad(2.0954757928848267e-08f, _1130, _1138); - float _1140 = mad(0.9999996423721313f, _1131, _1139); - float _1141 = _1134 - _1129; - float _1142 = _1137 - _1130; - float _1143 = _1140 - _1131; - float _1144 = _1141 * _811; - float _1145 = _1142 * _811; - float _1146 = _1143 * _811; - float _1147 = _1144 + _1129; - float _1148 = _1145 + _1130; - float _1149 = _1146 + _1131; - float _1150 = _791 * _1147; - float _1151 = mad(_792, _1148, _1150); - float _1152 = mad(_793, _1149, _1151); - float _1153 = _795 * _1147; - float _1154 = mad(_796, _1148, _1153); - float _1155 = mad(_797, _1149, _1154); - float _1156 = _799 * _1147; - float _1157 = mad(_800, _1148, _1156); - float _1158 = mad(_801, _1149, _1157); - float _1159 = max(0.0f, _1152); - float _1160 = max(0.0f, _1155); - float _1161 = max(0.0f, _1158); - - float _1162 = saturate(_1159); - float _1163 = saturate(_1160); - float _1164 = saturate(_1161); - bool _1165 = (_1162 < 0.0031306699384003878f); - if (_1165) { - float _1167 = _1162 * 12.920000076293945f; - _1175 = _1167; - } else { - float _1169 = log2(_1162); - float _1170 = _1169 * 0.4166666567325592f; - float _1171 = exp2(_1170); - float _1172 = _1171 * 1.0549999475479126f; - float _1173 = _1172 + -0.054999999701976776f; - _1175 = _1173; - } - bool _1176 = (_1163 < 0.0031306699384003878f); - if (_1176) { - float _1178 = _1163 * 12.920000076293945f; - _1186 = _1178; - } else { - float _1180 = log2(_1163); - float _1181 = _1180 * 0.4166666567325592f; - float _1182 = exp2(_1181); - float _1183 = _1182 * 1.0549999475479126f; - float _1184 = _1183 + -0.054999999701976776f; - _1186 = _1184; - } - bool _1187 = (_1164 < 0.0031306699384003878f); - if (_1187) { - float _1189 = _1164 * 12.920000076293945f; - _1197 = _1189; - } else { - float _1191 = log2(_1164); - float _1192 = _1191 * 0.4166666567325592f; - float _1193 = exp2(_1192); - float _1194 = _1193 * 1.0549999475479126f; - float _1195 = _1194 + -0.054999999701976776f; - _1197 = _1195; - } - float _1198 = _1175 * 0.9375f; - float _1199 = _1186 * 0.9375f; - float _1200 = _1198 + 0.03125f; - float _1201 = _1199 + 0.03125f; - float _1203 = _RootShaderParameters_005x; - float _1204 = _1203 * _1175; - float _1205 = _1203 * _1186; - float _1206 = _1203 * _1197; - float _1207 = _RootShaderParameters_005y; - float _1208 = _1197 * 15.0f; - float _1209 = floor(_1208); - float _1210 = _1208 - _1209; - float _1211 = _1200 + _1209; - float _1212 = _1211 * 0.0625f; - // _1213 = _1; - // _1214 = _2; - float4 _1215 = Textures_1.Sample(Samplers_1, float2(_1212, _1201)); - float _1216 = _1215.x; - float _1217 = _1215.y; - float _1218 = _1215.z; - float _1219 = _1212 + 0.0625f; - // _1220 = _1; - // _1221 = _2; - float4 _1222 = Textures_1.Sample(Samplers_1, float2(_1219, _1201)); - float _1223 = _1222.x; - float _1224 = _1222.y; - float _1225 = _1222.z; - float _1226 = _1223 - _1216; - float _1227 = _1224 - _1217; - float _1228 = _1225 - _1218; - float _1229 = _1226 * _1210; - float _1230 = _1227 * _1210; - float _1231 = _1228 * _1210; - float _1232 = _1229 + _1216; - float _1233 = _1230 + _1217; - float _1234 = _1231 + _1218; - float _1235 = _1232 * _1207; - float _1236 = _1233 * _1207; - float _1237 = _1234 * _1207; - float _1238 = _1235 + _1204; - float _1239 = _1236 + _1205; - float _1240 = _1237 + _1206; - float _1241 = max(6.103519990574569e-05f, _1238); - float _1242 = max(6.103519990574569e-05f, _1239); - float _1243 = max(6.103519990574569e-05f, _1240); - float _1244 = _1241 * 0.07739938050508499f; - float _1245 = _1242 * 0.07739938050508499f; - float _1246 = _1243 * 0.07739938050508499f; - float _1247 = _1241 * 0.9478672742843628f; - float _1248 = _1242 * 0.9478672742843628f; - float _1249 = _1243 * 0.9478672742843628f; - float _1250 = _1247 + 0.05213269963860512f; - float _1251 = _1248 + 0.05213269963860512f; - float _1252 = _1249 + 0.05213269963860512f; - float _1253 = log2(_1250); - float _1254 = log2(_1251); - float _1255 = log2(_1252); - float _1256 = _1253 * 2.4000000953674316f; - float _1257 = _1254 * 2.4000000953674316f; - float _1258 = _1255 * 2.4000000953674316f; - float _1259 = exp2(_1256); - float _1260 = exp2(_1257); - float _1261 = exp2(_1258); - bool _1262 = (_1241 > 0.040449999272823334f); - bool _1263 = (_1242 > 0.040449999272823334f); - bool _1264 = (_1243 > 0.040449999272823334f); - float _1265 = _1262 ? _1259 : _1244; - float _1266 = _1263 ? _1260 : _1245; - float _1267 = _1264 ? _1261 : _1246; - - float _1269 = _RootShaderParameters_039x; - float _1270 = _1269 * _1265; - float _1271 = _1269 * _1266; - float _1272 = _1269 * _1267; - float _1273 = _RootShaderParameters_039y; - float _1274 = _RootShaderParameters_039z; - float _1275 = _1273 + _1270; - float _1276 = _1275 * _1265; - float _1277 = _1276 + _1274; - float _1278 = _1273 + _1271; - float _1279 = _1278 * _1266; - float _1280 = _1279 + _1274; - float _1281 = _1273 + _1272; - float _1282 = _1281 * _1267; - float _1283 = _1282 + _1274; - float _1285 = _RootShaderParameters_013w; - float _1286 = _RootShaderParameters_013x; - float _1287 = _RootShaderParameters_013y; - float _1288 = _RootShaderParameters_013z; - float _1290 = _RootShaderParameters_014x; - float _1291 = _RootShaderParameters_014y; - float _1292 = _RootShaderParameters_014z; - float _1293 = _1290 * _1277; - float _1294 = _1291 * _1280; - float _1295 = _1292 * _1283; - float _1296 = _1286 - _1293; - float _1297 = _1287 - _1294; - float _1298 = _1288 - _1295; - float _1299 = _1296 * _1285; - float _1300 = _1297 * _1285; - float _1301 = _1298 * _1285; - float _1302 = _1299 + _1293; - float _1303 = _1300 + _1294; - float _1304 = _1301 + _1295; - float _1305 = _1290 * _804; - float _1306 = _1291 * _807; - float _1307 = _1292 * _810; - float _1308 = _1286 - _1305; - float _1309 = _1287 - _1306; - float _1310 = _1288 - _1307; - float _1311 = _1308 * _1285; - float _1312 = _1309 * _1285; - float _1313 = _1310 * _1285; - float _1314 = _1311 + _1305; - float _1315 = _1312 + _1306; - float _1316 = _1313 + _1307; - float _1318 = _RootShaderParameters_040y; - float _1319 = max(0.0f, _1302); - float _1320 = max(0.0f, _1303); - float _1321 = max(0.0f, _1304); - float _1322 = log2(_1319); - float _1323 = log2(_1320); - float _1324 = log2(_1321); - float _1325 = _1322 * _1318; - float _1326 = _1323 * _1318; - float _1327 = _1324 * _1318; - float _1328 = exp2(_1325); - float _1329 = exp2(_1326); - float _1330 = exp2(_1327); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_1328, _1329, _1330)); - } - - uint _1332 = _RootShaderParameters_040w; - bool _1333 = (_1332 == 0); - if (_1333) { - uint _1336 = UniformBufferConstants_WorkingColorSpace_020x; - bool _1337 = (_1336 == 0); - _1370 = _1328; - _1371 = _1329; - _1372 = _1330; - do { - if (_1337) { - float _1340 = UniformBufferConstants_WorkingColorSpace_008x; - float _1341 = UniformBufferConstants_WorkingColorSpace_008y; - float _1342 = UniformBufferConstants_WorkingColorSpace_008z; - float _1344 = UniformBufferConstants_WorkingColorSpace_009x; - float _1345 = UniformBufferConstants_WorkingColorSpace_009y; - float _1346 = UniformBufferConstants_WorkingColorSpace_009z; - float _1348 = UniformBufferConstants_WorkingColorSpace_010x; - float _1349 = UniformBufferConstants_WorkingColorSpace_010y; - float _1350 = UniformBufferConstants_WorkingColorSpace_010z; - float _1351 = _1340 * _1328; - float _1352 = mad(_1341, _1329, _1351); - float _1353 = mad(_1342, _1330, _1352); - float _1354 = _1344 * _1328; - float _1355 = mad(_1345, _1329, _1354); - float _1356 = mad(_1346, _1330, _1355); - float _1357 = _1348 * _1328; - float _1358 = mad(_1349, _1329, _1357); - float _1359 = mad(_1350, _1330, _1358); - float _1360 = _1353 * _39; - float _1361 = mad(_40, _1356, _1360); - float _1362 = mad(_41, _1359, _1361); - float _1363 = _1353 * _42; - float _1364 = mad(_43, _1356, _1363); - float _1365 = mad(_44, _1359, _1364); - float _1366 = _1353 * _45; - float _1367 = mad(_46, _1356, _1366); - float _1368 = mad(_47, _1359, _1367); - _1370 = _1362; - _1371 = _1365; - _1372 = _1368; - } - bool _1373 = (_1370 < 0.0031306699384003878f); - do { - if (_1373) { - float _1375 = _1370 * 12.920000076293945f; - _1383 = _1375; - } else { - float _1377 = log2(_1370); - float _1378 = _1377 * 0.4166666567325592f; - float _1379 = exp2(_1378); - float _1380 = _1379 * 1.0549999475479126f; - float _1381 = _1380 + -0.054999999701976776f; - _1383 = _1381; - } - bool _1384 = (_1371 < 0.0031306699384003878f); - do { - if (_1384) { - float _1386 = _1371 * 12.920000076293945f; - _1394 = _1386; - } else { - float _1388 = log2(_1371); - float _1389 = _1388 * 0.4166666567325592f; - float _1390 = exp2(_1389); - float _1391 = _1390 * 1.0549999475479126f; - float _1392 = _1391 + -0.054999999701976776f; - _1394 = _1392; - } - bool _1395 = (_1372 < 0.0031306699384003878f); - if (_1395) { - float _1397 = _1372 * 12.920000076293945f; - _2754 = _1383; - _2755 = _1394; - _2756 = _1397; - } else { - float _1399 = log2(_1372); - float _1400 = _1399 * 0.4166666567325592f; - float _1401 = exp2(_1400); - float _1402 = _1401 * 1.0549999475479126f; - float _1403 = _1402 + -0.054999999701976776f; - _2754 = _1383; - _2755 = _1394; - _2756 = _1403; - } - } while (false); - } while (false); - } while (false); - } else { - bool _1405 = (_1332 == 1); - if (_1405) { - float _1408 = UniformBufferConstants_WorkingColorSpace_008x; - float _1409 = UniformBufferConstants_WorkingColorSpace_008y; - float _1410 = UniformBufferConstants_WorkingColorSpace_008z; - float _1412 = UniformBufferConstants_WorkingColorSpace_009x; - float _1413 = UniformBufferConstants_WorkingColorSpace_009y; - float _1414 = UniformBufferConstants_WorkingColorSpace_009z; - float _1416 = UniformBufferConstants_WorkingColorSpace_010x; - float _1417 = UniformBufferConstants_WorkingColorSpace_010y; - float _1418 = UniformBufferConstants_WorkingColorSpace_010z; - float _1419 = _1408 * _1328; - float _1420 = mad(_1409, _1329, _1419); - float _1421 = mad(_1410, _1330, _1420); - float _1422 = _1412 * _1328; - float _1423 = mad(_1413, _1329, _1422); - float _1424 = mad(_1414, _1330, _1423); - float _1425 = _1416 * _1328; - float _1426 = mad(_1417, _1329, _1425); - float _1427 = mad(_1418, _1330, _1426); - float _1428 = _1421 * _39; - float _1429 = mad(_40, _1424, _1428); - float _1430 = mad(_41, _1427, _1429); - float _1431 = _1421 * _42; - float _1432 = mad(_43, _1424, _1431); - float _1433 = mad(_44, _1427, _1432); - float _1434 = _1421 * _45; - float _1435 = mad(_46, _1424, _1434); - float _1436 = mad(_47, _1427, _1435); - float _1437 = max(6.103519990574569e-05f, _1430); - float _1438 = max(6.103519990574569e-05f, _1433); - float _1439 = max(6.103519990574569e-05f, _1436); - float _1440 = max(_1437, 0.017999999225139618f); - float _1441 = max(_1438, 0.017999999225139618f); - float _1442 = max(_1439, 0.017999999225139618f); - float _1443 = log2(_1440); - float _1444 = log2(_1441); - float _1445 = log2(_1442); - float _1446 = _1443 * 0.44999998807907104f; - float _1447 = _1444 * 0.44999998807907104f; - float _1448 = _1445 * 0.44999998807907104f; - float _1449 = exp2(_1446); - float _1450 = exp2(_1447); - float _1451 = exp2(_1448); - float _1452 = _1449 * 1.0989999771118164f; - float _1453 = _1450 * 1.0989999771118164f; - float _1454 = _1451 * 1.0989999771118164f; - float _1455 = _1452 + -0.0989999994635582f; - float _1456 = _1453 + -0.0989999994635582f; - float _1457 = _1454 + -0.0989999994635582f; - float _1458 = _1437 * 4.5f; - float _1459 = _1438 * 4.5f; - float _1460 = _1439 * 4.5f; - float _1461 = min(_1458, _1455); - float _1462 = min(_1459, _1456); - float _1463 = min(_1460, _1457); - _2754 = _1461; - _2755 = _1462; - _2756 = _1463; - } else { - bool _1465 = (_1332 == 3); - bool _1466 = (_1332 == 5); - bool _1467 = _1465 || _1466; - if (_1467) { - // Goes in here - // %1469 = bitcast [6 x float]* %12 to i8* - // %1470 = bitcast [6 x float]* %13 to i8* - float _1472 = _RootShaderParameters_012z; - float _1473 = _RootShaderParameters_012y; - float _1474 = _RootShaderParameters_012x; - float _1476 = _RootShaderParameters_011x; - float _1477 = _RootShaderParameters_011y; - float _1478 = _RootShaderParameters_011z; - float _1479 = _RootShaderParameters_011w; - float _1481 = _RootShaderParameters_010x; - float _1482 = _RootShaderParameters_010y; - float _1483 = _RootShaderParameters_010z; - float _1484 = _RootShaderParameters_010w; - float _1486 = _RootShaderParameters_009x; - float _1488 = _RootShaderParameters_008x; - float _1489 = _RootShaderParameters_008y; - float _1490 = _RootShaderParameters_008z; - float _1491 = _RootShaderParameters_008w; - _12[0] = _1481; - _12[1] = _1482; - _12[2] = _1483; - _12[3] = _1484; - _12[4] = _1474; - _12[5] = _1474; - _13[0] = _1476; - _13[1] = _1477; - _13[2] = _1478; - _13[3] = _1479; - _13[4] = _1473; - _13[5] = _1473; - float _1505 = UniformBufferConstants_WorkingColorSpace_016x; - float _1506 = UniformBufferConstants_WorkingColorSpace_016y; - float _1507 = UniformBufferConstants_WorkingColorSpace_016z; - float _1509 = UniformBufferConstants_WorkingColorSpace_017x; - float _1510 = UniformBufferConstants_WorkingColorSpace_017y; - float _1511 = UniformBufferConstants_WorkingColorSpace_017z; - float _1513 = UniformBufferConstants_WorkingColorSpace_018x; - float _1514 = UniformBufferConstants_WorkingColorSpace_018y; - float _1515 = UniformBufferConstants_WorkingColorSpace_018z; - float _1516 = _1472 * _1314; - float _1517 = _1472 * _1315; - float _1518 = _1472 * _1316; - float _1519 = _1505 * _1516; - float _1520 = mad(_1506, _1517, _1519); - float _1521 = mad(_1507, _1518, _1520); - float _1522 = _1509 * _1516; - float _1523 = mad(_1510, _1517, _1522); - float _1524 = mad(_1511, _1518, _1523); - float _1525 = _1513 * _1516; - float _1526 = mad(_1514, _1517, _1525); - float _1527 = mad(_1515, _1518, _1526); - float _1528 = min(_1521, _1524); - float _1529 = min(_1528, _1527); - float _1530 = max(_1521, _1524); - float _1531 = max(_1530, _1527); - float _1532 = max(_1531, 1.000000013351432e-10f); - float _1533 = max(_1529, 1.000000013351432e-10f); - float _1534 = _1532 - _1533; - float _1535 = max(_1531, 0.009999999776482582f); - float _1536 = _1534 / _1535; - float _1537 = _1527 - _1524; - float _1538 = _1537 * _1527; - float _1539 = _1524 - _1521; - float _1540 = _1539 * _1524; - float _1541 = _1538 + _1540; - float _1542 = _1521 - _1527; - float _1543 = _1542 * _1521; - float _1544 = _1541 + _1543; - float _1545 = sqrt(_1544); - float _1546 = _1545 * 1.75f; - float _1547 = _1524 + _1521; - float _1548 = _1547 + _1527; - float _1549 = _1548 + _1546; - float _1550 = _1549 * 0.3333333432674408f; - float _1551 = _1536 + -0.4000000059604645f; - float _1552 = _1551 * 5.0f; - float _1553 = _1551 * 2.5f; - float _1554 = abs(_1553); - float _1555 = 1.0f - _1554; - float _1556 = max(_1555, 0.0f); - bool _1557 = (_1552 > 0.0f); - bool _1558 = (_1552 < 0.0f); - int _1559 = int(_1557); - int _1560 = int(_1558); - int _1561 = _1559 - _1560; - float _1562 = float(_1561); - float _1563 = _1556 * _1556; - float _1564 = 1.0f - _1563; - float _1565 = _1562 * _1564; - float _1566 = _1565 + 1.0f; - float _1567 = _1566 * 0.02500000037252903f; - bool _1568 = !(_1550 <= 0.0533333346247673f); - _1576 = _1567; - do { - if (_1568) { - bool _1570 = !(_1550 >= 0.1599999964237213f); - _1576 = 0.0f; - if (_1570) { - float _1572 = 0.23999999463558197f / _1549; - float _1573 = _1572 + -0.5f; - float _1574 = _1573 * _1567; - _1576 = _1574; - } - } - float _1577 = _1576 + 1.0f; - float _1578 = _1577 * _1521; - float _1579 = _1577 * _1524; - float _1580 = _1577 * _1527; - bool _1581 = (_1578 == _1579); - bool _1582 = (_1579 == _1580); - bool _1583 = _1581 && _1582; - _1612 = 0.0f; - do { - if (!_1583) { - float _1585 = _1578 * 2.0f; - float _1586 = _1585 - _1579; - float _1587 = _1586 - _1580; - float _1588 = _1524 - _1527; - float _1589 = _1588 * 1.7320507764816284f; - float _1590 = _1589 * _1577; - float _1591 = _1590 / _1587; - float _1592 = atan(_1591); - float _1593 = _1592 + 3.1415927410125732f; - float _1594 = _1592 + -3.1415927410125732f; - bool _1595 = (_1587 < 0.0f); - bool _1596 = (_1587 == 0.0f); - bool _1597 = (_1590 >= 0.0f); - bool _1598 = (_1590 < 0.0f); - bool _1599 = _1597 && _1595; - float _1600 = _1599 ? _1593 : _1592; - bool _1601 = _1598 && _1595; - float _1602 = _1601 ? _1594 : _1600; - bool _1603 = _1598 && _1596; - bool _1604 = _1597 && _1596; - float _1605 = _1602 * 57.2957763671875f; - float _1606 = _1603 ? -90.0f : _1605; - float _1607 = _1604 ? 90.0f : _1606; - bool _1608 = (_1607 < 0.0f); - _1612 = _1607; - if (_1608) { - float _1610 = _1607 + 360.0f; - _1612 = _1610; - } - } - float _1613 = max(_1612, 0.0f); - float _1614 = min(_1613, 360.0f); - bool _1615 = (_1614 < -180.0f); - do { - if (_1615) { - float _1617 = _1614 + 360.0f; - _1623 = _1617; - } else { - bool _1619 = (_1614 > 180.0f); - _1623 = _1614; - if (_1619) { - float _1621 = _1614 + -360.0f; - _1623 = _1621; - } - } - bool _1624 = (_1623 > -67.5f); - bool _1625 = (_1623 < 67.5f); - bool _1626 = _1624 && _1625; - _1662 = 0.0f; - do { - if (_1626) { - float _1628 = _1623 + 67.5f; - float _1629 = _1628 * 0.029629629105329514f; - int _1630 = int(_1629); - float _1631 = float(_1630); - float _1632 = _1629 - _1631; - float _1633 = _1632 * _1632; - float _1634 = _1633 * _1632; - bool _1635 = (_1630 == 3); - if (_1635) { - float _1637 = _1634 * 0.1666666716337204f; - float _1638 = _1633 * 0.5f; - float _1639 = _1632 * 0.5f; - float _1640 = 0.1666666716337204f - _1639; - float _1641 = _1640 + _1638; - float _1642 = _1641 - _1637; - _1662 = _1642; - } else { - bool _1644 = (_1630 == 2); - if (_1644) { - float _1646 = _1634 * 0.5f; - float _1647 = 0.6666666865348816f - _1633; - float _1648 = _1647 + _1646; - _1662 = _1648; - } else { - bool _1650 = (_1630 == 1); - if (_1650) { - float _1652 = _1634 * -0.5f; - float _1653 = _1633 + _1632; - float _1654 = _1653 * 0.5f; - float _1655 = _1652 + 0.1666666716337204f; - float _1656 = _1655 + _1654; - _1662 = _1656; - } else { - bool _1658 = (_1630 == 0); - float _1659 = _1634 * 0.1666666716337204f; - float _1660 = _1658 ? _1659 : 0.0f; - _1662 = _1660; - } - } - } - } - float _1663 = 0.029999999329447746f - _1578; - float _1664 = _1536 * 0.27000001072883606f; - float _1665 = _1664 * _1663; - float _1666 = _1665 * _1662; - float _1667 = _1666 + _1578; - float _1668 = max(_1667, 0.0f); - float _1669 = max(_1579, 0.0f); - float _1670 = max(_1580, 0.0f); - float _1671 = min(_1668, 65535.0f); - float _1672 = min(_1669, 65535.0f); - float _1673 = min(_1670, 65535.0f); - float _1674 = _1671 * 1.4514392614364624f; - float _1675 = mad(-0.2365107536315918f, _1672, _1674); - float _1676 = mad(-0.21492856740951538f, _1673, _1675); - float _1677 = _1671 * -0.07655377686023712f; - float _1678 = mad(1.17622971534729f, _1672, _1677); - float _1679 = mad(-0.09967592358589172f, _1673, _1678); - float _1680 = _1671 * 0.008316148072481155f; - float _1681 = mad(-0.006032449658960104f, _1672, _1680); - float _1682 = mad(0.9977163076400757f, _1673, _1681); - float _1683 = max(_1676, 0.0f); - float _1684 = max(_1679, 0.0f); - float _1685 = max(_1682, 0.0f); - float _1686 = min(_1683, 65504.0f); - float _1687 = min(_1684, 65504.0f); - float _1688 = min(_1685, 65504.0f); - float _1689 = dot(float3(_1686, _1687, _1688), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1690 = _1686 - _1689; - float _1691 = _1687 - _1689; - float _1692 = _1688 - _1689; - float _1693 = _1690 * 0.9599999785423279f; - float _1694 = _1691 * 0.9599999785423279f; - float _1695 = _1692 * 0.9599999785423279f; - float _1696 = _1693 + _1689; - float _1697 = _1694 + _1689; - float _1698 = _1695 + _1689; - float _1699 = max(_1696, 1.000000013351432e-10f); - float _1700 = log2(_1699); - float _1701 = _1700 * 0.3010300099849701f; - float _1702 = log2(_1488); - float _1703 = _1702 * 0.3010300099849701f; - bool _1704 = !(_1701 <= _1703); - do { - if (!_1704) { - float _1706 = log2(_1489); - float _1707 = _1706 * 0.3010300099849701f; - _1772 = _1707; - } else { - bool _1709 = (_1701 > _1703); - float _1710 = log2(_1486); - float _1711 = _1710 * 0.3010300099849701f; - bool _1712 = (_1701 < _1711); - bool _1713 = _1709 && _1712; - if (_1713) { - float _1715 = _1700 - _1702; - float _1716 = _1715 * 0.9030900001525879f; - float _1717 = _1710 - _1702; - float _1718 = _1717 * 0.3010300099849701f; - float _1719 = _1716 / _1718; - int _1720 = int(_1719); - float _1721 = float(_1720); - float _1722 = _1719 - _1721; - float _1724 = _12[_1720]; - int _1725 = _1720 + 1; - float _1727 = _12[_1725]; - int _1728 = _1720 + 2; - float _1730 = _12[_1728]; - float _1731 = _1722 * _1722; - float _1732 = _1724 * 0.5f; - float _1733 = mad(_1727, -1.0f, _1732); - float _1734 = mad(_1730, 0.5f, _1733); - float _1735 = _1727 - _1724; - float _1736 = mad(_1727, 0.5f, _1732); - float _1737 = dot(float3(_1731, _1722, 1.0f), float3(_1734, _1735, _1736)); - _1772 = _1737; - } else { - bool _1739 = !(_1701 >= _1711); - do { - if (!_1739) { - float _1741 = log2(_1490); - float _1742 = _1741 * 0.3010300099849701f; - bool _1743 = (_1701 < _1742); - if (_1743) { - float _1745 = _1700 - _1710; - float _1746 = _1745 * 0.9030900001525879f; - float _1747 = _1741 - _1710; - float _1748 = _1747 * 0.3010300099849701f; - float _1749 = _1746 / _1748; - int _1750 = int(_1749); - float _1751 = float(_1750); - float _1752 = _1749 - _1751; - float _1754 = _13[_1750]; - int _1755 = _1750 + 1; - float _1757 = _13[_1755]; - int _1758 = _1750 + 2; - float _1760 = _13[_1758]; - float _1761 = _1752 * _1752; - float _1762 = _1754 * 0.5f; - float _1763 = mad(_1757, -1.0f, _1762); - float _1764 = mad(_1760, 0.5f, _1763); - float _1765 = _1757 - _1754; - float _1766 = mad(_1757, 0.5f, _1762); - float _1767 = dot(float3(_1761, _1752, 1.0f), float3(_1764, _1765, _1766)); - _1772 = _1767; - break; - } - } - float _1769 = log2(_1491); - float _1770 = _1769 * 0.3010300099849701f; - _1772 = _1770; - } while (false); - } - } - float _1773 = _1772 * 3.321928024291992f; - float _1774 = exp2(_1773); - float _1775 = max(_1697, 1.000000013351432e-10f); - float _1776 = log2(_1775); - float _1777 = _1776 * 0.3010300099849701f; - bool _1778 = !(_1777 <= _1703); - do { - if (!_1778) { - float _1780 = log2(_1489); - float _1781 = _1780 * 0.3010300099849701f; - _1846 = _1781; - } else { - bool _1783 = (_1777 > _1703); - float _1784 = log2(_1486); - float _1785 = _1784 * 0.3010300099849701f; - bool _1786 = (_1777 < _1785); - bool _1787 = _1783 && _1786; - if (_1787) { - float _1789 = _1776 - _1702; - float _1790 = _1789 * 0.9030900001525879f; - float _1791 = _1784 - _1702; - float _1792 = _1791 * 0.3010300099849701f; - float _1793 = _1790 / _1792; - int _1794 = int(_1793); - float _1795 = float(_1794); - float _1796 = _1793 - _1795; - float _1798 = _12[_1794]; - int _1799 = _1794 + 1; - float _1801 = _12[_1799]; - int _1802 = _1794 + 2; - float _1804 = _12[_1802]; - float _1805 = _1796 * _1796; - float _1806 = _1798 * 0.5f; - float _1807 = mad(_1801, -1.0f, _1806); - float _1808 = mad(_1804, 0.5f, _1807); - float _1809 = _1801 - _1798; - float _1810 = mad(_1801, 0.5f, _1806); - float _1811 = dot(float3(_1805, _1796, 1.0f), float3(_1808, _1809, _1810)); - _1846 = _1811; - } else { - bool _1813 = !(_1777 >= _1785); - do { - if (!_1813) { - float _1815 = log2(_1490); - float _1816 = _1815 * 0.3010300099849701f; - bool _1817 = (_1777 < _1816); - if (_1817) { - float _1819 = _1776 - _1784; - float _1820 = _1819 * 0.9030900001525879f; - float _1821 = _1815 - _1784; - float _1822 = _1821 * 0.3010300099849701f; - float _1823 = _1820 / _1822; - int _1824 = int(_1823); - float _1825 = float(_1824); - float _1826 = _1823 - _1825; - float _1828 = _13[_1824]; - int _1829 = _1824 + 1; - float _1831 = _13[_1829]; - int _1832 = _1824 + 2; - float _1834 = _13[_1832]; - float _1835 = _1826 * _1826; - float _1836 = _1828 * 0.5f; - float _1837 = mad(_1831, -1.0f, _1836); - float _1838 = mad(_1834, 0.5f, _1837); - float _1839 = _1831 - _1828; - float _1840 = mad(_1831, 0.5f, _1836); - float _1841 = dot(float3(_1835, _1826, 1.0f), float3(_1838, _1839, _1840)); - _1846 = _1841; - break; - } - } - float _1843 = log2(_1491); - float _1844 = _1843 * 0.3010300099849701f; - _1846 = _1844; - } while (false); - } - } - float _1847 = _1846 * 3.321928024291992f; - float _1848 = exp2(_1847); - float _1849 = max(_1698, 1.000000013351432e-10f); - float _1850 = log2(_1849); - float _1851 = _1850 * 0.3010300099849701f; - bool _1852 = !(_1851 <= _1703); - do { - if (!_1852) { - float _1854 = log2(_1489); - float _1855 = _1854 * 0.3010300099849701f; - _1920 = _1855; - } else { - bool _1857 = (_1851 > _1703); - float _1858 = log2(_1486); - float _1859 = _1858 * 0.3010300099849701f; - bool _1860 = (_1851 < _1859); - bool _1861 = _1857 && _1860; - if (_1861) { - float _1863 = _1850 - _1702; - float _1864 = _1863 * 0.9030900001525879f; - float _1865 = _1858 - _1702; - float _1866 = _1865 * 0.3010300099849701f; - float _1867 = _1864 / _1866; - int _1868 = int(_1867); - float _1869 = float(_1868); - float _1870 = _1867 - _1869; - float _1872 = _12[_1868]; - int _1873 = _1868 + 1; - float _1875 = _12[_1873]; - int _1876 = _1868 + 2; - float _1878 = _12[_1876]; - float _1879 = _1870 * _1870; - float _1880 = _1872 * 0.5f; - float _1881 = mad(_1875, -1.0f, _1880); - float _1882 = mad(_1878, 0.5f, _1881); - float _1883 = _1875 - _1872; - float _1884 = mad(_1875, 0.5f, _1880); - float _1885 = dot(float3(_1879, _1870, 1.0f), float3(_1882, _1883, _1884)); - _1920 = _1885; - } else { - bool _1887 = !(_1851 >= _1859); - do { - if (!_1887) { - float _1889 = log2(_1490); - float _1890 = _1889 * 0.3010300099849701f; - bool _1891 = (_1851 < _1890); - if (_1891) { - float _1893 = _1850 - _1858; - float _1894 = _1893 * 0.9030900001525879f; - float _1895 = _1889 - _1858; - float _1896 = _1895 * 0.3010300099849701f; - float _1897 = _1894 / _1896; - int _1898 = int(_1897); - float _1899 = float(_1898); - float _1900 = _1897 - _1899; - float _1902 = _13[_1898]; - int _1903 = _1898 + 1; - float _1905 = _13[_1903]; - int _1906 = _1898 + 2; - float _1908 = _13[_1906]; - float _1909 = _1900 * _1900; - float _1910 = _1902 * 0.5f; - float _1911 = mad(_1905, -1.0f, _1910); - float _1912 = mad(_1908, 0.5f, _1911); - float _1913 = _1905 - _1902; - float _1914 = mad(_1905, 0.5f, _1910); - float _1915 = dot(float3(_1909, _1900, 1.0f), float3(_1912, _1913, _1914)); - _1920 = _1915; - break; - } - } - float _1917 = log2(_1491); - float _1918 = _1917 * 0.3010300099849701f; - _1920 = _1918; - } while (false); - } - } - float _1921 = _1920 * 3.321928024291992f; - float _1922 = exp2(_1921); - float _1923 = _1774 - _1489; - float _1924 = _1491 - _1489; - float _1925 = _1923 / _1924; - float _1926 = _1848 - _1489; - float _1927 = _1926 / _1924; - float _1928 = _1922 - _1489; - float _1929 = _1928 / _1924; - float _1930 = _1925 * 0.6624541878700256f; - float _1931 = mad(0.13400420546531677f, _1927, _1930); - float _1932 = mad(0.15618768334388733f, _1929, _1931); - float _1933 = _1925 * 0.2722287178039551f; - float _1934 = mad(0.6740817427635193f, _1927, _1933); - float _1935 = mad(0.053689517080783844f, _1929, _1934); - float _1936 = _1925 * -0.005574649665504694f; - float _1937 = mad(0.00406073359772563f, _1927, _1936); - float _1938 = mad(1.0103391408920288f, _1929, _1937); - float _1939 = _1932 * 1.6410233974456787f; - float _1940 = mad(-0.32480329275131226f, _1935, _1939); - float _1941 = mad(-0.23642469942569733f, _1938, _1940); - float _1942 = _1932 * -0.663662850856781f; - float _1943 = mad(1.6153316497802734f, _1935, _1942); - float _1944 = mad(0.016756348311901093f, _1938, _1943); - float _1945 = _1932 * 0.011721894145011902f; - float _1946 = mad(-0.008284442126750946f, _1935, _1945); - float _1947 = mad(0.9883948564529419f, _1938, _1946); - float _1948 = max(_1941, 0.0f); - float _1949 = max(_1944, 0.0f); - float _1950 = max(_1947, 0.0f); - float _1951 = min(_1948, 1.0f); - float _1952 = min(_1949, 1.0f); - float _1953 = min(_1950, 1.0f); - float _1954 = _1951 * 0.6624541878700256f; - float _1955 = mad(0.13400420546531677f, _1952, _1954); - float _1956 = mad(0.15618768334388733f, _1953, _1955); - float _1957 = _1951 * 0.2722287178039551f; - float _1958 = mad(0.6740817427635193f, _1952, _1957); - float _1959 = mad(0.053689517080783844f, _1953, _1958); - float _1960 = _1951 * -0.005574649665504694f; - float _1961 = mad(0.00406073359772563f, _1952, _1960); - float _1962 = mad(1.0103391408920288f, _1953, _1961); - float _1963 = _1956 * 1.6410233974456787f; - float _1964 = mad(-0.32480329275131226f, _1959, _1963); - float _1965 = mad(-0.23642469942569733f, _1962, _1964); - float _1966 = _1956 * -0.663662850856781f; - float _1967 = mad(1.6153316497802734f, _1959, _1966); - float _1968 = mad(0.016756348311901093f, _1962, _1967); - float _1969 = _1956 * 0.011721894145011902f; - float _1970 = mad(-0.008284442126750946f, _1959, _1969); - float _1971 = mad(0.9883948564529419f, _1962, _1970); - float _1972 = max(_1965, 0.0f); - float _1973 = max(_1968, 0.0f); - float _1974 = max(_1971, 0.0f); - float _1975 = min(_1972, 65535.0f); - float _1976 = min(_1973, 65535.0f); - float _1977 = min(_1974, 65535.0f); - float _1978 = _1975 * _1491; - float _1979 = _1976 * _1491; - float _1980 = _1977 * _1491; - float _1981 = max(_1978, 0.0f); - float _1982 = max(_1979, 0.0f); - float _1983 = max(_1980, 0.0f); - float _1984 = min(_1981, 65535.0f); - float _1985 = min(_1982, 65535.0f); - float _1986 = min(_1983, 65535.0f); - bool _1987 = (_1332 == 5); - _1999 = _1984; - _2000 = _1985; - _2001 = _1986; - do { - float3 test; - if (!_1987) { - float _1989 = _1984 * _39; - float _1990 = mad(_40, _1985, _1989); - float _1991 = mad(_41, _1986, _1990); - float _1992 = _1984 * _42; - float _1993 = mad(_43, _1985, _1992); - float _1994 = mad(_44, _1986, _1993); - float _1995 = _1984 * _45; - float _1996 = mad(_46, _1985, _1995); - float _1997 = mad(_47, _1986, _1996); - _1999 = _1991; - _2000 = _1994; - _2001 = _1997; - } - - float _2002 = _1999 * 9.999999747378752e-05f; - float _2003 = _2000 * 9.999999747378752e-05f; - float _2004 = _2001 * 9.999999747378752e-05f; - float _2005 = log2(_2002); - float _2006 = log2(_2003); - float _2007 = log2(_2004); - float _2008 = _2005 * 0.1593017578125f; - float _2009 = _2006 * 0.1593017578125f; - float _2010 = _2007 * 0.1593017578125f; - float _2011 = exp2(_2008); - float _2012 = exp2(_2009); - float _2013 = exp2(_2010); - float _2014 = _2011 * 18.8515625f; - float _2015 = _2012 * 18.8515625f; - float _2016 = _2013 * 18.8515625f; - float _2017 = _2014 + 0.8359375f; - float _2018 = _2015 + 0.8359375f; - float _2019 = _2016 + 0.8359375f; - float _2020 = _2011 * 18.6875f; - float _2021 = _2012 * 18.6875f; - float _2022 = _2013 * 18.6875f; - float _2023 = _2020 + 1.0f; - float _2024 = _2021 + 1.0f; - float _2025 = _2022 + 1.0f; - float _2026 = 1.0f / _2023; - float _2027 = 1.0f / _2024; - float _2028 = 1.0f / _2025; - float _2029 = _2026 * _2017; - float _2030 = _2027 * _2018; - float _2031 = _2028 * _2019; - float _2032 = log2(_2029); - float _2033 = log2(_2030); - float _2034 = log2(_2031); - float _2035 = _2032 * 78.84375f; - float _2036 = _2033 * 78.84375f; - float _2037 = _2034 * 78.84375f; - float _2038 = exp2(_2035); - float _2039 = exp2(_2036); - float _2040 = exp2(_2037); - _2754 = _2038; - _2755 = _2039; - _2756 = _2040; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - int _2042 = _1332 & -3; - bool _2043 = (_2042 == 4); - if (_2043) { - // %2045 = bitcast [6 x float]* %10 to i8* - // %2046 = bitcast [6 x float]* %11 to i8* - float _2048 = _RootShaderParameters_012z; - float _2049 = _RootShaderParameters_012y; - float _2050 = _RootShaderParameters_012x; - float _2052 = _RootShaderParameters_011x; - float _2053 = _RootShaderParameters_011y; - float _2054 = _RootShaderParameters_011z; - float _2055 = _RootShaderParameters_011w; - float _2057 = _RootShaderParameters_010x; - float _2058 = _RootShaderParameters_010y; - float _2059 = _RootShaderParameters_010z; - float _2060 = _RootShaderParameters_010w; - float _2062 = _RootShaderParameters_009x; - float _2064 = _RootShaderParameters_008x; - float _2065 = _RootShaderParameters_008y; - float _2066 = _RootShaderParameters_008z; - float _2067 = _RootShaderParameters_008w; - _10[0] = _2057; - _10[1] = _2058; - _10[2] = _2059; - _10[3] = _2060; - _10[4] = _2050; - _10[5] = _2050; - _11[0] = _2052; - _11[1] = _2053; - _11[2] = _2054; - _11[3] = _2055; - _11[4] = _2049; - _11[5] = _2049; - float _2081 = UniformBufferConstants_WorkingColorSpace_016x; - float _2082 = UniformBufferConstants_WorkingColorSpace_016y; - float _2083 = UniformBufferConstants_WorkingColorSpace_016z; - float _2085 = UniformBufferConstants_WorkingColorSpace_017x; - float _2086 = UniformBufferConstants_WorkingColorSpace_017y; - float _2087 = UniformBufferConstants_WorkingColorSpace_017z; - float _2089 = UniformBufferConstants_WorkingColorSpace_018x; - float _2090 = UniformBufferConstants_WorkingColorSpace_018y; - float _2091 = UniformBufferConstants_WorkingColorSpace_018z; - float _2092 = _2048 * _1314; - float _2093 = _2048 * _1315; - float _2094 = _2048 * _1316; - float _2095 = _2081 * _2092; - float _2096 = mad(_2082, _2093, _2095); - float _2097 = mad(_2083, _2094, _2096); - float _2098 = _2085 * _2092; - float _2099 = mad(_2086, _2093, _2098); - float _2100 = mad(_2087, _2094, _2099); - float _2101 = _2089 * _2092; - float _2102 = mad(_2090, _2093, _2101); - float _2103 = mad(_2091, _2094, _2102); - float _2104 = min(_2097, _2100); - float _2105 = min(_2104, _2103); - float _2106 = max(_2097, _2100); - float _2107 = max(_2106, _2103); - float _2108 = max(_2107, 1.000000013351432e-10f); - float _2109 = max(_2105, 1.000000013351432e-10f); - float _2110 = _2108 - _2109; - float _2111 = max(_2107, 0.009999999776482582f); - float _2112 = _2110 / _2111; - float _2113 = _2103 - _2100; - float _2114 = _2113 * _2103; - float _2115 = _2100 - _2097; - float _2116 = _2115 * _2100; - float _2117 = _2114 + _2116; - float _2118 = _2097 - _2103; - float _2119 = _2118 * _2097; - float _2120 = _2117 + _2119; - float _2121 = sqrt(_2120); - float _2122 = _2121 * 1.75f; - float _2123 = _2100 + _2097; - float _2124 = _2123 + _2103; - float _2125 = _2124 + _2122; - float _2126 = _2125 * 0.3333333432674408f; - float _2127 = _2112 + -0.4000000059604645f; - float _2128 = _2127 * 5.0f; - float _2129 = _2127 * 2.5f; - float _2130 = abs(_2129); - float _2131 = 1.0f - _2130; - float _2132 = max(_2131, 0.0f); - bool _2133 = (_2128 > 0.0f); - bool _2134 = (_2128 < 0.0f); - int _2135 = int(_2133); - int _2136 = int(_2134); - int _2137 = _2135 - _2136; - float _2138 = float(_2137); - float _2139 = _2132 * _2132; - float _2140 = 1.0f - _2139; - float _2141 = _2138 * _2140; - float _2142 = _2141 + 1.0f; - float _2143 = _2142 * 0.02500000037252903f; - bool _2144 = !(_2126 <= 0.0533333346247673f); - _2152 = _2143; - do { - if (_2144) { - bool _2146 = !(_2126 >= 0.1599999964237213f); - _2152 = 0.0f; - if (_2146) { - float _2148 = 0.23999999463558197f / _2125; - float _2149 = _2148 + -0.5f; - float _2150 = _2149 * _2143; - _2152 = _2150; - } - } - float _2153 = _2152 + 1.0f; - float _2154 = _2153 * _2097; - float _2155 = _2153 * _2100; - float _2156 = _2153 * _2103; - bool _2157 = (_2154 == _2155); - bool _2158 = (_2155 == _2156); - bool _2159 = _2157 && _2158; - _2188 = 0.0f; - do { - if (!_2159) { - float _2161 = _2154 * 2.0f; - float _2162 = _2161 - _2155; - float _2163 = _2162 - _2156; - float _2164 = _2100 - _2103; - float _2165 = _2164 * 1.7320507764816284f; - float _2166 = _2165 * _2153; - float _2167 = _2166 / _2163; - float _2168 = atan(_2167); - float _2169 = _2168 + 3.1415927410125732f; - float _2170 = _2168 + -3.1415927410125732f; - bool _2171 = (_2163 < 0.0f); - bool _2172 = (_2163 == 0.0f); - bool _2173 = (_2166 >= 0.0f); - bool _2174 = (_2166 < 0.0f); - bool _2175 = _2173 && _2171; - float _2176 = _2175 ? _2169 : _2168; - bool _2177 = _2174 && _2171; - float _2178 = _2177 ? _2170 : _2176; - bool _2179 = _2174 && _2172; - bool _2180 = _2173 && _2172; - float _2181 = _2178 * 57.2957763671875f; - float _2182 = _2179 ? -90.0f : _2181; - float _2183 = _2180 ? 90.0f : _2182; - bool _2184 = (_2183 < 0.0f); - _2188 = _2183; - if (_2184) { - float _2186 = _2183 + 360.0f; - _2188 = _2186; - } - } - float _2189 = max(_2188, 0.0f); - float _2190 = min(_2189, 360.0f); - bool _2191 = (_2190 < -180.0f); - do { - if (_2191) { - float _2193 = _2190 + 360.0f; - _2199 = _2193; - } else { - bool _2195 = (_2190 > 180.0f); - _2199 = _2190; - if (_2195) { - float _2197 = _2190 + -360.0f; - _2199 = _2197; - } - } - bool _2200 = (_2199 > -67.5f); - bool _2201 = (_2199 < 67.5f); - bool _2202 = _2200 && _2201; - _2238 = 0.0f; - do { - if (_2202) { - float _2204 = _2199 + 67.5f; - float _2205 = _2204 * 0.029629629105329514f; - int _2206 = int(_2205); - float _2207 = float(_2206); - float _2208 = _2205 - _2207; - float _2209 = _2208 * _2208; - float _2210 = _2209 * _2208; - bool _2211 = (_2206 == 3); - if (_2211) { - float _2213 = _2210 * 0.1666666716337204f; - float _2214 = _2209 * 0.5f; - float _2215 = _2208 * 0.5f; - float _2216 = 0.1666666716337204f - _2215; - float _2217 = _2216 + _2214; - float _2218 = _2217 - _2213; - _2238 = _2218; - } else { - bool _2220 = (_2206 == 2); - if (_2220) { - float _2222 = _2210 * 0.5f; - float _2223 = 0.6666666865348816f - _2209; - float _2224 = _2223 + _2222; - _2238 = _2224; - } else { - bool _2226 = (_2206 == 1); - if (_2226) { - float _2228 = _2210 * -0.5f; - float _2229 = _2209 + _2208; - float _2230 = _2229 * 0.5f; - float _2231 = _2228 + 0.1666666716337204f; - float _2232 = _2231 + _2230; - _2238 = _2232; - } else { - bool _2234 = (_2206 == 0); - float _2235 = _2210 * 0.1666666716337204f; - float _2236 = _2234 ? _2235 : 0.0f; - _2238 = _2236; - } - } - } - } - float _2239 = 0.029999999329447746f - _2154; - float _2240 = _2112 * 0.27000001072883606f; - float _2241 = _2240 * _2239; - float _2242 = _2241 * _2238; - float _2243 = _2242 + _2154; - float _2244 = max(_2243, 0.0f); - float _2245 = max(_2155, 0.0f); - float _2246 = max(_2156, 0.0f); - float _2247 = min(_2244, 65535.0f); - float _2248 = min(_2245, 65535.0f); - float _2249 = min(_2246, 65535.0f); - float _2250 = _2247 * 1.4514392614364624f; - float _2251 = mad(-0.2365107536315918f, _2248, _2250); - float _2252 = mad(-0.21492856740951538f, _2249, _2251); - float _2253 = _2247 * -0.07655377686023712f; - float _2254 = mad(1.17622971534729f, _2248, _2253); - float _2255 = mad(-0.09967592358589172f, _2249, _2254); - float _2256 = _2247 * 0.008316148072481155f; - float _2257 = mad(-0.006032449658960104f, _2248, _2256); - float _2258 = mad(0.9977163076400757f, _2249, _2257); - float _2259 = max(_2252, 0.0f); - float _2260 = max(_2255, 0.0f); - float _2261 = max(_2258, 0.0f); - float _2262 = min(_2259, 65504.0f); - float _2263 = min(_2260, 65504.0f); - float _2264 = min(_2261, 65504.0f); - float _2265 = dot(float3(_2262, _2263, _2264), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _2266 = _2262 - _2265; - float _2267 = _2263 - _2265; - float _2268 = _2264 - _2265; - float _2269 = _2266 * 0.9599999785423279f; - float _2270 = _2267 * 0.9599999785423279f; - float _2271 = _2268 * 0.9599999785423279f; - float _2272 = _2269 + _2265; - float _2273 = _2270 + _2265; - float _2274 = _2271 + _2265; - float _2275 = max(_2272, 1.000000013351432e-10f); - float _2276 = log2(_2275); - float _2277 = _2276 * 0.3010300099849701f; - float _2278 = log2(_2064); - float _2279 = _2278 * 0.3010300099849701f; - bool _2280 = !(_2277 <= _2279); - do { - if (!_2280) { - float _2282 = log2(_2065); - float _2283 = _2282 * 0.3010300099849701f; - _2348 = _2283; - } else { - bool _2285 = (_2277 > _2279); - float _2286 = log2(_2062); - float _2287 = _2286 * 0.3010300099849701f; - bool _2288 = (_2277 < _2287); - bool _2289 = _2285 && _2288; - if (_2289) { - float _2291 = _2276 - _2278; - float _2292 = _2291 * 0.9030900001525879f; - float _2293 = _2286 - _2278; - float _2294 = _2293 * 0.3010300099849701f; - float _2295 = _2292 / _2294; - int _2296 = int(_2295); - float _2297 = float(_2296); - float _2298 = _2295 - _2297; - float _2300 = _10[_2296]; - int _2301 = _2296 + 1; - float _2303 = _10[_2301]; - int _2304 = _2296 + 2; - float _2306 = _10[_2304]; - float _2307 = _2298 * _2298; - float _2308 = _2300 * 0.5f; - float _2309 = mad(_2303, -1.0f, _2308); - float _2310 = mad(_2306, 0.5f, _2309); - float _2311 = _2303 - _2300; - float _2312 = mad(_2303, 0.5f, _2308); - float _2313 = dot(float3(_2307, _2298, 1.0f), float3(_2310, _2311, _2312)); - _2348 = _2313; - } else { - bool _2315 = !(_2277 >= _2287); - do { - if (!_2315) { - float _2317 = log2(_2066); - float _2318 = _2317 * 0.3010300099849701f; - bool _2319 = (_2277 < _2318); - if (_2319) { - float _2321 = _2276 - _2286; - float _2322 = _2321 * 0.9030900001525879f; - float _2323 = _2317 - _2286; - float _2324 = _2323 * 0.3010300099849701f; - float _2325 = _2322 / _2324; - int _2326 = int(_2325); - float _2327 = float(_2326); - float _2328 = _2325 - _2327; - float _2330 = _11[_2326]; - int _2331 = _2326 + 1; - float _2333 = _11[_2331]; - int _2334 = _2326 + 2; - float _2336 = _11[_2334]; - float _2337 = _2328 * _2328; - float _2338 = _2330 * 0.5f; - float _2339 = mad(_2333, -1.0f, _2338); - float _2340 = mad(_2336, 0.5f, _2339); - float _2341 = _2333 - _2330; - float _2342 = mad(_2333, 0.5f, _2338); - float _2343 = dot(float3(_2337, _2328, 1.0f), float3(_2340, _2341, _2342)); - _2348 = _2343; - break; - } - } - float _2345 = log2(_2067); - float _2346 = _2345 * 0.3010300099849701f; - _2348 = _2346; - } while (false); - } - } - float _2349 = _2348 * 3.321928024291992f; - float _2350 = exp2(_2349); - float _2351 = max(_2273, 1.000000013351432e-10f); - float _2352 = log2(_2351); - float _2353 = _2352 * 0.3010300099849701f; - bool _2354 = !(_2353 <= _2279); - do { - if (!_2354) { - float _2356 = log2(_2065); - float _2357 = _2356 * 0.3010300099849701f; - _2422 = _2357; - } else { - bool _2359 = (_2353 > _2279); - float _2360 = log2(_2062); - float _2361 = _2360 * 0.3010300099849701f; - bool _2362 = (_2353 < _2361); - bool _2363 = _2359 && _2362; - if (_2363) { - float _2365 = _2352 - _2278; - float _2366 = _2365 * 0.9030900001525879f; - float _2367 = _2360 - _2278; - float _2368 = _2367 * 0.3010300099849701f; - float _2369 = _2366 / _2368; - int _2370 = int(_2369); - float _2371 = float(_2370); - float _2372 = _2369 - _2371; - float _2374 = _10[_2370]; - int _2375 = _2370 + 1; - float _2377 = _10[_2375]; - int _2378 = _2370 + 2; - float _2380 = _10[_2378]; - float _2381 = _2372 * _2372; - float _2382 = _2374 * 0.5f; - float _2383 = mad(_2377, -1.0f, _2382); - float _2384 = mad(_2380, 0.5f, _2383); - float _2385 = _2377 - _2374; - float _2386 = mad(_2377, 0.5f, _2382); - float _2387 = dot(float3(_2381, _2372, 1.0f), float3(_2384, _2385, _2386)); - _2422 = _2387; - } else { - bool _2389 = !(_2353 >= _2361); - do { - if (!_2389) { - float _2391 = log2(_2066); - float _2392 = _2391 * 0.3010300099849701f; - bool _2393 = (_2353 < _2392); - if (_2393) { - float _2395 = _2352 - _2360; - float _2396 = _2395 * 0.9030900001525879f; - float _2397 = _2391 - _2360; - float _2398 = _2397 * 0.3010300099849701f; - float _2399 = _2396 / _2398; - int _2400 = int(_2399); - float _2401 = float(_2400); - float _2402 = _2399 - _2401; - float _2404 = _11[_2400]; - int _2405 = _2400 + 1; - float _2407 = _11[_2405]; - int _2408 = _2400 + 2; - float _2410 = _11[_2408]; - float _2411 = _2402 * _2402; - float _2412 = _2404 * 0.5f; - float _2413 = mad(_2407, -1.0f, _2412); - float _2414 = mad(_2410, 0.5f, _2413); - float _2415 = _2407 - _2404; - float _2416 = mad(_2407, 0.5f, _2412); - float _2417 = dot(float3(_2411, _2402, 1.0f), float3(_2414, _2415, _2416)); - _2422 = _2417; - break; - } - } - float _2419 = log2(_2067); - float _2420 = _2419 * 0.3010300099849701f; - _2422 = _2420; - } while (false); - } - } - float _2423 = _2422 * 3.321928024291992f; - float _2424 = exp2(_2423); - float _2425 = max(_2274, 1.000000013351432e-10f); - float _2426 = log2(_2425); - float _2427 = _2426 * 0.3010300099849701f; - bool _2428 = !(_2427 <= _2279); - do { - if (!_2428) { - float _2430 = log2(_2065); - float _2431 = _2430 * 0.3010300099849701f; - _2496 = _2431; - } else { - bool _2433 = (_2427 > _2279); - float _2434 = log2(_2062); - float _2435 = _2434 * 0.3010300099849701f; - bool _2436 = (_2427 < _2435); - bool _2437 = _2433 && _2436; - if (_2437) { - float _2439 = _2426 - _2278; - float _2440 = _2439 * 0.9030900001525879f; - float _2441 = _2434 - _2278; - float _2442 = _2441 * 0.3010300099849701f; - float _2443 = _2440 / _2442; - int _2444 = int(_2443); - float _2445 = float(_2444); - float _2446 = _2443 - _2445; - float _2448 = _10[_2444]; - int _2449 = _2444 + 1; - float _2451 = _10[_2449]; - int _2452 = _2444 + 2; - float _2454 = _10[_2452]; - float _2455 = _2446 * _2446; - float _2456 = _2448 * 0.5f; - float _2457 = mad(_2451, -1.0f, _2456); - float _2458 = mad(_2454, 0.5f, _2457); - float _2459 = _2451 - _2448; - float _2460 = mad(_2451, 0.5f, _2456); - float _2461 = dot(float3(_2455, _2446, 1.0f), float3(_2458, _2459, _2460)); - _2496 = _2461; - } else { - bool _2463 = !(_2427 >= _2435); - do { - if (!_2463) { - float _2465 = log2(_2066); - float _2466 = _2465 * 0.3010300099849701f; - bool _2467 = (_2427 < _2466); - if (_2467) { - float _2469 = _2426 - _2434; - float _2470 = _2469 * 0.9030900001525879f; - float _2471 = _2465 - _2434; - float _2472 = _2471 * 0.3010300099849701f; - float _2473 = _2470 / _2472; - int _2474 = int(_2473); - float _2475 = float(_2474); - float _2476 = _2473 - _2475; - float _2478 = _11[_2474]; - int _2479 = _2474 + 1; - float _2481 = _11[_2479]; - int _2482 = _2474 + 2; - float _2484 = _11[_2482]; - float _2485 = _2476 * _2476; - float _2486 = _2478 * 0.5f; - float _2487 = mad(_2481, -1.0f, _2486); - float _2488 = mad(_2484, 0.5f, _2487); - float _2489 = _2481 - _2478; - float _2490 = mad(_2481, 0.5f, _2486); - float _2491 = dot(float3(_2485, _2476, 1.0f), float3(_2488, _2489, _2490)); - _2496 = _2491; - break; - } - } - float _2493 = log2(_2067); - float _2494 = _2493 * 0.3010300099849701f; - _2496 = _2494; - } while (false); - } - } - float _2497 = _2496 * 3.321928024291992f; - float _2498 = exp2(_2497); - float _2499 = _2350 - _2065; - float _2500 = _2067 - _2065; - float _2501 = _2499 / _2500; - float _2502 = _2424 - _2065; - float _2503 = _2502 / _2500; - float _2504 = _2498 - _2065; - float _2505 = _2504 / _2500; - float _2506 = _2501 * 0.6624541878700256f; - float _2507 = mad(0.13400420546531677f, _2503, _2506); - float _2508 = mad(0.15618768334388733f, _2505, _2507); - float _2509 = _2501 * 0.2722287178039551f; - float _2510 = mad(0.6740817427635193f, _2503, _2509); - float _2511 = mad(0.053689517080783844f, _2505, _2510); - float _2512 = _2501 * -0.005574649665504694f; - float _2513 = mad(0.00406073359772563f, _2503, _2512); - float _2514 = mad(1.0103391408920288f, _2505, _2513); - float _2515 = _2508 * 1.6410233974456787f; - float _2516 = mad(-0.32480329275131226f, _2511, _2515); - float _2517 = mad(-0.23642469942569733f, _2514, _2516); - float _2518 = _2508 * -0.663662850856781f; - float _2519 = mad(1.6153316497802734f, _2511, _2518); - float _2520 = mad(0.016756348311901093f, _2514, _2519); - float _2521 = _2508 * 0.011721894145011902f; - float _2522 = mad(-0.008284442126750946f, _2511, _2521); - float _2523 = mad(0.9883948564529419f, _2514, _2522); - float _2524 = max(_2517, 0.0f); - float _2525 = max(_2520, 0.0f); - float _2526 = max(_2523, 0.0f); - float _2527 = min(_2524, 1.0f); - float _2528 = min(_2525, 1.0f); - float _2529 = min(_2526, 1.0f); - float _2530 = _2527 * 0.6624541878700256f; - float _2531 = mad(0.13400420546531677f, _2528, _2530); - float _2532 = mad(0.15618768334388733f, _2529, _2531); - float _2533 = _2527 * 0.2722287178039551f; - float _2534 = mad(0.6740817427635193f, _2528, _2533); - float _2535 = mad(0.053689517080783844f, _2529, _2534); - float _2536 = _2527 * -0.005574649665504694f; - float _2537 = mad(0.00406073359772563f, _2528, _2536); - float _2538 = mad(1.0103391408920288f, _2529, _2537); - float _2539 = _2532 * 1.6410233974456787f; - float _2540 = mad(-0.32480329275131226f, _2535, _2539); - float _2541 = mad(-0.23642469942569733f, _2538, _2540); - float _2542 = _2532 * -0.663662850856781f; - float _2543 = mad(1.6153316497802734f, _2535, _2542); - float _2544 = mad(0.016756348311901093f, _2538, _2543); - float _2545 = _2532 * 0.011721894145011902f; - float _2546 = mad(-0.008284442126750946f, _2535, _2545); - float _2547 = mad(0.9883948564529419f, _2538, _2546); - float _2548 = max(_2541, 0.0f); - float _2549 = max(_2544, 0.0f); - float _2550 = max(_2547, 0.0f); - float _2551 = min(_2548, 65535.0f); - float _2552 = min(_2549, 65535.0f); - float _2553 = min(_2550, 65535.0f); - float _2554 = _2551 * _2067; - float _2555 = _2552 * _2067; - float _2556 = _2553 * _2067; - float _2557 = max(_2554, 0.0f); - float _2558 = max(_2555, 0.0f); - float _2559 = max(_2556, 0.0f); - float _2560 = min(_2557, 65535.0f); - float _2561 = min(_2558, 65535.0f); - float _2562 = min(_2559, 65535.0f); - bool _2563 = (_1332 == 6); - _2575 = _2560; - _2576 = _2561; - _2577 = _2562; - do { - if (!_2563) { - float _2565 = _2560 * _39; - float _2566 = mad(_40, _2561, _2565); - float _2567 = mad(_41, _2562, _2566); - float _2568 = _2560 * _42; - float _2569 = mad(_43, _2561, _2568); - float _2570 = mad(_44, _2562, _2569); - float _2571 = _2560 * _45; - float _2572 = mad(_46, _2561, _2571); - float _2573 = mad(_47, _2562, _2572); - _2575 = _2567; - _2576 = _2570; - _2577 = _2573; - } - float _2578 = _2575 * 9.999999747378752e-05f; - float _2579 = _2576 * 9.999999747378752e-05f; - float _2580 = _2577 * 9.999999747378752e-05f; - float _2581 = log2(_2578); - float _2582 = log2(_2579); - float _2583 = log2(_2580); - float _2584 = _2581 * 0.1593017578125f; - float _2585 = _2582 * 0.1593017578125f; - float _2586 = _2583 * 0.1593017578125f; - float _2587 = exp2(_2584); - float _2588 = exp2(_2585); - float _2589 = exp2(_2586); - float _2590 = _2587 * 18.8515625f; - float _2591 = _2588 * 18.8515625f; - float _2592 = _2589 * 18.8515625f; - float _2593 = _2590 + 0.8359375f; - float _2594 = _2591 + 0.8359375f; - float _2595 = _2592 + 0.8359375f; - float _2596 = _2587 * 18.6875f; - float _2597 = _2588 * 18.6875f; - float _2598 = _2589 * 18.6875f; - float _2599 = _2596 + 1.0f; - float _2600 = _2597 + 1.0f; - float _2601 = _2598 + 1.0f; - float _2602 = 1.0f / _2599; - float _2603 = 1.0f / _2600; - float _2604 = 1.0f / _2601; - float _2605 = _2602 * _2593; - float _2606 = _2603 * _2594; - float _2607 = _2604 * _2595; - float _2608 = log2(_2605); - float _2609 = log2(_2606); - float _2610 = log2(_2607); - float _2611 = _2608 * 78.84375f; - float _2612 = _2609 * 78.84375f; - float _2613 = _2610 * 78.84375f; - float _2614 = exp2(_2611); - float _2615 = exp2(_2612); - float _2616 = exp2(_2613); - _2754 = _2614; - _2755 = _2615; - _2756 = _2616; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - bool _2618 = (_1332 == 7); - if (_2618) { - float _2621 = UniformBufferConstants_WorkingColorSpace_008x; - float _2622 = UniformBufferConstants_WorkingColorSpace_008y; - float _2623 = UniformBufferConstants_WorkingColorSpace_008z; - float _2625 = UniformBufferConstants_WorkingColorSpace_009x; - float _2626 = UniformBufferConstants_WorkingColorSpace_009y; - float _2627 = UniformBufferConstants_WorkingColorSpace_009z; - float _2629 = UniformBufferConstants_WorkingColorSpace_010x; - float _2630 = UniformBufferConstants_WorkingColorSpace_010y; - float _2631 = UniformBufferConstants_WorkingColorSpace_010z; - float _2632 = _2621 * _1314; - float _2633 = mad(_2622, _1315, _2632); - float _2634 = mad(_2623, _1316, _2633); - float _2635 = _2625 * _1314; - float _2636 = mad(_2626, _1315, _2635); - float _2637 = mad(_2627, _1316, _2636); - float _2638 = _2629 * _1314; - float _2639 = mad(_2630, _1315, _2638); - float _2640 = mad(_2631, _1316, _2639); - float _2641 = _2634 * _39; - float _2642 = mad(_40, _2637, _2641); - float _2643 = mad(_41, _2640, _2642); - float _2644 = _2634 * _42; - float _2645 = mad(_43, _2637, _2644); - float _2646 = mad(_44, _2640, _2645); - float _2647 = _2634 * _45; - float _2648 = mad(_46, _2637, _2647); - float _2649 = mad(_47, _2640, _2648); - float _2650 = _2643 * 9.999999747378752e-05f; - float _2651 = _2646 * 9.999999747378752e-05f; - float _2652 = _2649 * 9.999999747378752e-05f; - float _2653 = log2(_2650); - float _2654 = log2(_2651); - float _2655 = log2(_2652); - float _2656 = _2653 * 0.1593017578125f; - float _2657 = _2654 * 0.1593017578125f; - float _2658 = _2655 * 0.1593017578125f; - float _2659 = exp2(_2656); - float _2660 = exp2(_2657); - float _2661 = exp2(_2658); - float _2662 = _2659 * 18.8515625f; - float _2663 = _2660 * 18.8515625f; - float _2664 = _2661 * 18.8515625f; - float _2665 = _2662 + 0.8359375f; - float _2666 = _2663 + 0.8359375f; - float _2667 = _2664 + 0.8359375f; - float _2668 = _2659 * 18.6875f; - float _2669 = _2660 * 18.6875f; - float _2670 = _2661 * 18.6875f; - float _2671 = _2668 + 1.0f; - float _2672 = _2669 + 1.0f; - float _2673 = _2670 + 1.0f; - float _2674 = 1.0f / _2671; - float _2675 = 1.0f / _2672; - float _2676 = 1.0f / _2673; - float _2677 = _2674 * _2665; - float _2678 = _2675 * _2666; - float _2679 = _2676 * _2667; - float _2680 = log2(_2677); - float _2681 = log2(_2678); - float _2682 = log2(_2679); - float _2683 = _2680 * 78.84375f; - float _2684 = _2681 * 78.84375f; - float _2685 = _2682 * 78.84375f; - float _2686 = exp2(_2683); - float _2687 = exp2(_2684); - float _2688 = exp2(_2685); - _2754 = _2686; - _2755 = _2687; - _2756 = _2688; - } else { - bool _2690 = (_1332 == 8); - _2754 = _1314; - _2755 = _1315; - _2756 = _1316; - if (!_2690) { - bool _2692 = (_1332 == 9); - float _2694 = UniformBufferConstants_WorkingColorSpace_008x; - float _2695 = UniformBufferConstants_WorkingColorSpace_008y; - float _2696 = UniformBufferConstants_WorkingColorSpace_008z; - float _2698 = UniformBufferConstants_WorkingColorSpace_009x; - float _2699 = UniformBufferConstants_WorkingColorSpace_009y; - float _2700 = UniformBufferConstants_WorkingColorSpace_009z; - float _2702 = UniformBufferConstants_WorkingColorSpace_010x; - float _2703 = UniformBufferConstants_WorkingColorSpace_010y; - float _2704 = UniformBufferConstants_WorkingColorSpace_010z; - if (_2692) { - float _2706 = _2694 * _1302; - float _2707 = mad(_2695, _1303, _2706); - float _2708 = mad(_2696, _1304, _2707); - float _2709 = _2698 * _1302; - float _2710 = mad(_2699, _1303, _2709); - float _2711 = mad(_2700, _1304, _2710); - float _2712 = _2702 * _1302; - float _2713 = mad(_2703, _1303, _2712); - float _2714 = mad(_2704, _1304, _2713); - float _2715 = _2708 * _39; - float _2716 = mad(_40, _2711, _2715); - float _2717 = mad(_41, _2714, _2716); - float _2718 = _2708 * _42; - float _2719 = mad(_43, _2711, _2718); - float _2720 = mad(_44, _2714, _2719); - float _2721 = _2708 * _45; - float _2722 = mad(_46, _2711, _2721); - float _2723 = mad(_47, _2714, _2722); - _2754 = _2717; - _2755 = _2720; - _2756 = _2723; - } else { - float _2725 = _2694 * _1328; - float _2726 = mad(_2695, _1329, _2725); - float _2727 = mad(_2696, _1330, _2726); - float _2728 = _2698 * _1328; - float _2729 = mad(_2699, _1329, _2728); - float _2730 = mad(_2700, _1330, _2729); - float _2731 = _2702 * _1328; - float _2732 = mad(_2703, _1329, _2731); - float _2733 = mad(_2704, _1330, _2732); - float _2734 = _2727 * _39; - float _2735 = mad(_40, _2730, _2734); - float _2736 = mad(_41, _2733, _2735); - float _2737 = _2727 * _42; - float _2738 = mad(_43, _2730, _2737); - float _2739 = mad(_44, _2733, _2738); - float _2740 = _2727 * _45; - float _2741 = mad(_46, _2730, _2740); - float _2742 = mad(_47, _2733, _2741); - float _2743 = _RootShaderParameters_040z; - float _2744 = log2(_2736); - float _2745 = log2(_2739); - float _2746 = log2(_2742); - float _2747 = _2744 * _2743; - float _2748 = _2745 * _2743; - float _2749 = _2746 * _2743; - float _2750 = exp2(_2747); - float _2751 = exp2(_2748); - float _2752 = exp2(_2749); - _2754 = _2750; - _2755 = _2751; - _2756 = _2752; - } - } - } - } - } - } - } - float _2757 = _2754 * 0.9523810148239136f; - float _2758 = _2755 * 0.9523810148239136f; - float _2759 = _2756 * 0.9523810148239136f; - SV_Target.x = _2757; - SV_Target.y = _2758; - SV_Target.z = _2759; - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0xBAA27141.ps_6_6.hlsl b/src/games/ue-dx12/lutbuilder_0xBAA27141.ps_6_6.hlsl deleted file mode 100644 index 309807e5..00000000 --- a/src/games/ue-dx12/lutbuilder_0xBAA27141.ps_6_6.hlsl +++ /dev/null @@ -1,2718 +0,0 @@ - -#include "./common.hlsl" -#include "./shared.h" - -cbuffer _RootShaderParameters : register(b0) { - float _RootShaderParameters_008x : packoffset(c008.x); - float _RootShaderParameters_008y : packoffset(c008.y); - float _RootShaderParameters_008z : packoffset(c008.z); - float _RootShaderParameters_008w : packoffset(c008.w); - float _RootShaderParameters_009x : packoffset(c009.x); - float _RootShaderParameters_010x : packoffset(c010.x); - float _RootShaderParameters_010y : packoffset(c010.y); - float _RootShaderParameters_010z : packoffset(c010.z); - float _RootShaderParameters_010w : packoffset(c010.w); - float _RootShaderParameters_011x : packoffset(c011.x); - float _RootShaderParameters_011y : packoffset(c011.y); - float _RootShaderParameters_011z : packoffset(c011.z); - float _RootShaderParameters_011w : packoffset(c011.w); - float _RootShaderParameters_012x : packoffset(c012.x); - float _RootShaderParameters_012y : packoffset(c012.y); - float _RootShaderParameters_012z : packoffset(c012.z); - float _RootShaderParameters_013x : packoffset(c013.x); - float _RootShaderParameters_013y : packoffset(c013.y); - float _RootShaderParameters_013z : packoffset(c013.z); - float _RootShaderParameters_013w : packoffset(c013.w); - float _RootShaderParameters_014x : packoffset(c014.x); - float _RootShaderParameters_014y : packoffset(c014.y); - float _RootShaderParameters_014z : packoffset(c014.z); - float _RootShaderParameters_015x : packoffset(c015.x); - float _RootShaderParameters_015y : packoffset(c015.y); - float _RootShaderParameters_015z : packoffset(c015.z); - float _RootShaderParameters_015w : packoffset(c015.w); - float _RootShaderParameters_016x : packoffset(c016.x); - float _RootShaderParameters_016y : packoffset(c016.y); - float _RootShaderParameters_016z : packoffset(c016.z); - float _RootShaderParameters_016w : packoffset(c016.w); - float _RootShaderParameters_017x : packoffset(c017.x); - float _RootShaderParameters_017y : packoffset(c017.y); - float _RootShaderParameters_017z : packoffset(c017.z); - float _RootShaderParameters_017w : packoffset(c017.w); - float _RootShaderParameters_018x : packoffset(c018.x); - float _RootShaderParameters_018y : packoffset(c018.y); - float _RootShaderParameters_018z : packoffset(c018.z); - float _RootShaderParameters_018w : packoffset(c018.w); - float _RootShaderParameters_019x : packoffset(c019.x); - float _RootShaderParameters_019y : packoffset(c019.y); - float _RootShaderParameters_019z : packoffset(c019.z); - float _RootShaderParameters_019w : packoffset(c019.w); - float _RootShaderParameters_020x : packoffset(c020.x); - float _RootShaderParameters_020y : packoffset(c020.y); - float _RootShaderParameters_020z : packoffset(c020.z); - float _RootShaderParameters_020w : packoffset(c020.w); - float _RootShaderParameters_021x : packoffset(c021.x); - float _RootShaderParameters_021y : packoffset(c021.y); - float _RootShaderParameters_021z : packoffset(c021.z); - float _RootShaderParameters_021w : packoffset(c021.w); - float _RootShaderParameters_022x : packoffset(c022.x); - float _RootShaderParameters_022y : packoffset(c022.y); - float _RootShaderParameters_022z : packoffset(c022.z); - float _RootShaderParameters_022w : packoffset(c022.w); - float _RootShaderParameters_023x : packoffset(c023.x); - float _RootShaderParameters_023y : packoffset(c023.y); - float _RootShaderParameters_023z : packoffset(c023.z); - float _RootShaderParameters_023w : packoffset(c023.w); - float _RootShaderParameters_024x : packoffset(c024.x); - float _RootShaderParameters_024y : packoffset(c024.y); - float _RootShaderParameters_024z : packoffset(c024.z); - float _RootShaderParameters_024w : packoffset(c024.w); - float _RootShaderParameters_025x : packoffset(c025.x); - float _RootShaderParameters_025y : packoffset(c025.y); - float _RootShaderParameters_025z : packoffset(c025.z); - float _RootShaderParameters_025w : packoffset(c025.w); - float _RootShaderParameters_026x : packoffset(c026.x); - float _RootShaderParameters_026y : packoffset(c026.y); - float _RootShaderParameters_026z : packoffset(c026.z); - float _RootShaderParameters_026w : packoffset(c026.w); - float _RootShaderParameters_027x : packoffset(c027.x); - float _RootShaderParameters_027y : packoffset(c027.y); - float _RootShaderParameters_027z : packoffset(c027.z); - float _RootShaderParameters_027w : packoffset(c027.w); - float _RootShaderParameters_028x : packoffset(c028.x); - float _RootShaderParameters_028y : packoffset(c028.y); - float _RootShaderParameters_028z : packoffset(c028.z); - float _RootShaderParameters_028w : packoffset(c028.w); - float _RootShaderParameters_029x : packoffset(c029.x); - float _RootShaderParameters_029y : packoffset(c029.y); - float _RootShaderParameters_029z : packoffset(c029.z); - float _RootShaderParameters_029w : packoffset(c029.w); - float _RootShaderParameters_030x : packoffset(c030.x); - float _RootShaderParameters_030y : packoffset(c030.y); - float _RootShaderParameters_030z : packoffset(c030.z); - float _RootShaderParameters_030w : packoffset(c030.w); - float _RootShaderParameters_031x : packoffset(c031.x); - float _RootShaderParameters_031y : packoffset(c031.y); - float _RootShaderParameters_031z : packoffset(c031.z); - float _RootShaderParameters_031w : packoffset(c031.w); - float _RootShaderParameters_032x : packoffset(c032.x); - float _RootShaderParameters_032y : packoffset(c032.y); - float _RootShaderParameters_032z : packoffset(c032.z); - float _RootShaderParameters_032w : packoffset(c032.w); - float _RootShaderParameters_033x : packoffset(c033.x); - float _RootShaderParameters_033y : packoffset(c033.y); - float _RootShaderParameters_033z : packoffset(c033.z); - float _RootShaderParameters_033w : packoffset(c033.w); - float _RootShaderParameters_034x : packoffset(c034.x); - float _RootShaderParameters_034y : packoffset(c034.y); - float _RootShaderParameters_034z : packoffset(c034.z); - float _RootShaderParameters_034w : packoffset(c034.w); - float _RootShaderParameters_035z : packoffset(c035.z); - float _RootShaderParameters_035w : packoffset(c035.w); - float _RootShaderParameters_036x : packoffset(c036.x); - float _RootShaderParameters_036y : packoffset(c036.y); - float _RootShaderParameters_036z : packoffset(c036.z); - float _RootShaderParameters_036w : packoffset(c036.w); - float _RootShaderParameters_037x : packoffset(c037.x); - float _RootShaderParameters_037y : packoffset(c037.y); - float _RootShaderParameters_037z : packoffset(c037.z); - float _RootShaderParameters_037w : packoffset(c037.w); - float _RootShaderParameters_038x : packoffset(c038.x); - float _RootShaderParameters_039x : packoffset(c039.x); - float _RootShaderParameters_039y : packoffset(c039.y); - float _RootShaderParameters_039z : packoffset(c039.z); - float _RootShaderParameters_040y : packoffset(c040.y); - float _RootShaderParameters_040z : packoffset(c040.z); - uint _RootShaderParameters_040w : packoffset(c040.w); - uint _RootShaderParameters_041x : packoffset(c041.x); -}; - -cbuffer UniformBufferConstants_WorkingColorSpace : register(b1) { - float UniformBufferConstants_WorkingColorSpace_008x : packoffset(c008.x); - float UniformBufferConstants_WorkingColorSpace_008y : packoffset(c008.y); - float UniformBufferConstants_WorkingColorSpace_008z : packoffset(c008.z); - float UniformBufferConstants_WorkingColorSpace_009x : packoffset(c009.x); - float UniformBufferConstants_WorkingColorSpace_009y : packoffset(c009.y); - float UniformBufferConstants_WorkingColorSpace_009z : packoffset(c009.z); - float UniformBufferConstants_WorkingColorSpace_010x : packoffset(c010.x); - float UniformBufferConstants_WorkingColorSpace_010y : packoffset(c010.y); - float UniformBufferConstants_WorkingColorSpace_010z : packoffset(c010.z); - float UniformBufferConstants_WorkingColorSpace_012x : packoffset(c012.x); - float UniformBufferConstants_WorkingColorSpace_012y : packoffset(c012.y); - float UniformBufferConstants_WorkingColorSpace_012z : packoffset(c012.z); - float UniformBufferConstants_WorkingColorSpace_013x : packoffset(c013.x); - float UniformBufferConstants_WorkingColorSpace_013y : packoffset(c013.y); - float UniformBufferConstants_WorkingColorSpace_013z : packoffset(c013.z); - float UniformBufferConstants_WorkingColorSpace_014x : packoffset(c014.x); - float UniformBufferConstants_WorkingColorSpace_014y : packoffset(c014.y); - float UniformBufferConstants_WorkingColorSpace_014z : packoffset(c014.z); - float UniformBufferConstants_WorkingColorSpace_016x : packoffset(c016.x); - float UniformBufferConstants_WorkingColorSpace_016y : packoffset(c016.y); - float UniformBufferConstants_WorkingColorSpace_016z : packoffset(c016.z); - float UniformBufferConstants_WorkingColorSpace_017x : packoffset(c017.x); - float UniformBufferConstants_WorkingColorSpace_017y : packoffset(c017.y); - float UniformBufferConstants_WorkingColorSpace_017z : packoffset(c017.z); - float UniformBufferConstants_WorkingColorSpace_018x : packoffset(c018.x); - float UniformBufferConstants_WorkingColorSpace_018y : packoffset(c018.y); - float UniformBufferConstants_WorkingColorSpace_018z : packoffset(c018.z); - uint UniformBufferConstants_WorkingColorSpace_020x : packoffset(c020.x); -}; - -float4 main( - noperspective float2 TEXCOORD: TEXCOORD, - noperspective float4 SV_Position: SV_Position, - nointerpolation uint SV_RenderTargetArrayIndex: SV_RenderTargetArrayIndex) - : SV_Target { - float4 SV_Target; - // cbuffer _1 = UniformBufferConstants_WorkingColorSpace; - // cbuffer _2 = _RootShaderParameters; - // _3 = _1; - // _4 = _2; - uint _5 = SV_RenderTargetArrayIndex; - float _6 = TEXCOORD.x; - float _7 = TEXCOORD.y; - float _8[6]; - float _9[6]; - float _10[6]; - float _11[6]; - float _12 = _6 + -0.015625f; - float _13 = _7 + -0.015625f; - float _14 = _12 * 1.0322580337524414f; - float _15 = _13 * 1.0322580337524414f; - float _16 = float(_5); - float _17 = _16 * 0.032258063554763794f; - uint _19 = _RootShaderParameters_041x; - bool _20 = (_19 == 1); - float _37 = 1.379158854484558f; - float _38 = -0.3088507056236267f; - float _39 = -0.07034677267074585f; - float _40 = -0.06933528929948807f; - float _41 = 1.0822921991348267f; - float _42 = -0.012962047010660172f; - float _43 = -0.002159259282052517f; - float _44 = -0.045465391129255295f; - float _45 = 1.0477596521377563f; - float _103; - float _104; - float _105; - float _629; - float _665; - float _676; - float _740; - float _1008; - float _1009; - float _1010; - float _1021; - float _1032; - float _1214; - float _1250; - float _1261; - float _1300; - float _1410; - float _1484; - float _1558; - float _1637; - float _1638; - float _1639; - float _1790; - float _1826; - float _1837; - float _1876; - float _1986; - float _2060; - float _2134; - float _2213; - float _2214; - float _2215; - float _2392; - float _2393; - float _2394; - if (!_20) { - bool _22 = (_19 == 2); - _37 = 1.02579927444458f; - _38 = -0.020052503794431686f; - _39 = -0.0057713985443115234f; - _40 = -0.0022350111976265907f; - _41 = 1.0045825242996216f; - _42 = -0.002352306619286537f; - _43 = -0.005014004185795784f; - _44 = -0.025293385609984398f; - _45 = 1.0304402112960815f; - if (!_22) { - bool _24 = (_19 == 3); - _37 = 0.6954522132873535f; - _38 = 0.14067870378494263f; - _39 = 0.16386906802654266f; - _40 = 0.044794563204050064f; - _41 = 0.8596711158752441f; - _42 = 0.0955343171954155f; - _43 = -0.005525882821530104f; - _44 = 0.004025210160762072f; - _45 = 1.0015007257461548f; - if (!_24) { - bool _26 = (_19 == 4); - float _27 = _26 ? 1.0f : 1.7050515413284302f; - float _28 = _26 ? 0.0f : -0.6217905879020691f; - float _29 = _26 ? 0.0f : -0.0832584798336029f; - float _30 = _26 ? 0.0f : -0.13025718927383423f; - float _31 = _26 ? 1.0f : 1.1408027410507202f; - float _32 = _26 ? 0.0f : -0.010548528283834457f; - float _33 = _26 ? 0.0f : -0.024003278464078903f; - float _34 = _26 ? 0.0f : -0.1289687603712082f; - float _35 = _26 ? 1.0f : 1.152971863746643f; - _37 = _27; - _38 = _28; - _39 = _29; - _40 = _30; - _41 = _31; - _42 = _32; - _43 = _33; - _44 = _34; - _45 = _35; - } - } - } - uint _47 = _RootShaderParameters_040w; - bool _48 = (_47 > 2); - if (_48) { - float _50 = log2(_14); - float _51 = log2(_15); - float _52 = log2(_17); - float _53 = _50 * 0.012683313339948654f; - float _54 = _51 * 0.012683313339948654f; - float _55 = _52 * 0.012683313339948654f; - float _56 = exp2(_53); - float _57 = exp2(_54); - float _58 = exp2(_55); - float _59 = _56 + -0.8359375f; - float _60 = _57 + -0.8359375f; - float _61 = _58 + -0.8359375f; - float _62 = max(0.0f, _59); - float _63 = max(0.0f, _60); - float _64 = max(0.0f, _61); - float _65 = _56 * 18.6875f; - float _66 = _57 * 18.6875f; - float _67 = _58 * 18.6875f; - float _68 = 18.8515625f - _65; - float _69 = 18.8515625f - _66; - float _70 = 18.8515625f - _67; - float _71 = _62 / _68; - float _72 = _63 / _69; - float _73 = _64 / _70; - float _74 = log2(_71); - float _75 = log2(_72); - float _76 = log2(_73); - float _77 = _74 * 6.277394771575928f; - float _78 = _75 * 6.277394771575928f; - float _79 = _76 * 6.277394771575928f; - float _80 = exp2(_77); - float _81 = exp2(_78); - float _82 = exp2(_79); - float _83 = _80 * 100.0f; - float _84 = _81 * 100.0f; - float _85 = _82 * 100.0f; - _103 = _83; - _104 = _84; - _105 = _85; - } else { - float _87 = _12 * 14.45161247253418f; - float _88 = _87 + -6.07624626159668f; - float _89 = _13 * 14.45161247253418f; - float _90 = _89 + -6.07624626159668f; - float _91 = _16 * 0.4516128897666931f; - float _92 = _91 + -6.07624626159668f; - float _93 = exp2(_88); - float _94 = exp2(_90); - float _95 = exp2(_92); - float _96 = _93 * 0.18000000715255737f; - float _97 = _94 * 0.18000000715255737f; - float _98 = _95 * 0.18000000715255737f; - float _99 = _96 + -0.002667719265446067f; - float _100 = _97 + -0.002667719265446067f; - float _101 = _98 + -0.002667719265446067f; - _103 = _99; - _104 = _100; - _105 = _101; - } - - float _107 = UniformBufferConstants_WorkingColorSpace_008x; - float _108 = UniformBufferConstants_WorkingColorSpace_008y; - float _109 = UniformBufferConstants_WorkingColorSpace_008z; - float _111 = UniformBufferConstants_WorkingColorSpace_009x; - float _112 = UniformBufferConstants_WorkingColorSpace_009y; - float _113 = UniformBufferConstants_WorkingColorSpace_009z; - float _115 = UniformBufferConstants_WorkingColorSpace_010x; - float _116 = UniformBufferConstants_WorkingColorSpace_010y; - float _117 = UniformBufferConstants_WorkingColorSpace_010z; - float _118 = _107 * _103; - float _119 = mad(_108, _104, _118); - float _120 = mad(_109, _105, _119); - float _121 = _111 * _103; - float _122 = mad(_112, _104, _121); - float _123 = mad(_113, _105, _122); - float _124 = _115 * _103; - float _125 = mad(_116, _104, _124); - float _126 = mad(_117, _105, _125); - float _127 = dot(float3(_120, _123, _126), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _128 = _120 / _127; - float _129 = _123 / _127; - float _130 = _126 / _127; - float _131 = _128 + -1.0f; - float _132 = _129 + -1.0f; - float _133 = _130 + -1.0f; - float _134 = dot(float3(_131, _132, _133), float3(_131, _132, _133)); - float _135 = _134 * -4.0f; - float _136 = exp2(_135); - float _137 = 1.0f - _136; - float _139 = _RootShaderParameters_036z; - float _140 = _127 * _127; - float _141 = _140 * -4.0f; - float _142 = _141 * _139; - float _143 = exp2(_142); - float _144 = 1.0f - _143; - float _145 = _144 * _137; - float _146 = _120 * 1.370412826538086f; - float _147 = mad(-0.32929131388664246f, _123, _146); - float _148 = mad(-0.06368283927440643f, _126, _147); - float _149 = _120 * -0.08343426138162613f; - float _150 = mad(1.0970908403396606f, _123, _149); - float _151 = mad(-0.010861567221581936f, _126, _150); - float _152 = _120 * -0.02579325996339321f; - float _153 = mad(-0.09862564504146576f, _123, _152); - float _154 = mad(1.203694462776184f, _126, _153); - float _155 = _148 - _120; - float _156 = _151 - _123; - float _157 = _154 - _126; - float _158 = _155 * _145; - float _159 = _156 * _145; - float _160 = _157 * _145; - float _161 = _158 + _120; - float _162 = _159 + _123; - float _163 = _160 + _126; - float _164 = dot(float3(_161, _162, _163), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _166 = _RootShaderParameters_024x; - float _167 = _RootShaderParameters_024y; - float _168 = _RootShaderParameters_024z; - float _169 = _RootShaderParameters_024w; - float _171 = _RootShaderParameters_019x; - float _172 = _RootShaderParameters_019y; - float _173 = _RootShaderParameters_019z; - float _174 = _RootShaderParameters_019w; - float _175 = _171 + _166; - float _176 = _172 + _167; - float _177 = _173 + _168; - float _178 = _174 + _169; - float _180 = _RootShaderParameters_023x; - float _181 = _RootShaderParameters_023y; - float _182 = _RootShaderParameters_023z; - float _183 = _RootShaderParameters_023w; - float _185 = _RootShaderParameters_018x; - float _186 = _RootShaderParameters_018y; - float _187 = _RootShaderParameters_018z; - float _188 = _RootShaderParameters_018w; - float _189 = _185 * _180; - float _190 = _186 * _181; - float _191 = _187 * _182; - float _192 = _188 * _183; - float _194 = _RootShaderParameters_022x; - float _195 = _RootShaderParameters_022y; - float _196 = _RootShaderParameters_022z; - float _197 = _RootShaderParameters_022w; - float _199 = _RootShaderParameters_017x; - float _200 = _RootShaderParameters_017y; - float _201 = _RootShaderParameters_017z; - float _202 = _RootShaderParameters_017w; - float _203 = _199 * _194; - float _204 = _200 * _195; - float _205 = _201 * _196; - float _206 = _202 * _197; - float _208 = _RootShaderParameters_021x; - float _209 = _RootShaderParameters_021y; - float _210 = _RootShaderParameters_021z; - float _211 = _RootShaderParameters_021w; - float _213 = _RootShaderParameters_016x; - float _214 = _RootShaderParameters_016y; - float _215 = _RootShaderParameters_016z; - float _216 = _RootShaderParameters_016w; - float _217 = _213 * _208; - float _218 = _214 * _209; - float _219 = _215 * _210; - float _220 = _216 * _211; - float _222 = _RootShaderParameters_020x; - float _223 = _RootShaderParameters_020y; - float _224 = _RootShaderParameters_020z; - float _225 = _RootShaderParameters_020w; - float _227 = _RootShaderParameters_015x; - float _228 = _RootShaderParameters_015y; - float _229 = _RootShaderParameters_015z; - float _230 = _RootShaderParameters_015w; - float _231 = _227 * _222; - float _232 = _228 * _223; - float _233 = _229 * _224; - float _234 = _230 * _225; - float _235 = _231 * _234; - float _236 = _232 * _234; - float _237 = _233 * _234; - float _238 = _161 - _164; - float _239 = _162 - _164; - float _240 = _163 - _164; - float _241 = _235 * _238; - float _242 = _236 * _239; - float _243 = _237 * _240; - float _244 = _241 + _164; - float _245 = _242 + _164; - float _246 = _243 + _164; - float _247 = max(0.0f, _244); - float _248 = max(0.0f, _245); - float _249 = max(0.0f, _246); - float _250 = _217 * _220; - float _251 = _218 * _220; - float _252 = _219 * _220; - float _253 = _247 * 5.55555534362793f; - float _254 = _248 * 5.55555534362793f; - float _255 = _249 * 5.55555534362793f; - float _256 = log2(_253); - float _257 = log2(_254); - float _258 = log2(_255); - float _259 = _250 * _256; - float _260 = _251 * _257; - float _261 = _252 * _258; - float _262 = exp2(_259); - float _263 = exp2(_260); - float _264 = exp2(_261); - float _265 = _262 * 0.18000000715255737f; - float _266 = _263 * 0.18000000715255737f; - float _267 = _264 * 0.18000000715255737f; - float _268 = _203 * _206; - float _269 = _204 * _206; - float _270 = _205 * _206; - float _271 = 1.0f / _268; - float _272 = 1.0f / _269; - float _273 = 1.0f / _270; - float _274 = log2(_265); - float _275 = log2(_266); - float _276 = log2(_267); - float _277 = _274 * _271; - float _278 = _275 * _272; - float _279 = _276 * _273; - float _280 = exp2(_277); - float _281 = exp2(_278); - float _282 = exp2(_279); - float _283 = _189 * _192; - float _284 = _190 * _192; - float _285 = _191 * _192; - float _286 = _283 * _280; - float _287 = _284 * _281; - float _288 = _285 * _282; - float _289 = _175 + _178; - float _290 = _176 + _178; - float _291 = _177 + _178; - float _292 = _289 + _286; - float _293 = _290 + _287; - float _294 = _291 + _288; - float _296 = _RootShaderParameters_035z; - float _297 = _164 / _296; - float _298 = saturate(_297); - float _299 = _298 * 2.0f; - float _300 = 3.0f - _299; - float _301 = _298 * _298; - float _302 = _301 * _300; - float _303 = 1.0f - _302; - float _305 = _RootShaderParameters_034x; - float _306 = _RootShaderParameters_034y; - float _307 = _RootShaderParameters_034z; - float _308 = _RootShaderParameters_034w; - float _309 = _171 + _305; - float _310 = _172 + _306; - float _311 = _173 + _307; - float _312 = _174 + _308; - float _314 = _RootShaderParameters_033x; - float _315 = _RootShaderParameters_033y; - float _316 = _RootShaderParameters_033z; - float _317 = _RootShaderParameters_033w; - float _318 = _185 * _314; - float _319 = _186 * _315; - float _320 = _187 * _316; - float _321 = _188 * _317; - float _323 = _RootShaderParameters_032x; - float _324 = _RootShaderParameters_032y; - float _325 = _RootShaderParameters_032z; - float _326 = _RootShaderParameters_032w; - float _327 = _199 * _323; - float _328 = _200 * _324; - float _329 = _201 * _325; - float _330 = _202 * _326; - float _332 = _RootShaderParameters_031x; - float _333 = _RootShaderParameters_031y; - float _334 = _RootShaderParameters_031z; - float _335 = _RootShaderParameters_031w; - float _336 = _213 * _332; - float _337 = _214 * _333; - float _338 = _215 * _334; - float _339 = _216 * _335; - float _341 = _RootShaderParameters_030x; - float _342 = _RootShaderParameters_030y; - float _343 = _RootShaderParameters_030z; - float _344 = _RootShaderParameters_030w; - float _345 = _227 * _341; - float _346 = _228 * _342; - float _347 = _229 * _343; - float _348 = _230 * _344; - float _349 = _345 * _348; - float _350 = _346 * _348; - float _351 = _347 * _348; - float _352 = _349 * _238; - float _353 = _350 * _239; - float _354 = _351 * _240; - float _355 = _352 + _164; - float _356 = _353 + _164; - float _357 = _354 + _164; - float _358 = max(0.0f, _355); - float _359 = max(0.0f, _356); - float _360 = max(0.0f, _357); - float _361 = _336 * _339; - float _362 = _337 * _339; - float _363 = _338 * _339; - float _364 = _358 * 5.55555534362793f; - float _365 = _359 * 5.55555534362793f; - float _366 = _360 * 5.55555534362793f; - float _367 = log2(_364); - float _368 = log2(_365); - float _369 = log2(_366); - float _370 = _361 * _367; - float _371 = _362 * _368; - float _372 = _363 * _369; - float _373 = exp2(_370); - float _374 = exp2(_371); - float _375 = exp2(_372); - float _376 = _373 * 0.18000000715255737f; - float _377 = _374 * 0.18000000715255737f; - float _378 = _375 * 0.18000000715255737f; - float _379 = _327 * _330; - float _380 = _328 * _330; - float _381 = _329 * _330; - float _382 = 1.0f / _379; - float _383 = 1.0f / _380; - float _384 = 1.0f / _381; - float _385 = log2(_376); - float _386 = log2(_377); - float _387 = log2(_378); - float _388 = _385 * _382; - float _389 = _386 * _383; - float _390 = _387 * _384; - float _391 = exp2(_388); - float _392 = exp2(_389); - float _393 = exp2(_390); - float _394 = _318 * _321; - float _395 = _319 * _321; - float _396 = _320 * _321; - float _397 = _394 * _391; - float _398 = _395 * _392; - float _399 = _396 * _393; - float _400 = _309 + _312; - float _401 = _310 + _312; - float _402 = _311 + _312; - float _403 = _400 + _397; - float _404 = _401 + _398; - float _405 = _402 + _399; - float _406 = _RootShaderParameters_036x; - float _407 = _RootShaderParameters_035w; - float _408 = _406 - _407; - float _409 = _164 - _407; - float _410 = _409 / _408; - float _411 = saturate(_410); - float _412 = _411 * 2.0f; - float _413 = 3.0f - _412; - float _414 = _411 * _411; - float _415 = _414 * _413; - float _417 = _RootShaderParameters_029x; - float _418 = _RootShaderParameters_029y; - float _419 = _RootShaderParameters_029z; - float _420 = _RootShaderParameters_029w; - float _421 = _171 + _417; - float _422 = _172 + _418; - float _423 = _173 + _419; - float _424 = _174 + _420; - float _426 = _RootShaderParameters_028x; - float _427 = _RootShaderParameters_028y; - float _428 = _RootShaderParameters_028z; - float _429 = _RootShaderParameters_028w; - float _430 = _185 * _426; - float _431 = _186 * _427; - float _432 = _187 * _428; - float _433 = _188 * _429; - float _435 = _RootShaderParameters_027x; - float _436 = _RootShaderParameters_027y; - float _437 = _RootShaderParameters_027z; - float _438 = _RootShaderParameters_027w; - float _439 = _199 * _435; - float _440 = _200 * _436; - float _441 = _201 * _437; - float _442 = _202 * _438; - float _444 = _RootShaderParameters_026x; - float _445 = _RootShaderParameters_026y; - float _446 = _RootShaderParameters_026z; - float _447 = _RootShaderParameters_026w; - float _448 = _213 * _444; - float _449 = _214 * _445; - float _450 = _215 * _446; - float _451 = _216 * _447; - float _453 = _RootShaderParameters_025x; - float _454 = _RootShaderParameters_025y; - float _455 = _RootShaderParameters_025z; - float _456 = _RootShaderParameters_025w; - float _457 = _227 * _453; - float _458 = _228 * _454; - float _459 = _229 * _455; - float _460 = _230 * _456; - float _461 = _457 * _460; - float _462 = _458 * _460; - float _463 = _459 * _460; - float _464 = _461 * _238; - float _465 = _462 * _239; - float _466 = _463 * _240; - float _467 = _464 + _164; - float _468 = _465 + _164; - float _469 = _466 + _164; - float _470 = max(0.0f, _467); - float _471 = max(0.0f, _468); - float _472 = max(0.0f, _469); - float _473 = _448 * _451; - float _474 = _449 * _451; - float _475 = _450 * _451; - float _476 = _470 * 5.55555534362793f; - float _477 = _471 * 5.55555534362793f; - float _478 = _472 * 5.55555534362793f; - float _479 = log2(_476); - float _480 = log2(_477); - float _481 = log2(_478); - float _482 = _473 * _479; - float _483 = _474 * _480; - float _484 = _475 * _481; - float _485 = exp2(_482); - float _486 = exp2(_483); - float _487 = exp2(_484); - float _488 = _485 * 0.18000000715255737f; - float _489 = _486 * 0.18000000715255737f; - float _490 = _487 * 0.18000000715255737f; - float _491 = _439 * _442; - float _492 = _440 * _442; - float _493 = _441 * _442; - float _494 = 1.0f / _491; - float _495 = 1.0f / _492; - float _496 = 1.0f / _493; - float _497 = log2(_488); - float _498 = log2(_489); - float _499 = log2(_490); - float _500 = _497 * _494; - float _501 = _498 * _495; - float _502 = _499 * _496; - float _503 = exp2(_500); - float _504 = exp2(_501); - float _505 = exp2(_502); - float _506 = _430 * _433; - float _507 = _431 * _433; - float _508 = _432 * _433; - float _509 = _506 * _503; - float _510 = _507 * _504; - float _511 = _508 * _505; - float _512 = _421 + _424; - float _513 = _422 + _424; - float _514 = _423 + _424; - float _515 = _512 + _509; - float _516 = _513 + _510; - float _517 = _514 + _511; - float _518 = _302 - _415; - float _519 = _303 * _292; - float _520 = _303 * _293; - float _521 = _303 * _294; - float _522 = _515 * _518; - float _523 = _516 * _518; - float _524 = _517 * _518; - float _525 = _415 * _403; - float _526 = _415 * _404; - float _527 = _415 * _405; - float _528 = _525 + _519; - float _529 = _528 + _522; - float _530 = _526 + _520; - float _531 = _530 + _523; - float _532 = _527 + _521; - float _533 = _532 + _524; - float _535 = UniformBufferConstants_WorkingColorSpace_012x; - float _536 = UniformBufferConstants_WorkingColorSpace_012y; - float _537 = UniformBufferConstants_WorkingColorSpace_012z; - float _539 = UniformBufferConstants_WorkingColorSpace_013x; - float _540 = UniformBufferConstants_WorkingColorSpace_013y; - float _541 = UniformBufferConstants_WorkingColorSpace_013z; - float _543 = UniformBufferConstants_WorkingColorSpace_014x; - float _544 = UniformBufferConstants_WorkingColorSpace_014y; - float _545 = UniformBufferConstants_WorkingColorSpace_014z; - float _546 = _529 * _535; - float _547 = mad(_536, _531, _546); - float _548 = mad(_537, _533, _547); - float _549 = _539 * _529; - float _550 = mad(_540, _531, _549); - float _551 = mad(_541, _533, _550); - float _552 = _543 * _529; - float _553 = mad(_544, _531, _552); - float _554 = mad(_545, _533, _553); - float _555 = _RootShaderParameters_036y; - - float3 untonemapped_ap1 = float3(_529, _531, _533); // CustomEdit - - float _556 = _529 * 0.9386394023895264f; - float _557 = mad(-4.540197551250458e-09f, _531, _556); - float _558 = mad(0.061360642313957214f, _533, _557); - float _559 = _529 * 6.775371730327606e-08f; - float _560 = mad(0.8307942152023315f, _531, _559); - float _561 = mad(0.169205904006958f, _533, _560); - float _562 = _529 * -9.313225746154785e-10f; - float _563 = mad(-2.3283064365386963e-10f, _531, _562); - float _564 = _558 - _529; - float _565 = _561 - _531; - float _566 = _564 * _555; - float _567 = _565 * _555; - float _568 = _563 * _555; - float _569 = _566 + _529; - float _570 = _567 + _531; - float _571 = _568 + _533; - - float _572 = _569 * 0.6954522132873535f; - float _573 = mad(0.14067868888378143f, _570, _572); - float _574 = mad(0.16386905312538147f, _571, _573); - float _575 = _569 * 0.044794581830501556f; - float _576 = mad(0.8596711158752441f, _570, _575); - float _577 = mad(0.0955343246459961f, _571, _576); - float _578 = _569 * -0.005525882821530104f; - float _579 = mad(0.004025210160762072f, _570, _578); - float _580 = mad(1.0015007257461548f, _571, _579); - float _581 = min(_574, _577); - float _582 = min(_581, _580); - float _583 = max(_574, _577); - float _584 = max(_583, _580); - float _585 = max(_584, 1.000000013351432e-10f); - float _586 = max(_582, 1.000000013351432e-10f); - float _587 = _585 - _586; - float _588 = max(_584, 0.009999999776482582f); - float _589 = _587 / _588; - float _590 = _580 - _577; - float _591 = _590 * _580; - float _592 = _577 - _574; - float _593 = _592 * _577; - float _594 = _591 + _593; - float _595 = _574 - _580; - float _596 = _595 * _574; - float _597 = _594 + _596; - float _598 = sqrt(_597); - float _599 = _598 * 1.75f; - float _600 = _577 + _574; - float _601 = _600 + _580; - float _602 = _601 + _599; - float _603 = _602 * 0.3333333432674408f; - float _604 = _589 + -0.4000000059604645f; - float _605 = _604 * 5.0f; - float _606 = _604 * 2.5f; - float _607 = abs(_606); - float _608 = 1.0f - _607; - float _609 = max(_608, 0.0f); - bool _610 = (_605 > 0.0f); - bool _611 = (_605 < 0.0f); - int _612 = int(_610); - int _613 = int(_611); - int _614 = _612 - _613; - float _615 = float(_614); - float _616 = _609 * _609; - float _617 = 1.0f - _616; - float _618 = _615 * _617; - float _619 = _618 + 1.0f; - float _620 = _619 * 0.02500000037252903f; - bool _621 = !(_603 <= 0.0533333346247673f); - _629 = _620; - if (_621) { - bool _623 = !(_603 >= 0.1599999964237213f); - _629 = 0.0f; - if (_623) { - float _625 = 0.23999999463558197f / _602; - float _626 = _625 + -0.5f; - float _627 = _626 * _620; - _629 = _627; - } - } - float _630 = _629 + 1.0f; - float _631 = _630 * _574; - float _632 = _630 * _577; - float _633 = _630 * _580; - bool _634 = (_631 == _632); - bool _635 = (_632 == _633); - bool _636 = _634 && _635; - _665 = 0.0f; - if (!_636) { - float _638 = _631 * 2.0f; - float _639 = _638 - _632; - float _640 = _639 - _633; - float _641 = _577 - _580; - float _642 = _641 * 1.7320507764816284f; - float _643 = _642 * _630; - float _644 = _643 / _640; - float _645 = atan(_644); - float _646 = _645 + 3.1415927410125732f; - float _647 = _645 + -3.1415927410125732f; - bool _648 = (_640 < 0.0f); - bool _649 = (_640 == 0.0f); - bool _650 = (_643 >= 0.0f); - bool _651 = (_643 < 0.0f); - bool _652 = _650 && _648; - float _653 = _652 ? _646 : _645; - bool _654 = _651 && _648; - float _655 = _654 ? _647 : _653; - bool _656 = _651 && _649; - bool _657 = _650 && _649; - float _658 = _655 * 57.2957763671875f; - float _659 = _656 ? -90.0f : _658; - float _660 = _657 ? 90.0f : _659; - bool _661 = (_660 < 0.0f); - _665 = _660; - if (_661) { - float _663 = _660 + 360.0f; - _665 = _663; - } - } - float _666 = max(_665, 0.0f); - float _667 = min(_666, 360.0f); - bool _668 = (_667 < -180.0f); - if (_668) { - float _670 = _667 + 360.0f; - _676 = _670; - } else { - bool _672 = (_667 > 180.0f); - _676 = _667; - if (_672) { - float _674 = _667 + -360.0f; - _676 = _674; - } - } - float _677 = _676 * 0.014814814552664757f; - float _678 = abs(_677); - float _679 = 1.0f - _678; - float _680 = saturate(_679); - float _681 = _680 * 2.0f; - float _682 = 3.0f - _681; - float _683 = _680 * _680; - float _684 = _683 * _682; - float _685 = 0.029999999329447746f - _631; - float _686 = _589 * 0.18000000715255737f; - float _687 = _686 * _685; - float _688 = _684 * _684; - float _689 = _688 * _687; - float _690 = _689 + _631; - float _691 = _690 * 1.4514392614364624f; - float _692 = mad(-0.2365107536315918f, _632, _691); - float _693 = mad(-0.21492856740951538f, _633, _692); - float _694 = _690 * -0.07655377686023712f; - float _695 = mad(1.17622971534729f, _632, _694); - float _696 = mad(-0.09967592358589172f, _633, _695); - float _697 = _690 * 0.008316148072481155f; - float _698 = mad(-0.006032449658960104f, _632, _697); - float _699 = mad(0.9977163076400757f, _633, _698); - float _700 = max(0.0f, _693); - float _701 = max(0.0f, _696); - float _702 = max(0.0f, _699); - float _703 = dot(float3(_700, _701, _702), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _704 = _700 - _703; - float _705 = _701 - _703; - float _706 = _702 - _703; - float _707 = _704 * 0.9599999785423279f; - float _708 = _705 * 0.9599999785423279f; - float _709 = _706 * 0.9599999785423279f; - float _710 = _707 + _703; - float _711 = _708 + _703; - float _712 = _709 + _703; - - float _714 = _RootShaderParameters_037w; - float _715 = _714 + 1.0f; - float _716 = _RootShaderParameters_037y; - float _717 = _715 - _716; - float _719 = _RootShaderParameters_038x; - float _720 = _719 + 1.0f; - float _721 = _RootShaderParameters_037z; - float _722 = _720 - _721; - - bool _723 = (_716 > 0.800000011920929f); - float _724 = _RootShaderParameters_037x; - if (_723) { - float _726 = 0.8199999928474426f - _716; - float _727 = _726 / _724; - float _728 = _727 + -0.7447274923324585f; - _740 = _728; - } else { - float _730 = _714 + 0.18000000715255737f; - float _731 = _730 / _717; - float _732 = 2.0f - _731; - float _733 = _731 / _732; - float _734 = log2(_733); - float _735 = _734 * 0.3465735912322998f; - float _736 = _717 / _724; - float _737 = _735 * _736; - float _738 = -0.7447274923324585f - _737; - _740 = _738; - } - float _741 = 1.0f - _716; - float _742 = _741 / _724; - float _743 = _742 - _740; - float _744 = _721 / _724; - float _745 = _744 - _743; - float _746 = log2(_710); - float _747 = log2(_711); - float _748 = log2(_712); - float _749 = _746 * 0.3010300099849701f; - float _750 = _747 * 0.3010300099849701f; - float _751 = _748 * 0.3010300099849701f; - float _752 = _749 + _743; - float _753 = _750 + _743; - float _754 = _751 + _743; - float _755 = _724 * _752; - float _756 = _724 * _753; - float _757 = _724 * _754; - float _758 = _717 * 2.0f; - float _759 = _724 * -2.0f; - float _760 = _759 / _717; - float _761 = _749 - _740; - float _762 = _750 - _740; - float _763 = _751 - _740; - float _764 = _761 * 1.4426950216293335f; - float _765 = _764 * _760; - float _766 = _762 * 1.4426950216293335f; - float _767 = _766 * _760; - float _768 = _763 * 1.4426950216293335f; - float _769 = _768 * _760; - float _770 = exp2(_765); - float _771 = exp2(_767); - float _772 = exp2(_769); - float _773 = _770 + 1.0f; - float _774 = _771 + 1.0f; - float _775 = _772 + 1.0f; - float _776 = _758 / _773; - float _777 = _758 / _774; - float _778 = _758 / _775; - float _779 = _776 - _714; - float _780 = _777 - _714; - float _781 = _778 - _714; - float _782 = _722 * 2.0f; - float _783 = _724 * 2.0f; - float _784 = _783 / _722; - float _785 = _749 - _745; - float _786 = _750 - _745; - float _787 = _751 - _745; - float _788 = _785 * 1.4426950216293335f; - float _789 = _788 * _784; - float _790 = _786 * 1.4426950216293335f; - float _791 = _790 * _784; - float _792 = _787 * 1.4426950216293335f; - float _793 = _792 * _784; - float _794 = exp2(_789); - float _795 = exp2(_791); - float _796 = exp2(_793); - float _797 = _794 + 1.0f; - float _798 = _795 + 1.0f; - float _799 = _796 + 1.0f; - float _800 = _782 / _797; - float _801 = _782 / _798; - float _802 = _782 / _799; - float _803 = _720 - _800; - float _804 = _720 - _801; - float _805 = _720 - _802; - bool _806 = (_749 < _740); - bool _807 = (_750 < _740); - bool _808 = (_751 < _740); - float _809 = _806 ? _779 : _755; - float _810 = _807 ? _780 : _756; - float _811 = _808 ? _781 : _757; - bool _812 = (_749 > _745); - bool _813 = (_750 > _745); - bool _814 = (_751 > _745); - float _815 = _812 ? _803 : _755; - float _816 = _813 ? _804 : _756; - float _817 = _814 ? _805 : _757; - float _818 = _745 - _740; - float _819 = _761 / _818; - float _820 = _762 / _818; - float _821 = _763 / _818; - float _822 = saturate(_819); - float _823 = saturate(_820); - float _824 = saturate(_821); - bool _825 = (_745 < _740); - float _826 = 1.0f - _822; - float _827 = 1.0f - _823; - float _828 = 1.0f - _824; - float _829 = _825 ? _826 : _822; - float _830 = _825 ? _827 : _823; - float _831 = _825 ? _828 : _824; - float _832 = _829 * 2.0f; - float _833 = _830 * 2.0f; - float _834 = _831 * 2.0f; - float _835 = 3.0f - _832; - float _836 = 3.0f - _833; - float _837 = 3.0f - _834; - float _838 = _815 - _809; - float _839 = _816 - _810; - float _840 = _817 - _811; - float _841 = _829 * _829; - float _842 = _841 * _838; - float _843 = _842 * _835; - float _844 = _830 * _830; - float _845 = _844 * _839; - float _846 = _845 * _836; - float _847 = _831 * _831; - float _848 = _847 * _840; - float _849 = _848 * _837; - float _850 = _843 + _809; - float _851 = _846 + _810; - float _852 = _849 + _811; - float _853 = dot(float3(_850, _851, _852), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _854 = _850 - _853; - float _855 = _851 - _853; - float _856 = _852 - _853; - float _857 = _854 * 0.9300000071525574f; - float _858 = _855 * 0.9300000071525574f; - float _859 = _856 * 0.9300000071525574f; - float _860 = _857 + _853; - float _861 = _858 + _853; - float _862 = _859 + _853; - float _863 = max(0.0f, _860); - float _864 = max(0.0f, _861); - float _865 = max(0.0f, _862); - - float _866 = _RootShaderParameters_036w; - float _867 = _863 - _569; - float _868 = _864 - _570; - float _869 = _865 - _571; - - float _870 = _866 * _867; - float _871 = _866 * _868; - float _872 = _866 * _869; - float _873 = _870 + _569; - float _874 = _871 + _570; - float _875 = _872 + _571; - float _876 = _873 * 1.065374732017517f; - float _877 = mad(1.451815478503704e-06f, _874, _876); - float _878 = mad(-0.06537103652954102f, _875, _877); - float _879 = _873 * -2.57161445915699e-07f; - float _880 = mad(1.2036634683609009f, _874, _879); - float _881 = mad(-0.20366770029067993f, _875, _880); - float _882 = _873 * 1.862645149230957e-08f; - float _883 = mad(2.0954757928848267e-08f, _874, _882); - float _884 = mad(0.9999996423721313f, _875, _883); - float _885 = _878 - _873; - float _886 = _881 - _874; - float _887 = _884 - _875; - float _888 = _885 * _555; - float _889 = _886 * _555; - float _890 = _887 * _555; - float _891 = _888 + _873; - float _892 = _889 + _874; - float _893 = _890 + _875; - float _894 = _535 * _891; - float _895 = mad(_536, _892, _894); - float _896 = mad(_537, _893, _895); - float _897 = _539 * _891; - float _898 = mad(_540, _892, _897); - float _899 = mad(_541, _893, _898); - float _900 = _543 * _891; - float _901 = mad(_544, _892, _900); - float _902 = mad(_545, _893, _901); - float _903 = max(0.0f, _896); - float _904 = max(0.0f, _899); - float _905 = max(0.0f, _902); - float _907 = _RootShaderParameters_039x; - float _908 = _907 * _903; - float _909 = _907 * _904; - float _910 = _907 * _905; - float _911 = _RootShaderParameters_039y; - float _912 = _RootShaderParameters_039z; - float _913 = _911 + _908; - float _914 = _913 * _903; - float _915 = _914 + _912; - float _916 = _911 + _909; - float _917 = _916 * _904; - float _918 = _917 + _912; - float _919 = _911 + _910; - float _920 = _919 * _905; - float _921 = _920 + _912; - float _923 = _RootShaderParameters_013w; - float _924 = _RootShaderParameters_013x; - float _925 = _RootShaderParameters_013y; - float _926 = _RootShaderParameters_013z; - float _928 = _RootShaderParameters_014x; - float _929 = _RootShaderParameters_014y; - float _930 = _RootShaderParameters_014z; - float _931 = _928 * _915; - float _932 = _929 * _918; - float _933 = _930 * _921; - float _934 = _924 - _931; - float _935 = _925 - _932; - float _936 = _926 - _933; - float _937 = _934 * _923; - float _938 = _935 * _923; - float _939 = _936 * _923; - float _940 = _937 + _931; - float _941 = _938 + _932; - float _942 = _939 + _933; - float _943 = _928 * _548; - float _944 = _929 * _551; - float _945 = _930 * _554; - float _946 = _924 - _943; - float _947 = _925 - _944; - float _948 = _926 - _945; - float _949 = _946 * _923; - float _950 = _947 * _923; - float _951 = _948 * _923; - float _952 = _949 + _943; - float _953 = _950 + _944; - float _954 = _951 + _945; - float _956 = _RootShaderParameters_040y; - float _957 = max(0.0f, _940); - float _958 = max(0.0f, _941); - float _959 = max(0.0f, _942); - float _960 = log2(_957); - float _961 = log2(_958); - float _962 = log2(_959); - float _963 = _960 * _956; - float _964 = _961 * _956; - float _965 = _962 * _956; - float _966 = exp2(_963); - float _967 = exp2(_964); - float _968 = exp2(_965); - - // CustomEdit - if (injectedData.toneMapType != 0) { - return LutBuilderToneMap(untonemapped_ap1, float3(_966, _967, _968)); - } - - uint _970 = _RootShaderParameters_040w; - bool _971 = (_970 == 0); - if (_971) { - uint _974 = UniformBufferConstants_WorkingColorSpace_020x; - bool _975 = (_974 == 0); - _1008 = _966; - _1009 = _967; - _1010 = _968; - do { - if (_975) { - float _978 = UniformBufferConstants_WorkingColorSpace_008x; - float _979 = UniformBufferConstants_WorkingColorSpace_008y; - float _980 = UniformBufferConstants_WorkingColorSpace_008z; - float _982 = UniformBufferConstants_WorkingColorSpace_009x; - float _983 = UniformBufferConstants_WorkingColorSpace_009y; - float _984 = UniformBufferConstants_WorkingColorSpace_009z; - float _986 = UniformBufferConstants_WorkingColorSpace_010x; - float _987 = UniformBufferConstants_WorkingColorSpace_010y; - float _988 = UniformBufferConstants_WorkingColorSpace_010z; - float _989 = _978 * _966; - float _990 = mad(_979, _967, _989); - float _991 = mad(_980, _968, _990); - float _992 = _982 * _966; - float _993 = mad(_983, _967, _992); - float _994 = mad(_984, _968, _993); - float _995 = _986 * _966; - float _996 = mad(_987, _967, _995); - float _997 = mad(_988, _968, _996); - float _998 = _991 * _37; - float _999 = mad(_38, _994, _998); - float _1000 = mad(_39, _997, _999); - float _1001 = _991 * _40; - float _1002 = mad(_41, _994, _1001); - float _1003 = mad(_42, _997, _1002); - float _1004 = _991 * _43; - float _1005 = mad(_44, _994, _1004); - float _1006 = mad(_45, _997, _1005); - _1008 = _1000; - _1009 = _1003; - _1010 = _1006; - } - bool _1011 = (_1008 < 0.0031306699384003878f); - do { - if (_1011) { - float _1013 = _1008 * 12.920000076293945f; - _1021 = _1013; - } else { - float _1015 = log2(_1008); - float _1016 = _1015 * 0.4166666567325592f; - float _1017 = exp2(_1016); - float _1018 = _1017 * 1.0549999475479126f; - float _1019 = _1018 + -0.054999999701976776f; - _1021 = _1019; - } - bool _1022 = (_1009 < 0.0031306699384003878f); - do { - if (_1022) { - float _1024 = _1009 * 12.920000076293945f; - _1032 = _1024; - } else { - float _1026 = log2(_1009); - float _1027 = _1026 * 0.4166666567325592f; - float _1028 = exp2(_1027); - float _1029 = _1028 * 1.0549999475479126f; - float _1030 = _1029 + -0.054999999701976776f; - _1032 = _1030; - } - bool _1033 = (_1010 < 0.0031306699384003878f); - if (_1033) { - float _1035 = _1010 * 12.920000076293945f; - _2392 = _1021; - _2393 = _1032; - _2394 = _1035; - } else { - float _1037 = log2(_1010); - float _1038 = _1037 * 0.4166666567325592f; - float _1039 = exp2(_1038); - float _1040 = _1039 * 1.0549999475479126f; - float _1041 = _1040 + -0.054999999701976776f; - _2392 = _1021; - _2393 = _1032; - _2394 = _1041; - } - } while (false); - } while (false); - } while (false); - } else { - bool _1043 = (_970 == 1); - if (_1043) { - float _1046 = UniformBufferConstants_WorkingColorSpace_008x; - float _1047 = UniformBufferConstants_WorkingColorSpace_008y; - float _1048 = UniformBufferConstants_WorkingColorSpace_008z; - float _1050 = UniformBufferConstants_WorkingColorSpace_009x; - float _1051 = UniformBufferConstants_WorkingColorSpace_009y; - float _1052 = UniformBufferConstants_WorkingColorSpace_009z; - float _1054 = UniformBufferConstants_WorkingColorSpace_010x; - float _1055 = UniformBufferConstants_WorkingColorSpace_010y; - float _1056 = UniformBufferConstants_WorkingColorSpace_010z; - float _1057 = _1046 * _966; - float _1058 = mad(_1047, _967, _1057); - float _1059 = mad(_1048, _968, _1058); - float _1060 = _1050 * _966; - float _1061 = mad(_1051, _967, _1060); - float _1062 = mad(_1052, _968, _1061); - float _1063 = _1054 * _966; - float _1064 = mad(_1055, _967, _1063); - float _1065 = mad(_1056, _968, _1064); - float _1066 = _1059 * _37; - float _1067 = mad(_38, _1062, _1066); - float _1068 = mad(_39, _1065, _1067); - float _1069 = _1059 * _40; - float _1070 = mad(_41, _1062, _1069); - float _1071 = mad(_42, _1065, _1070); - float _1072 = _1059 * _43; - float _1073 = mad(_44, _1062, _1072); - float _1074 = mad(_45, _1065, _1073); - float _1075 = max(6.103519990574569e-05f, _1068); - float _1076 = max(6.103519990574569e-05f, _1071); - float _1077 = max(6.103519990574569e-05f, _1074); - float _1078 = max(_1075, 0.017999999225139618f); - float _1079 = max(_1076, 0.017999999225139618f); - float _1080 = max(_1077, 0.017999999225139618f); - float _1081 = log2(_1078); - float _1082 = log2(_1079); - float _1083 = log2(_1080); - float _1084 = _1081 * 0.44999998807907104f; - float _1085 = _1082 * 0.44999998807907104f; - float _1086 = _1083 * 0.44999998807907104f; - float _1087 = exp2(_1084); - float _1088 = exp2(_1085); - float _1089 = exp2(_1086); - float _1090 = _1087 * 1.0989999771118164f; - float _1091 = _1088 * 1.0989999771118164f; - float _1092 = _1089 * 1.0989999771118164f; - float _1093 = _1090 + -0.0989999994635582f; - float _1094 = _1091 + -0.0989999994635582f; - float _1095 = _1092 + -0.0989999994635582f; - float _1096 = _1075 * 4.5f; - float _1097 = _1076 * 4.5f; - float _1098 = _1077 * 4.5f; - float _1099 = min(_1096, _1093); - float _1100 = min(_1097, _1094); - float _1101 = min(_1098, _1095); - _2392 = _1099; - _2393 = _1100; - _2394 = _1101; - } else { - bool _1103 = (_970 == 3); - bool _1104 = (_970 == 5); - bool _1105 = _1103 || _1104; - if (_1105) { - // %1107 = bitcast [6 x float]* %10 to i8* - // %1108 = bitcast [6 x float]* %11 to i8* - float _1110 = _RootShaderParameters_012z; - float _1111 = _RootShaderParameters_012y; - float _1112 = _RootShaderParameters_012x; - float _1114 = _RootShaderParameters_011x; - float _1115 = _RootShaderParameters_011y; - float _1116 = _RootShaderParameters_011z; - float _1117 = _RootShaderParameters_011w; - float _1119 = _RootShaderParameters_010x; - float _1120 = _RootShaderParameters_010y; - float _1121 = _RootShaderParameters_010z; - float _1122 = _RootShaderParameters_010w; - float _1124 = _RootShaderParameters_009x; - float _1126 = _RootShaderParameters_008x; - float _1127 = _RootShaderParameters_008y; - float _1128 = _RootShaderParameters_008z; - float _1129 = _RootShaderParameters_008w; - _10[0] = _1119; - _10[1] = _1120; - _10[2] = _1121; - _10[3] = _1122; - _10[4] = _1112; - _10[5] = _1112; - _11[0] = _1114; - _11[1] = _1115; - _11[2] = _1116; - _11[3] = _1117; - _11[4] = _1111; - _11[5] = _1111; - float _1143 = UniformBufferConstants_WorkingColorSpace_016x; - float _1144 = UniformBufferConstants_WorkingColorSpace_016y; - float _1145 = UniformBufferConstants_WorkingColorSpace_016z; - float _1147 = UniformBufferConstants_WorkingColorSpace_017x; - float _1148 = UniformBufferConstants_WorkingColorSpace_017y; - float _1149 = UniformBufferConstants_WorkingColorSpace_017z; - float _1151 = UniformBufferConstants_WorkingColorSpace_018x; - float _1152 = UniformBufferConstants_WorkingColorSpace_018y; - float _1153 = UniformBufferConstants_WorkingColorSpace_018z; - float _1154 = _1110 * _952; - float _1155 = _1110 * _953; - float _1156 = _1110 * _954; - float _1157 = _1143 * _1154; - float _1158 = mad(_1144, _1155, _1157); - float _1159 = mad(_1145, _1156, _1158); - float _1160 = _1147 * _1154; - float _1161 = mad(_1148, _1155, _1160); - float _1162 = mad(_1149, _1156, _1161); - float _1163 = _1151 * _1154; - float _1164 = mad(_1152, _1155, _1163); - float _1165 = mad(_1153, _1156, _1164); - float _1166 = min(_1159, _1162); - float _1167 = min(_1166, _1165); - float _1168 = max(_1159, _1162); - float _1169 = max(_1168, _1165); - float _1170 = max(_1169, 1.000000013351432e-10f); - float _1171 = max(_1167, 1.000000013351432e-10f); - float _1172 = _1170 - _1171; - float _1173 = max(_1169, 0.009999999776482582f); - float _1174 = _1172 / _1173; - float _1175 = _1165 - _1162; - float _1176 = _1175 * _1165; - float _1177 = _1162 - _1159; - float _1178 = _1177 * _1162; - float _1179 = _1176 + _1178; - float _1180 = _1159 - _1165; - float _1181 = _1180 * _1159; - float _1182 = _1179 + _1181; - float _1183 = sqrt(_1182); - float _1184 = _1183 * 1.75f; - float _1185 = _1162 + _1159; - float _1186 = _1185 + _1165; - float _1187 = _1186 + _1184; - float _1188 = _1187 * 0.3333333432674408f; - float _1189 = _1174 + -0.4000000059604645f; - float _1190 = _1189 * 5.0f; - float _1191 = _1189 * 2.5f; - float _1192 = abs(_1191); - float _1193 = 1.0f - _1192; - float _1194 = max(_1193, 0.0f); - bool _1195 = (_1190 > 0.0f); - bool _1196 = (_1190 < 0.0f); - int _1197 = int(_1195); - int _1198 = int(_1196); - int _1199 = _1197 - _1198; - float _1200 = float(_1199); - float _1201 = _1194 * _1194; - float _1202 = 1.0f - _1201; - float _1203 = _1200 * _1202; - float _1204 = _1203 + 1.0f; - float _1205 = _1204 * 0.02500000037252903f; - bool _1206 = !(_1188 <= 0.0533333346247673f); - _1214 = _1205; - do { - if (_1206) { - bool _1208 = !(_1188 >= 0.1599999964237213f); - _1214 = 0.0f; - if (_1208) { - float _1210 = 0.23999999463558197f / _1187; - float _1211 = _1210 + -0.5f; - float _1212 = _1211 * _1205; - _1214 = _1212; - } - } - float _1215 = _1214 + 1.0f; - float _1216 = _1215 * _1159; - float _1217 = _1215 * _1162; - float _1218 = _1215 * _1165; - bool _1219 = (_1216 == _1217); - bool _1220 = (_1217 == _1218); - bool _1221 = _1219 && _1220; - _1250 = 0.0f; - do { - if (!_1221) { - float _1223 = _1216 * 2.0f; - float _1224 = _1223 - _1217; - float _1225 = _1224 - _1218; - float _1226 = _1162 - _1165; - float _1227 = _1226 * 1.7320507764816284f; - float _1228 = _1227 * _1215; - float _1229 = _1228 / _1225; - float _1230 = atan(_1229); - float _1231 = _1230 + 3.1415927410125732f; - float _1232 = _1230 + -3.1415927410125732f; - bool _1233 = (_1225 < 0.0f); - bool _1234 = (_1225 == 0.0f); - bool _1235 = (_1228 >= 0.0f); - bool _1236 = (_1228 < 0.0f); - bool _1237 = _1235 && _1233; - float _1238 = _1237 ? _1231 : _1230; - bool _1239 = _1236 && _1233; - float _1240 = _1239 ? _1232 : _1238; - bool _1241 = _1236 && _1234; - bool _1242 = _1235 && _1234; - float _1243 = _1240 * 57.2957763671875f; - float _1244 = _1241 ? -90.0f : _1243; - float _1245 = _1242 ? 90.0f : _1244; - bool _1246 = (_1245 < 0.0f); - _1250 = _1245; - if (_1246) { - float _1248 = _1245 + 360.0f; - _1250 = _1248; - } - } - float _1251 = max(_1250, 0.0f); - float _1252 = min(_1251, 360.0f); - bool _1253 = (_1252 < -180.0f); - do { - if (_1253) { - float _1255 = _1252 + 360.0f; - _1261 = _1255; - } else { - bool _1257 = (_1252 > 180.0f); - _1261 = _1252; - if (_1257) { - float _1259 = _1252 + -360.0f; - _1261 = _1259; - } - } - bool _1262 = (_1261 > -67.5f); - bool _1263 = (_1261 < 67.5f); - bool _1264 = _1262 && _1263; - _1300 = 0.0f; - do { - if (_1264) { - float _1266 = _1261 + 67.5f; - float _1267 = _1266 * 0.029629629105329514f; - int _1268 = int(_1267); - float _1269 = float(_1268); - float _1270 = _1267 - _1269; - float _1271 = _1270 * _1270; - float _1272 = _1271 * _1270; - bool _1273 = (_1268 == 3); - if (_1273) { - float _1275 = _1272 * 0.1666666716337204f; - float _1276 = _1271 * 0.5f; - float _1277 = _1270 * 0.5f; - float _1278 = 0.1666666716337204f - _1277; - float _1279 = _1278 + _1276; - float _1280 = _1279 - _1275; - _1300 = _1280; - } else { - bool _1282 = (_1268 == 2); - if (_1282) { - float _1284 = _1272 * 0.5f; - float _1285 = 0.6666666865348816f - _1271; - float _1286 = _1285 + _1284; - _1300 = _1286; - } else { - bool _1288 = (_1268 == 1); - if (_1288) { - float _1290 = _1272 * -0.5f; - float _1291 = _1271 + _1270; - float _1292 = _1291 * 0.5f; - float _1293 = _1290 + 0.1666666716337204f; - float _1294 = _1293 + _1292; - _1300 = _1294; - } else { - bool _1296 = (_1268 == 0); - float _1297 = _1272 * 0.1666666716337204f; - float _1298 = _1296 ? _1297 : 0.0f; - _1300 = _1298; - } - } - } - } - float _1301 = 0.029999999329447746f - _1216; - float _1302 = _1174 * 0.27000001072883606f; - float _1303 = _1302 * _1301; - float _1304 = _1303 * _1300; - float _1305 = _1304 + _1216; - float _1306 = max(_1305, 0.0f); - float _1307 = max(_1217, 0.0f); - float _1308 = max(_1218, 0.0f); - float _1309 = min(_1306, 65535.0f); - float _1310 = min(_1307, 65535.0f); - float _1311 = min(_1308, 65535.0f); - float _1312 = _1309 * 1.4514392614364624f; - float _1313 = mad(-0.2365107536315918f, _1310, _1312); - float _1314 = mad(-0.21492856740951538f, _1311, _1313); - float _1315 = _1309 * -0.07655377686023712f; - float _1316 = mad(1.17622971534729f, _1310, _1315); - float _1317 = mad(-0.09967592358589172f, _1311, _1316); - float _1318 = _1309 * 0.008316148072481155f; - float _1319 = mad(-0.006032449658960104f, _1310, _1318); - float _1320 = mad(0.9977163076400757f, _1311, _1319); - float _1321 = max(_1314, 0.0f); - float _1322 = max(_1317, 0.0f); - float _1323 = max(_1320, 0.0f); - float _1324 = min(_1321, 65504.0f); - float _1325 = min(_1322, 65504.0f); - float _1326 = min(_1323, 65504.0f); - float _1327 = dot(float3(_1324, _1325, _1326), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1328 = _1324 - _1327; - float _1329 = _1325 - _1327; - float _1330 = _1326 - _1327; - float _1331 = _1328 * 0.9599999785423279f; - float _1332 = _1329 * 0.9599999785423279f; - float _1333 = _1330 * 0.9599999785423279f; - float _1334 = _1331 + _1327; - float _1335 = _1332 + _1327; - float _1336 = _1333 + _1327; - float _1337 = max(_1334, 1.000000013351432e-10f); - float _1338 = log2(_1337); - float _1339 = _1338 * 0.3010300099849701f; - float _1340 = log2(_1126); - float _1341 = _1340 * 0.3010300099849701f; - bool _1342 = !(_1339 <= _1341); - do { - if (!_1342) { - float _1344 = log2(_1127); - float _1345 = _1344 * 0.3010300099849701f; - _1410 = _1345; - } else { - bool _1347 = (_1339 > _1341); - float _1348 = log2(_1124); - float _1349 = _1348 * 0.3010300099849701f; - bool _1350 = (_1339 < _1349); - bool _1351 = _1347 && _1350; - if (_1351) { - float _1353 = _1338 - _1340; - float _1354 = _1353 * 0.9030900001525879f; - float _1355 = _1348 - _1340; - float _1356 = _1355 * 0.3010300099849701f; - float _1357 = _1354 / _1356; - int _1358 = int(_1357); - float _1359 = float(_1358); - float _1360 = _1357 - _1359; - float _1362 = _10[_1358]; - int _1363 = _1358 + 1; - float _1365 = _10[_1363]; - int _1366 = _1358 + 2; - float _1368 = _10[_1366]; - float _1369 = _1360 * _1360; - float _1370 = _1362 * 0.5f; - float _1371 = mad(_1365, -1.0f, _1370); - float _1372 = mad(_1368, 0.5f, _1371); - float _1373 = _1365 - _1362; - float _1374 = mad(_1365, 0.5f, _1370); - float _1375 = dot(float3(_1369, _1360, 1.0f), float3(_1372, _1373, _1374)); - _1410 = _1375; - } else { - bool _1377 = !(_1339 >= _1349); - do { - if (!_1377) { - float _1379 = log2(_1128); - float _1380 = _1379 * 0.3010300099849701f; - bool _1381 = (_1339 < _1380); - if (_1381) { - float _1383 = _1338 - _1348; - float _1384 = _1383 * 0.9030900001525879f; - float _1385 = _1379 - _1348; - float _1386 = _1385 * 0.3010300099849701f; - float _1387 = _1384 / _1386; - int _1388 = int(_1387); - float _1389 = float(_1388); - float _1390 = _1387 - _1389; - float _1392 = _11[_1388]; - int _1393 = _1388 + 1; - float _1395 = _11[_1393]; - int _1396 = _1388 + 2; - float _1398 = _11[_1396]; - float _1399 = _1390 * _1390; - float _1400 = _1392 * 0.5f; - float _1401 = mad(_1395, -1.0f, _1400); - float _1402 = mad(_1398, 0.5f, _1401); - float _1403 = _1395 - _1392; - float _1404 = mad(_1395, 0.5f, _1400); - float _1405 = dot(float3(_1399, _1390, 1.0f), float3(_1402, _1403, _1404)); - _1410 = _1405; - break; - } - } - float _1407 = log2(_1129); - float _1408 = _1407 * 0.3010300099849701f; - _1410 = _1408; - } while (false); - } - } - float _1411 = _1410 * 3.321928024291992f; - float _1412 = exp2(_1411); - float _1413 = max(_1335, 1.000000013351432e-10f); - float _1414 = log2(_1413); - float _1415 = _1414 * 0.3010300099849701f; - bool _1416 = !(_1415 <= _1341); - do { - if (!_1416) { - float _1418 = log2(_1127); - float _1419 = _1418 * 0.3010300099849701f; - _1484 = _1419; - } else { - bool _1421 = (_1415 > _1341); - float _1422 = log2(_1124); - float _1423 = _1422 * 0.3010300099849701f; - bool _1424 = (_1415 < _1423); - bool _1425 = _1421 && _1424; - if (_1425) { - float _1427 = _1414 - _1340; - float _1428 = _1427 * 0.9030900001525879f; - float _1429 = _1422 - _1340; - float _1430 = _1429 * 0.3010300099849701f; - float _1431 = _1428 / _1430; - int _1432 = int(_1431); - float _1433 = float(_1432); - float _1434 = _1431 - _1433; - float _1436 = _10[_1432]; - int _1437 = _1432 + 1; - float _1439 = _10[_1437]; - int _1440 = _1432 + 2; - float _1442 = _10[_1440]; - float _1443 = _1434 * _1434; - float _1444 = _1436 * 0.5f; - float _1445 = mad(_1439, -1.0f, _1444); - float _1446 = mad(_1442, 0.5f, _1445); - float _1447 = _1439 - _1436; - float _1448 = mad(_1439, 0.5f, _1444); - float _1449 = dot(float3(_1443, _1434, 1.0f), float3(_1446, _1447, _1448)); - _1484 = _1449; - } else { - bool _1451 = !(_1415 >= _1423); - do { - if (!_1451) { - float _1453 = log2(_1128); - float _1454 = _1453 * 0.3010300099849701f; - bool _1455 = (_1415 < _1454); - if (_1455) { - float _1457 = _1414 - _1422; - float _1458 = _1457 * 0.9030900001525879f; - float _1459 = _1453 - _1422; - float _1460 = _1459 * 0.3010300099849701f; - float _1461 = _1458 / _1460; - int _1462 = int(_1461); - float _1463 = float(_1462); - float _1464 = _1461 - _1463; - float _1466 = _11[_1462]; - int _1467 = _1462 + 1; - float _1469 = _11[_1467]; - int _1470 = _1462 + 2; - float _1472 = _11[_1470]; - float _1473 = _1464 * _1464; - float _1474 = _1466 * 0.5f; - float _1475 = mad(_1469, -1.0f, _1474); - float _1476 = mad(_1472, 0.5f, _1475); - float _1477 = _1469 - _1466; - float _1478 = mad(_1469, 0.5f, _1474); - float _1479 = dot(float3(_1473, _1464, 1.0f), float3(_1476, _1477, _1478)); - _1484 = _1479; - break; - } - } - float _1481 = log2(_1129); - float _1482 = _1481 * 0.3010300099849701f; - _1484 = _1482; - } while (false); - } - } - float _1485 = _1484 * 3.321928024291992f; - float _1486 = exp2(_1485); - float _1487 = max(_1336, 1.000000013351432e-10f); - float _1488 = log2(_1487); - float _1489 = _1488 * 0.3010300099849701f; - bool _1490 = !(_1489 <= _1341); - do { - if (!_1490) { - float _1492 = log2(_1127); - float _1493 = _1492 * 0.3010300099849701f; - _1558 = _1493; - } else { - bool _1495 = (_1489 > _1341); - float _1496 = log2(_1124); - float _1497 = _1496 * 0.3010300099849701f; - bool _1498 = (_1489 < _1497); - bool _1499 = _1495 && _1498; - if (_1499) { - float _1501 = _1488 - _1340; - float _1502 = _1501 * 0.9030900001525879f; - float _1503 = _1496 - _1340; - float _1504 = _1503 * 0.3010300099849701f; - float _1505 = _1502 / _1504; - int _1506 = int(_1505); - float _1507 = float(_1506); - float _1508 = _1505 - _1507; - float _1510 = _10[_1506]; - int _1511 = _1506 + 1; - float _1513 = _10[_1511]; - int _1514 = _1506 + 2; - float _1516 = _10[_1514]; - float _1517 = _1508 * _1508; - float _1518 = _1510 * 0.5f; - float _1519 = mad(_1513, -1.0f, _1518); - float _1520 = mad(_1516, 0.5f, _1519); - float _1521 = _1513 - _1510; - float _1522 = mad(_1513, 0.5f, _1518); - float _1523 = dot(float3(_1517, _1508, 1.0f), float3(_1520, _1521, _1522)); - _1558 = _1523; - } else { - bool _1525 = !(_1489 >= _1497); - do { - if (!_1525) { - float _1527 = log2(_1128); - float _1528 = _1527 * 0.3010300099849701f; - bool _1529 = (_1489 < _1528); - if (_1529) { - float _1531 = _1488 - _1496; - float _1532 = _1531 * 0.9030900001525879f; - float _1533 = _1527 - _1496; - float _1534 = _1533 * 0.3010300099849701f; - float _1535 = _1532 / _1534; - int _1536 = int(_1535); - float _1537 = float(_1536); - float _1538 = _1535 - _1537; - float _1540 = _11[_1536]; - int _1541 = _1536 + 1; - float _1543 = _11[_1541]; - int _1544 = _1536 + 2; - float _1546 = _11[_1544]; - float _1547 = _1538 * _1538; - float _1548 = _1540 * 0.5f; - float _1549 = mad(_1543, -1.0f, _1548); - float _1550 = mad(_1546, 0.5f, _1549); - float _1551 = _1543 - _1540; - float _1552 = mad(_1543, 0.5f, _1548); - float _1553 = dot(float3(_1547, _1538, 1.0f), float3(_1550, _1551, _1552)); - _1558 = _1553; - break; - } - } - float _1555 = log2(_1129); - float _1556 = _1555 * 0.3010300099849701f; - _1558 = _1556; - } while (false); - } - } - float _1559 = _1558 * 3.321928024291992f; - float _1560 = exp2(_1559); - float _1561 = _1412 - _1127; - float _1562 = _1129 - _1127; - float _1563 = _1561 / _1562; - float _1564 = _1486 - _1127; - float _1565 = _1564 / _1562; - float _1566 = _1560 - _1127; - float _1567 = _1566 / _1562; - float _1568 = _1563 * 0.6624541878700256f; - float _1569 = mad(0.13400420546531677f, _1565, _1568); - float _1570 = mad(0.15618768334388733f, _1567, _1569); - float _1571 = _1563 * 0.2722287178039551f; - float _1572 = mad(0.6740817427635193f, _1565, _1571); - float _1573 = mad(0.053689517080783844f, _1567, _1572); - float _1574 = _1563 * -0.005574649665504694f; - float _1575 = mad(0.00406073359772563f, _1565, _1574); - float _1576 = mad(1.0103391408920288f, _1567, _1575); - float _1577 = _1570 * 1.6410233974456787f; - float _1578 = mad(-0.32480329275131226f, _1573, _1577); - float _1579 = mad(-0.23642469942569733f, _1576, _1578); - float _1580 = _1570 * -0.663662850856781f; - float _1581 = mad(1.6153316497802734f, _1573, _1580); - float _1582 = mad(0.016756348311901093f, _1576, _1581); - float _1583 = _1570 * 0.011721894145011902f; - float _1584 = mad(-0.008284442126750946f, _1573, _1583); - float _1585 = mad(0.9883948564529419f, _1576, _1584); - float _1586 = max(_1579, 0.0f); - float _1587 = max(_1582, 0.0f); - float _1588 = max(_1585, 0.0f); - float _1589 = min(_1586, 1.0f); - float _1590 = min(_1587, 1.0f); - float _1591 = min(_1588, 1.0f); - float _1592 = _1589 * 0.6624541878700256f; - float _1593 = mad(0.13400420546531677f, _1590, _1592); - float _1594 = mad(0.15618768334388733f, _1591, _1593); - float _1595 = _1589 * 0.2722287178039551f; - float _1596 = mad(0.6740817427635193f, _1590, _1595); - float _1597 = mad(0.053689517080783844f, _1591, _1596); - float _1598 = _1589 * -0.005574649665504694f; - float _1599 = mad(0.00406073359772563f, _1590, _1598); - float _1600 = mad(1.0103391408920288f, _1591, _1599); - float _1601 = _1594 * 1.6410233974456787f; - float _1602 = mad(-0.32480329275131226f, _1597, _1601); - float _1603 = mad(-0.23642469942569733f, _1600, _1602); - float _1604 = _1594 * -0.663662850856781f; - float _1605 = mad(1.6153316497802734f, _1597, _1604); - float _1606 = mad(0.016756348311901093f, _1600, _1605); - float _1607 = _1594 * 0.011721894145011902f; - float _1608 = mad(-0.008284442126750946f, _1597, _1607); - float _1609 = mad(0.9883948564529419f, _1600, _1608); - float _1610 = max(_1603, 0.0f); - float _1611 = max(_1606, 0.0f); - float _1612 = max(_1609, 0.0f); - float _1613 = min(_1610, 65535.0f); - float _1614 = min(_1611, 65535.0f); - float _1615 = min(_1612, 65535.0f); - float _1616 = _1613 * _1129; - float _1617 = _1614 * _1129; - float _1618 = _1615 * _1129; - float _1619 = max(_1616, 0.0f); - float _1620 = max(_1617, 0.0f); - float _1621 = max(_1618, 0.0f); - float _1622 = min(_1619, 65535.0f); - float _1623 = min(_1620, 65535.0f); - float _1624 = min(_1621, 65535.0f); - bool _1625 = (_970 == 5); - _1637 = _1622; - _1638 = _1623; - _1639 = _1624; - do { - if (!_1625) { - float _1627 = _1622 * _37; - float _1628 = mad(_38, _1623, _1627); - float _1629 = mad(_39, _1624, _1628); - float _1630 = _1622 * _40; - float _1631 = mad(_41, _1623, _1630); - float _1632 = mad(_42, _1624, _1631); - float _1633 = _1622 * _43; - float _1634 = mad(_44, _1623, _1633); - float _1635 = mad(_45, _1624, _1634); - _1637 = _1629; - _1638 = _1632; - _1639 = _1635; - } - float _1640 = _1637 * 9.999999747378752e-05f; - float _1641 = _1638 * 9.999999747378752e-05f; - float _1642 = _1639 * 9.999999747378752e-05f; - float _1643 = log2(_1640); - float _1644 = log2(_1641); - float _1645 = log2(_1642); - float _1646 = _1643 * 0.1593017578125f; - float _1647 = _1644 * 0.1593017578125f; - float _1648 = _1645 * 0.1593017578125f; - float _1649 = exp2(_1646); - float _1650 = exp2(_1647); - float _1651 = exp2(_1648); - float _1652 = _1649 * 18.8515625f; - float _1653 = _1650 * 18.8515625f; - float _1654 = _1651 * 18.8515625f; - float _1655 = _1652 + 0.8359375f; - float _1656 = _1653 + 0.8359375f; - float _1657 = _1654 + 0.8359375f; - float _1658 = _1649 * 18.6875f; - float _1659 = _1650 * 18.6875f; - float _1660 = _1651 * 18.6875f; - float _1661 = _1658 + 1.0f; - float _1662 = _1659 + 1.0f; - float _1663 = _1660 + 1.0f; - float _1664 = 1.0f / _1661; - float _1665 = 1.0f / _1662; - float _1666 = 1.0f / _1663; - float _1667 = _1664 * _1655; - float _1668 = _1665 * _1656; - float _1669 = _1666 * _1657; - float _1670 = log2(_1667); - float _1671 = log2(_1668); - float _1672 = log2(_1669); - float _1673 = _1670 * 78.84375f; - float _1674 = _1671 * 78.84375f; - float _1675 = _1672 * 78.84375f; - float _1676 = exp2(_1673); - float _1677 = exp2(_1674); - float _1678 = exp2(_1675); - _2392 = _1676; - _2393 = _1677; - _2394 = _1678; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - int _1680 = _970 & -3; - bool _1681 = (_1680 == 4); - if (_1681) { - // %1683 = bitcast [6 x float]* %8 to i8* - // %1684 = bitcast [6 x float]* %9 to i8* - float _1686 = _RootShaderParameters_012z; - float _1687 = _RootShaderParameters_012y; - float _1688 = _RootShaderParameters_012x; - float _1690 = _RootShaderParameters_011x; - float _1691 = _RootShaderParameters_011y; - float _1692 = _RootShaderParameters_011z; - float _1693 = _RootShaderParameters_011w; - float _1695 = _RootShaderParameters_010x; - float _1696 = _RootShaderParameters_010y; - float _1697 = _RootShaderParameters_010z; - float _1698 = _RootShaderParameters_010w; - float _1700 = _RootShaderParameters_009x; - float _1702 = _RootShaderParameters_008x; - float _1703 = _RootShaderParameters_008y; - float _1704 = _RootShaderParameters_008z; - float _1705 = _RootShaderParameters_008w; - _8[0] = _1695; - _8[1] = _1696; - _8[2] = _1697; - _8[3] = _1698; - _8[4] = _1688; - _8[5] = _1688; - _9[0] = _1690; - _9[1] = _1691; - _9[2] = _1692; - _9[3] = _1693; - _9[4] = _1687; - _9[5] = _1687; - float _1719 = UniformBufferConstants_WorkingColorSpace_016x; - float _1720 = UniformBufferConstants_WorkingColorSpace_016y; - float _1721 = UniformBufferConstants_WorkingColorSpace_016z; - float _1723 = UniformBufferConstants_WorkingColorSpace_017x; - float _1724 = UniformBufferConstants_WorkingColorSpace_017y; - float _1725 = UniformBufferConstants_WorkingColorSpace_017z; - float _1727 = UniformBufferConstants_WorkingColorSpace_018x; - float _1728 = UniformBufferConstants_WorkingColorSpace_018y; - float _1729 = UniformBufferConstants_WorkingColorSpace_018z; - float _1730 = _1686 * _952; - float _1731 = _1686 * _953; - float _1732 = _1686 * _954; - float _1733 = _1719 * _1730; - float _1734 = mad(_1720, _1731, _1733); - float _1735 = mad(_1721, _1732, _1734); - float _1736 = _1723 * _1730; - float _1737 = mad(_1724, _1731, _1736); - float _1738 = mad(_1725, _1732, _1737); - float _1739 = _1727 * _1730; - float _1740 = mad(_1728, _1731, _1739); - float _1741 = mad(_1729, _1732, _1740); - float _1742 = min(_1735, _1738); - float _1743 = min(_1742, _1741); - float _1744 = max(_1735, _1738); - float _1745 = max(_1744, _1741); - float _1746 = max(_1745, 1.000000013351432e-10f); - float _1747 = max(_1743, 1.000000013351432e-10f); - float _1748 = _1746 - _1747; - float _1749 = max(_1745, 0.009999999776482582f); - float _1750 = _1748 / _1749; - float _1751 = _1741 - _1738; - float _1752 = _1751 * _1741; - float _1753 = _1738 - _1735; - float _1754 = _1753 * _1738; - float _1755 = _1752 + _1754; - float _1756 = _1735 - _1741; - float _1757 = _1756 * _1735; - float _1758 = _1755 + _1757; - float _1759 = sqrt(_1758); - float _1760 = _1759 * 1.75f; - float _1761 = _1738 + _1735; - float _1762 = _1761 + _1741; - float _1763 = _1762 + _1760; - float _1764 = _1763 * 0.3333333432674408f; - float _1765 = _1750 + -0.4000000059604645f; - float _1766 = _1765 * 5.0f; - float _1767 = _1765 * 2.5f; - float _1768 = abs(_1767); - float _1769 = 1.0f - _1768; - float _1770 = max(_1769, 0.0f); - bool _1771 = (_1766 > 0.0f); - bool _1772 = (_1766 < 0.0f); - int _1773 = int(_1771); - int _1774 = int(_1772); - int _1775 = _1773 - _1774; - float _1776 = float(_1775); - float _1777 = _1770 * _1770; - float _1778 = 1.0f - _1777; - float _1779 = _1776 * _1778; - float _1780 = _1779 + 1.0f; - float _1781 = _1780 * 0.02500000037252903f; - bool _1782 = !(_1764 <= 0.0533333346247673f); - _1790 = _1781; - do { - if (_1782) { - bool _1784 = !(_1764 >= 0.1599999964237213f); - _1790 = 0.0f; - if (_1784) { - float _1786 = 0.23999999463558197f / _1763; - float _1787 = _1786 + -0.5f; - float _1788 = _1787 * _1781; - _1790 = _1788; - } - } - float _1791 = _1790 + 1.0f; - float _1792 = _1791 * _1735; - float _1793 = _1791 * _1738; - float _1794 = _1791 * _1741; - bool _1795 = (_1792 == _1793); - bool _1796 = (_1793 == _1794); - bool _1797 = _1795 && _1796; - _1826 = 0.0f; - do { - if (!_1797) { - float _1799 = _1792 * 2.0f; - float _1800 = _1799 - _1793; - float _1801 = _1800 - _1794; - float _1802 = _1738 - _1741; - float _1803 = _1802 * 1.7320507764816284f; - float _1804 = _1803 * _1791; - float _1805 = _1804 / _1801; - float _1806 = atan(_1805); - float _1807 = _1806 + 3.1415927410125732f; - float _1808 = _1806 + -3.1415927410125732f; - bool _1809 = (_1801 < 0.0f); - bool _1810 = (_1801 == 0.0f); - bool _1811 = (_1804 >= 0.0f); - bool _1812 = (_1804 < 0.0f); - bool _1813 = _1811 && _1809; - float _1814 = _1813 ? _1807 : _1806; - bool _1815 = _1812 && _1809; - float _1816 = _1815 ? _1808 : _1814; - bool _1817 = _1812 && _1810; - bool _1818 = _1811 && _1810; - float _1819 = _1816 * 57.2957763671875f; - float _1820 = _1817 ? -90.0f : _1819; - float _1821 = _1818 ? 90.0f : _1820; - bool _1822 = (_1821 < 0.0f); - _1826 = _1821; - if (_1822) { - float _1824 = _1821 + 360.0f; - _1826 = _1824; - } - } - float _1827 = max(_1826, 0.0f); - float _1828 = min(_1827, 360.0f); - bool _1829 = (_1828 < -180.0f); - do { - if (_1829) { - float _1831 = _1828 + 360.0f; - _1837 = _1831; - } else { - bool _1833 = (_1828 > 180.0f); - _1837 = _1828; - if (_1833) { - float _1835 = _1828 + -360.0f; - _1837 = _1835; - } - } - bool _1838 = (_1837 > -67.5f); - bool _1839 = (_1837 < 67.5f); - bool _1840 = _1838 && _1839; - _1876 = 0.0f; - do { - if (_1840) { - float _1842 = _1837 + 67.5f; - float _1843 = _1842 * 0.029629629105329514f; - int _1844 = int(_1843); - float _1845 = float(_1844); - float _1846 = _1843 - _1845; - float _1847 = _1846 * _1846; - float _1848 = _1847 * _1846; - bool _1849 = (_1844 == 3); - if (_1849) { - float _1851 = _1848 * 0.1666666716337204f; - float _1852 = _1847 * 0.5f; - float _1853 = _1846 * 0.5f; - float _1854 = 0.1666666716337204f - _1853; - float _1855 = _1854 + _1852; - float _1856 = _1855 - _1851; - _1876 = _1856; - } else { - bool _1858 = (_1844 == 2); - if (_1858) { - float _1860 = _1848 * 0.5f; - float _1861 = 0.6666666865348816f - _1847; - float _1862 = _1861 + _1860; - _1876 = _1862; - } else { - bool _1864 = (_1844 == 1); - if (_1864) { - float _1866 = _1848 * -0.5f; - float _1867 = _1847 + _1846; - float _1868 = _1867 * 0.5f; - float _1869 = _1866 + 0.1666666716337204f; - float _1870 = _1869 + _1868; - _1876 = _1870; - } else { - bool _1872 = (_1844 == 0); - float _1873 = _1848 * 0.1666666716337204f; - float _1874 = _1872 ? _1873 : 0.0f; - _1876 = _1874; - } - } - } - } - float _1877 = 0.029999999329447746f - _1792; - float _1878 = _1750 * 0.27000001072883606f; - float _1879 = _1878 * _1877; - float _1880 = _1879 * _1876; - float _1881 = _1880 + _1792; - float _1882 = max(_1881, 0.0f); - float _1883 = max(_1793, 0.0f); - float _1884 = max(_1794, 0.0f); - float _1885 = min(_1882, 65535.0f); - float _1886 = min(_1883, 65535.0f); - float _1887 = min(_1884, 65535.0f); - float _1888 = _1885 * 1.4514392614364624f; - float _1889 = mad(-0.2365107536315918f, _1886, _1888); - float _1890 = mad(-0.21492856740951538f, _1887, _1889); - float _1891 = _1885 * -0.07655377686023712f; - float _1892 = mad(1.17622971534729f, _1886, _1891); - float _1893 = mad(-0.09967592358589172f, _1887, _1892); - float _1894 = _1885 * 0.008316148072481155f; - float _1895 = mad(-0.006032449658960104f, _1886, _1894); - float _1896 = mad(0.9977163076400757f, _1887, _1895); - float _1897 = max(_1890, 0.0f); - float _1898 = max(_1893, 0.0f); - float _1899 = max(_1896, 0.0f); - float _1900 = min(_1897, 65504.0f); - float _1901 = min(_1898, 65504.0f); - float _1902 = min(_1899, 65504.0f); - float _1903 = dot(float3(_1900, _1901, _1902), float3(0.2722287178039551f, 0.6740817427635193f, 0.053689517080783844f)); - float _1904 = _1900 - _1903; - float _1905 = _1901 - _1903; - float _1906 = _1902 - _1903; - float _1907 = _1904 * 0.9599999785423279f; - float _1908 = _1905 * 0.9599999785423279f; - float _1909 = _1906 * 0.9599999785423279f; - float _1910 = _1907 + _1903; - float _1911 = _1908 + _1903; - float _1912 = _1909 + _1903; - float _1913 = max(_1910, 1.000000013351432e-10f); - float _1914 = log2(_1913); - float _1915 = _1914 * 0.3010300099849701f; - float _1916 = log2(_1702); - float _1917 = _1916 * 0.3010300099849701f; - bool _1918 = !(_1915 <= _1917); - do { - if (!_1918) { - float _1920 = log2(_1703); - float _1921 = _1920 * 0.3010300099849701f; - _1986 = _1921; - } else { - bool _1923 = (_1915 > _1917); - float _1924 = log2(_1700); - float _1925 = _1924 * 0.3010300099849701f; - bool _1926 = (_1915 < _1925); - bool _1927 = _1923 && _1926; - if (_1927) { - float _1929 = _1914 - _1916; - float _1930 = _1929 * 0.9030900001525879f; - float _1931 = _1924 - _1916; - float _1932 = _1931 * 0.3010300099849701f; - float _1933 = _1930 / _1932; - int _1934 = int(_1933); - float _1935 = float(_1934); - float _1936 = _1933 - _1935; - float _1938 = _8[_1934]; - int _1939 = _1934 + 1; - float _1941 = _8[_1939]; - int _1942 = _1934 + 2; - float _1944 = _8[_1942]; - float _1945 = _1936 * _1936; - float _1946 = _1938 * 0.5f; - float _1947 = mad(_1941, -1.0f, _1946); - float _1948 = mad(_1944, 0.5f, _1947); - float _1949 = _1941 - _1938; - float _1950 = mad(_1941, 0.5f, _1946); - float _1951 = dot(float3(_1945, _1936, 1.0f), float3(_1948, _1949, _1950)); - _1986 = _1951; - } else { - bool _1953 = !(_1915 >= _1925); - do { - if (!_1953) { - float _1955 = log2(_1704); - float _1956 = _1955 * 0.3010300099849701f; - bool _1957 = (_1915 < _1956); - if (_1957) { - float _1959 = _1914 - _1924; - float _1960 = _1959 * 0.9030900001525879f; - float _1961 = _1955 - _1924; - float _1962 = _1961 * 0.3010300099849701f; - float _1963 = _1960 / _1962; - int _1964 = int(_1963); - float _1965 = float(_1964); - float _1966 = _1963 - _1965; - float _1968 = _9[_1964]; - int _1969 = _1964 + 1; - float _1971 = _9[_1969]; - int _1972 = _1964 + 2; - float _1974 = _9[_1972]; - float _1975 = _1966 * _1966; - float _1976 = _1968 * 0.5f; - float _1977 = mad(_1971, -1.0f, _1976); - float _1978 = mad(_1974, 0.5f, _1977); - float _1979 = _1971 - _1968; - float _1980 = mad(_1971, 0.5f, _1976); - float _1981 = dot(float3(_1975, _1966, 1.0f), float3(_1978, _1979, _1980)); - _1986 = _1981; - break; - } - } - float _1983 = log2(_1705); - float _1984 = _1983 * 0.3010300099849701f; - _1986 = _1984; - } while (false); - } - } - float _1987 = _1986 * 3.321928024291992f; - float _1988 = exp2(_1987); - float _1989 = max(_1911, 1.000000013351432e-10f); - float _1990 = log2(_1989); - float _1991 = _1990 * 0.3010300099849701f; - bool _1992 = !(_1991 <= _1917); - do { - if (!_1992) { - float _1994 = log2(_1703); - float _1995 = _1994 * 0.3010300099849701f; - _2060 = _1995; - } else { - bool _1997 = (_1991 > _1917); - float _1998 = log2(_1700); - float _1999 = _1998 * 0.3010300099849701f; - bool _2000 = (_1991 < _1999); - bool _2001 = _1997 && _2000; - if (_2001) { - float _2003 = _1990 - _1916; - float _2004 = _2003 * 0.9030900001525879f; - float _2005 = _1998 - _1916; - float _2006 = _2005 * 0.3010300099849701f; - float _2007 = _2004 / _2006; - int _2008 = int(_2007); - float _2009 = float(_2008); - float _2010 = _2007 - _2009; - float _2012 = _8[_2008]; - int _2013 = _2008 + 1; - float _2015 = _8[_2013]; - int _2016 = _2008 + 2; - float _2018 = _8[_2016]; - float _2019 = _2010 * _2010; - float _2020 = _2012 * 0.5f; - float _2021 = mad(_2015, -1.0f, _2020); - float _2022 = mad(_2018, 0.5f, _2021); - float _2023 = _2015 - _2012; - float _2024 = mad(_2015, 0.5f, _2020); - float _2025 = dot(float3(_2019, _2010, 1.0f), float3(_2022, _2023, _2024)); - _2060 = _2025; - } else { - bool _2027 = !(_1991 >= _1999); - do { - if (!_2027) { - float _2029 = log2(_1704); - float _2030 = _2029 * 0.3010300099849701f; - bool _2031 = (_1991 < _2030); - if (_2031) { - float _2033 = _1990 - _1998; - float _2034 = _2033 * 0.9030900001525879f; - float _2035 = _2029 - _1998; - float _2036 = _2035 * 0.3010300099849701f; - float _2037 = _2034 / _2036; - int _2038 = int(_2037); - float _2039 = float(_2038); - float _2040 = _2037 - _2039; - float _2042 = _9[_2038]; - int _2043 = _2038 + 1; - float _2045 = _9[_2043]; - int _2046 = _2038 + 2; - float _2048 = _9[_2046]; - float _2049 = _2040 * _2040; - float _2050 = _2042 * 0.5f; - float _2051 = mad(_2045, -1.0f, _2050); - float _2052 = mad(_2048, 0.5f, _2051); - float _2053 = _2045 - _2042; - float _2054 = mad(_2045, 0.5f, _2050); - float _2055 = dot(float3(_2049, _2040, 1.0f), float3(_2052, _2053, _2054)); - _2060 = _2055; - break; - } - } - float _2057 = log2(_1705); - float _2058 = _2057 * 0.3010300099849701f; - _2060 = _2058; - } while (false); - } - } - float _2061 = _2060 * 3.321928024291992f; - float _2062 = exp2(_2061); - float _2063 = max(_1912, 1.000000013351432e-10f); - float _2064 = log2(_2063); - float _2065 = _2064 * 0.3010300099849701f; - bool _2066 = !(_2065 <= _1917); - do { - if (!_2066) { - float _2068 = log2(_1703); - float _2069 = _2068 * 0.3010300099849701f; - _2134 = _2069; - } else { - bool _2071 = (_2065 > _1917); - float _2072 = log2(_1700); - float _2073 = _2072 * 0.3010300099849701f; - bool _2074 = (_2065 < _2073); - bool _2075 = _2071 && _2074; - if (_2075) { - float _2077 = _2064 - _1916; - float _2078 = _2077 * 0.9030900001525879f; - float _2079 = _2072 - _1916; - float _2080 = _2079 * 0.3010300099849701f; - float _2081 = _2078 / _2080; - int _2082 = int(_2081); - float _2083 = float(_2082); - float _2084 = _2081 - _2083; - float _2086 = _8[_2082]; - int _2087 = _2082 + 1; - float _2089 = _8[_2087]; - int _2090 = _2082 + 2; - float _2092 = _8[_2090]; - float _2093 = _2084 * _2084; - float _2094 = _2086 * 0.5f; - float _2095 = mad(_2089, -1.0f, _2094); - float _2096 = mad(_2092, 0.5f, _2095); - float _2097 = _2089 - _2086; - float _2098 = mad(_2089, 0.5f, _2094); - float _2099 = dot(float3(_2093, _2084, 1.0f), float3(_2096, _2097, _2098)); - _2134 = _2099; - } else { - bool _2101 = !(_2065 >= _2073); - do { - if (!_2101) { - float _2103 = log2(_1704); - float _2104 = _2103 * 0.3010300099849701f; - bool _2105 = (_2065 < _2104); - if (_2105) { - float _2107 = _2064 - _2072; - float _2108 = _2107 * 0.9030900001525879f; - float _2109 = _2103 - _2072; - float _2110 = _2109 * 0.3010300099849701f; - float _2111 = _2108 / _2110; - int _2112 = int(_2111); - float _2113 = float(_2112); - float _2114 = _2111 - _2113; - float _2116 = _9[_2112]; - int _2117 = _2112 + 1; - float _2119 = _9[_2117]; - int _2120 = _2112 + 2; - float _2122 = _9[_2120]; - float _2123 = _2114 * _2114; - float _2124 = _2116 * 0.5f; - float _2125 = mad(_2119, -1.0f, _2124); - float _2126 = mad(_2122, 0.5f, _2125); - float _2127 = _2119 - _2116; - float _2128 = mad(_2119, 0.5f, _2124); - float _2129 = dot(float3(_2123, _2114, 1.0f), float3(_2126, _2127, _2128)); - _2134 = _2129; - break; - } - } - float _2131 = log2(_1705); - float _2132 = _2131 * 0.3010300099849701f; - _2134 = _2132; - } while (false); - } - } - float _2135 = _2134 * 3.321928024291992f; - float _2136 = exp2(_2135); - float _2137 = _1988 - _1703; - float _2138 = _1705 - _1703; - float _2139 = _2137 / _2138; - float _2140 = _2062 - _1703; - float _2141 = _2140 / _2138; - float _2142 = _2136 - _1703; - float _2143 = _2142 / _2138; - float _2144 = _2139 * 0.6624541878700256f; - float _2145 = mad(0.13400420546531677f, _2141, _2144); - float _2146 = mad(0.15618768334388733f, _2143, _2145); - float _2147 = _2139 * 0.2722287178039551f; - float _2148 = mad(0.6740817427635193f, _2141, _2147); - float _2149 = mad(0.053689517080783844f, _2143, _2148); - float _2150 = _2139 * -0.005574649665504694f; - float _2151 = mad(0.00406073359772563f, _2141, _2150); - float _2152 = mad(1.0103391408920288f, _2143, _2151); - float _2153 = _2146 * 1.6410233974456787f; - float _2154 = mad(-0.32480329275131226f, _2149, _2153); - float _2155 = mad(-0.23642469942569733f, _2152, _2154); - float _2156 = _2146 * -0.663662850856781f; - float _2157 = mad(1.6153316497802734f, _2149, _2156); - float _2158 = mad(0.016756348311901093f, _2152, _2157); - float _2159 = _2146 * 0.011721894145011902f; - float _2160 = mad(-0.008284442126750946f, _2149, _2159); - float _2161 = mad(0.9883948564529419f, _2152, _2160); - float _2162 = max(_2155, 0.0f); - float _2163 = max(_2158, 0.0f); - float _2164 = max(_2161, 0.0f); - float _2165 = min(_2162, 1.0f); - float _2166 = min(_2163, 1.0f); - float _2167 = min(_2164, 1.0f); - float _2168 = _2165 * 0.6624541878700256f; - float _2169 = mad(0.13400420546531677f, _2166, _2168); - float _2170 = mad(0.15618768334388733f, _2167, _2169); - float _2171 = _2165 * 0.2722287178039551f; - float _2172 = mad(0.6740817427635193f, _2166, _2171); - float _2173 = mad(0.053689517080783844f, _2167, _2172); - float _2174 = _2165 * -0.005574649665504694f; - float _2175 = mad(0.00406073359772563f, _2166, _2174); - float _2176 = mad(1.0103391408920288f, _2167, _2175); - float _2177 = _2170 * 1.6410233974456787f; - float _2178 = mad(-0.32480329275131226f, _2173, _2177); - float _2179 = mad(-0.23642469942569733f, _2176, _2178); - float _2180 = _2170 * -0.663662850856781f; - float _2181 = mad(1.6153316497802734f, _2173, _2180); - float _2182 = mad(0.016756348311901093f, _2176, _2181); - float _2183 = _2170 * 0.011721894145011902f; - float _2184 = mad(-0.008284442126750946f, _2173, _2183); - float _2185 = mad(0.9883948564529419f, _2176, _2184); - float _2186 = max(_2179, 0.0f); - float _2187 = max(_2182, 0.0f); - float _2188 = max(_2185, 0.0f); - float _2189 = min(_2186, 65535.0f); - float _2190 = min(_2187, 65535.0f); - float _2191 = min(_2188, 65535.0f); - float _2192 = _2189 * _1705; - float _2193 = _2190 * _1705; - float _2194 = _2191 * _1705; - float _2195 = max(_2192, 0.0f); - float _2196 = max(_2193, 0.0f); - float _2197 = max(_2194, 0.0f); - float _2198 = min(_2195, 65535.0f); - float _2199 = min(_2196, 65535.0f); - float _2200 = min(_2197, 65535.0f); - bool _2201 = (_970 == 6); - _2213 = _2198; - _2214 = _2199; - _2215 = _2200; - do { - if (!_2201) { - float _2203 = _2198 * _37; - float _2204 = mad(_38, _2199, _2203); - float _2205 = mad(_39, _2200, _2204); - float _2206 = _2198 * _40; - float _2207 = mad(_41, _2199, _2206); - float _2208 = mad(_42, _2200, _2207); - float _2209 = _2198 * _43; - float _2210 = mad(_44, _2199, _2209); - float _2211 = mad(_45, _2200, _2210); - _2213 = _2205; - _2214 = _2208; - _2215 = _2211; - } - float _2216 = _2213 * 9.999999747378752e-05f; - float _2217 = _2214 * 9.999999747378752e-05f; - float _2218 = _2215 * 9.999999747378752e-05f; - float _2219 = log2(_2216); - float _2220 = log2(_2217); - float _2221 = log2(_2218); - float _2222 = _2219 * 0.1593017578125f; - float _2223 = _2220 * 0.1593017578125f; - float _2224 = _2221 * 0.1593017578125f; - float _2225 = exp2(_2222); - float _2226 = exp2(_2223); - float _2227 = exp2(_2224); - float _2228 = _2225 * 18.8515625f; - float _2229 = _2226 * 18.8515625f; - float _2230 = _2227 * 18.8515625f; - float _2231 = _2228 + 0.8359375f; - float _2232 = _2229 + 0.8359375f; - float _2233 = _2230 + 0.8359375f; - float _2234 = _2225 * 18.6875f; - float _2235 = _2226 * 18.6875f; - float _2236 = _2227 * 18.6875f; - float _2237 = _2234 + 1.0f; - float _2238 = _2235 + 1.0f; - float _2239 = _2236 + 1.0f; - float _2240 = 1.0f / _2237; - float _2241 = 1.0f / _2238; - float _2242 = 1.0f / _2239; - float _2243 = _2240 * _2231; - float _2244 = _2241 * _2232; - float _2245 = _2242 * _2233; - float _2246 = log2(_2243); - float _2247 = log2(_2244); - float _2248 = log2(_2245); - float _2249 = _2246 * 78.84375f; - float _2250 = _2247 * 78.84375f; - float _2251 = _2248 * 78.84375f; - float _2252 = exp2(_2249); - float _2253 = exp2(_2250); - float _2254 = exp2(_2251); - _2392 = _2252; - _2393 = _2253; - _2394 = _2254; - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } while (false); - } else { - bool _2256 = (_970 == 7); - if (_2256) { - float _2259 = UniformBufferConstants_WorkingColorSpace_008x; - float _2260 = UniformBufferConstants_WorkingColorSpace_008y; - float _2261 = UniformBufferConstants_WorkingColorSpace_008z; - float _2263 = UniformBufferConstants_WorkingColorSpace_009x; - float _2264 = UniformBufferConstants_WorkingColorSpace_009y; - float _2265 = UniformBufferConstants_WorkingColorSpace_009z; - float _2267 = UniformBufferConstants_WorkingColorSpace_010x; - float _2268 = UniformBufferConstants_WorkingColorSpace_010y; - float _2269 = UniformBufferConstants_WorkingColorSpace_010z; - float _2270 = _2259 * _952; - float _2271 = mad(_2260, _953, _2270); - float _2272 = mad(_2261, _954, _2271); - float _2273 = _2263 * _952; - float _2274 = mad(_2264, _953, _2273); - float _2275 = mad(_2265, _954, _2274); - float _2276 = _2267 * _952; - float _2277 = mad(_2268, _953, _2276); - float _2278 = mad(_2269, _954, _2277); - float _2279 = _2272 * _37; - float _2280 = mad(_38, _2275, _2279); - float _2281 = mad(_39, _2278, _2280); - float _2282 = _2272 * _40; - float _2283 = mad(_41, _2275, _2282); - float _2284 = mad(_42, _2278, _2283); - float _2285 = _2272 * _43; - float _2286 = mad(_44, _2275, _2285); - float _2287 = mad(_45, _2278, _2286); - float _2288 = _2281 * 9.999999747378752e-05f; - float _2289 = _2284 * 9.999999747378752e-05f; - float _2290 = _2287 * 9.999999747378752e-05f; - float _2291 = log2(_2288); - float _2292 = log2(_2289); - float _2293 = log2(_2290); - float _2294 = _2291 * 0.1593017578125f; - float _2295 = _2292 * 0.1593017578125f; - float _2296 = _2293 * 0.1593017578125f; - float _2297 = exp2(_2294); - float _2298 = exp2(_2295); - float _2299 = exp2(_2296); - float _2300 = _2297 * 18.8515625f; - float _2301 = _2298 * 18.8515625f; - float _2302 = _2299 * 18.8515625f; - float _2303 = _2300 + 0.8359375f; - float _2304 = _2301 + 0.8359375f; - float _2305 = _2302 + 0.8359375f; - float _2306 = _2297 * 18.6875f; - float _2307 = _2298 * 18.6875f; - float _2308 = _2299 * 18.6875f; - float _2309 = _2306 + 1.0f; - float _2310 = _2307 + 1.0f; - float _2311 = _2308 + 1.0f; - float _2312 = 1.0f / _2309; - float _2313 = 1.0f / _2310; - float _2314 = 1.0f / _2311; - float _2315 = _2312 * _2303; - float _2316 = _2313 * _2304; - float _2317 = _2314 * _2305; - float _2318 = log2(_2315); - float _2319 = log2(_2316); - float _2320 = log2(_2317); - float _2321 = _2318 * 78.84375f; - float _2322 = _2319 * 78.84375f; - float _2323 = _2320 * 78.84375f; - float _2324 = exp2(_2321); - float _2325 = exp2(_2322); - float _2326 = exp2(_2323); - _2392 = _2324; - _2393 = _2325; - _2394 = _2326; - } else { - bool _2328 = (_970 == 8); - _2392 = _952; - _2393 = _953; - _2394 = _954; - if (!_2328) { - bool _2330 = (_970 == 9); - float _2332 = UniformBufferConstants_WorkingColorSpace_008x; - float _2333 = UniformBufferConstants_WorkingColorSpace_008y; - float _2334 = UniformBufferConstants_WorkingColorSpace_008z; - float _2336 = UniformBufferConstants_WorkingColorSpace_009x; - float _2337 = UniformBufferConstants_WorkingColorSpace_009y; - float _2338 = UniformBufferConstants_WorkingColorSpace_009z; - float _2340 = UniformBufferConstants_WorkingColorSpace_010x; - float _2341 = UniformBufferConstants_WorkingColorSpace_010y; - float _2342 = UniformBufferConstants_WorkingColorSpace_010z; - if (_2330) { - float _2344 = _2332 * _940; - float _2345 = mad(_2333, _941, _2344); - float _2346 = mad(_2334, _942, _2345); - float _2347 = _2336 * _940; - float _2348 = mad(_2337, _941, _2347); - float _2349 = mad(_2338, _942, _2348); - float _2350 = _2340 * _940; - float _2351 = mad(_2341, _941, _2350); - float _2352 = mad(_2342, _942, _2351); - float _2353 = _2346 * _37; - float _2354 = mad(_38, _2349, _2353); - float _2355 = mad(_39, _2352, _2354); - float _2356 = _2346 * _40; - float _2357 = mad(_41, _2349, _2356); - float _2358 = mad(_42, _2352, _2357); - float _2359 = _2346 * _43; - float _2360 = mad(_44, _2349, _2359); - float _2361 = mad(_45, _2352, _2360); - _2392 = _2355; - _2393 = _2358; - _2394 = _2361; - } else { - float _2363 = _2332 * _966; - float _2364 = mad(_2333, _967, _2363); - float _2365 = mad(_2334, _968, _2364); - float _2366 = _2336 * _966; - float _2367 = mad(_2337, _967, _2366); - float _2368 = mad(_2338, _968, _2367); - float _2369 = _2340 * _966; - float _2370 = mad(_2341, _967, _2369); - float _2371 = mad(_2342, _968, _2370); - float _2372 = _2365 * _37; - float _2373 = mad(_38, _2368, _2372); - float _2374 = mad(_39, _2371, _2373); - float _2375 = _2365 * _40; - float _2376 = mad(_41, _2368, _2375); - float _2377 = mad(_42, _2371, _2376); - float _2378 = _2365 * _43; - float _2379 = mad(_44, _2368, _2378); - float _2380 = mad(_45, _2371, _2379); - float _2381 = _RootShaderParameters_040z; - float _2382 = log2(_2374); - float _2383 = log2(_2377); - float _2384 = log2(_2380); - float _2385 = _2382 * _2381; - float _2386 = _2383 * _2381; - float _2387 = _2384 * _2381; - float _2388 = exp2(_2385); - float _2389 = exp2(_2386); - float _2390 = exp2(_2387); - _2392 = _2388; - _2393 = _2389; - _2394 = _2390; - } - } - } - } - } - } - } - float _2395 = _2392 * 0.9523810148239136f; - float _2396 = _2393 * 0.9523810148239136f; - float _2397 = _2394 * 0.9523810148239136f; - SV_Target.x = _2395; - SV_Target.y = _2396; - SV_Target.z = _2397; - SV_Target.w = 0.0f; - return SV_Target; -} diff --git a/src/games/ue-dx12/lutbuilder_0xBEB7EB31.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xBEB7EB31.ps_5_1.hlsl deleted file mode 100644 index 4ac7083a..00000000 --- a/src/games/ue-dx12/lutbuilder_0xBEB7EB31.ps_5_1.hlsl +++ /dev/null @@ -1,1394 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.3.16 on Sat Dec 21 22:55:08 2024 -cbuffer cb0 : register(b0) { - float4 cb0[68]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r1.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r1.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[66].y * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r2.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r2.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r2.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r2.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.xyz = cb0[44].yyy ? r1.xyz : r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r0.w = cmp(cb0[35].w == 0.000000); - if (r0.w != 0) { - r0.w = dot(r1.xyz, float3(0.212599993, 0.715200007, 0.0722000003)); - r1.w = cmp(cb0[67].y < r0.w); - r2.x = -cb0[67].y + r0.w; - r2.x = -cb0[67].z * r2.x; - r2.x = r2.x / cb0[67].x; - r2.y = cb0[67].x + -cb0[67].y; - r2.x = 1.44269502 * r2.x; - r2.x = exp2(r2.x); - r2.x = -r2.y * r2.x + cb0[67].x; - r2.xzw = r2.xxx * r1.xyz; - r2.xzw = r2.xzw / r0.www; - r2.xzw = r1.www ? r2.xzw : r1.xyz; - r3.xyz = cmp(cb0[67].yyy < r1.xyz); - r4.xyz = -cb0[67].yyy + r1.xyz; - r4.xyz = -cb0[67].zzz * r4.xyz; - r4.xyz = r4.xyz / cb0[67].xxx; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = -r2.yyy * r4.xyz + cb0[67].xxx; - r3.xyz = r3.xyz ? r4.xyz : r1.xyz; - r2.xyz = -r3.xyz + r2.xzw; - r2.xyz = cb0[67].www * r2.xyz + r3.xyz; - r1.xyz = r2.xyz; - } else { - r3.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r3.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r3.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r3.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r3.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r0.w = min(r3.y, r3.z); - r0.w = min(r0.w, r3.w); - r1.w = max(r3.y, r3.z); - r1.w = max(r1.w, r3.w); - r4.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r4.x + -r0.w; - r0.w = r0.w / r4.y; - r4.xyz = r3.wzy + -r3.zyw; - r4.xy = r4.xy * r3.wz; - r1.w = r4.x + r4.y; - r1.w = r3.y * r4.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r3.w + r3.z; - r2.w = r2.w + r3.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.x = -0.400000006 + r0.w; - r4.x = 2.5 * r3.x; - r4.x = 1 + -abs(r4.x); - r4.x = max(0, r4.x); - r4.y = cmp(0 < r3.x); - r3.x = cmp(r3.x < 0); - r3.x = (int)-r4.y + (int)r3.x; - r3.x = (int)r3.x; - r4.x = -r4.x * r4.x + 1; - r3.x = r3.x * r4.x + 1; - r3.x = 0.0250000004 * r3.x; - r4.x = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.x * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.x ? r3.x : r1.w; - r1.w = 1 + r1.w; - r4.yzw = r3.yzw * r1.www; - r5.xy = cmp(r4.zw == r4.yz); - r2.w = r5.y ? r5.x : 0; - r3.x = r3.z * r1.w + -r4.w; - r3.x = 1.73205078 * r3.x; - r3.z = r4.y * 2 + -r4.z; - r3.z = -r3.w * r1.w + r3.z; - r3.w = min(abs(r3.x), abs(r3.z)); - r5.x = max(abs(r3.x), abs(r3.z)); - r5.x = 1 / r5.x; - r3.w = r5.x * r3.w; - r5.x = r3.w * r3.w; - r5.y = r5.x * 0.0208350997 + -0.0851330012; - r5.y = r5.x * r5.y + 0.180141002; - r5.y = r5.x * r5.y + -0.330299497; - r5.x = r5.x * r5.y + 0.999866009; - r5.y = r5.x * r3.w; - r5.z = cmp(abs(r3.z) < abs(r3.x)); - r5.y = r5.y * -2 + 1.57079637; - r5.y = r5.z ? r5.y : 0; - r3.w = r3.w * r5.x + r5.y; - r5.x = cmp(r3.z < -r3.z); - r5.x = r5.x ? -3.141593 : 0; - r3.w = r5.x + r3.w; - r5.x = min(r3.x, r3.z); - r3.x = max(r3.x, r3.z); - r3.z = cmp(r5.x < -r5.x); - r3.x = cmp(r3.x >= -r3.x); - r3.x = r3.x ? r3.z : 0; - r3.x = r3.x ? -r3.w : r3.w; - r3.x = 57.2957802 * r3.x; - r2.w = r2.w ? 0 : r3.x; - r3.x = cmp(r2.w < 0); - r3.z = 360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.x = cmp(180 < r2.w); - r3.z = -360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.x * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r3.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r4.x = r0.w * 0.180000007 + r4.y; - r3.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r4.xzw); - r3.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r4.xzw); - r3.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r4.xzw); - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r4.xy = float2(1, 0.180000007) + cb0[36].ww; - r0.w = -cb0[36].y + r4.x; - r1.w = 1 + cb0[37].x; - r2.w = -cb0[36].z + r1.w; - r3.w = cmp(0.800000012 < cb0[36].y); - r4.xz = float2(0.819999993, 1) + -cb0[36].yy; - r4.xz = r4.xz / cb0[36].xx; - r4.y = r4.y / r0.w; - r4.xw = float2(-0.744727492, -1) + r4.xy; - r4.w = 1 + -r4.w; - r4.y = r4.y / r4.w; - r4.y = log2(r4.y); - r4.y = 0.346573591 * r4.y; - r4.w = r0.w / cb0[36].x; - r4.y = -r4.y * r4.w + -0.744727492; - r3.w = r3.w ? r4.x : r4.y; - r4.x = r4.z + -r3.w; - r4.y = cb0[36].z / cb0[36].x; - r4.y = r4.y + -r4.x; - r3.xyz = log2(r3.xyz); - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r3.xyz; - r4.xzw = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.xxx; - r4.xzw = cb0[36].xxx * r4.xzw; - r5.w = r0.w + r0.w; - r6.x = -2 * cb0[36].x; - r0.w = r6.x / r0.w; - r6.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r7.xyz = r6.xyz * r0.www; - r7.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = float3(1, 1, 1) + r7.xyz; - r7.xyz = r5.www / r7.xyz; - r7.xyz = -cb0[36].www + r7.xyz; - r0.w = r2.w + r2.w; - r5.w = cb0[36].x + cb0[36].x; - r2.w = r5.w / r2.w; - r3.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r4.yyy; - r3.xyz = r3.xyz * r2.www; - r3.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r3.xyz = float3(1, 1, 1) + r3.xyz; - r3.xyz = r0.www / r3.xyz; - r3.xyz = -r3.xyz + r1.www; - r8.xyz = cmp(r5.xyz < r3.www); - r7.xyz = r8.xyz ? r7.xyz : r4.xzw; - r5.xyz = cmp(r4.yyy < r5.xyz); - r3.xyz = r5.xyz ? r3.xyz : r4.xzw; - r0.w = r4.y + -r3.w; - r4.xzw = saturate(r6.xyz / r0.www); - r0.w = cmp(r4.y < r3.w); - r5.xyz = float3(1, 1, 1) + -r4.xzw; - r4.xyz = r0.www ? r5.xyz : r4.xzw; - r5.xyz = -r4.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r4.xyz = r4.xyz * r4.xyz; - r4.xyz = r4.xyz * r5.xyz; - r3.xyz = r3.xyz + -r7.xyz; - r3.xyz = r4.xyz * r3.xyz + r7.xyz; - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].zzz * r3.xyz + r0.xyz; - r3.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r3.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r3.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r3.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r3.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r2.xyz = max(float3(0, 0, 0), r3.xyz); - } - r0.xyz = r2.xyz * r2.xyz; - r2.xyz = cb0[26].yyy * r2.xyz; - r0.xyz = cb0[26].xxx * r0.xyz + r2.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.xyz = cb0[42].yzw * r7.xyz; - r7.xyz = -r7.xyz * cb0[42].yzw + cb0[43].xyz; - r7.xyz = cb0[43].www * r7.xyz + r8.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.xyz = cb0[42].yzw * r7.xyz; - r7.xyz = -r7.xyz * cb0[42].yzw + cb0[43].xyz; - r7.xyz = cb0[43].www * r7.xyz + r8.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xC130BE2D.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xC130BE2D.ps_5_1.hlsl deleted file mode 100644 index 5d8505e8..00000000 --- a/src/games/ue-dx12/lutbuilder_0xC130BE2D.ps_5_1.hlsl +++ /dev/null @@ -1,472 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:03:00 2024 -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = cb0[35].y * cb0[35].y; - r0.y = cb0[35].y * 1189.62 + r0.x; - r0.y = 1412139.88 + r0.y; - r0.y = r0.y * r0.y; - r1.xyz = -cb0[35].yyy * float3(2.8974182e-05, 1916156.25, 705674) + float3(1, -1.13758118e+09, 1.97471539e+09); - r0.zw = -r0.xx * float2(1.53176999, 308.606995) + r1.yz; - r1.x = r0.x * 1.61456057e-07 + r1.x; - r2.x = r0.z / r0.y; - r0.y = -cb0[35].y * 179.455994 + r0.x; - r0.y = 6193636 + r0.y; - r0.y = r0.y * r0.y; - r2.y = r0.w / r0.y; - r0.y = dot(r2.xy, r2.xy); - r0.y = rsqrt(r0.y); - r0.yz = r2.xy * r0.yy; - r0.y = cb0[35].z * -r0.y; - r0.z = cb0[35].z * r0.z; - r1.yzw = cb0[35].yyy * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r1.yzw = r0.xxx * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r1.yzw; - r0.xw = r1.wy / r1.xz; - r0.y = r0.y * 0.0500000007 + r0.x; - r0.z = r0.z * 0.0500000007 + r0.w; - r1.x = r0.z + r0.z; - r0.z = 3 * r0.z; - r1.x = -r0.y * 8 + r1.x; - r0.y = r0.y + r0.y; - r1.x = 4 + r1.x; - r2.xy = r0.zy / r1.xx; - r0.y = 3 * r0.w; - r0.z = r0.w + r0.w; - r0.z = -r0.x * 8 + r0.z; - r0.x = r0.x + r0.x; - r0.z = 4 + r0.z; - r1.xy = r0.yx / r0.zz; - r0.xy = r2.xy + -r1.xy; - r0.z = cb0[35].y * 1.00055635; - r0.z = 1 / r0.z; - r1.zw = -r0.zz * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r1.zw = r1.zw * r0.zz + float2(99.1100006, 247.479996); - r0.zw = r1.zw * r0.zz + float2(0.244063005, 0.237039998); - r1.z = cmp(6996.10791 >= cb0[35].y); - r2.x = r1.z ? r0.z : r0.w; - r0.z = r2.x * r2.x; - r0.w = 2.86999989 * r2.x; - r0.z = r0.z * -3 + r0.w; - r2.y = -0.275000006 + r0.z; - r0.z = cmp(cb0[35].y < 4000); - r0.zw = r0.zz ? r1.xy : r2.xy; - r0.xy = r0.zw + r0.xy; - r0.zw = float2(0.312700003, 0.328999996); - r0.xyzw = cb0[38].wwww ? r0.xyzw : r0.zwxy; - r1.xy = max(float2(1.00000001e-10, 1.00000001e-10), r0.yw); - r2.xy = r0.xz / r1.xy; - r0.xz = float2(1, 1) + -r0.xz; - r0.xy = r0.xz + -r0.yw; - r0.xy = r0.xy / r1.xy; - r2.w = r0.x; - r2.z = 1; - r0.x = dot(float3(0.895099998, 0.266400009, -0.161400005), r2.xzw); - r0.zw = r2.yz; - r1.x = dot(float3(-0.161400005, 0.895099998, 0.266400009), r0.yzw); - r0.x = r1.x / r0.x; - r1.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.xxx; - r3.x = r1.z; - r0.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r2.xzw); - r1.w = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r2.xzw); - r2.x = dot(float3(0.0366999991, -0.750199974, 1.71350002), r0.yzw); - r0.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r0.yzw); - r0.y = r0.y / r1.w; - r0.yzw = float3(0.0388999991, -0.0684999973, 1.02960002) * r0.yyy; - r0.x = r2.x / r0.x; - r2.xyz = float3(-0.750199974, 1.71350002, 0.0366999991) * r0.xxx; - r3.y = r2.z; - r3.z = r0.w; - r0.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r3.xyz); - r4.x = r1.y; - r4.y = r2.y; - r1.y = r2.x; - r4.z = r0.z; - r1.z = r0.y; - r0.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r4.xyz); - r0.yzw = cb1[1].xyz * r0.yyy; - r1.w = dot(float3(0.432305306, 0.518360317, 0.0492912009), r1.xyz); - r0.yzw = r1.www * cb1[0].xyz + r0.yzw; - r0.xyz = r0.xxx * cb1[2].xyz + r0.yzw; - r2.xyz = cb1[4].yyy * r0.xyz; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r4.xyz); - r1.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r4.xyz); - r4.xyz = cb1[1].xyz * r1.www; - r5.xyz = cb1[1].xyz * r0.www; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r1.xyz); - r1.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r1.xyz); - r1.xyz = r1.xxx * cb1[0].xyz + r4.xyz; - r4.xyz = r0.www * cb1[0].xyz + r5.xyz; - r0.w = dot(float3(0.986992896, -0.1470543, 0.159962699), r3.xyz); - r1.w = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r3.xyz); - r1.xyz = r1.www * cb1[2].xyz + r1.xyz; - r3.xyz = r0.www * cb1[2].xyz + r4.xyz; - r2.xyz = cb1[4].xxx * r3.xyz + r2.xyz; - r2.xyz = cb1[4].zzz * r1.xyz + r2.xyz; - r0.w = 0.5 / cb0[35].x; - r4.xy = v0.xy + -r0.ww; - r4.xy = cb0[35].xx * r4.xy; - r0.w = cb0[35].x + -1; - r4.xy = r4.xy / r0.ww; - r1.w = (uint)v2.x; - r4.z = r1.w / r0.w; - r4.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r4.xyz; - r4.xyz = float3(14, 14, 14) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = r4.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r2.x = dot(r2.xyz, r4.xyz); - r5.xyz = cb1[5].yyy * r0.xyz; - r0.xyz = cb1[6].yyy * r0.xyz; - r0.xyz = cb1[6].xxx * r3.xyz + r0.xyz; - r3.xyz = cb1[5].xxx * r3.xyz + r5.xyz; - r3.xyz = cb1[5].zzz * r1.xyz + r3.xyz; - r0.xyz = cb1[6].zzz * r1.xyz + r0.xyz; - r2.z = dot(r0.xyz, r4.xyz); - r2.y = dot(r3.xyz, r4.xyz); - r0.x = dot(cb1[8].xyz, r2.xyz); - r0.y = dot(cb1[9].xyz, r2.xyz); - r0.z = dot(cb1[10].xyz, r2.xyz); - r1.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r0.xyz); - r1.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r0.xyz); - r1.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r2.xyz = r0.xyz / r0.www; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r1.w = dot(r2.xyz, r2.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r1.w * r0.w; - r0.xyz = r0.www * r1.xyz + r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.xyz = r0.xyz + -r0.www; - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r1.xyz = r1.xyz * r1.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r3.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r2.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r2.xyz = log2(r2.xyz); - r3.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r3.xyz = r3.xyz * r3.www; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r2.xyz = log2(r2.xyz); - r3.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r3.xyz = r3.xyz * r3.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r3.xyz = r3.xyz * r3.www; - r4.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz + r4.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r2.w = 1 + -r1.w; - r3.x = -cb0[36].x + r0.w; - r3.y = cb0[36].y + -cb0[36].x; - r3.y = 1 / r3.y; - r3.x = saturate(r3.x * r3.y); - r3.y = r3.x * -2 + 3; - r3.x = r3.x * r3.x; - r2.w = -r3.y * r3.x + r2.w; - r3.x = r3.y * r3.x; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r1.xyz * r1.www + r2.xyz; - r2.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r2.xyz = r2.xyz * r2.www; - r0.xyz = r2.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r0.xyz = log2(r0.xyz); - r2.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r0.xyz = r2.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r0.xyz = log2(r0.xyz); - r2.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r0.xyz = r2.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r2.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r4.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r3.yzw = r4.xyz + r4.www; - r0.xyz = r0.xyz * r2.xyz + r3.yzw; - r0.xyz = r0.xyz * r3.xxx + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r1.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r1.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r2.xyz = r1.wzy + -r1.zyw; - r2.xy = r2.xy * r1.wz; - r0.w = r2.x + r2.y; - r0.w = r1.y * r2.z + r0.w; - r0.w = sqrt(r0.w); - r1.x = r1.w + r1.z; - r1.x = r1.x + r1.y; - r0.w = r0.w * 1.75 + r1.x; - r1.x = 0.333333343 * r0.w; - r1.x = 0.0799999982 / r1.x; - r1.x = -0.5 + r1.x; - r2.x = min(r1.y, r1.z); - r2.x = min(r2.x, r1.w); - r2.y = max(r1.y, r1.z); - r2.y = max(r2.y, r1.w); - r2.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 0.00999999978), r2.xyy); - r2.x = r2.y + -r2.x; - r2.x = r2.x / r2.z; - r2.y = -0.400000006 + r2.x; - r2.z = cmp(0 < r2.y); - r2.w = cmp(r2.y < 0); - r2.y = 2.5 * r2.y; - r2.y = 1 + -abs(r2.y); - r2.y = max(0, r2.y); - r2.y = -r2.y * r2.y + 1; - r2.z = (int)-r2.z + (int)r2.w; - r2.z = (int)r2.z; - r2.y = r2.z * r2.y + 1; - r2.y = 0.0250000004 * r2.y; - r1.x = r2.y * r1.x; - r2.z = cmp(r0.w >= 0.479999989); - r0.w = cmp(0.159999996 >= r0.w); - r1.x = r2.z ? 0 : r1.x; - r0.w = r0.w ? r2.y : r1.x; - r0.w = 1 + r0.w; - r3.yzw = r1.yzw * r0.www; - r1.x = -r1.y * r0.w + 0.0299999993; - r1.y = r1.z * r0.w + -r3.w; - r1.y = 1.73205078 * r1.y; - r1.z = r3.y * 2 + -r3.z; - r0.w = -r1.w * r0.w + r1.z; - r1.z = max(abs(r1.y), abs(r0.w)); - r1.z = 1 / r1.z; - r1.w = min(abs(r1.y), abs(r0.w)); - r1.z = r1.w * r1.z; - r1.w = r1.z * r1.z; - r2.y = r1.w * 0.0208350997 + -0.0851330012; - r2.y = r1.w * r2.y + 0.180141002; - r2.y = r1.w * r2.y + -0.330299497; - r1.w = r1.w * r2.y + 0.999866009; - r2.y = r1.z * r1.w; - r2.y = r2.y * -2 + 1.57079637; - r2.z = cmp(abs(r0.w) < abs(r1.y)); - r2.y = r2.z ? r2.y : 0; - r1.z = r1.z * r1.w + r2.y; - r1.w = cmp(r0.w < -r0.w); - r1.w = r1.w ? -3.141593 : 0; - r1.z = r1.z + r1.w; - r1.w = min(r1.y, r0.w); - r0.w = max(r1.y, r0.w); - r0.w = cmp(r0.w >= -r0.w); - r1.y = cmp(r1.w < -r1.w); - r0.w = r0.w ? r1.y : 0; - r0.w = r0.w ? -r1.z : r1.z; - r0.w = 57.2957802 * r0.w; - r1.yz = cmp(r3.zw == r3.yz); - r1.y = r1.z ? r1.y : 0; - r0.w = r1.y ? 0 : r0.w; - r1.y = cmp(r0.w < 0); - r1.z = 360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = max(0, r0.w); - r0.w = min(360, r0.w); - r1.y = cmp(180 < r0.w); - r1.z = -360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = 0.0148148146 * r0.w; - r0.w = 1 + -abs(r0.w); - r0.w = max(0, r0.w); - r1.y = r0.w * -2 + 3; - r0.w = r0.w * r0.w; - r0.w = r1.y * r0.w; - r0.w = r0.w * r0.w; - r0.w = r0.w * r2.x; - r0.w = r0.w * r1.x; - r3.x = r0.w * 0.180000007 + r3.y; - r1.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r3.xzw); - r1.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r3.xzw); - r1.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r3.xzw); - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r1.xyz = log2(r1.xyz); - r0.w = cb0[37].w / cb0[37].y; - r2.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r2.xw = -cb0[37].zw + r2.xy; - r1.w = r2.z / r2.x; - r2.z = -1 + r1.w; - r2.z = 1 + -r2.z; - r1.w = r1.w / r2.z; - r1.w = log2(r1.w); - r1.w = 0.346573591 * r1.w; - r2.z = r2.x / cb0[37].y; - r1.w = -r1.w * r2.z + -0.744727492; - r2.z = cmp(0.800000012 < cb0[37].z); - r3.xy = -cb0[37].zz + float2(0.819999993, 1); - r3.xy = r3.xy / cb0[37].yy; - r3.x = -0.744727492 + r3.x; - r1.w = r2.z ? r3.x : r1.w; - r2.z = r3.y + -r1.w; - r0.w = -r2.z + r0.w; - r3.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r2.zzz; - r3.xyz = cb0[37].yyy * r3.xyz; - r4.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r2.z = cb0[37].y + cb0[37].y; - r2.z = r2.z / r2.w; - r4.xyz = r2.zzz * r4.xyz; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(1, 1, 1) + r4.xyz; - r2.zw = r2.xw + r2.xw; - r4.xyz = r2.www / r4.xyz; - r4.xyz = -r4.xyz + r2.yyy; - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r1.xyz; - r1.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r1.www; - r6.xyz = cmp(r0.www < r5.xyz); - r5.xyz = cmp(r5.xyz < r1.www); - r4.xyz = r6.xyz ? r4.xyz : r3.xyz; - r2.y = cb0[37].y * -2; - r2.x = r2.y / r2.x; - r2.xyw = r2.xxx * r1.xyz; - r2.xyw = float3(1.44269502, 1.44269502, 1.44269502) * r2.xyw; - r2.xyw = exp2(r2.xyw); - r2.xyw = float3(1, 1, 1) + r2.xyw; - r2.xyz = r2.zzz / r2.xyw; - r2.xyz = -cb0[38].xxx + r2.xyz; - r2.xyz = r5.xyz ? r2.xyz : r3.xyz; - r3.xyz = r4.xyz + -r2.xyz; - r2.w = r0.w + -r1.w; - r0.w = cmp(r0.w < r1.w); - r1.xyz = saturate(r1.xyz / r2.www); - r4.xyz = float3(1, 1, 1) + -r1.xyz; - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.xyz = -r1.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r1.xyz = r1.xyz * r1.xyz; - r1.xyz = r1.xyz * r4.xyz; - r1.xyz = r1.xyz * r3.xyz + r2.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[37].xxx * r1.xyz + r0.xyz; - r1.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r1.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r1.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.x = dot(cb1[12].xyz, r0.xyz); - r1.y = dot(cb1[13].xyz, r0.xyz); - r1.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[39].yyy * r0.xyz; - r0.xyz = cb0[39].xxx * r1.xyz + r0.xyz; - r0.xyz = cb0[39].zzz + r0.xyz; - r1.xyz = cb0[14].xyz * r0.xyz; - r0.xyz = -r0.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r0.xyz + r1.xyz; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = log2(r0.xyz); - r0.xyz = cb0[40].yyy * r0.xyz; - r0.xyz = exp2(r0.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r0.xyz); - return; - } - - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r3.xyz = r2.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r3.xyz; - r3.xyz = r2.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r3.xyz; - r3.x = dot(r3.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r4.xyz = r2.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r4.xyz; - r4.xyz = r2.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r4.xyz; - r3.y = dot(r4.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r4.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r2.yzw; - r3.z = dot(r2.xyz, r1.xyz); - r0.xyz = cb1[20].xxx ? r0.xyz : r3.xyz; - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r0.xyz; - r2.xyz = cmp(r0.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = log2(r0.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r2.xyz ? r0.xyz : r1.xyz; - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r0.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xC1BCC6B5.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xC1BCC6B5.ps_5_1.hlsl deleted file mode 100644 index 31034e34..00000000 --- a/src/games/ue-dx12/lutbuilder_0xC1BCC6B5.ps_5_1.hlsl +++ /dev/null @@ -1,1388 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.3.16 on Wed Dec 18 01:13:05 2024 -cbuffer cb0 : register(b0) { - float4 cb0[67]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r1.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r1.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[66].y * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r2.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r2.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r2.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r2.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.xyz = cb0[44].yyy ? r1.xyz : r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - if (cb0[44].y != 0) { - r2.x = dot(r1.xyz, cb0[28].xyz); - r2.y = dot(r1.xyz, cb0[29].xyz); - r2.z = dot(r1.xyz, cb0[30].xyz); - r0.w = dot(r1.xyz, cb0[33].xyz); - r0.w = 1 + r0.w; - r0.w = rcp(r0.w); - r3.xyz = cb0[35].xyz * r0.www + cb0[34].xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r3.xyz = cb0[31].xxx + -r2.xyz; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r4.xyz = max(cb0[31].zzz, r2.xyz); - r2.xyz = max(cb0[31].xxx, r2.xyz); - r2.xyz = min(cb0[31].zzz, r2.xyz); - r5.xyz = r4.xyz * cb0[32].xxx + cb0[32].yyy; - r4.xyz = cb0[31].www + r4.xyz; - r4.xyz = rcp(r4.xyz); - r6.xyz = cb0[28].www * r3.xyz; - r3.xyz = cb0[31].yyy + r3.xyz; - r3.xyz = rcp(r3.xyz); - r3.xyz = r6.xyz * r3.xyz + cb0[29].www; - r2.xyz = r2.xyz * cb0[30].www + r3.xyz; - r2.xyz = r5.xyz * r4.xyz + r2.xyz; - r2.xyz = float3(-0.00200000009, -0.00200000009, -0.00200000009) + r2.xyz; - } else { - r3.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r3.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r3.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r3.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r3.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r0.w = min(r3.y, r3.z); - r0.w = min(r0.w, r3.w); - r1.w = max(r3.y, r3.z); - r1.w = max(r1.w, r3.w); - r4.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r4.x + -r0.w; - r0.w = r0.w / r4.y; - r4.xyz = r3.wzy + -r3.zyw; - r4.xy = r4.xy * r3.wz; - r1.w = r4.x + r4.y; - r1.w = r3.y * r4.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r3.w + r3.z; - r2.w = r2.w + r3.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.x = -0.400000006 + r0.w; - r4.x = 2.5 * r3.x; - r4.x = 1 + -abs(r4.x); - r4.x = max(0, r4.x); - r4.y = cmp(0 < r3.x); - r3.x = cmp(r3.x < 0); - r3.x = (int)-r4.y + (int)r3.x; - r3.x = (int)r3.x; - r4.x = -r4.x * r4.x + 1; - r3.x = r3.x * r4.x + 1; - r3.x = 0.0250000004 * r3.x; - r4.x = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.x * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.x ? r3.x : r1.w; - r1.w = 1 + r1.w; - r4.yzw = r3.yzw * r1.www; - r5.xy = cmp(r4.zw == r4.yz); - r2.w = r5.y ? r5.x : 0; - r3.x = r3.z * r1.w + -r4.w; - r3.x = 1.73205078 * r3.x; - r3.z = r4.y * 2 + -r4.z; - r3.z = -r3.w * r1.w + r3.z; - r3.w = min(abs(r3.x), abs(r3.z)); - r5.x = max(abs(r3.x), abs(r3.z)); - r5.x = 1 / r5.x; - r3.w = r5.x * r3.w; - r5.x = r3.w * r3.w; - r5.y = r5.x * 0.0208350997 + -0.0851330012; - r5.y = r5.x * r5.y + 0.180141002; - r5.y = r5.x * r5.y + -0.330299497; - r5.x = r5.x * r5.y + 0.999866009; - r5.y = r5.x * r3.w; - r5.z = cmp(abs(r3.z) < abs(r3.x)); - r5.y = r5.y * -2 + 1.57079637; - r5.y = r5.z ? r5.y : 0; - r3.w = r3.w * r5.x + r5.y; - r5.x = cmp(r3.z < -r3.z); - r5.x = r5.x ? -3.141593 : 0; - r3.w = r5.x + r3.w; - r5.x = min(r3.x, r3.z); - r3.x = max(r3.x, r3.z); - r3.z = cmp(r5.x < -r5.x); - r3.x = cmp(r3.x >= -r3.x); - r3.x = r3.x ? r3.z : 0; - r3.x = r3.x ? -r3.w : r3.w; - r3.x = 57.2957802 * r3.x; - r2.w = r2.w ? 0 : r3.x; - r3.x = cmp(r2.w < 0); - r3.z = 360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.x = cmp(180 < r2.w); - r3.z = -360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.x * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r3.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r4.x = r0.w * 0.180000007 + r4.y; - r3.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r4.xzw); - r3.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r4.xzw); - r3.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r4.xzw); - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r4.xy = float2(1, 0.180000007) + cb0[36].ww; - r0.w = -cb0[36].y + r4.x; - r1.w = 1 + cb0[37].x; - r2.w = -cb0[36].z + r1.w; - r3.w = cmp(0.800000012 < cb0[36].y); - r4.xz = float2(0.819999993, 1) + -cb0[36].yy; - r4.xz = r4.xz / cb0[36].xx; - r4.y = r4.y / r0.w; - r4.xw = float2(-0.744727492, -1) + r4.xy; - r4.w = 1 + -r4.w; - r4.y = r4.y / r4.w; - r4.y = log2(r4.y); - r4.y = 0.346573591 * r4.y; - r4.w = r0.w / cb0[36].x; - r4.y = -r4.y * r4.w + -0.744727492; - r3.w = r3.w ? r4.x : r4.y; - r4.x = r4.z + -r3.w; - r4.y = cb0[36].z / cb0[36].x; - r4.y = r4.y + -r4.x; - r3.xyz = log2(r3.xyz); - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r3.xyz; - r4.xzw = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.xxx; - r4.xzw = cb0[36].xxx * r4.xzw; - r5.w = r0.w + r0.w; - r6.x = -2 * cb0[36].x; - r0.w = r6.x / r0.w; - r6.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r7.xyz = r6.xyz * r0.www; - r7.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = float3(1, 1, 1) + r7.xyz; - r7.xyz = r5.www / r7.xyz; - r7.xyz = -cb0[36].www + r7.xyz; - r0.w = r2.w + r2.w; - r5.w = cb0[36].x + cb0[36].x; - r2.w = r5.w / r2.w; - r3.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r4.yyy; - r3.xyz = r3.xyz * r2.www; - r3.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r3.xyz = float3(1, 1, 1) + r3.xyz; - r3.xyz = r0.www / r3.xyz; - r3.xyz = -r3.xyz + r1.www; - r8.xyz = cmp(r5.xyz < r3.www); - r7.xyz = r8.xyz ? r7.xyz : r4.xzw; - r5.xyz = cmp(r4.yyy < r5.xyz); - r3.xyz = r5.xyz ? r3.xyz : r4.xzw; - r0.w = r4.y + -r3.w; - r4.xzw = saturate(r6.xyz / r0.www); - r0.w = cmp(r4.y < r3.w); - r5.xyz = float3(1, 1, 1) + -r4.xzw; - r4.xyz = r0.www ? r5.xyz : r4.xzw; - r5.xyz = -r4.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r4.xyz = r4.xyz * r4.xyz; - r4.xyz = r4.xyz * r5.xyz; - r3.xyz = r3.xyz + -r7.xyz; - r3.xyz = r4.xyz * r3.xyz + r7.xyz; - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].zzz * r3.xyz + r0.xyz; - r3.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r3.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r3.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r3.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r3.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r2.xyz = max(float3(0, 0, 0), r3.xyz); - } - r0.xyz = r2.xyz * r2.xyz; - r2.xyz = cb0[26].yyy * r2.xyz; - r0.xyz = cb0[26].xxx * r0.xyz + r2.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xC2A711CC.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xC2A711CC.ps_5_1.hlsl deleted file mode 100644 index 3d4c607b..00000000 --- a/src/games/ue-dx12/lutbuilder_0xC2A711CC.ps_5_1.hlsl +++ /dev/null @@ -1,1386 +0,0 @@ -// ---- Created with 3Dmigoto v1.3.16 on Thu Oct 17 13:24:17 2024 -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r5.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r5.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r5.xyz; - r3.xyz = r2.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r3.xyz; - r4.xyz = r2.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r5.xyz; - r3.xyz = r2.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r3.xyz; - r4.xyz = r2.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r2.yzw; - - r0.z = cmp(asuint(cb0[40].w) >= 3); - - // PQ Decode - r5.xy = log2(r0.xy); - r5.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r5.xyz; - r0.xyw = exp2(r0.xyw); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r5.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[36].z * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r5.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r5.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r5.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r5.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r5.xyz = r5.xyz * r5.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r5.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r1.xyz = r1.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].z; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r0.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].x + -cb0[35].w; - r3.w = -cb0[35].w + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r0.xyz = r6.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r6.xyz = r7.xyz * r7.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r6.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r0.xyz = r0.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r5.xyz * r4.www + r0.xyz; - - // CustomEdit - float3 untonemapped_ap1 = r0.xyz; - - // Blue correct - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = cb0[36].yyy * r1.xyz + r0.xyz; - - // start of film tonemap - // AP1 => AP0 - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r1.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r1.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r1.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - // aces::hueweight (with smoothstep) - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - // AP0 => AP1 - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; // End of ACES:RRT - - // Film Toe > 0.8 - r6.xy = cb0[37].ww + float2(1, 0.180000007); - r0.w = -cb0[37].y + r6.x; - r1.w = cb0[38].x + 1; - r2.w = -cb0[37].z + r1.w; - r3.w = cmp(0.800000012 < cb0[37].y); - r6.xz = -cb0[37].yy + float2(0.819999993, 1); - r6.xz = r6.xz / cb0[37].xx; - r4.w = -0.744727492 + r6.x; - r5.w = r6.y / r0.w; - r6.x = -1 + r5.w; - r6.x = 1 + -r6.x; - r5.w = r5.w / r6.x; - r5.w = log2(r5.w); - r5.w = 0.346573591 * r5.w; - r6.x = r0.w / cb0[37].x; - r5.w = -r5.w * r6.x + -0.744727492; - r3.w = r3.w ? r4.w : r5.w; - r4.w = r6.z + -r3.w; - r5.w = cb0[37].z / cb0[37].x; - r5.w = r5.w + -r4.w; - r5.xyz = log2(r5.xyz); - r6.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r7.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.www; - r7.xyz = cb0[37].xxx * r7.xyz; - r4.w = r0.w + r0.w; - r6.w = cb0[37].x * -2; - r0.w = r6.w / r0.w; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r9.xyz = r8.xyz * r0.www; - r9.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r9.xyz; - r9.xyz = exp2(r9.xyz); - r9.xyz = float3(1, 1, 1) + r9.xyz; - r9.xyz = r4.www / r9.xyz; - r9.xyz = -cb0[37].www + r9.xyz; - r0.w = r2.w + r2.w; - r4.w = cb0[37].x + cb0[37].x; - r2.w = r4.w / r2.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r5.www; - r5.xyz = r5.xyz * r2.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r0.www / r5.xyz; - r5.xyz = -r5.xyz + r1.www; - r10.xyz = cmp(r6.xyz < r3.www); - r9.xyz = r10.xyz ? r9.xyz : r7.xyz; - r6.xyz = cmp(r5.www < r6.xyz); - r5.xyz = r6.xyz ? r5.xyz : r7.xyz; - r0.w = r5.w + -r3.w; - r6.xyz = saturate(r8.xyz / r0.www); - r0.w = cmp(r5.w < r3.w); - r7.xyz = float3(1, 1, 1) + -r6.xyz; - r6.xyz = r0.www ? r7.xyz : r6.xyz; - r7.xyz = -r6.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r6.xyz = r6.xyz * r6.xyz; - r6.xyz = r6.xyz * r7.xyz; - r5.xyz = r5.xyz + -r9.xyz; - r5.xyz = r6.xyz * r5.xyz + r9.xyz; - // AP1_RGB2Y - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].www * r5.xyz + r1.xyz; - - // BlueBlueCorrectInv - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r1.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r1.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r1.xyz); - r5.xyz = r5.xyz + -r1.xyz; - r1.xyz = cb0[36].yyy * r5.xyz + r1.xyz; - - r5.x = saturate(dot(cb1[12].xyz, r1.xyz)); - r5.y = saturate(dot(cb1[13].xyz, r1.xyz)); - r5.z = saturate(dot(cb1[14].xyz, r1.xyz)); - - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r5.xyz; - r6.xyz = cmp(r5.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r5.xyz = log2(r5.xyz); - r5.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = r5.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r1.xyz = r6.xyz ? r5.xyz : r1.xyz; - r5.yzw = r1.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r5.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r5.y + r1.w; - r5.x = 0.0625 * r1.w; - r6.xyz = t0.Sample(s0_s, r5.xz).xyz; - r5.xy = float2(0.0625, 0) + r5.xz; - r5.xyz = t0.Sample(s0_s, r5.xy).xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r0.www * r5.xyz + r6.xyz; - r5.xyz = cb0[5].yyy * r5.xyz; - r1.xyz = cb0[5].xxx * r1.xyz + r5.xyz; - r1.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r1.xyz); - r5.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r1.xyz); - r6.xyz = r1.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r1.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r1.xyz; - r1.xyz = r5.xyz ? r6.xyz : r1.xyz; - - r5.xyz = r1.xyz * r1.xyz; - r1.xyz = cb0[39].yyy * r1.xyz; - r1.xyz = cb0[39].xxx * r5.xyz + r1.xyz; - r1.xyz = cb0[39].zzz + r1.xyz; - r5.xyz = cb0[14].xyz * r1.xyz; - r1.xyz = -r1.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r1.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r1.xyz); - r5.xyz = log2(r5.xyz); - - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - // CustomEdit - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { // cb[40].w = output device - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r3.xyz, r6.xyz); - r7.y = dot(r4.xyz, r6.xyz); - r7.z = dot(r2.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r0.xyz); - r7.y = dot(cb1[13].xyz, r0.xyz); - r7.z = dot(cb1[14].xyz, r0.xyz); - r0.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r7.xyz + r0.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r0.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r0.xyz); - r7.y = dot(cb1[9].xyz, r0.xyz); - r7.z = dot(cb1[10].xyz, r0.xyz); - r8.x = dot(r3.xyz, r7.xyz); - r8.y = dot(r4.xyz, r7.xyz); - r8.z = dot(r2.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r1.xyz); - r8.y = dot(cb1[9].xyz, r1.xyz); - r8.z = dot(cb1[10].xyz, r1.xyz); - r1.x = dot(r3.xyz, r8.xyz); - r1.y = dot(r4.xyz, r8.xyz); - r1.z = dot(r2.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r3.xyz, r8.xyz); - r1.w = dot(r4.xyz, r8.xyz); - r2.x = dot(r2.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.x); - r2.xyz = cb0[40].zzz * r3.xyz; - r2.xyz = exp2(r2.xyz); - r1.xyz = r7.yyy ? r1.xyz : r2.xyz; - r6.xyz = r7.xxx ? r0.xyz : r1.xyz; - } - } - } - } - } - - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xCA383248.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xCA383248.ps_5_1.hlsl deleted file mode 100644 index 98766c3f..00000000 --- a/src/games/ue-dx12/lutbuilder_0xCA383248.ps_5_1.hlsl +++ /dev/null @@ -1,403 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:03:14 2024 -Texture2D t1 : register(t1); - -Texture2D t0 : register(t0); - -SamplerState s1_s : register(s1); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r0.xyz = float3(14, 14, 14) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r0.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r1.xyz); - r0.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r1.xyz); - r0.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r1.xyz); - r0.xyz = r0.xyz + -r1.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r2.xyz = r1.xyz / r0.www; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r1.w = dot(r2.xyz, r2.xyz); - r1.w = -4 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + -r1.w; - r0.w = r1.w * r0.w; - r0.xyz = r0.www * r0.xyz + r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.xyz = r0.xyz + -r0.www; - r1.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r1.xyz = r1.xyz * r1.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r2.xyz = r2.xyz * r2.www; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r1.xyz = log2(r1.xyz); - r2.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r2.xyz = r2.xyz * r2.www; - r3.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.x = 1 + -r1.w; - r2.y = -cb0[36].x + r0.w; - r2.z = cb0[36].y + -cb0[36].x; - r2.z = 1 / r2.z; - r2.y = saturate(r2.y * r2.z); - r2.z = r2.y * -2 + 3; - r2.y = r2.y * r2.y; - r2.x = -r2.z * r2.y + r2.x; - r2.y = r2.z * r2.y; - r1.xyz = r2.xxx * r1.xyz; - r3.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = r2.xzw * r0.xyz + r0.www; - r2.xzw = max(float3(0, 0, 0), r2.xzw); - r2.xzw = float3(5.55555534, 5.55555534, 5.55555534) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r3.xyz = r3.xyz * r3.www; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r2.xzw = float3(0.180000007, 0.180000007, 0.180000007) * r2.xzw; - r2.xzw = log2(r2.xzw); - r3.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r3.xyz = r3.xyz * r3.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xzw = r3.xyz * r2.xzw; - r2.xzw = exp2(r2.xzw); - r3.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r3.xyz = r3.xyz * r3.www; - r4.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz + r4.www; - r2.xzw = r2.xzw * r3.xyz + r4.xyz; - r1.xyz = r2.xzw * r1.www + r1.xyz; - r3.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r2.xzw = r3.xyz * r3.www; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r0.xyz = log2(r0.xyz); - r3.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r2.xzw = r3.xyz * r3.www; - r2.xzw = float3(1, 1, 1) / r2.xzw; - r0.xyz = r2.xzw * r0.xyz; - r0.xyz = exp2(r0.xyz); - r3.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r2.xzw = r3.xyz * r3.www; - r3.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r3.xyz = r3.xyz + r3.www; - r0.xyz = r0.xyz * r2.xzw + r3.xyz; - r0.xyz = r0.xyz * r2.yyy + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r1.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r1.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r1.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r1.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r2.xyz = r1.wzy + -r1.zyw; - r2.xy = r2.xy * r1.wz; - r0.w = r2.x + r2.y; - r0.w = r1.y * r2.z + r0.w; - r0.w = sqrt(r0.w); - r1.x = r1.w + r1.z; - r1.x = r1.x + r1.y; - r0.w = r0.w * 1.75 + r1.x; - r1.x = 0.333333343 * r0.w; - r1.x = 0.0799999982 / r1.x; - r1.x = -0.5 + r1.x; - r2.x = min(r1.y, r1.z); - r2.x = min(r2.x, r1.w); - r2.y = max(r1.y, r1.z); - r2.y = max(r2.y, r1.w); - r2.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 0.00999999978), r2.xyy); - r2.x = r2.y + -r2.x; - r2.x = r2.x / r2.z; - r2.y = -0.400000006 + r2.x; - r2.z = cmp(0 < r2.y); - r2.w = cmp(r2.y < 0); - r2.y = 2.5 * r2.y; - r2.y = 1 + -abs(r2.y); - r2.y = max(0, r2.y); - r2.y = -r2.y * r2.y + 1; - r2.z = (int)-r2.z + (int)r2.w; - r2.z = (int)r2.z; - r2.y = r2.z * r2.y + 1; - r2.y = 0.0250000004 * r2.y; - r1.x = r2.y * r1.x; - r2.z = cmp(r0.w >= 0.479999989); - r0.w = cmp(0.159999996 >= r0.w); - r1.x = r2.z ? 0 : r1.x; - r0.w = r0.w ? r2.y : r1.x; - r0.w = 1 + r0.w; - r3.yzw = r1.yzw * r0.www; - r1.x = -r1.y * r0.w + 0.0299999993; - r1.y = r1.z * r0.w + -r3.w; - r1.y = 1.73205078 * r1.y; - r1.z = r3.y * 2 + -r3.z; - r0.w = -r1.w * r0.w + r1.z; - r1.z = max(abs(r1.y), abs(r0.w)); - r1.z = 1 / r1.z; - r1.w = min(abs(r1.y), abs(r0.w)); - r1.z = r1.w * r1.z; - r1.w = r1.z * r1.z; - r2.y = r1.w * 0.0208350997 + -0.0851330012; - r2.y = r1.w * r2.y + 0.180141002; - r2.y = r1.w * r2.y + -0.330299497; - r1.w = r1.w * r2.y + 0.999866009; - r2.y = r1.z * r1.w; - r2.y = r2.y * -2 + 1.57079637; - r2.z = cmp(abs(r0.w) < abs(r1.y)); - r2.y = r2.z ? r2.y : 0; - r1.z = r1.z * r1.w + r2.y; - r1.w = cmp(r0.w < -r0.w); - r1.w = r1.w ? -3.141593 : 0; - r1.z = r1.z + r1.w; - r1.w = min(r1.y, r0.w); - r0.w = max(r1.y, r0.w); - r0.w = cmp(r0.w >= -r0.w); - r1.y = cmp(r1.w < -r1.w); - r0.w = r0.w ? r1.y : 0; - r0.w = r0.w ? -r1.z : r1.z; - r0.w = 57.2957802 * r0.w; - r1.yz = cmp(r3.zw == r3.yz); - r1.y = r1.z ? r1.y : 0; - r0.w = r1.y ? 0 : r0.w; - r1.y = cmp(r0.w < 0); - r1.z = 360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = max(0, r0.w); - r0.w = min(360, r0.w); - r1.y = cmp(180 < r0.w); - r1.z = -360 + r0.w; - r0.w = r1.y ? r1.z : r0.w; - r0.w = 0.0148148146 * r0.w; - r0.w = 1 + -abs(r0.w); - r0.w = max(0, r0.w); - r1.y = r0.w * -2 + 3; - r0.w = r0.w * r0.w; - r0.w = r1.y * r0.w; - r0.w = r0.w * r0.w; - r0.w = r0.w * r2.x; - r0.w = r0.w * r1.x; - r3.x = r0.w * 0.180000007 + r3.y; - r1.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r3.xzw); - r1.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r3.xzw); - r1.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r3.xzw); - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r1.xyz = log2(r1.xyz); - r0.w = cb0[37].w / cb0[37].y; - r2.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r2.xw = -cb0[37].zw + r2.xy; - r1.w = r2.z / r2.x; - r2.z = -1 + r1.w; - r2.z = 1 + -r2.z; - r1.w = r1.w / r2.z; - r1.w = log2(r1.w); - r1.w = 0.346573591 * r1.w; - r2.z = r2.x / cb0[37].y; - r1.w = -r1.w * r2.z + -0.744727492; - r2.z = cmp(0.800000012 < cb0[37].z); - r3.xy = -cb0[37].zz + float2(0.819999993, 1); - r3.xy = r3.xy / cb0[37].yy; - r3.x = -0.744727492 + r3.x; - r1.w = r2.z ? r3.x : r1.w; - r2.z = r3.y + -r1.w; - r0.w = -r2.z + r0.w; - r3.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r2.zzz; - r3.xyz = cb0[37].yyy * r3.xyz; - r4.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r2.z = cb0[37].y + cb0[37].y; - r2.z = r2.z / r2.w; - r4.xyz = r2.zzz * r4.xyz; - r4.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(1, 1, 1) + r4.xyz; - r2.zw = r2.xw + r2.xw; - r4.xyz = r2.www / r4.xyz; - r4.xyz = -r4.xyz + r2.yyy; - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r1.xyz; - r1.xyz = r1.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r1.www; - r6.xyz = cmp(r0.www < r5.xyz); - r5.xyz = cmp(r5.xyz < r1.www); - r4.xyz = r6.xyz ? r4.xyz : r3.xyz; - r2.y = cb0[37].y * -2; - r2.x = r2.y / r2.x; - r2.xyw = r2.xxx * r1.xyz; - r2.xyw = float3(1.44269502, 1.44269502, 1.44269502) * r2.xyw; - r2.xyw = exp2(r2.xyw); - r2.xyw = float3(1, 1, 1) + r2.xyw; - r2.xyz = r2.zzz / r2.xyw; - r2.xyz = -cb0[38].xxx + r2.xyz; - r2.xyz = r5.xyz ? r2.xyz : r3.xyz; - r3.xyz = r4.xyz + -r2.xyz; - r2.w = r0.w + -r1.w; - r0.w = cmp(r0.w < r1.w); - r1.xyz = saturate(r1.xyz / r2.www); - r4.xyz = float3(1, 1, 1) + -r1.xyz; - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.xyz = -r1.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r1.xyz = r1.xyz * r1.xyz; - r1.xyz = r1.xyz * r4.xyz; - r1.xyz = r1.xyz * r3.xyz + r2.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r1.xyz + -r0.www; - r1.xyz = r1.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[37].xxx * r1.xyz + r0.xyz; - r1.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r1.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r1.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r0.xyz = cb0[36].zzz * r1.xyz + r0.xyz; - r1.x = saturate(dot(cb1[12].xyz, r0.xyz)); - r1.y = saturate(dot(cb1[13].xyz, r0.xyz)); - r1.z = saturate(dot(cb1[14].xyz, r0.xyz)); - r0.xyz = log2(r1.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r1.xyz; - r1.xyz = cmp(r1.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = r1.xyz ? r0.xyz : r2.xyz; - r1.yzw = r0.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r1.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.y = r1.y + r1.w; - r1.x = 0.0625 * r1.y; - r1.yw = float2(0.0625, 0) + r1.xz; - r2.xyz = t0.Sample(s0_s, r1.yw).xyz; - r3.xyz = t1.Sample(s1_s, r1.yw).xyz; - r4.xyz = t0.Sample(s0_s, r1.xz).xyz; - r1.xyz = t1.Sample(s1_s, r1.xz).xyz; - r2.xyz = -r4.xyz + r2.xyz; - r2.xyz = r0.www * r2.xyz + r4.xyz; - r2.xyz = cb0[5].yyy * r2.xyz; - r0.xyz = cb0[5].xxx * r0.xyz + r2.xyz; - r2.xyz = r3.xyz + -r1.xyz; - r1.xyz = r0.www * r2.xyz + r1.xyz; - r0.xyz = cb0[5].zzz * r1.xyz + r0.xyz; - r0.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r0.xyz); - r1.xyz = r0.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r1.xyz = log2(r1.xyz); - r1.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r0.xyz); - r0.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r0.xyz; - r0.xyz = r2.xyz ? r1.xyz : r0.xyz; - r1.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[39].yyy * r0.xyz; - r0.xyz = cb0[39].xxx * r1.xyz + r0.xyz; - r0.xyz = cb0[39].zzz + r0.xyz; - r1.xyz = cb0[14].xyz * r0.xyz; - r0.xyz = -r0.xyz * cb0[14].xyz + cb0[13].xyz; - r0.xyz = cb0[13].www * r0.xyz + r1.xyz; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = log2(r0.xyz); - r0.xyz = cb0[40].yyy * r0.xyz; - r0.xyz = exp2(r0.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r0.xyz); - return; - } - - r1.x = dot(cb1[8].xyz, r0.xyz); - r1.y = dot(cb1[9].xyz, r0.xyz); - r1.z = dot(cb1[10].xyz, r0.xyz); - r2.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r3.xyz = r2.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r2.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r3.xyz; - r3.xyz = r2.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r3.xyz; - r3.xyz = r2.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r3.xyz; - r3.x = dot(r3.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r2.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r4.xyz; - r4.xyz = r2.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r4.xyz; - r4.xyz = r2.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r4.xyz; - r3.y = dot(r4.xyz, r1.xyz); - r4.xyz = r2.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r4.xyz = r2.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.yzw = r2.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r2.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r2.yzw; - r3.z = dot(r2.xyz, r1.xyz); - r0.xyz = cb1[20].xxx ? r0.xyz : r3.xyz; - r1.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r0.xyz; - r2.xyz = cmp(r0.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r0.xyz = log2(r0.xyz); - r0.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r0.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r2.xyz ? r0.xyz : r1.xyz; - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r0.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xCC8FD0FF.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xCC8FD0FF.ps_5_1.hlsl deleted file mode 100644 index d7065a36..00000000 --- a/src/games/ue-dx12/lutbuilder_0xCC8FD0FF.ps_5_1.hlsl +++ /dev/null @@ -1,1292 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.3.16 on Wed Dec 25 01:33:54 2024 -cbuffer cb0 : register(b0) { - float4 cb0[67]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r0.w = 1.00055635 * cb0[44].y; - r1.x = cmp(6996.10791 >= cb0[44].y); - r1.yz = float2(4.60700006e+09, 2.0064e+09) / r0.ww; - r1.yz = float2(2967800, 1901800) + -r1.yz; - r1.yz = r1.yz / r0.ww; - r1.yz = float2(99.1100006, 247.479996) + r1.yz; - r1.yz = r1.yz / r0.ww; - r1.yz = float2(0.244063005, 0.237039998) + r1.yz; - r1.x = r1.x ? r1.y : r1.z; - r0.w = r1.x * r1.x; - r1.z = 2.86999989 * r1.x; - r0.w = r0.w * -3 + r1.z; - r1.y = -0.275000006 + r0.w; - r2.xyz = cb0[44].yyy * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[44].y * cb0[44].y; - r2.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r2.xyz; - r2.x = r2.x / r2.y; - r1.z = -cb0[44].y * 2.8974182e-05 + 1; - r0.w = r0.w * 1.61456057e-07 + r1.z; - r2.y = r2.z / r0.w; - r1.zw = r2.xy + r2.xy; - r0.w = 3 * r2.x; - r1.z = -r2.y * 8 + r1.z; - r1.z = 4 + r1.z; - r3.x = r0.w / r1.z; - r3.y = r1.w / r1.z; - r0.w = cmp(cb0[44].y < 4000); - r1.xy = r0.ww ? r3.xy : r1.xy; - r0.w = dot(r2.xy, r2.xy); - r0.w = rsqrt(r0.w); - r1.zw = r2.xy * r0.ww; - r0.w = cb0[44].z * -r1.w; - r0.w = r0.w * 0.0500000007 + r2.x; - r1.z = cb0[44].z * r1.z; - r1.z = r1.z * 0.0500000007 + r2.y; - r1.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.z * 8 + r0.w; - r0.w = 4 + r0.w; - r1.z = r1.z + r1.z; - r2.xy = r1.wz / r0.ww; - r1.zw = r2.xy + -r3.xy; - r1.xy = r1.xy + r1.zw; - r0.w = max(1.00000001e-10, r1.y); - r2.x = r1.x / r0.w; - r1.x = 1 + -r1.x; - r1.x = r1.x + -r1.y; - r2.z = r1.x / r0.w; - r2.y = 1; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r2.xyz); - r1.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r2.xyz); - r1.y = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r2.xyz); - r0.w = 0.941379249 / r0.w; - r1.xy = float2(1.04043639, 1.0897665) / r1.xy; - r2.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r1.xzw = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.xxx; - r3.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r1.yyy; - r4.x = r2.x; - r4.y = r1.x; - r4.z = r3.x; - r5.x = dot(float3(0.986992896, -0.1470543, 0.159962699), r4.xyz); - r6.x = r2.y; - r6.y = r1.z; - r6.z = r3.y; - r5.y = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r3.x = r2.z; - r3.y = r1.w; - r5.z = dot(float3(0.986992896, -0.1470543, 0.159962699), r3.xyz); - r1.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r4.xyz); - r1.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r1.z = dot(float3(0.432305306, 0.518360317, 0.0492912009), r3.xyz); - r2.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r4.xyz); - r2.y = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r2.z = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r3.xyz); - r3.x = dot(r5.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.x = dot(r5.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.x = dot(r5.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.y = dot(r1.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.y = dot(r1.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.y = dot(r1.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.z = dot(r2.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.z = dot(r2.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.z = dot(r2.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r1.x = dot(float3(3.2409699, -1.5373832, -0.498610765), r3.xyz); - r1.y = dot(float3(3.2409699, -1.5373832, -0.498610765), r4.xyz); - r1.z = dot(float3(3.2409699, -1.5373832, -0.498610765), r5.xyz); - r2.x = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r3.xyz); - r2.y = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r4.xyz); - r2.z = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r5.xyz); - r3.x = dot(float3(0.0556300804, -0.203976959, 1.05697155), r3.xyz); - r3.y = dot(float3(0.0556300804, -0.203976959, 1.05697155), r4.xyz); - r3.z = dot(float3(0.0556300804, -0.203976959, 1.05697155), r5.xyz); - r1.x = dot(r1.xyz, r0.xyz); - r1.y = dot(r2.xyz, r0.xyz); - r1.z = dot(r3.xyz, r0.xyz); - r0.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r0.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r0.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r0.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[66].y * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r0.xyz); - r1.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r0.xyz); - r1.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = r0.www * r1.xyz + r0.xyz; - r0.xyz = cb0[44].xxx ? r0.xyz : r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r0.xyz = max(float3(0, 0, 0), r1.xyz); - r2.xyz = r0.xyz * r0.xyz; - r2.xyz = r2.xyz * r2.xyz; - r2.xyz = r2.xyz * r2.xyz + float3(1, 1, 1); - r2.xyz = log2(r2.xyz); - r2.xyz = float3(0.125, 0.125, 0.125) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(-1, -1, -1) + r2.xyz; - r0.xyz = -r2.xyz + r0.xyz; - r2.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[26].yyy * r0.xyz; - r0.xyz = cb0[26].xxx * r2.xyz + r0.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xD4A45A02.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xD4A45A02.ps_5_1.hlsl deleted file mode 100644 index 80d0f3b9..00000000 --- a/src/games/ue-dx12/lutbuilder_0xD4A45A02.ps_5_1.hlsl +++ /dev/null @@ -1,1521 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb0 : register(b0) { - float4 cb0[67]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r0.w = 1.00055635 * cb0[44].z; - r0.w = 1 / r0.w; - r1.x = cmp(6996.10791 >= cb0[44].z); - r1.yz = -r0.ww * float2(4.60700006e+09, 2.0064e+09) + float2(2967800, 1901800); - r1.yz = r1.yz * r0.ww + float2(99.1100006, 247.479996); - r1.yz = r1.yz * r0.ww + float2(0.244063005, 0.237039998); - r1.x = r1.x ? r1.y : r1.z; - r0.w = r1.x * r1.x; - r1.z = 2.86999989 * r1.x; - r0.w = r0.w * -3 + r1.z; - r1.y = -0.275000006 + r0.w; - r2.xyz = cb0[44].zzz * float3(0.000154118257, 0.00084242021, 4.22806261e-05) + float3(0.860117733, 1, 0.317398727); - r0.w = cb0[44].z * cb0[44].z; - r2.xyz = r0.www * float3(1.28641219e-07, 7.08145137e-07, 4.20481676e-08) + r2.xyz; - r2.x = r2.x / r2.y; - r1.z = -cb0[44].z * 2.8974182e-05 + 1; - r0.w = r0.w * 1.61456057e-07 + r1.z; - r2.y = r2.z / r0.w; - r1.zw = r2.xy + r2.xy; - r0.w = 3 * r2.x; - r1.z = -r2.y * 8 + r1.z; - r1.z = 4 + r1.z; - r3.x = r0.w / r1.z; - r3.y = r1.w / r1.z; - r0.w = cmp(cb0[44].z < 4000); - r1.xy = r0.ww ? r3.xy : r1.xy; - r0.w = dot(r2.xy, r2.xy); - r0.w = rsqrt(r0.w); - r1.zw = r2.xy * r0.ww; - r0.w = cb0[44].w * -r1.w; - r0.w = r0.w * 0.0500000007 + r2.x; - r1.z = cb0[44].w * r1.z; - r1.z = r1.z * 0.0500000007 + r2.y; - r1.w = 3 * r0.w; - r0.w = r0.w + r0.w; - r0.w = -r1.z * 8 + r0.w; - r0.w = 4 + r0.w; - r1.z = r1.z + r1.z; - r2.xy = r1.wz / r0.ww; - r1.zw = r2.xy + -r3.xy; - r1.xy = r1.xy + r1.zw; - r1.zw = float2(0.312700003, 0.328999996); - r1.xyzw = cb0[44].xxxx ? r1.xyzw : r1.zwxy; - r2.xy = max(float2(1.00000001e-10, 1.00000001e-10), r1.yw); - r2.zw = float2(1, 1) + -r1.xz; - r1.yw = r2.zw + -r1.yw; - r3.xy = r1.xz / r2.xy; - r1.xy = r1.yw / r2.xy; - r3.z = 1; - r3.w = r1.x; - r0.w = dot(float3(0.895099998, 0.266400009, -0.161400005), r3.xzw); - r1.x = dot(float3(-0.750199974, 1.71350002, 0.0366999991), r3.xzw); - r2.x = dot(float3(0.0388999991, -0.0684999973, 1.02960002), r3.xzw); - r1.zw = r3.yz; - r2.y = dot(float3(-0.161400005, 0.895099998, 0.266400009), r1.yzw); - r2.z = dot(float3(0.0366999991, -0.750199974, 1.71350002), r1.yzw); - r1.y = dot(float3(1.02960002, 0.0388999991, -0.0684999973), r1.yzw); - r0.w = r2.y / r0.w; - r1.x = r2.z / r1.x; - r1.y = r1.y / r2.x; - r2.xyz = float3(0.895099998, 0.266400009, -0.161400005) * r0.www; - r1.xzw = float3(-0.750199974, 1.71350002, 0.0366999991) * r1.xxx; - r3.xyz = float3(0.0388999991, -0.0684999973, 1.02960002) * r1.yyy; - r4.x = r2.x; - r4.y = r1.x; - r4.z = r3.x; - r5.x = dot(float3(0.986992896, -0.1470543, 0.159962699), r4.xyz); - r6.x = r2.y; - r6.y = r1.z; - r6.z = r3.y; - r5.y = dot(float3(0.986992896, -0.1470543, 0.159962699), r6.xyz); - r3.x = r2.z; - r3.y = r1.w; - r5.z = dot(float3(0.986992896, -0.1470543, 0.159962699), r3.xyz); - r1.x = dot(float3(0.432305306, 0.518360317, 0.0492912009), r4.xyz); - r1.y = dot(float3(0.432305306, 0.518360317, 0.0492912009), r6.xyz); - r1.z = dot(float3(0.432305306, 0.518360317, 0.0492912009), r3.xyz); - r2.x = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r4.xyz); - r2.y = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r6.xyz); - r2.z = dot(float3(-0.0085287001, 0.040042799, 0.968486726), r3.xyz); - r3.x = dot(r5.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.x = dot(r5.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.x = dot(r5.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.y = dot(r1.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.y = dot(r1.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.y = dot(r1.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r3.z = dot(r2.xyz, float3(0.412456393, 0.212672904, 0.0193339009)); - r4.z = dot(r2.xyz, float3(0.357576102, 0.715152204, 0.119191997)); - r5.z = dot(r2.xyz, float3(0.180437505, 0.0721750036, 0.950304091)); - r1.x = dot(float3(3.2409699, -1.5373832, -0.498610765), r3.xyz); - r1.y = dot(float3(3.2409699, -1.5373832, -0.498610765), r4.xyz); - r1.z = dot(float3(3.2409699, -1.5373832, -0.498610765), r5.xyz); - r2.x = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r3.xyz); - r2.y = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r4.xyz); - r2.z = dot(float3(-0.969243646, 1.8759675, 0.0415550582), r5.xyz); - r3.x = dot(float3(0.0556300804, -0.203976959, 1.05697155), r3.xyz); - r3.y = dot(float3(0.0556300804, -0.203976959, 1.05697155), r4.xyz); - r3.z = dot(float3(0.0556300804, -0.203976959, 1.05697155), r5.xyz); - r1.x = dot(r1.xyz, r0.xyz); - r1.y = dot(r2.xyz, r0.xyz); - r1.z = dot(r3.xyz, r0.xyz); - r0.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r0.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r0.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r0.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[66].y * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r0.xyz); - r1.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r0.xyz); - r1.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r0.xyz); - r1.xyz = r1.xyz + -r0.xyz; - r1.xyz = r0.www * r1.xyz + r0.xyz; - r0.xyz = cb0[44].yyy ? r0.xyz : r1.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - float3 untonemapped_ap1 = r1.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - if (cb0[44].y != 0) { - r2.x = dot(r1.xyz, cb0[28].xyz); - r2.y = dot(r1.xyz, cb0[29].xyz); - r2.z = dot(r1.xyz, cb0[30].xyz); - r0.w = dot(r1.xyz, cb0[33].xyz); - r0.w = 1 + r0.w; - r0.w = rcp(r0.w); - r3.xyz = cb0[35].xyz * r0.www + cb0[34].xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r3.xyz = cb0[31].xxx + -r2.xyz; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r4.xyz = max(cb0[31].zzz, r2.xyz); - r2.xyz = max(cb0[31].xxx, r2.xyz); - r2.xyz = min(cb0[31].zzz, r2.xyz); - r5.xyz = r4.xyz * cb0[32].xxx + cb0[32].yyy; - r4.xyz = cb0[31].www + r4.xyz; - r4.xyz = rcp(r4.xyz); - r6.xyz = cb0[28].www * r3.xyz; - r3.xyz = cb0[31].yyy + r3.xyz; - r3.xyz = rcp(r3.xyz); - r3.xyz = r6.xyz * r3.xyz + cb0[29].www; - r2.xyz = r2.xyz * cb0[30].www + r3.xyz; - r2.xyz = r5.xyz * r4.xyz + r2.xyz; - r2.xyz = float3(-0.00200000009, -0.00200000009, -0.00200000009) + r2.xyz; - } else { - r3.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r3.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r3.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r3.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r3.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r0.w = min(r3.y, r3.z); - r0.w = min(r0.w, r3.w); - r1.w = max(r3.y, r3.z); - r1.w = max(r1.w, r3.w); - r4.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r4.x + -r0.w; - r0.w = r0.w / r4.y; - r4.xyz = r3.wzy + -r3.zyw; - r4.xy = r4.xy * r3.wz; - r1.w = r4.x + r4.y; - r1.w = r3.y * r4.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r3.w + r3.z; - r2.w = r2.w + r3.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.x = -0.400000006 + r0.w; - r4.x = 2.5 * r3.x; - r4.x = 1 + -abs(r4.x); - r4.x = max(0, r4.x); - r4.y = cmp(0 < r3.x); - r3.x = cmp(r3.x < 0); - r3.x = (int)-r4.y + (int)r3.x; - r3.x = (int)r3.x; - r4.x = -r4.x * r4.x + 1; - r3.x = r3.x * r4.x + 1; - r3.x = 0.0250000004 * r3.x; - r4.x = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.x * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.x ? r3.x : r1.w; - r1.w = 1 + r1.w; - r4.yzw = r3.yzw * r1.www; - r5.xy = cmp(r4.zw == r4.yz); - r2.w = r5.y ? r5.x : 0; - r3.x = r3.z * r1.w + -r4.w; - r3.x = 1.73205078 * r3.x; - r3.z = r4.y * 2 + -r4.z; - r3.z = -r3.w * r1.w + r3.z; - r3.w = min(abs(r3.x), abs(r3.z)); - r5.x = max(abs(r3.x), abs(r3.z)); - r5.x = 1 / r5.x; - r3.w = r5.x * r3.w; - r5.x = r3.w * r3.w; - r5.y = r5.x * 0.0208350997 + -0.0851330012; - r5.y = r5.x * r5.y + 0.180141002; - r5.y = r5.x * r5.y + -0.330299497; - r5.x = r5.x * r5.y + 0.999866009; - r5.y = r5.x * r3.w; - r5.z = cmp(abs(r3.z) < abs(r3.x)); - r5.y = r5.y * -2 + 1.57079637; - r5.y = r5.z ? r5.y : 0; - r3.w = r3.w * r5.x + r5.y; - r5.x = cmp(r3.z < -r3.z); - r5.x = r5.x ? -3.141593 : 0; - r3.w = r5.x + r3.w; - r5.x = min(r3.x, r3.z); - r3.x = max(r3.x, r3.z); - r3.z = cmp(r5.x < -r5.x); - r3.x = cmp(r3.x >= -r3.x); - r3.x = r3.x ? r3.z : 0; - r3.x = r3.x ? -r3.w : r3.w; - r3.x = 57.2957802 * r3.x; - r2.w = r2.w ? 0 : r3.x; - r3.x = cmp(r2.w < 0); - r3.z = 360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.x = cmp(180 < r2.w); - r3.z = -360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.x * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r3.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r4.x = r0.w * 0.180000007 + r4.y; - r3.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r4.xzw); - r3.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r4.xzw); - r3.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r4.xzw); - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r4.xy = float2(1, 0.180000007) + cb0[36].ww; - r0.w = -cb0[36].y + r4.x; - r1.w = 1 + cb0[37].x; - r2.w = -cb0[36].z + r1.w; - r3.w = cmp(0.800000012 < cb0[36].y); - r4.xz = float2(0.819999993, 1) + -cb0[36].yy; - r4.xz = r4.xz / cb0[36].xx; - r4.y = r4.y / r0.w; - r4.xw = float2(-0.744727492, -1) + r4.xy; - r4.w = 1 + -r4.w; - r4.y = r4.y / r4.w; - r4.y = log2(r4.y); - r4.y = 0.346573591 * r4.y; - r4.w = r0.w / cb0[36].x; - r4.y = -r4.y * r4.w + -0.744727492; - r3.w = r3.w ? r4.x : r4.y; - r4.x = r4.z + -r3.w; - r4.y = cb0[36].z / cb0[36].x; - r4.y = r4.y + -r4.x; - r3.xyz = log2(r3.xyz); - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r3.xyz; - r4.xzw = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.xxx; - r4.xzw = cb0[36].xxx * r4.xzw; - r5.w = r0.w + r0.w; - r6.x = -2 * cb0[36].x; - r0.w = r6.x / r0.w; - r6.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r7.xyz = r6.xyz * r0.www; - r7.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = float3(1, 1, 1) + r7.xyz; - r7.xyz = r5.www / r7.xyz; - r7.xyz = -cb0[36].www + r7.xyz; - r0.w = r2.w + r2.w; - r5.w = cb0[36].x + cb0[36].x; - r2.w = r5.w / r2.w; - r3.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r4.yyy; - r3.xyz = r3.xyz * r2.www; - r3.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r3.xyz = float3(1, 1, 1) + r3.xyz; - r3.xyz = r0.www / r3.xyz; - r3.xyz = -r3.xyz + r1.www; - r8.xyz = cmp(r5.xyz < r3.www); - r7.xyz = r8.xyz ? r7.xyz : r4.xzw; - r5.xyz = cmp(r4.yyy < r5.xyz); - r3.xyz = r5.xyz ? r3.xyz : r4.xzw; - r0.w = r4.y + -r3.w; - r4.xzw = saturate(r6.xyz / r0.www); - r0.w = cmp(r4.y < r3.w); - r5.xyz = float3(1, 1, 1) + -r4.xzw; - r4.xyz = r0.www ? r5.xyz : r4.xzw; - r5.xyz = -r4.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r4.xyz = r4.xyz * r4.xyz; - r4.xyz = r4.xyz * r5.xyz; - r3.xyz = r3.xyz + -r7.xyz; - r3.xyz = r4.xyz * r3.xyz + r7.xyz; - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].zzz * r3.xyz + r0.xyz; - r3.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r3.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r3.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r3.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r3.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r2.xyz = max(float3(0, 0, 0), r3.xyz); - } - r2.xyz = saturate(r2.xyz); - r0.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r2.xyz; - r3.xyz = cmp(r2.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = log2(r2.xyz); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r3.xyz ? r2.xyz : r0.xyz; - r2.yzw = r0.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r2.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r2.y + r1.w; - r2.x = 0.0625 * r1.w; - r3.xyz = t0.Sample(s0_s, r2.xz).xyz; - r2.xy = float2(0.0625, 0) + r2.xz; - r2.xyz = t0.Sample(s0_s, r2.xy).xyz; - r2.xyz = r2.xyz + -r3.xyz; - r2.xyz = r0.www * r2.xyz + r3.xyz; - r2.xyz = cb0[39].xxx * r2.xyz; - r0.xyz = cb0[38].xxx * r0.xyz + r2.xyz; - r0.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r0.xyz); - r2.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r0.xyz); - r3.xyz = r0.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r3.xyz = log2(r3.xyz); - r3.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r0.xyz; - r0.xyz = r2.xyz ? r3.xyz : r0.xyz; - r2.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[26].yyy * r0.xyz; - r0.xyz = cb0[26].xxx * r2.xyz + r0.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xE6EB2840.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xE6EB2840.ps_5_1.hlsl deleted file mode 100644 index 5b405ef0..00000000 --- a/src/games/ue-dx12/lutbuilder_0xE6EB2840.ps_5_1.hlsl +++ /dev/null @@ -1,1420 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb0 : register(b0) { - float4 cb0[67]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - const float4 icb[] = { { -4.000000, -0.718548, -4.970622, 0.808913 }, - { -4.000000, 2.081031, -3.029378, 1.191087 }, - { -3.157377, 3.668124, -2.126200, 1.568300 }, - { -0.485250, 4.000000, -1.510500, 1.948300 }, - { 1.847732, 4.000000, -1.057800, 2.308300 }, - { 1.847732, 4.000000, -0.466800, 2.638400 }, - { -2.301030, 0.801995, 0.119380, 2.859500 }, - { -2.301030, 1.198005, 0.708813, 2.987261 }, - { -1.931200, 1.594300, 1.291187, 3.012739 }, - { -1.520500, 1.997300, 1.291187, 3.012739 }, - { -1.057800, 2.378300, 0, 0 }, - { -0.466800, 2.768400, 0, 0 }, - { 0.119380, 3.051500, 0, 0 }, - { 0.708813, 3.274629, 0, 0 }, - { 1.291187, 3.327431, 0, 0 }, - { 1.291187, 3.327431, 0, 0 } }; - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12; - uint4 bitmask, uiDest; - float4 fDest; - - r0.xy = float2(-0.015625, -0.015625) + v0.xy; - r0.xy = float2(1.03225803, 1.03225803) * r0.xy; - r0.z = (uint)v2.x; - r1.z = 0.0322580636 * r0.z; - r0.z = cmp(asuint(cb0[65].z) >= 3); - r2.xy = log2(r0.xy); - r2.z = log2(r1.z); - r0.xyw = float3(0.0126833133, 0.0126833133, 0.0126833133) * r2.xyz; - r0.xyw = exp2(r0.xyw); - r2.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r0.xyw; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r0.xyw = -r0.xyw * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r0.xyw = r2.xyz / r0.xyw; - r0.xyw = log2(r0.xyw); - r0.xyw = float3(6.27739477, 6.27739477, 6.27739477) * r0.xyw; - r0.xyw = exp2(r0.xyw); - r0.xyw = float3(100, 100, 100) * r0.xyw; - r1.xy = v0.xy * float2(1.03225803, 1.03225803) + float2(-0.0161290318, -0.0161290318); - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r0.xyz = r0.zzz ? r0.xyw : r1.xyz; - r1.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r1.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r1.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r0.yzw = r1.xyz / r0.xxx; - r0.yzw = float3(-1, -1, -1) + r0.yzw; - r0.y = dot(r0.yzw, r0.yzw); - r0.y = -4 * r0.y; - r0.y = exp2(r0.y); - r0.x = r0.x * r0.x; - r0.x = cb0[66].y * r0.x; - r0.x = -4 * r0.x; - r0.x = exp2(r0.x); - r0.xy = float2(1, 1) + -r0.xy; - r0.x = r0.y * r0.x; - r2.x = dot(float3(1.37041271, -0.329291314, -0.0636827648), r1.xyz); - r2.y = dot(float3(-0.0834341869, 1.09709096, -0.0108615728), r1.xyz); - r2.z = dot(float3(-0.0257932581, -0.0986256376, 1.20369434), r1.xyz); - r0.yzw = r2.xyz + -r1.xyz; - r0.xyz = r0.xxx * r0.yzw + r1.xyz; - r0.xyz = cb0[44].yyy ? r1.xyz : r0.xyz; - r0.w = dot(r0.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyzw = cb0[50].xyzw * cb0[45].xyzw; - r2.xyzw = cb0[51].xyzw * cb0[46].xyzw; - r3.xyzw = cb0[52].xyzw * cb0[47].xyzw; - r4.xyzw = cb0[53].xyzw * cb0[48].xyzw; - r5.xyzw = cb0[54].xyzw + cb0[49].xyzw; - r1.xyz = r1.xyz * r1.www; - r0.xyz = r0.xyz + -r0.www; - r1.xyz = r1.xyz * r0.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r2.xyz = r2.xyz * r2.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r2.xyz = r3.xyz * r3.www; - r2.xyz = float3(1, 1, 1) / r2.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r2.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r2.xyz = r4.xyz * r4.www; - r3.xyz = r5.xyz + r5.www; - r1.xyz = r1.xyz * r2.xyz + r3.xyz; - r1.w = 1 / cb0[65].x; - r1.w = saturate(r1.w * r0.w); - r2.x = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.x * r1.w + 1; - r2.xyzw = cb0[60].xyzw * cb0[45].xyzw; - r3.xyzw = cb0[61].xyzw * cb0[46].xyzw; - r4.xyzw = cb0[62].xyzw * cb0[47].xyzw; - r5.xyzw = cb0[63].xyzw * cb0[48].xyzw; - r6.xyzw = cb0[64].xyzw + cb0[49].xyzw; - r2.xyz = r2.xyz * r2.www; - r2.xyz = r2.xyz * r0.xyz + r0.www; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r2.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r2.xyz; - r3.xyz = r3.xyz * r3.www; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r2.xyz; - r3.xyz = r4.xyz * r4.www; - r3.xyz = float3(1, 1, 1) / r3.xyz; - r2.xyz = log2(r2.xyz); - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = exp2(r2.xyz); - r3.xyz = r5.xyz * r5.www; - r4.xyz = r6.xyz + r6.www; - r2.xyz = r2.xyz * r3.xyz + r4.xyz; - r2.w = 1 + -cb0[65].y; - r3.x = -cb0[65].y + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.x * r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r3.y = r3.x * r2.w; - r4.xyzw = cb0[55].xyzw * cb0[45].xyzw; - r5.xyzw = cb0[56].xyzw * cb0[46].xyzw; - r6.xyzw = cb0[57].xyzw * cb0[47].xyzw; - r7.xyzw = cb0[58].xyzw * cb0[48].xyzw; - r8.xyzw = cb0[59].xyzw + cb0[49].xyzw; - r4.xyz = r4.xyz * r4.www; - r0.xyz = r4.xyz * r0.xyz + r0.www; - r0.xyz = max(float3(0, 0, 0), r0.xyz); - r0.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r0.xyz; - r4.xyz = r5.xyz * r5.www; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r0.xyz; - r4.xyz = r6.xyz * r6.www; - r4.xyz = float3(1, 1, 1) / r4.xyz; - r0.xyz = log2(r0.xyz); - r0.xyz = r4.xyz * r0.xyz; - r0.xyz = exp2(r0.xyz); - r4.xyz = r7.xyz * r7.www; - r5.xyz = r8.xyz + r8.www; - r0.xyz = r0.xyz * r4.xyz + r5.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.x * r2.w + r0.w; - r0.xyz = r0.xyz * r0.www; - r0.xyz = r1.xyz * r1.www + r0.xyz; - r0.xyz = r2.xyz * r3.yyy + r0.xyz; - - float3 untonemapped_ap1 = r1.xyz; - - r1.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r1.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r1.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - if (cb0[44].y != 0) { - r2.x = dot(r1.xyz, cb0[28].xyz); - r2.y = dot(r1.xyz, cb0[29].xyz); - r2.z = dot(r1.xyz, cb0[30].xyz); - r0.w = dot(r1.xyz, cb0[33].xyz); - r0.w = 1 + r0.w; - r0.w = rcp(r0.w); - r3.xyz = cb0[35].xyz * r0.www + cb0[34].xyz; - r2.xyz = r3.xyz * r2.xyz; - r2.xyz = max(float3(0, 0, 0), r2.xyz); - r3.xyz = cb0[31].xxx + -r2.xyz; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r4.xyz = max(cb0[31].zzz, r2.xyz); - r2.xyz = max(cb0[31].xxx, r2.xyz); - r2.xyz = min(cb0[31].zzz, r2.xyz); - r5.xyz = r4.xyz * cb0[32].xxx + cb0[32].yyy; - r4.xyz = cb0[31].www + r4.xyz; - r4.xyz = rcp(r4.xyz); - r6.xyz = cb0[28].www * r3.xyz; - r3.xyz = cb0[31].yyy + r3.xyz; - r3.xyz = rcp(r3.xyz); - r3.xyz = r6.xyz * r3.xyz + cb0[29].www; - r2.xyz = r2.xyz * cb0[30].www + r3.xyz; - r2.xyz = r5.xyz * r4.xyz + r2.xyz; - r2.xyz = float3(-0.00200000009, -0.00200000009, -0.00200000009) + r2.xyz; - } else { - r3.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r0.xyz); - r3.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r0.xyz); - r3.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r0.xyz); - r3.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r0.xyz); - r3.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r0.xyz); - r0.w = min(r3.y, r3.z); - r0.w = min(r0.w, r3.w); - r1.w = max(r3.y, r3.z); - r1.w = max(r1.w, r3.w); - r4.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r4.x + -r0.w; - r0.w = r0.w / r4.y; - r4.xyz = r3.wzy + -r3.zyw; - r4.xy = r4.xy * r3.wz; - r1.w = r4.x + r4.y; - r1.w = r3.y * r4.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r3.w + r3.z; - r2.w = r2.w + r3.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.x = -0.400000006 + r0.w; - r4.x = 2.5 * r3.x; - r4.x = 1 + -abs(r4.x); - r4.x = max(0, r4.x); - r4.y = cmp(0 < r3.x); - r3.x = cmp(r3.x < 0); - r3.x = (int)-r4.y + (int)r3.x; - r3.x = (int)r3.x; - r4.x = -r4.x * r4.x + 1; - r3.x = r3.x * r4.x + 1; - r3.x = 0.0250000004 * r3.x; - r4.x = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.x * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.x ? r3.x : r1.w; - r1.w = 1 + r1.w; - r4.yzw = r3.yzw * r1.www; - r5.xy = cmp(r4.zw == r4.yz); - r2.w = r5.y ? r5.x : 0; - r3.x = r3.z * r1.w + -r4.w; - r3.x = 1.73205078 * r3.x; - r3.z = r4.y * 2 + -r4.z; - r3.z = -r3.w * r1.w + r3.z; - r3.w = min(abs(r3.x), abs(r3.z)); - r5.x = max(abs(r3.x), abs(r3.z)); - r5.x = 1 / r5.x; - r3.w = r5.x * r3.w; - r5.x = r3.w * r3.w; - r5.y = r5.x * 0.0208350997 + -0.0851330012; - r5.y = r5.x * r5.y + 0.180141002; - r5.y = r5.x * r5.y + -0.330299497; - r5.x = r5.x * r5.y + 0.999866009; - r5.y = r5.x * r3.w; - r5.z = cmp(abs(r3.z) < abs(r3.x)); - r5.y = r5.y * -2 + 1.57079637; - r5.y = r5.z ? r5.y : 0; - r3.w = r3.w * r5.x + r5.y; - r5.x = cmp(r3.z < -r3.z); - r5.x = r5.x ? -3.141593 : 0; - r3.w = r5.x + r3.w; - r5.x = min(r3.x, r3.z); - r3.x = max(r3.x, r3.z); - r3.z = cmp(r5.x < -r5.x); - r3.x = cmp(r3.x >= -r3.x); - r3.x = r3.x ? r3.z : 0; - r3.x = r3.x ? -r3.w : r3.w; - r3.x = 57.2957802 * r3.x; - r2.w = r2.w ? 0 : r3.x; - r3.x = cmp(r2.w < 0); - r3.z = 360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.x = cmp(180 < r2.w); - r3.z = -360 + r2.w; - r2.w = r3.x ? r3.z : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.x = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.x * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r3.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r4.x = r0.w * 0.180000007 + r4.y; - r3.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r4.xzw); - r3.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r4.xzw); - r3.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r4.xzw); - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r4.xy = float2(1, 0.180000007) + cb0[36].ww; - r0.w = -cb0[36].y + r4.x; - r1.w = 1 + cb0[37].x; - r2.w = -cb0[36].z + r1.w; - r3.w = cmp(0.800000012 < cb0[36].y); - r4.xz = float2(0.819999993, 1) + -cb0[36].yy; - r4.xz = r4.xz / cb0[36].xx; - r4.y = r4.y / r0.w; - r4.xw = float2(-0.744727492, -1) + r4.xy; - r4.w = 1 + -r4.w; - r4.y = r4.y / r4.w; - r4.y = log2(r4.y); - r4.y = 0.346573591 * r4.y; - r4.w = r0.w / cb0[36].x; - r4.y = -r4.y * r4.w + -0.744727492; - r3.w = r3.w ? r4.x : r4.y; - r4.x = r4.z + -r3.w; - r4.y = cb0[36].z / cb0[36].x; - r4.y = r4.y + -r4.x; - r3.xyz = log2(r3.xyz); - r5.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r3.xyz; - r4.xzw = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r4.xxx; - r4.xzw = cb0[36].xxx * r4.xzw; - r5.w = r0.w + r0.w; - r6.x = -2 * cb0[36].x; - r0.w = r6.x / r0.w; - r6.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r3.www; - r7.xyz = r6.xyz * r0.www; - r7.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = float3(1, 1, 1) + r7.xyz; - r7.xyz = r5.www / r7.xyz; - r7.xyz = -cb0[36].www + r7.xyz; - r0.w = r2.w + r2.w; - r5.w = cb0[36].x + cb0[36].x; - r2.w = r5.w / r2.w; - r3.xyz = r3.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r4.yyy; - r3.xyz = r3.xyz * r2.www; - r3.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r3.xyz = float3(1, 1, 1) + r3.xyz; - r3.xyz = r0.www / r3.xyz; - r3.xyz = -r3.xyz + r1.www; - r8.xyz = cmp(r5.xyz < r3.www); - r7.xyz = r8.xyz ? r7.xyz : r4.xzw; - r5.xyz = cmp(r4.yyy < r5.xyz); - r3.xyz = r5.xyz ? r3.xyz : r4.xzw; - r0.w = r4.y + -r3.w; - r4.xzw = saturate(r6.xyz / r0.www); - r0.w = cmp(r4.y < r3.w); - r5.xyz = float3(1, 1, 1) + -r4.xzw; - r4.xyz = r0.www ? r5.xyz : r4.xzw; - r5.xyz = -r4.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r4.xyz = r4.xyz * r4.xyz; - r4.xyz = r4.xyz * r5.xyz; - r3.xyz = r3.xyz + -r7.xyz; - r3.xyz = r4.xyz * r3.xyz + r7.xyz; - r0.w = dot(r3.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r3.xyz = r3.xyz + -r0.www; - r3.xyz = r3.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r3.xyz = max(float3(0, 0, 0), r3.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].zzz * r3.xyz + r0.xyz; - r3.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r0.xyz); - r3.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r0.xyz); - r3.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r0.xyz); - r3.xyz = r3.xyz + -r0.xyz; - r0.xyz = cb0[66].xxx * r3.xyz + r0.xyz; - r3.x = dot(float3(1.70505154, -0.621790707, -0.0832583979), r0.xyz); - r3.y = dot(float3(-0.130257145, 1.14080286, -0.0105485283), r0.xyz); - r3.z = dot(float3(-0.0240032747, -0.128968775, 1.15297174), r0.xyz); - r2.xyz = max(float3(0, 0, 0), r3.xyz); - } - r2.xyz = saturate(r2.xyz); - r0.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r2.xyz; - r3.xyz = cmp(r2.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = log2(r2.xyz); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r0.xyz = r3.xyz ? r2.xyz : r0.xyz; - r2.yzw = r0.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r2.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r2.y + r1.w; - r2.x = 0.0625 * r1.w; - r3.xyz = t0.Sample(s0_s, r2.xz).xyz; - r2.xy = float2(0.0625, 0) + r2.xz; - r2.xyz = t0.Sample(s0_s, r2.xy).xyz; - r2.xyz = r2.xyz + -r3.xyz; - r2.xyz = r0.www * r2.xyz + r3.xyz; - r2.xyz = cb0[39].xxx * r2.xyz; - r0.xyz = cb0[38].xxx * r0.xyz + r2.xyz; - r0.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r0.xyz); - r2.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r0.xyz); - r3.xyz = r0.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r3.xyz = log2(r3.xyz); - r3.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r0.xyz; - r0.xyz = r2.xyz ? r3.xyz : r0.xyz; - r2.xyz = r0.xyz * r0.xyz; - r0.xyz = cb0[26].yyy * r0.xyz; - r0.xyz = cb0[26].xxx * r2.xyz + r0.xyz; - r0.xyz = cb0[26].zzz + r0.xyz; - r2.xyz = cb0[42].yzw * r0.xyz; - r0.xyz = -r0.xyz * cb0[42].yzw + cb0[43].xyz; - r0.xyz = cb0[43].www * r0.xyz + r2.xyz; - r2.xyz = max(float3(0, 0, 0), r0.xyz); - r2.xyz = log2(r2.xyz); - r2.xyz = cb0[27].yyy * r2.xyz; - r3.xyz = exp2(r2.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r3.xyz); - return; - } - - if (cb0[65].z == 0) { - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r3.xyz; - r5.xyz = cmp(r3.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r2.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r2.xyz; - r2.xyz = exp2(r2.xyz); - r2.xyz = r2.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r2.xyz = r5.xyz ? r2.xyz : r4.xyz; - } else { - r4.xyzw = cmp(asint(cb0[65].wwww) == int4(1, 2, 3, 4)); - r5.xyz = r4.www ? float3(1, 0, 0) : float3(1.70505154, -0.621790707, -0.0832583979); - r6.xyz = r4.www ? float3(0, 1, 0) : float3(-0.130257145, 1.14080286, -0.0105485283); - r7.xyz = r4.www ? float3(0, 0, 1) : float3(-0.0240032747, -0.128968775, 1.15297174); - r5.xyz = r4.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r5.xyz; - r6.xyz = r4.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r6.xyz; - r7.xyz = r4.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r7.xyz; - r5.xyz = r4.yyy ? float3(1.02579927, -0.0200525094, -0.00577136781) : r5.xyz; - r6.xyz = r4.yyy ? float3(-0.00223502493, 1.00458264, -0.00235231337) : r6.xyz; - r4.yzw = r4.yyy ? float3(-0.00501400325, -0.0252933875, 1.03044021) : r7.xyz; - r5.xyz = r4.xxx ? float3(1.37915885, -0.308850735, -0.0703467429) : r5.xyz; - r6.xyz = r4.xxx ? float3(-0.0693352968, 1.08229232, -0.0129620517) : r6.xyz; - r4.xyz = r4.xxx ? float3(-0.00215925858, -0.0454653986, 1.04775953) : r4.yzw; - r0.w = cmp(asint(cb0[65].z) == 1); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r2.xyz = min(r8.xyz, r7.xyz); - } else { - r7.xyz = cb0[42].yzw * r1.xyz; - r1.xyz = -r1.xyz * cb0[42].yzw + cb0[43].xyz; - r1.xyz = cb0[43].www * r1.xyz + r7.xyz; - r7.xy = cmp(asint(cb0[65].zz) == int2(3, 5)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = r0.w * 0.90309 + 7.54498291; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].z; - r9.y = icb[r8.x + 0].z; - r9.z = icb[r8.y + 0].z; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.1373367); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.3549509 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.3549509 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 0].w; - r9.y = icb[r8.x + 0].w; - r9.z = icb[r8.y + 0].w; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.1373367); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.3549509 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.3549509 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = r0.w * 0.90309 + 7.54498291; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].z; - r10.y = icb[r9.x + 0].z; - r10.z = icb[r9.y + 0].z; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.1373367); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.3549509 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.3549509 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 0].w; - r10.y = icb[r9.x + 0].w; - r10.z = icb[r9.y + 0].w; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0180617999 + 2.78077793; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r7.xyz = float3(-3.50738446e-05, -3.50738446e-05, -3.50738446e-05) + r7.xyz; - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(4, 6)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = float3(1.5, 1.5, 1.5) * r1.xyz; - r8.y = dot(float3(0.439700812, 0.382978052, 0.1773348), r7.xyz); - r8.z = dot(float3(0.0897923037, 0.813423157, 0.096761629), r7.xyz); - r8.w = dot(float3(0.0175439864, 0.111544058, 0.870704114), r7.xyz); - r0.w = min(r8.y, r8.z); - r0.w = min(r0.w, r8.w); - r1.w = max(r8.y, r8.z); - r1.w = max(r1.w, r8.w); - r7.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r7.x + -r0.w; - r0.w = r0.w / r7.y; - r7.xyz = r8.wzy + -r8.zyw; - r7.xy = r8.wz * r7.xy; - r1.w = r7.x + r7.y; - r1.w = r8.y * r7.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r8.w + r8.z; - r2.w = r2.w + r8.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r7.yzw = r8.yzw * r1.www; - r9.xy = cmp(r7.zw == r7.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r8.z * r1.w + -r7.w; - r3.w = 1.73205078 * r3.w; - r4.w = r7.y * 2 + -r7.z; - r4.w = -r8.w * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r8.x = r6.w * 0.0208350997 + -0.0851330012; - r8.x = r6.w * r8.x + 0.180141002; - r8.x = r6.w * r8.x + -0.330299497; - r6.w = r6.w * r8.x + 0.999866009; - r8.x = r6.w * r5.w; - r8.z = cmp(abs(r4.w) < abs(r3.w)); - r8.x = r8.x * -2 + 1.57079637; - r8.x = r8.z ? r8.x : 0; - r5.w = r5.w * r6.w + r8.x; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r8.xzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r8.xz = r3.ww * float2(0.5, 0.5) + r8.xz; - r8.xz = r2.ww * float2(-0.5, 0.5) + r8.xz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r8.xz = float2(0.166666672, 0.166666672) + r8.xz; - r3.w = r4.w ? 0 : r8.w; - r3.w = r9.z ? r8.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r8.x : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r8.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r7.x = r0.w * 0.180000007 + r7.y; - r7.xyz = max(float3(0, 0, 0), r7.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r8.xyz = cmp(float3(0, 0, 0) >= r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = r8.xyz ? float3(-14, -14, -14) : r7.xyz; - r8.xyz = cmp(float3(-17.4739323, -17.4739323, -17.4739323) >= r7.xyz); - if (r8.x != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.x); - r2.w = cmp(r7.x < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.664385557 + -r2.w; - r8.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r8.x + 0].x; - r10.z = icb[r8.w + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r1.w = cmp(r7.x >= -2.47393107); - r2.w = cmp(r7.x < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.x * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r9.y = r1.w * 0.553654671 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r9.x = r9.y * r9.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r7.x + 0].y; - r10.z = icb[r7.w + 0].y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r0.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.x = exp2(r0.w); - if (r8.y != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.y); - r2.w = cmp(r7.y < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.664385557 + -r2.w; - r7.xw = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].x; - r11.y = icb[r7.x + 0].x; - r11.z = icb[r7.w + 0].x; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r1.w = cmp(r7.y >= -2.47393107); - r2.w = cmp(r7.y < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.y * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r10.y = r1.w * 0.553654671 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r10.x = r10.y * r10.y; - r11.x = icb[r3.w + 0].y; - r11.y = icb[r7.x + 0].y; - r11.z = icb[r7.y + 0].y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r0.w = dot(r10.xyz, r12.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.y = exp2(r0.w); - if (r8.z != 0) { - r0.w = -4; - } else { - r1.w = cmp(-17.4739323 < r7.z); - r2.w = cmp(r7.z < -2.47393107); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 5.26017761; - r2.w = 0.664385557 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r8.y = r1.w * 0.664385557 + -r2.w; - r7.xy = (int2)r3.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r3.w + 0].x; - r10.y = icb[r7.x + 0].x; - r10.z = icb[r7.y + 0].x; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r0.w = dot(r8.xyz, r11.xyz); - } else { - r1.w = cmp(r7.z >= -2.47393107); - r2.w = cmp(r7.z < 15.5260687); - r1.w = r1.w ? r2.w : 0; - if (r1.w != 0) { - r1.w = r7.z * 0.30103001 + 0.744727492; - r2.w = 0.553654671 * r1.w; - r3.w = (int)r2.w; - r2.w = trunc(r2.w); - r7.y = r1.w * 0.553654671 + -r2.w; - r8.xy = (int2)r3.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r10.x = icb[r3.w + 0].y; - r10.y = icb[r8.x + 0].y; - r10.z = icb[r8.y + 0].y; - r8.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r10.xy, float2(-1, 1)); - r8.z = dot(r10.xy, float2(0.5, 0.5)); - r7.z = 1; - r0.w = dot(r7.xyz, r8.xyz); - } else { - r0.w = 4; - } - } - } - r0.w = 3.32192802 * r0.w; - r9.z = exp2(r0.w); - r7.x = dot(float3(0.695452213, 0.140678704, 0.163869068), r9.xyz); - r7.y = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r9.xyz); - r7.z = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r9.xyz); - r0.w = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r1.w = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r2.w = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r3.w = cmp(0 >= r0.w); - r0.w = log2(r0.w); - r0.w = r3.w ? -13.2877121 : r0.w; - r3.w = cmp(-12.7838678 >= r0.w); - if (r3.w != 0) { - r3.w = -2.30102992; - } else { - r4.w = cmp(-12.7838678 < r0.w); - r5.w = cmp(r0.w < 2.26303458); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + 3.84832764; - r5.w = 1.54540098 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 1.54540098 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].x; - r9.y = icb[r8.x + 6].x; - r9.z = icb[r8.y + 6].x; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r4.w = cmp(r0.w >= 2.26303458); - r5.w = cmp(r0.w < 12.4948215); - r4.w = r4.w ? r5.w : 0; - if (r4.w != 0) { - r4.w = r0.w * 0.30103001 + -0.681241274; - r5.w = 2.27267218 * r4.w; - r6.w = (int)r5.w; - r5.w = trunc(r5.w); - r7.y = r4.w * 2.27267218 + -r5.w; - r8.xy = (int2)r6.ww + int2(1, 2); - r7.x = r7.y * r7.y; - r9.x = icb[r6.w + 6].y; - r9.y = icb[r8.x + 6].y; - r9.z = icb[r8.y + 6].y; - r8.x = dot(r9.xzy, float3(0.5, 0.5, -1)); - r8.y = dot(r9.xy, float2(-1, 1)); - r8.z = dot(r9.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r8.xyz); - } else { - r3.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r3.w; - r7.x = exp2(r0.w); - r0.w = cmp(0 >= r1.w); - r1.w = log2(r1.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r3.w = cmp(-12.7838678 < r0.w); - r4.w = cmp(r0.w < 2.26303458); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + 3.84832764; - r4.w = 1.54540098 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 1.54540098 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r3.w = cmp(r0.w >= 2.26303458); - r4.w = cmp(r0.w < 12.4948215); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r3.w = r0.w * 0.30103001 + -0.681241274; - r4.w = 2.27267218 * r3.w; - r5.w = (int)r4.w; - r4.w = trunc(r4.w); - r8.y = r3.w * 2.27267218 + -r4.w; - r9.xy = (int2)r5.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r5.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.y = exp2(r0.w); - r0.w = cmp(0 >= r2.w); - r1.w = log2(r2.w); - r0.w = r0.w ? -13.2877121 : r1.w; - r1.w = cmp(-12.7838678 >= r0.w); - if (r1.w != 0) { - r1.w = -2.30102992; - } else { - r2.w = cmp(-12.7838678 < r0.w); - r3.w = cmp(r0.w < 2.26303458); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + 3.84832764; - r3.w = 1.54540098 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 1.54540098 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].x; - r10.y = icb[r9.x + 6].x; - r10.z = icb[r9.y + 6].x; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r2.w = cmp(r0.w >= 2.26303458); - r3.w = cmp(r0.w < 12.4948215); - r2.w = r2.w ? r3.w : 0; - if (r2.w != 0) { - r2.w = r0.w * 0.30103001 + -0.681241274; - r3.w = 2.27267218 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r8.y = r2.w * 2.27267218 + -r3.w; - r9.xy = (int2)r4.ww + int2(1, 2); - r8.x = r8.y * r8.y; - r10.x = icb[r4.w + 6].y; - r10.y = icb[r9.x + 6].y; - r10.z = icb[r9.y + 6].y; - r9.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r10.xy, float2(-1, 1)); - r9.z = dot(r10.xy, float2(0.5, 0.5)); - r8.z = 1; - r1.w = dot(r8.xyz, r9.xyz); - } else { - r1.w = r0.w * 0.0361235999 + 2.84967208; - } - } - } - r0.w = 3.32192802 * r1.w; - r7.z = exp2(r0.w); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(asint(cb0[65].z) == 7); - if (r0.w != 0) { - r7.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r1.xyz); - r7.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r1.xyz); - r7.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r1.xyz); - r8.x = dot(r5.xyz, r7.xyz); - r8.y = dot(r6.xyz, r7.xyz); - r8.z = dot(r4.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r2.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(asint(cb0[65].zz) == int2(8, 9)); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r0.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r0.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r0.xyz); - r0.x = dot(r5.xyz, r8.xyz); - r0.y = dot(r6.xyz, r8.xyz); - r0.z = dot(r4.xyz, r8.xyz); - r8.x = dot(float3(0.613191485, 0.33951208, 0.0473663323), r3.xyz); - r8.y = dot(float3(0.0702069029, 0.916335821, 0.0134500116), r3.xyz); - r8.z = dot(float3(0.0206188709, 0.109567292, 0.869606733), r3.xyz); - r0.w = dot(r5.xyz, r8.xyz); - r1.w = dot(r6.xyz, r8.xyz); - r2.w = dot(r4.xyz, r8.xyz); - r3.x = log2(r0.w); - r3.y = log2(r1.w); - r3.z = log2(r2.w); - r3.xyz = cb0[27].zzz * r3.xyz; - r3.xyz = exp2(r3.xyz); - r0.xyz = r7.yyy ? r0.xyz : r3.xyz; - r2.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r2.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/lutbuilder_0xF6AA7756.ps_5_1.hlsl b/src/games/ue-dx12/lutbuilder_0xF6AA7756.ps_5_1.hlsl deleted file mode 100644 index c083435f..00000000 --- a/src/games/ue-dx12/lutbuilder_0xF6AA7756.ps_5_1.hlsl +++ /dev/null @@ -1,1452 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -// ---- Created with 3Dmigoto v1.4.1 on Thu Dec 26 02:04:33 2024 -Texture2D t0 : register(t0); - -SamplerState s0_s : register(s0); - -cbuffer cb1 : register(b1) { - float4 cb1[21]; -} - -cbuffer cb0 : register(b0) { - float4 cb0[42]; -} - -// 3Dmigoto declarations -#define cmp - - -void main( - linear noperspective float2 v0: TEXCOORD0, - float4 v1: SV_POSITION0, - uint v2: SV_RenderTargetArrayIndex0, - out float4 o0: SV_Target0) { - float4 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14; - uint4 bitmask, uiDest; - float4 fDest; - - r0.x = 0.5 / cb0[35].x; - r0.xy = v0.xy + -r0.xx; - r0.xy = cb0[35].xx * r0.xy; - r0.z = cb0[35].x + -1; - r1.xy = r0.xy / r0.zz; - r0.x = (uint)v2.x; - r1.z = r0.x / r0.z; - r0.xyzw = cmp(int4(1, 2, 3, 4) == asint(cb0[41].xxxx)); - r2.xyz = r0.www ? float3(1, 0, 0) : float3(1.70505095, -0.621792138, -0.0832588747); - r3.xyz = r0.www ? float3(0, 1, 0) : float3(-0.130256414, 1.14080477, -0.0105483187); - r4.xyz = r0.www ? float3(0, 0, 1) : float3(-0.0240033567, -0.128968969, 1.15297234); - r2.xyz = r0.zzz ? float3(0.695452213, 0.140678704, 0.163869068) : r2.xyz; - r3.xyz = r0.zzz ? float3(0.0447945632, 0.859671116, 0.0955343172) : r3.xyz; - r4.xyz = r0.zzz ? float3(-0.00552588282, 0.00402521016, 1.00150073) : r4.xyz; - r2.xyz = r0.yyy ? float3(1.02582479, -0.0200531911, -0.00577155687) : r2.xyz; - r3.xyz = r0.yyy ? float3(-0.00223436952, 1.00458646, -0.00235213246) : r3.xyz; - r0.yzw = r0.yyy ? float3(-0.00501335133, -0.025290072, 1.03030348) : r4.xyz; - r2.xyz = r0.xxx ? float3(1.37921417, -0.308864146, -0.0703499839) : r2.xyz; - r3.xyz = r0.xxx ? float3(-0.0693348572, 1.08229673, -0.0129618878) : r3.xyz; - r0.xyz = r0.xxx ? float3(-0.00215900945, -0.0454593264, 1.04761839) : r0.yzw; - r0.w = cmp(asuint(cb0[40].w) >= 3); - r4.xyz = log2(r1.xyz); - r4.xyz = float3(0.0126833133, 0.0126833133, 0.0126833133) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = float3(-0.8359375, -0.8359375, -0.8359375) + r4.xyz; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r4.xyz = -r4.xyz * float3(18.6875, 18.6875, 18.6875) + float3(18.8515625, 18.8515625, 18.8515625); - r4.xyz = r5.xyz / r4.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = float3(6.27739477, 6.27739477, 6.27739477) * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(100, 100, 100) * r4.xyz; - r1.xyz = float3(-0.434017599, -0.434017599, -0.434017599) + r1.xyz; - r1.xyz = float3(14, 14, 14) * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = r1.xyz * float3(0.180000007, 0.180000007, 0.180000007) + float3(-0.00266771927, -0.00266771927, -0.00266771927); - r1.xyz = r0.www ? r4.xyz : r1.xyz; - r4.x = dot(cb1[8].xyz, r1.xyz); - r4.y = dot(cb1[9].xyz, r1.xyz); - r4.z = dot(cb1[10].xyz, r1.xyz); - r0.w = dot(r4.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r1.xyz = r4.xyz / r0.www; - r1.xyz = float3(-1, -1, -1) + r1.xyz; - r1.x = dot(r1.xyz, r1.xyz); - r1.x = -4 * r1.x; - r1.x = exp2(r1.x); - r1.x = 1 + -r1.x; - r0.w = r0.w * r0.w; - r0.w = cb0[36].w * r0.w; - r0.w = -4 * r0.w; - r0.w = exp2(r0.w); - r0.w = 1 + -r0.w; - r0.w = r1.x * r0.w; - r1.x = dot(float3(1.37041235, -0.329292178, -0.0636831224), r4.xyz); - r1.y = dot(float3(-0.083433494, 1.09709275, -0.0108613791), r4.xyz); - r1.z = dot(float3(-0.0257933214, -0.0986258015, 1.20369494), r4.xyz); - r1.xyz = r1.xyz + -r4.xyz; - r1.xyz = r0.www * r1.xyz + r4.xyz; - r0.w = dot(r1.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r4.xyzw = cb0[20].xyzw * cb0[15].xyzw; - r5.xyzw = cb0[21].xyzw * cb0[16].xyzw; - r6.xyzw = cb0[22].xyzw * cb0[17].xyzw; - r7.xyzw = cb0[23].xyzw * cb0[18].xyzw; - r8.xyzw = cb0[24].xyzw + cb0[19].xyzw; - r4.xyz = r4.xyz * r4.www; - r1.xyz = r1.xyz + -r0.www; - r4.xyz = r4.xyz * r1.xyz + r0.www; - r4.xyz = max(float3(0, 0, 0), r4.xyz); - r4.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r4.xyz; - r5.xyz = r5.xyz * r5.www; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r4.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r4.xyz; - r5.xyz = r6.xyz * r6.www; - r5.xyz = float3(1, 1, 1) / r5.xyz; - r4.xyz = log2(r4.xyz); - r4.xyz = r5.xyz * r4.xyz; - r4.xyz = exp2(r4.xyz); - r5.xyz = r7.xyz * r7.www; - r6.xyz = r8.xyz + r8.www; - r4.xyz = r4.xyz * r5.xyz + r6.xyz; - r1.w = 1 / cb0[35].w; - r1.w = saturate(r1.w * r0.w); - r2.w = r1.w * -2 + 3; - r1.w = r1.w * r1.w; - r1.w = -r2.w * r1.w + 1; - r5.xyzw = cb0[30].xyzw * cb0[15].xyzw; - r6.xyzw = cb0[31].xyzw * cb0[16].xyzw; - r7.xyzw = cb0[32].xyzw * cb0[17].xyzw; - r8.xyzw = cb0[33].xyzw * cb0[18].xyzw; - r9.xyzw = cb0[34].xyzw + cb0[19].xyzw; - r5.xyz = r5.xyz * r5.www; - r5.xyz = r5.xyz * r1.xyz + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r5.xyz; - r6.xyz = r6.xyz * r6.www; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r5.xyz; - r6.xyz = r7.xyz * r7.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r5.xyz = log2(r5.xyz); - r5.xyz = r6.xyz * r5.xyz; - r5.xyz = exp2(r5.xyz); - r6.xyz = r8.xyz * r8.www; - r7.xyz = r9.xyz + r9.www; - r5.xyz = r5.xyz * r6.xyz + r7.xyz; - r2.w = cb0[36].y + -cb0[36].x; - r3.w = -cb0[36].x + r0.w; - r2.w = 1 / r2.w; - r2.w = saturate(r3.w * r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r4.w = r3.w * r2.w; - r6.xyzw = cb0[25].xyzw * cb0[15].xyzw; - r7.xyzw = cb0[26].xyzw * cb0[16].xyzw; - r8.xyzw = cb0[27].xyzw * cb0[17].xyzw; - r9.xyzw = cb0[28].xyzw * cb0[18].xyzw; - r10.xyzw = cb0[29].xyzw + cb0[19].xyzw; - r6.xyz = r6.xyz * r6.www; - r1.xyz = r6.xyz * r1.xyz + r0.www; - r1.xyz = max(float3(0, 0, 0), r1.xyz); - r1.xyz = float3(5.55555534, 5.55555534, 5.55555534) * r1.xyz; - r6.xyz = r7.xyz * r7.www; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r1.xyz = float3(0.180000007, 0.180000007, 0.180000007) * r1.xyz; - r6.xyz = r8.xyz * r8.www; - r6.xyz = float3(1, 1, 1) / r6.xyz; - r1.xyz = log2(r1.xyz); - r1.xyz = r6.xyz * r1.xyz; - r1.xyz = exp2(r1.xyz); - r6.xyz = r9.xyz * r9.www; - r7.xyz = r10.xyz + r10.www; - r1.xyz = r1.xyz * r6.xyz + r7.xyz; - r0.w = 1 + -r1.w; - r0.w = -r3.w * r2.w + r0.w; - r1.xyz = r1.xyz * r0.www; - r1.xyz = r4.xyz * r1.www + r1.xyz; - r1.xyz = r5.xyz * r4.www + r1.xyz; - - float3 untonemapped_ap1 = r0.xyz; - - r4.x = dot(float3(0.938639402, 1.02359565e-10, 0.0613606237), r1.xyz); - r4.y = dot(float3(8.36008554e-11, 0.830794156, 0.169205874), r1.xyz); - r4.z = dot(float3(2.13187367e-12, -5.63307213e-12, 1), r1.xyz); - r4.xyz = r4.xyz + -r1.xyz; - r4.xyz = cb0[36].zzz * r4.xyz + r1.xyz; - r5.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r4.xyz); - r5.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r4.xyz); - r5.w = dot(float3(-0.00552588236, 0.00402521016, 1.00150073), r4.xyz); - r0.w = min(r5.y, r5.z); - r0.w = min(r0.w, r5.w); - r1.w = max(r5.y, r5.z); - r1.w = max(r1.w, r5.w); - r6.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r6.x + -r0.w; - r0.w = r0.w / r6.y; - r6.xyz = r5.wzy + -r5.zyw; - r6.xy = r6.xy * r5.wz; - r1.w = r6.x + r6.y; - r1.w = r5.y * r6.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r5.w + r5.z; - r2.w = r2.w + r5.y; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.x = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.x + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r6.yzw = r5.yzw * r1.www; - r7.xy = cmp(r6.zw == r6.yz); - r2.w = r7.y ? r7.x : 0; - r3.w = r5.z * r1.w + -r6.w; - r3.w = 1.73205078 * r3.w; - r4.w = r6.y * 2 + -r6.z; - r4.w = -r5.w * r1.w + r4.w; - r5.x = min(abs(r4.w), abs(r3.w)); - r5.z = max(abs(r4.w), abs(r3.w)); - r5.z = 1 / r5.z; - r5.x = r5.x * r5.z; - r5.z = r5.x * r5.x; - r5.w = r5.z * 0.0208350997 + -0.0851330012; - r5.w = r5.z * r5.w + 0.180141002; - r5.w = r5.z * r5.w + -0.330299497; - r5.z = r5.z * r5.w + 0.999866009; - r5.w = r5.x * r5.z; - r7.x = cmp(abs(r4.w) < abs(r3.w)); - r5.w = r5.w * -2 + 1.57079637; - r5.w = r7.x ? r5.w : 0; - r5.x = r5.x * r5.z + r5.w; - r5.z = cmp(r4.w < -r4.w); - r5.z = r5.z ? -3.141593 : 0; - r5.x = r5.x + r5.z; - r5.z = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r5.z < -r5.z); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.x : r5.x; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = 0.0148148146 * r2.w; - r2.w = 1 + -abs(r2.w); - r2.w = max(0, r2.w); - r3.w = r2.w * -2 + 3; - r2.w = r2.w * r2.w; - r2.w = r3.w * r2.w; - r2.w = r2.w * r2.w; - r0.w = r2.w * r0.w; - r1.w = -r5.y * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r6.x = r0.w * 0.180000007 + r6.y; - r5.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r6.xzw); - r5.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r6.xzw); - r5.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r6.xzw); - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r6.xyz = cb0[38].xyx + float3(1, 1, 0.180000007); - r6.xw = -cb0[37].zw + r6.xy; - r0.w = cmp(0.800000012 < cb0[37].z); - r7.xy = -cb0[37].zz + float2(0.819999993, 1); - r7.xy = r7.xy / cb0[37].yy; - r1.w = -0.744727492 + r7.x; - r2.w = r6.z / r6.x; - r3.w = -1 + r2.w; - r3.w = 1 + -r3.w; - r2.w = r2.w / r3.w; - r2.w = log2(r2.w); - r2.w = 0.346573591 * r2.w; - r3.w = r6.x / cb0[37].y; - r2.w = -r2.w * r3.w + -0.744727492; - r0.w = r0.w ? r1.w : r2.w; - r1.w = r7.y + -r0.w; - r2.w = cb0[37].w / cb0[37].y; - r2.w = r2.w + -r1.w; - r5.xyz = log2(r5.xyz); - r7.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r5.xyz; - r8.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + r1.www; - r8.xyz = cb0[37].yyy * r8.xyz; - r9.xy = r6.xw + r6.xw; - r1.w = cb0[37].y * -2; - r1.w = r1.w / r6.x; - r10.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r0.www; - r11.xyz = r10.xyz * r1.www; - r11.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r11.xyz; - r11.xyz = exp2(r11.xyz); - r11.xyz = float3(1, 1, 1) + r11.xyz; - r9.xzw = r9.xxx / r11.xyz; - r9.xzw = -cb0[38].xxx + r9.xzw; - r1.w = cb0[37].y + cb0[37].y; - r1.w = r1.w / r6.w; - r5.xyz = r5.xyz * float3(0.30103001, 0.30103001, 0.30103001) + -r2.www; - r5.xyz = r5.xyz * r1.www; - r5.xyz = float3(1.44269502, 1.44269502, 1.44269502) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = float3(1, 1, 1) + r5.xyz; - r5.xyz = r9.yyy / r5.xyz; - r5.xyz = r6.yyy + -r5.xyz; - r6.xyz = cmp(r7.xyz < r0.www); - r6.xyz = r6.xyz ? r9.xzw : r8.xyz; - r7.xyz = cmp(r2.www < r7.xyz); - r5.xyz = r7.xyz ? r5.xyz : r8.xyz; - r1.w = r2.w + -r0.w; - r7.xyz = saturate(r10.xyz / r1.www); - r0.w = cmp(r2.w < r0.w); - r8.xyz = float3(1, 1, 1) + -r7.xyz; - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r8.xyz = -r7.xyz * float3(2, 2, 2) + float3(3, 3, 3); - r7.xyz = r7.xyz * r7.xyz; - r7.xyz = r7.xyz * r8.xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r7.xyz * r5.xyz + r6.xyz; - r0.w = dot(r5.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r5.xyz = r5.xyz + -r0.www; - r5.xyz = r5.xyz * float3(0.930000007, 0.930000007, 0.930000007) + r0.www; - r5.xyz = max(float3(0, 0, 0), r5.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[37].xxx * r5.xyz + r4.xyz; - r5.x = dot(float3(1.06537485, 1.44678506e-06, -0.0653710067), r4.xyz); - r5.y = dot(float3(-3.45525592e-07, 1.20366347, -0.203667715), r4.xyz); - r5.z = dot(float3(1.9865448e-08, 2.12079581e-08, 0.999999583), r4.xyz); - r5.xyz = r5.xyz + -r4.xyz; - r4.xyz = cb0[36].zzz * r5.xyz + r4.xyz; - r5.x = saturate(dot(cb1[12].xyz, r4.xyz)); - r5.y = saturate(dot(cb1[13].xyz, r4.xyz)); - r5.z = saturate(dot(cb1[14].xyz, r4.xyz)); - r4.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r5.xyz; - r6.xyz = cmp(r5.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r5.xyz = log2(r5.xyz); - r5.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r5.xyz; - r5.xyz = exp2(r5.xyz); - r5.xyz = r5.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r4.xyz = r6.xyz ? r5.xyz : r4.xyz; - r5.yzw = r4.xyz * float3(0.9375, 0.9375, 0.9375) + float3(0.03125, 0.03125, 0.03125); - r0.w = r5.w * 16 + -0.5; - r1.w = floor(r0.w); - r0.w = -r1.w + r0.w; - r1.w = r5.y + r1.w; - r5.x = 0.0625 * r1.w; - r6.xyz = t0.Sample(s0_s, r5.xz).xyz; - r5.xy = float2(0.0625, 0) + r5.xz; - r5.xyz = t0.Sample(s0_s, r5.xy).xyz; - r5.xyz = r5.xyz + -r6.xyz; - r5.xyz = r0.www * r5.xyz + r6.xyz; - r5.xyz = cb0[5].yyy * r5.xyz; - r4.xyz = cb0[5].xxx * r4.xyz + r5.xyz; - r4.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r4.xyz); - r5.xyz = cmp(float3(0.0404499993, 0.0404499993, 0.0404499993) < r4.xyz); - r6.xyz = r4.xyz * float3(0.947867274, 0.947867274, 0.947867274) + float3(0.0521326996, 0.0521326996, 0.0521326996); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(2.4000001, 2.4000001, 2.4000001) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r4.xyz = float3(0.0773993805, 0.0773993805, 0.0773993805) * r4.xyz; - r4.xyz = r5.xyz ? r6.xyz : r4.xyz; - r5.xyz = r4.xyz * r4.xyz; - r4.xyz = cb0[39].yyy * r4.xyz; - r4.xyz = cb0[39].xxx * r5.xyz + r4.xyz; - r4.xyz = cb0[39].zzz + r4.xyz; - r5.xyz = cb0[14].xyz * r4.xyz; - r4.xyz = -r4.xyz * cb0[14].xyz + cb0[13].xyz; - r4.xyz = cb0[13].www * r4.xyz + r5.xyz; - r5.xyz = max(float3(0, 0, 0), r4.xyz); - r5.xyz = log2(r5.xyz); - r5.xyz = cb0[40].yyy * r5.xyz; - r5.xyz = exp2(r5.xyz); - - if (injectedData.toneMapType != 0) { - o0 = LutBuilderToneMap(untonemapped_ap1, r5.xyz); - return; - } - - if (cb0[40].w == 0) { - r6.x = dot(cb1[8].xyz, r5.xyz); - r6.y = dot(cb1[9].xyz, r5.xyz); - r6.z = dot(cb1[10].xyz, r5.xyz); - r7.x = dot(r2.xyz, r6.xyz); - r7.y = dot(r3.xyz, r6.xyz); - r7.z = dot(r0.xyz, r6.xyz); - r6.xyz = cb1[20].xxx ? r5.xyz : r7.xyz; - r7.xyz = float3(12.9200001, 12.9200001, 12.9200001) * r6.xyz; - r8.xyz = cmp(r6.xyz >= float3(0.00313066994, 0.00313066994, 0.00313066994)); - r6.xyz = log2(r6.xyz); - r6.xyz = float3(0.416666657, 0.416666657, 0.416666657) * r6.xyz; - r6.xyz = exp2(r6.xyz); - r6.xyz = r6.xyz * float3(1.05499995, 1.05499995, 1.05499995) + float3(-0.0549999997, -0.0549999997, -0.0549999997); - r6.xyz = r8.xyz ? r6.xyz : r7.xyz; - } else { - r0.w = cmp(1 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r5.xyz); - r7.y = dot(cb1[9].xyz, r5.xyz); - r7.z = dot(cb1[10].xyz, r5.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = max(float3(6.10351999e-05, 6.10351999e-05, 6.10351999e-05), r8.xyz); - r8.xyz = float3(4.5, 4.5, 4.5) * r7.xyz; - r7.xyz = max(float3(0.0179999992, 0.0179999992, 0.0179999992), r7.xyz); - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.449999988, 0.449999988, 0.449999988) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r7.xyz = r7.xyz * float3(1.09899998, 1.09899998, 1.09899998) + float3(-0.0989999995, -0.0989999995, -0.0989999995); - r6.xyz = min(r8.xyz, r7.xyz); - } else { - r7.x = dot(cb1[12].xyz, r1.xyz); - r7.y = dot(cb1[13].xyz, r1.xyz); - r7.z = dot(cb1[14].xyz, r1.xyz); - r1.xyz = cb0[14].xyz * r7.xyz; - r7.xyz = -r7.xyz * cb0[14].xyz + cb0[13].xyz; - r1.xyz = cb0[13].www * r7.xyz + r1.xyz; - r7.xy = cmp(int2(3, 5) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(5 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(4, 6) == asint(cb0[40].ww)); - r0.w = (int)r7.y | (int)r7.x; - if (r0.w != 0) { - r7.xyz = cb0[12].zzz * r1.xyz; - r8.y = dot(cb1[16].xyz, r7.xyz); - r8.z = dot(cb1[17].xyz, r7.xyz); - r8.w = dot(cb1[18].xyz, r7.xyz); - r7.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r8.yzw); - r7.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r8.yzw); - r7.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r8.yzw); - r0.w = max(r7.y, r7.z); - r0.w = max(r7.x, r0.w); - r1.w = cmp(r0.w < 1.00000001e-10); - r9.xyz = cmp(r8.yzw < float3(0, 0, 0)); - r2.w = (int)r9.y | (int)r9.x; - r2.w = (int)r9.z | (int)r2.w; - r1.w = (int)r1.w | (int)r2.w; - if (r1.w == 0) { - r9.xyz = r0.www + -r7.xyz; - r9.xyz = r9.xyz / abs(r0.www); - r10.xyz = cmp(r9.xyz < float3(0.814999998, 0.802999973, 0.879999995)); - r11.xyz = float3(-0.814999998, -0.802999973, -0.879999995) + r9.xyz; - r12.xyzw = float4(3.05528307, 1, 3.49726105, 1) * r11.xxyy; - r11.xy = log2(r12.xz); - r11.xy = float2(1.20000005, 1.20000005) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = float2(1, 1) + r11.xy; - r11.xy = log2(r11.xy); - r11.xy = float2(0.833333313, 0.833333313) * r11.xy; - r11.xy = exp2(r11.xy); - r11.xy = r12.yw / r11.xy; - r11.xy = float2(0.814999998, 0.802999973) + r11.xy; - r9.xy = r10.xy ? r9.xy : r11.xy; - r10.xy = float2(6.81099463, 1) * r11.zz; - r1.w = log2(r10.x); - r1.w = 1.20000005 * r1.w; - r1.w = exp2(r1.w); - r1.w = 1 + r1.w; - r1.w = log2(r1.w); - r1.w = 0.833333313 * r1.w; - r1.w = exp2(r1.w); - r1.w = r10.y / r1.w; - r1.w = 0.879999995 + r1.w; - r1.w = r10.z ? r9.z : r1.w; - r7.xy = -r9.xy * abs(r0.ww) + r0.ww; - r7.z = -r1.w * abs(r0.w) + r0.w; - } - r9.y = dot(float3(0.695452213, 0.140678704, 0.163869068), r7.xyz); - r9.z = dot(float3(0.0447945632, 0.859671116, 0.0955343172), r7.xyz); - r9.w = dot(float3(-0.00552588282, 0.00402521016, 1.00150073), r7.xyz); - r7.xyz = r9.yzw + -r8.yzw; - r7.xyz = cb0[12].www * r7.xyz + r8.yzw; - r0.w = min(r7.x, r7.y); - r0.w = min(r0.w, r7.z); - r1.w = max(r7.x, r7.y); - r1.w = max(r1.w, r7.z); - r8.xy = max(float2(1.00000001e-10, 0.00999999978), r1.ww); - r0.w = max(1.00000001e-10, r0.w); - r0.w = r8.x + -r0.w; - r0.w = r0.w / r8.y; - r8.xyz = r7.zyx + -r7.yxz; - r8.xy = r8.xy * r7.zy; - r1.w = r8.x + r8.y; - r1.w = r7.x * r8.z + r1.w; - r1.w = sqrt(r1.w); - r2.w = r7.z + r7.y; - r2.w = r2.w + r7.x; - r1.w = r1.w * 1.75 + r2.w; - r2.w = 0.333333343 * r1.w; - r3.w = -0.400000006 + r0.w; - r4.w = 2.5 * r3.w; - r4.w = 1 + -abs(r4.w); - r4.w = max(0, r4.w); - r5.w = cmp(0 < r3.w); - r3.w = cmp(r3.w < 0); - r3.w = (int)-r5.w + (int)r3.w; - r3.w = (int)r3.w; - r4.w = -r4.w * r4.w + 1; - r3.w = r3.w * r4.w + 1; - r3.w = 0.0250000004 * r3.w; - r4.w = cmp(0.159999996 >= r1.w); - r1.w = cmp(r1.w >= 0.479999989); - r2.w = 0.0799999982 / r2.w; - r2.w = -0.5 + r2.w; - r2.w = r3.w * r2.w; - r1.w = r1.w ? 0 : r2.w; - r1.w = r4.w ? r3.w : r1.w; - r1.w = 1 + r1.w; - r8.yzw = r7.xyz * r1.www; - r9.xy = cmp(r8.zw == r8.yz); - r2.w = r9.y ? r9.x : 0; - r3.w = r7.y * r1.w + -r8.w; - r3.w = 1.73205078 * r3.w; - r4.w = r8.y * 2 + -r8.z; - r4.w = -r7.z * r1.w + r4.w; - r5.w = min(abs(r4.w), abs(r3.w)); - r6.w = max(abs(r4.w), abs(r3.w)); - r6.w = 1 / r6.w; - r5.w = r6.w * r5.w; - r6.w = r5.w * r5.w; - r7.y = r6.w * 0.0208350997 + -0.0851330012; - r7.y = r6.w * r7.y + 0.180141002; - r7.y = r6.w * r7.y + -0.330299497; - r6.w = r6.w * r7.y + 0.999866009; - r7.y = r6.w * r5.w; - r7.z = cmp(abs(r4.w) < abs(r3.w)); - r7.y = r7.y * -2 + 1.57079637; - r7.y = r7.z ? r7.y : 0; - r5.w = r5.w * r6.w + r7.y; - r6.w = cmp(r4.w < -r4.w); - r6.w = r6.w ? -3.141593 : 0; - r5.w = r6.w + r5.w; - r6.w = min(r4.w, r3.w); - r3.w = max(r4.w, r3.w); - r4.w = cmp(r6.w < -r6.w); - r3.w = cmp(r3.w >= -r3.w); - r3.w = r3.w ? r4.w : 0; - r3.w = r3.w ? -r5.w : r5.w; - r3.w = 57.2957802 * r3.w; - r2.w = r2.w ? 0 : r3.w; - r3.w = cmp(r2.w < 0); - r4.w = 360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r2.w = max(0, r2.w); - r2.w = min(360, r2.w); - r3.w = cmp(180 < r2.w); - r4.w = -360 + r2.w; - r2.w = r3.w ? r4.w : r2.w; - r3.w = cmp(-67.5 < r2.w); - r4.w = cmp(r2.w < 67.5); - r3.w = r3.w ? r4.w : 0; - if (r3.w != 0) { - r2.w = 67.5 + r2.w; - r3.w = 0.0296296291 * r2.w; - r4.w = (int)r3.w; - r3.w = trunc(r3.w); - r2.w = r2.w * 0.0296296291 + -r3.w; - r3.w = r2.w * r2.w; - r5.w = r3.w * r2.w; - r7.yzw = float3(-0.166666672, -0.5, 0.166666672) * r5.www; - r7.yz = r3.ww * float2(0.5, 0.5) + r7.yz; - r7.yz = r2.ww * float2(-0.5, 0.5) + r7.yz; - r2.w = r5.w * 0.5 + -r3.w; - r2.w = 0.666666687 + r2.w; - r9.xyz = cmp((int3)r4.www == int3(3, 2, 1)); - r7.yz = float2(0.166666672, 0.166666672) + r7.yz; - r3.w = r4.w ? 0 : r7.w; - r3.w = r9.z ? r7.z : r3.w; - r2.w = r9.y ? r2.w : r3.w; - r2.w = r9.x ? r7.y : r2.w; - } else { - r2.w = 0; - } - r0.w = r2.w * r0.w; - r0.w = 1.5 * r0.w; - r1.w = -r7.x * r1.w + 0.0299999993; - r0.w = r1.w * r0.w; - r8.x = r0.w * 0.180000007 + r8.y; - r7.xyz = max(float3(0, 0, 0), r8.xzw); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r8.x = dot(float3(1.45143926, -0.236510754, -0.214928567), r7.xyz); - r8.y = dot(float3(-0.0765537769, 1.17622972, -0.0996759236), r7.xyz); - r8.z = dot(float3(0.00831614807, -0.00603244966, 0.997716308), r7.xyz); - r7.xyz = max(float3(0, 0, 0), r8.xyz); - r7.xyz = min(float3(65504, 65504, 65504), r7.xyz); - r0.w = dot(r7.xyz, float3(0.272228718, 0.674081743, 0.0536895171)); - r7.xyz = r7.xyz + -r0.www; - r7.xyz = r7.xyz * float3(0.959999979, 0.959999979, 0.959999979) + r0.www; - r7.xyz = max(float3(1.00000001e-10, 1.00000001e-10, 1.00000001e-10), r7.xyz); - r7.xyz = log2(r7.xyz); - r8.xyz = float3(0.30103001, 0.30103001, 0.30103001) * r7.xyz; - r0.w = log2(cb0[8].x); - r0.w = 0.30103001 * r0.w; - r9.xyz = cmp(r0.www >= r8.xyz); - if (r9.x != 0) { - r1.w = log2(cb0[8].y); - r1.w = 0.30103001 * r1.w; - } else { - r2.w = cmp(r0.w < r8.x); - r3.w = log2(cb0[9].x); - r4.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r4.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r0.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r0.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r5.w = trunc(r2.w); - r10.y = -r5.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r9.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xw = r9.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[10].xyzw); - r2.w = r9.x * cb0[12].x + r2.w; - r11.x = r9.w * cb0[12].x + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[10].xyzw); - r2.w = r14.x * cb0[12].x + r2.w; - r11.y = r14.y * cb0[12].x + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[10].xyzw); - r2.w = r14.z * cb0[12].x + r2.w; - r11.z = r14.w * cb0[12].x + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = cmp(r8.x >= r4.w); - r3.w = log2(cb0[8].z); - r5.w = 0.30103001 * r3.w; - r5.w = cmp(r8.x < r5.w); - r2.w = r2.w ? r5.w : 0; - if (r2.w != 0) { - r2.w = r7.x * 0.30103001 + -r4.w; - r2.w = 3 * r2.w; - r3.w = r3.w * 0.30103001 + -r4.w; - r2.w = r2.w / r3.w; - r3.w = (int)r2.w; - r4.w = trunc(r2.w); - r10.y = -r4.w + r2.w; - r11.xyzw = cmp((int4)r3.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r3.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r2.w = dot(r11.wzyx, cb0[11].xyzw); - r2.w = r7.x * cb0[12].y + r2.w; - r11.x = r7.w * cb0[12].y + r2.w; - r12.xyzw = (int4)r3.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r13.wzyx, cb0[11].xyzw); - r2.w = r14.x * cb0[12].y + r2.w; - r11.y = r14.y * cb0[12].y + r2.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r2.w = dot(r12.wzyx, cb0[11].xyzw); - r2.w = r14.z * cb0[12].y + r2.w; - r11.z = r14.w * cb0[12].y + r2.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r1.w = dot(r10.xyz, r12.xyz); - } else { - r2.w = log2(cb0[8].w); - r1.w = 0.30103001 * r2.w; - } - } - } - r1.w = 3.32192802 * r1.w; - r1.w = exp2(r1.w); - if (r9.y != 0) { - r2.w = log2(cb0[8].y); - r2.w = 0.30103001 * r2.w; - } else { - r3.w = cmp(r0.w < r8.y); - r4.w = log2(cb0[9].x); - r5.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r5.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r0.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r0.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r6.w = trunc(r3.w); - r10.y = -r6.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xw = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xw = r7.xw ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[10].xyzw); - r3.w = r7.x * cb0[12].x + r3.w; - r11.x = r7.w * cb0[12].x + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[10].xyzw); - r3.w = r14.x * cb0[12].x + r3.w; - r11.y = r14.y * cb0[12].x + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[10].xyzw); - r3.w = r14.z * cb0[12].x + r3.w; - r11.z = r14.w * cb0[12].x + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = cmp(r8.y >= r5.w); - r4.w = log2(cb0[8].z); - r6.w = 0.30103001 * r4.w; - r6.w = cmp(r8.y < r6.w); - r3.w = r3.w ? r6.w : 0; - if (r3.w != 0) { - r3.w = r7.y * 0.30103001 + -r5.w; - r3.w = 3 * r3.w; - r4.w = r4.w * 0.30103001 + -r5.w; - r3.w = r3.w / r4.w; - r4.w = (int)r3.w; - r5.w = trunc(r3.w); - r10.y = -r5.w + r3.w; - r11.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r3.w = dot(r11.wzyx, cb0[11].xyzw); - r3.w = r7.x * cb0[12].y + r3.w; - r11.x = r7.y * cb0[12].y + r3.w; - r12.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r13.xyzw = cmp((int4)r12.yyyy == int4(3, 2, 1, 0)); - r14.xyzw = cmp((int4)r12.xyzw == int4(4, 5, 4, 5)); - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r14.xyzw = r14.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r13.wzyx, cb0[11].xyzw); - r3.w = r14.x * cb0[12].y + r3.w; - r11.y = r14.y * cb0[12].y + r3.w; - r12.xyzw = cmp((int4)r12.wwww == int4(3, 2, 1, 0)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r3.w = dot(r12.wzyx, cb0[11].xyzw); - r3.w = r14.z * cb0[12].y + r3.w; - r11.z = r14.w * cb0[12].y + r3.w; - r10.x = r10.y * r10.y; - r12.x = dot(r11.xzy, float3(0.5, 0.5, -1)); - r12.y = dot(r11.xy, float2(-1, 1)); - r12.z = dot(r11.xy, float2(0.5, 0.5)); - r10.z = 1; - r2.w = dot(r10.xyz, r12.xyz); - } else { - r3.w = log2(cb0[8].w); - r2.w = 0.30103001 * r3.w; - } - } - } - r2.w = 3.32192802 * r2.w; - r2.w = exp2(r2.w); - if (r9.z != 0) { - r3.w = log2(cb0[8].y); - r3.w = 0.30103001 * r3.w; - } else { - r4.w = cmp(r0.w < r8.z); - r5.w = log2(cb0[9].x); - r6.w = 0.30103001 * r5.w; - r7.x = cmp(r8.z < r6.w); - r4.w = r4.w ? r7.x : 0; - if (r4.w != 0) { - r4.w = r7.z * 0.30103001 + -r0.w; - r4.w = 3 * r4.w; - r0.w = r5.w * 0.30103001 + -r0.w; - r0.w = r4.w / r0.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r9.y = -r5.w + r0.w; - r10.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r7.xy = cmp((int2)r4.ww == int2(4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r7.xy = r7.xy ? float2(1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[10].xyzw); - r0.w = r7.x * cb0[12].x + r0.w; - r10.x = r7.y * cb0[12].x + r0.w; - r11.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r12.xyzw = cmp((int4)r11.yyyy == int4(3, 2, 1, 0)); - r13.xyzw = cmp((int4)r11.xyzw == int4(4, 5, 4, 5)); - r12.xyzw = r12.xyzw ? float4(1, 1, 1, 1) : 0; - r13.xyzw = r13.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r12.wzyx, cb0[10].xyzw); - r0.w = r13.x * cb0[12].x + r0.w; - r10.y = r13.y * cb0[12].x + r0.w; - r11.xyzw = cmp((int4)r11.wwww == int4(3, 2, 1, 0)); - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r11.wzyx, cb0[10].xyzw); - r0.w = r13.z * cb0[12].x + r0.w; - r10.z = r13.w * cb0[12].x + r0.w; - r9.x = r9.y * r9.y; - r11.x = dot(r10.xzy, float3(0.5, 0.5, -1)); - r11.y = dot(r10.xy, float2(-1, 1)); - r11.z = dot(r10.xy, float2(0.5, 0.5)); - r9.z = 1; - r3.w = dot(r9.xyz, r11.xyz); - } else { - r0.w = cmp(r8.z >= r6.w); - r4.w = log2(cb0[8].z); - r5.w = 0.30103001 * r4.w; - r5.w = cmp(r8.z < r5.w); - r0.w = r0.w ? r5.w : 0; - if (r0.w != 0) { - r0.w = r7.z * 0.30103001 + -r6.w; - r0.w = 3 * r0.w; - r4.w = r4.w * 0.30103001 + -r6.w; - r0.w = r0.w / r4.w; - r4.w = (int)r0.w; - r5.w = trunc(r0.w); - r7.y = -r5.w + r0.w; - r8.xyzw = cmp((int4)r4.wwww == int4(3, 2, 1, 0)); - r9.xy = cmp((int2)r4.ww == int2(4, 5)); - r8.xyzw = r8.xyzw ? float4(1, 1, 1, 1) : 0; - r9.xy = r9.xy ? float2(1, 1) : 0; - r0.w = dot(r8.wzyx, cb0[11].xyzw); - r0.w = r9.x * cb0[12].y + r0.w; - r8.x = r9.y * cb0[12].y + r0.w; - r9.xyzw = (int4)r4.wwww + int4(1, 1, 2, 2); - r10.xyzw = cmp((int4)r9.yyyy == int4(3, 2, 1, 0)); - r11.xyzw = cmp((int4)r9.xyzw == int4(4, 5, 4, 5)); - r10.xyzw = r10.xyzw ? float4(1, 1, 1, 1) : 0; - r11.xyzw = r11.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r10.wzyx, cb0[11].xyzw); - r0.w = r11.x * cb0[12].y + r0.w; - r8.y = r11.y * cb0[12].y + r0.w; - r9.xyzw = cmp((int4)r9.wwww == int4(3, 2, 1, 0)); - r9.xyzw = r9.xyzw ? float4(1, 1, 1, 1) : 0; - r0.w = dot(r9.wzyx, cb0[11].xyzw); - r0.w = r11.z * cb0[12].y + r0.w; - r8.z = r11.w * cb0[12].y + r0.w; - r7.x = r7.y * r7.y; - r9.x = dot(r8.xzy, float3(0.5, 0.5, -1)); - r9.y = dot(r8.xy, float2(-1, 1)); - r9.z = dot(r8.xy, float2(0.5, 0.5)); - r7.z = 1; - r3.w = dot(r7.xyz, r9.xyz); - } else { - r0.w = log2(cb0[8].w); - r3.w = 0.30103001 * r0.w; - } - } - } - r0.w = 3.32192802 * r3.w; - r0.w = exp2(r0.w); - r1.w = -cb0[8].y + r1.w; - r3.w = cb0[8].w + -cb0[8].y; - r7.x = r1.w / r3.w; - r1.w = -cb0[8].y + r2.w; - r7.y = r1.w / r3.w; - r0.w = -cb0[8].y + r0.w; - r7.z = r0.w / r3.w; - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = saturate(dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz)); - r7.y = saturate(dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz)); - r7.z = saturate(dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz)); - r8.x = dot(float3(0.662454188, 0.134004205, 0.156187683), r7.xyz); - r8.y = dot(float3(0.272228718, 0.674081743, 0.0536895171), r7.xyz); - r8.z = dot(float3(-0.00557464967, 0.0040607336, 1.01033914), r7.xyz); - r7.x = dot(float3(1.6410234, -0.324803293, -0.236424699), r8.xyz); - r7.y = dot(float3(-0.663662851, 1.61533165, 0.0167563483), r8.xyz); - r7.z = dot(float3(0.0117218941, -0.00828444213, 0.988394856), r8.xyz); - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = cb0[8].www * r7.xyz; - r7.xyz = max(float3(0, 0, 0), r7.xyz); - r7.xyz = min(float3(65535, 65535, 65535), r7.xyz); - r0.w = cmp(6 != asint(cb0[40].w)); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = r0.www ? r8.xyz : r7.xyz; - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r0.w = cmp(7 == asint(cb0[40].w)); - if (r0.w != 0) { - r7.x = dot(cb1[8].xyz, r1.xyz); - r7.y = dot(cb1[9].xyz, r1.xyz); - r7.z = dot(cb1[10].xyz, r1.xyz); - r8.x = dot(r2.xyz, r7.xyz); - r8.y = dot(r3.xyz, r7.xyz); - r8.z = dot(r0.xyz, r7.xyz); - r7.xyz = float3(9.99999975e-05, 9.99999975e-05, 9.99999975e-05) * r8.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(0.159301758, 0.159301758, 0.159301758) * r7.xyz; - r7.xyz = exp2(r7.xyz); - r8.xyz = r7.xyz * float3(18.8515625, 18.8515625, 18.8515625) + float3(0.8359375, 0.8359375, 0.8359375); - r7.xyz = r7.xyz * float3(18.6875, 18.6875, 18.6875) + float3(1, 1, 1); - r7.xyz = rcp(r7.xyz); - r7.xyz = r8.xyz * r7.xyz; - r7.xyz = log2(r7.xyz); - r7.xyz = float3(78.84375, 78.84375, 78.84375) * r7.xyz; - r6.xyz = exp2(r7.xyz); - } else { - r7.xy = cmp(int2(8, 9) == asint(cb0[40].ww)); - r8.x = dot(cb1[8].xyz, r4.xyz); - r8.y = dot(cb1[9].xyz, r4.xyz); - r8.z = dot(cb1[10].xyz, r4.xyz); - r4.x = dot(r2.xyz, r8.xyz); - r4.y = dot(r3.xyz, r8.xyz); - r4.z = dot(r0.xyz, r8.xyz); - r8.x = dot(cb1[8].xyz, r5.xyz); - r8.y = dot(cb1[9].xyz, r5.xyz); - r8.z = dot(cb1[10].xyz, r5.xyz); - r0.w = dot(r2.xyz, r8.xyz); - r1.w = dot(r3.xyz, r8.xyz); - r0.x = dot(r0.xyz, r8.xyz); - r2.x = log2(r0.w); - r2.y = log2(r1.w); - r2.z = log2(r0.x); - r0.xyz = cb0[40].zzz * r2.xyz; - r0.xyz = exp2(r0.xyz); - r0.xyz = r7.yyy ? r4.xyz : r0.xyz; - r6.xyz = r7.xxx ? r1.xyz : r0.xyz; - } - } - } - } - } - o0.xyz = float3(0.952381015, 0.952381015, 0.952381015) * r6.xyz; - o0.w = 0; - return; -} diff --git a/src/games/ue-dx12/shared.h b/src/games/ue-dx12/shared.h deleted file mode 100644 index 4412f8ee..00000000 --- a/src/games/ue-dx12/shared.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef SRC_UE_DX12_SHARED_H_ -#define SRC_UE_DX12_SHARED_H_ - -#ifndef __cplusplus -#include "../../shaders/renodx.hlsl" -#endif - -// Must be 32bit aligned -// Should be 4x32 -struct ShaderInjectData { - float toneMapType; - float toneMapPeakNits; - float toneMapGameNits; - float toneMapUINits; - float toneMapGammaCorrection; - float toneMapHueCorrectionMethod; - float toneMapHueCorrection; - float toneMapPerChannel; - float toneMapHueProcessor; - float colorGradeExposure; - float colorGradeHighlights; - float colorGradeShadows; - float colorGradeContrast; - float colorGradeSaturation; - float colorGradeBlowout; - float colorGradeFlare; - float colorGradeColorSpace; -}; - -#ifndef __cplusplus -cbuffer injectedBuffer : register(b13, space50) { - ShaderInjectData injectedData : packoffset(c0); -} -#endif - -#endif // SRC_UE_DX12_SHARED_H_ diff --git a/src/games/ue-dx12/swap_chain_proxy_pixel_shader.ps_5_1.hlsl b/src/games/ue-dx12/swap_chain_proxy_pixel_shader.ps_5_1.hlsl deleted file mode 100644 index fe5979ce..00000000 --- a/src/games/ue-dx12/swap_chain_proxy_pixel_shader.ps_5_1.hlsl +++ /dev/null @@ -1,11 +0,0 @@ -#include "./common.hlsl" -#include "./shared.h" - -Texture2D t0 : register(t0); -SamplerState s0 : register(s0); -float4 main(float4 vpos : SV_POSITION, float2 uv : TEXCOORD0) : SV_TARGET { - float4 color = t0.Sample(s0, uv); - color.rgb = FinalizeOutput(color.rgb); - color.a = 1.f; - return color; -} \ No newline at end of file diff --git a/src/games/ue-dx12/swap_chain_proxy_vertex_shader.vs_5_1.hlsl b/src/games/ue-dx12/swap_chain_proxy_vertex_shader.vs_5_1.hlsl deleted file mode 100644 index aaee1e17..00000000 --- a/src/games/ue-dx12/swap_chain_proxy_vertex_shader.vs_5_1.hlsl +++ /dev/null @@ -1,6 +0,0 @@ -void main(uint id : SV_VERTEXID, out float4 pos : SV_POSITION, - out float2 uv : TEXCOORD0) { - uv.x = (id == 1) ? 2.0 : 0.0; - uv.y = (id == 2) ? 2.0 : 0.0; - pos = float4(uv * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0); -} \ No newline at end of file diff --git a/src/games/ue-dx11/addon.cpp b/src/games/unrealengine/addon.cpp similarity index 100% rename from src/games/ue-dx11/addon.cpp rename to src/games/unrealengine/addon.cpp diff --git a/src/games/ue-dx11/common.hlsl b/src/games/unrealengine/common.hlsl similarity index 100% rename from src/games/ue-dx11/common.hlsl rename to src/games/unrealengine/common.hlsl diff --git a/src/games/ue-dx11/crisiscoreff7reunion/fmv_0xAC791084.ps_5_0.hlsl b/src/games/unrealengine/crisiscoreff7reunion/fmv_0xAC791084.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/crisiscoreff7reunion/fmv_0xAC791084.ps_5_0.hlsl rename to src/games/unrealengine/crisiscoreff7reunion/fmv_0xAC791084.ps_5_0.hlsl diff --git a/src/games/ue-dx11/kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl b/src/games/unrealengine/kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl rename to src/games/unrealengine/kh3/lutbuilder_0x00E9C5FE.ps_5_0.hlsl diff --git a/src/games/ue-dx11/kh3/lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl b/src/games/unrealengine/kh3/lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/kh3/lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl rename to src/games/unrealengine/kh3/lutbuilder_0x00E9C5FE_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/kh3/lutbuilder_0xE9343033.ps_5_0.hlsl b/src/games/unrealengine/kh3/lutbuilder_0xE9343033.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/kh3/lutbuilder_0xE9343033.ps_5_0.hlsl rename to src/games/unrealengine/kh3/lutbuilder_0xE9343033.ps_5_0.hlsl diff --git a/src/games/ue-dx11/kh3/lutbuilder_0xE9343033_dx12.ps_5_1.hlsl b/src/games/unrealengine/kh3/lutbuilder_0xE9343033_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/kh3/lutbuilder_0xE9343033_dx12.ps_5_1.hlsl rename to src/games/unrealengine/kh3/lutbuilder_0xE9343033_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x2569985B.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x2569985B.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x2569985B.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x2569985B.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x2569985B_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x2569985B_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x2569985B_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x2569985B_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x31FE4421.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x31FE4421_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x36E3A438.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x36E3A438_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x5CAE0013.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x5CAE0013_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x61C2EA30.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x61C2EA30_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x73B2BA54.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x73B2BA54_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x7570E7B1.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x7570E7B1_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x80CD76B6.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0x80CD76B6_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xA918F0C8.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xA918F0C8_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xB1614732.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xB1614732.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xB1614732.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xB1614732.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xB1614732_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xB1614732_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xB1614732_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xB1614732_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xBEB7EB31.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xBEB7EB31_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC130BE2D.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC130BE2D_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC1BCC6B5.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC1BCC6B5_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC2A711CC.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xC2A711CC_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCA383248.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCA383248.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCA383248.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCA383248.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCA383248_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCA383248_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCA383248_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCA383248_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCC8FD0FF.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xCC8FD0FF_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xD4A45A02.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xD4A45A02_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xE6EB2840.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xE6EB2840_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xF6AA7756.ps_5_0.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl b/src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm5/lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl rename to src/games/unrealengine/lutbuilders/sm5/lutbuilder_0xF6AA7756_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x269E94C1.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x3028EBE7.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x33247499.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x33247499.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x33247499.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x33247499.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x4CC68F73.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x4F3FCE76.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x5D760393.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x5D760393.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x5D760393.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x5D760393.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x6CFBD4C0.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x90BBE81C.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0x94D26E3A.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xB530B36A.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xB6CA5FD9.ps_6_6.hlsl diff --git a/src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl b/src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl similarity index 100% rename from src/games/ue-dx11/lutbuilders/sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl rename to src/games/unrealengine/lutbuilders/sm6/lutbuilder_0xBAA27141.ps_6_6.hlsl diff --git a/src/games/ue-dx11/shared.h b/src/games/unrealengine/shared.h similarity index 100% rename from src/games/ue-dx11/shared.h rename to src/games/unrealengine/shared.h diff --git a/src/games/ue-dx11/swapchainproxy/swap_chain_proxy_pixel_shader.ps_5_0.hlsl b/src/games/unrealengine/swapchainproxy/swap_chain_proxy_pixel_shader.ps_5_0.hlsl similarity index 100% rename from src/games/ue-dx11/swapchainproxy/swap_chain_proxy_pixel_shader.ps_5_0.hlsl rename to src/games/unrealengine/swapchainproxy/swap_chain_proxy_pixel_shader.ps_5_0.hlsl diff --git a/src/games/ue-dx11/swapchainproxy/swap_chain_proxy_pixel_shader_dx12.ps_5_1.hlsl b/src/games/unrealengine/swapchainproxy/swap_chain_proxy_pixel_shader_dx12.ps_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/swapchainproxy/swap_chain_proxy_pixel_shader_dx12.ps_5_1.hlsl rename to src/games/unrealengine/swapchainproxy/swap_chain_proxy_pixel_shader_dx12.ps_5_1.hlsl diff --git a/src/games/ue-dx11/swapchainproxy/swap_chain_proxy_vertex_shader.vs_4_0.hlsl b/src/games/unrealengine/swapchainproxy/swap_chain_proxy_vertex_shader.vs_4_0.hlsl similarity index 100% rename from src/games/ue-dx11/swapchainproxy/swap_chain_proxy_vertex_shader.vs_4_0.hlsl rename to src/games/unrealengine/swapchainproxy/swap_chain_proxy_vertex_shader.vs_4_0.hlsl diff --git a/src/games/ue-dx11/swapchainproxy/swap_chain_proxy_vertex_shader_dx12.vs_5_1.hlsl b/src/games/unrealengine/swapchainproxy/swap_chain_proxy_vertex_shader_dx12.vs_5_1.hlsl similarity index 100% rename from src/games/ue-dx11/swapchainproxy/swap_chain_proxy_vertex_shader_dx12.vs_5_1.hlsl rename to src/games/unrealengine/swapchainproxy/swap_chain_proxy_vertex_shader_dx12.vs_5_1.hlsl