Android机型性能分级方案

在 Android 生态中,由于设备碎片化极其严重(成千上万种机型,涵盖高通、联发科、三星、紫光展锐等不同芯片),仅通过“机型白名单”是不现实的。

目前业界主流的方案通常采用 **“分级策略” (Tiering Strategy)**,结合 静态检测(硬件规格)和 动态调整(运行时监控)。

阅读全文

Depth24Stencil8介绍

直接回答你的问题:不是浮点型

Depth24Stencil8 (通常在 OpenGL 中对应 GL_DEPTH24_STENCIL8,在 DirectX/Vulkan 中对应 D24_UNORM_S8_UINT) 中的 Depth24 部分,存储的是 **无符号归一化整型 (Unsigned Normalized Integer, UNORM)**。

阅读全文

Analyzing Format Trade-offs R11G11B10F

Analyzing Format Trade-offs

I’ve been drilling down on the nuances of RGB8 versus R11G11B10F. My focus is on understanding the situations where the floating-point precision of R11G11B10F justifies its increased memory footprint compared to the compact RGB8. I’m starting to grasp the implications for HDR rendering and light accumulation scenarios where the extra range is crucial. Current thinking focuses on the actual trade-offs that have to be made with a limited memory budget.

阅读全文

移动端模板测试与Eary-z分析

在移动端(特别是基于 TBDR 架构的 GPU,如 Adreno, Mali, Apple GPU)使用模版缓存(Stencil Buffer)时,导致 Early-Z 失效并引起 Fragment Shader(片元着色器)占用率上升,主要原因是 GPU 无法在着色器执行前确定深度和模版测试的最终结果,从而被迫回退到 Late-Z(后期深度测试)模式。

阅读全文

在 Bash Shell 中,单引号和双引号的主要区别

在 Bash Shell 中,单引号 (' ') 和双引号 (" ") 的主要区别在于 对特殊字符和变量的处理方式

简单总结:

  • 单引号 (强引用)所见即所得。单引号内的所有内容都会被当作普通字符,不进行变量替换或命令执行。
  • 双引号 (弱引用)允许解析。双引号内的内容大部分被当作普通字符,但会保留变量 ($)、命令替换 (`$()) 和转义符 (\) 的功能。

阅读全文

存储浮点数

我们要彻底理解这个问题,需要深入到计算机底层是如何存储浮点数(Floating Point)的。这里涉及到一个核心概念:科学计数法(Scientific Notation)的二进制版本

我们把这个问题拆解成三个部分:结构解析为什么是 1024 个刻度为什么范围不同精度不同

阅读全文