浏览代码

Graphics: Check B10G11R11 support for HDR format (#141)

Some android-based GPU such as Adreno 540 (Quest, Pixel 2) do not have
linear render support.
In such cases, BoatAttack fails to display anything on screen and spits
out exceptions. Additionally, the test runner will fail on these platforms.
/main
GitHub 3 年前
当前提交
3cb49ac5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Packages/com.verasl.water-system/Scripts/Rendering/PlanarReflections.cs

4
Packages/com.verasl.water-system/Scripts/Rendering/PlanarReflections.cs


if (_reflectionTexture == null)
{
var res = ReflectionResolution(cam, UniversalRenderPipeline.asset.renderScale);
const bool useHdr10 = true;
const RenderTextureFormat hdrFormat = useHdr10 ? RenderTextureFormat.RGB111110Float : RenderTextureFormat.DefaultHDR;
bool useHdr10 = RenderingUtils.SupportsRenderTextureFormat(RenderTextureFormat.RGB111110Float);
RenderTextureFormat hdrFormat = useHdr10 ? RenderTextureFormat.RGB111110Float : RenderTextureFormat.DefaultHDR;
_reflectionTexture = RenderTexture.GetTemporary(res.x, res.y, 16,
GraphicsFormatUtility.GetGraphicsFormat(hdrFormat, true));
}

正在加载...
取消
保存