internal static void UpdateEnvironmentProbes() { if (MyRender11.IsIntelBrokenCubemapsWorkaround) { return; } if (m_cubemapDepth == RwTexId.NULL) { m_cubemapDepth = MyRwTextures.CreateShadowmapArray(256, 256, 6, Format.R24G8_Typeless, Format.D24_UNorm_S8_UInt, Format.R24_UNorm_X8_Typeless); } if (m_envProbe.cubemapPrefiltered == RwTexId.NULL) { m_envProbe.cubemapPrefiltered = MyRwTextures.CreateCubemap(256, Format.R16G16B16A16_Float, "environment prefitlered probe"); m_envProbe.workCubemap = MyRwTextures.CreateCubemap(256, Format.R16G16B16A16_Float, "environment probe"); m_envProbe.workCubemapPrefiltered = MyRwTextures.CreateCubemap(256, Format.R16G16B16A16_Float, "environment prefitlered probe"); m_envProbe.prevWorkCubemapPrefiltered = MyRwTextures.CreateCubemap(256, Format.R16G16B16A16_Float, "environment prefitlered probe"); m_envProbe.ImmediateProbe(); } else { m_envProbe.StepUpdateProbe(); } }
internal static void UpdateEnvironmentProbes(MyCullQuery cullQuery) { if (MyRender11.IsIntelBrokenCubemapsWorkaround) { return; } if (m_cubemapDepth == RwTexId.NULL) { m_cubemapDepth = MyRwTextures.CreateShadowmapArray(MyEnvironmentProbe.CubeMapResolution, MyEnvironmentProbe.CubeMapResolution, 6, Format.R24G8_Typeless, Format.D24_UNorm_S8_UInt, Format.R24_UNorm_X8_Typeless); } if (Instance.cubemapPrefiltered == RwTexId.NULL) { Instance.cubemapPrefiltered = MyRwTextures.CreateCubemap(MyEnvironmentProbe.CubeMapResolution, Format.R16G16B16A16_Float, "Environment Prefiltered Probe"); Instance.workCubemap = MyRwTextures.CreateCubemap(MyEnvironmentProbe.CubeMapResolution, Format.R16G16B16A16_Float, "Environment Probe"); Instance.workCubemapPrefiltered = MyRwTextures.CreateCubemap(MyEnvironmentProbe.CubeMapResolution, Format.R16G16B16A16_Float, "Environment Prefiltered Probe"); Instance.prevWorkCubemapPrefiltered = MyRwTextures.CreateCubemap(MyEnvironmentProbe.CubeMapResolution, Format.R16G16B16A16_Float, "Environment Prefiltered Probe"); Instance.ImmediateProbe(cullQuery); } else { Instance.StepUpdateProbe(cullQuery); } }