Skip to content

Commit 0b7b488

Browse files
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.
1 parent 8f74fa9 commit 0b7b488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ private void PlanarReflectionTexture(Camera cam)
221221
if (_reflectionTexture == null)
222222
{
223223
var res = ReflectionResolution(cam, UniversalRenderPipeline.asset.renderScale);
224-
const bool useHdr10 = true;
225-
const RenderTextureFormat hdrFormat = useHdr10 ? RenderTextureFormat.RGB111110Float : RenderTextureFormat.DefaultHDR;
224+
bool useHdr10 = RenderingUtils.SupportsRenderTextureFormat(RenderTextureFormat.RGB111110Float);
225+
RenderTextureFormat hdrFormat = useHdr10 ? RenderTextureFormat.RGB111110Float : RenderTextureFormat.DefaultHDR;
226226
_reflectionTexture = RenderTexture.GetTemporary(res.x, res.y, 16,
227227
GraphicsFormatUtility.GetGraphicsFormat(hdrFormat, true));
228228
}

0 commit comments

Comments
 (0)