31 Matching Annotations
  1. Jun 2024
    1. We'll use the same formula that's used in the Universal RP, which is a variant of the Minimalist CookTorrance BRDF.

      See the slider Optimizing PBR for mobile for more details

    1. Because metallic surfaces absorb all refracted light they have no diffuse reflections and we can directly use the surface color texture as their base reflectivity.

      From ChatGPT

      Specular Reflection: This component represents the mirror-like reflection where incident light rays reflect off the surface at the same angle as the incoming rays. In metallic surfaces, this specular reflection dominates due to the high conductivity of metals, causing most incident light to be immediately reflected.

      Diffuse Reflection: Unlike non-metallic surfaces, where diffuse reflection is due to scattering from microscopic surface irregularities, the diffuse component in the Cook-Torrance model for metals often refers to the diffuse-like reflection caused by imperfections or micro-facets on the surface. These imperfections cause light to scatter in various directions rather than reflect perfectly specularly.

      Refracted Light and Metals: Metals generally do not transmit light, so there is minimal refraction occurring within the material. Instead of transmitting through the surface, incident light on metals is typically reflected or absorbed due to the material's conductive properties. Therefore, the diffuse component in the Cook-Torrance model for metals does not originate from refracted light within the material but rather from surface imperfections that cause scattering.

    1. The common opaque sorting option also takes some other criteria into consideration, including the render queue and materials.

      Taking materials into consideration, so we could apply batching techniques

    1. During the call to ScriptableRenderContext.ExecuteCommandBuffer, ScriptableRenderContext registers the commandBuffer parameter into its own internal list of commands to execute. The actual execution of these commands (including the commands stored in the custom commandBuffer) happens during ScriptableRenderContext.Submit.

      ScriptableRenderContext.ExecuteCommandBuffer copies commands to its own internal list from the buffer parameter

  2. May 2023
    1. MSAA keeps track of multiple samples per pixel, which don't have to placed in a regular grid. The big difference is that the fragment program is only invoked once per primitive per fragment, so at the original resolution. The result is then copied to all subsamples that are covered by the rasterized triangle.
      • MSAA keeps track of multiple samples per pixel, which don't have to be place in a regular grid.
      • The fragment program is only invoked once per primitive per fragment, so at the original resolution. The result is then copied to all subsamples that are covered by the rasterized triangle.

      i.e., if mulitple samples for a pixel locate in N primitives, the fragment program executes N times.

    2. tone mapping

      色调映射

  3. Apr 2023
    1. ComputeDirectionalShadowMatricesAndCullingPrimitives

      See https://catlikecoding.com/unity/tutorials/custom-srp/directional-shadows/

      However, directional lights are assumed to be infinitely far away and thus don't have a true position. So what we do instead is figure out view and projection matrices that match the light's orientation and gives us a clip space cube that overlaps the area visible to the camera that can contain the light's shadows.

    1. this process converges to give a smooth limit surface as the number of subdivision steps goes to infinity

      Limit surface 极限表面

      想象一下微积分中的求极限的过程,Limit surface 是求极限的结果

    1. mutex

      互斥量,互斥锁

      higher overhead compared to other options

    2. transactional memory

      事务内存

    3. data races.

      数据竞争

    4. acceleration structures

      以最快的速度去决定场景中哪些物体会与特定的光线相交,以此来避免计算那些不必要进行求交的测试

  4. Mar 2023
    1. The GPU then iterates through all entries and renders them in the order that they are provided.

      The cpu submit the vertex data and the array data containing per-object material properties once (single drawcall)

      However, the GPU iterates all instances and draws them. (也就是说,一次 drawcall 期间,GPU 会绘制多次)

  5. Feb 2023
    1. Fresnel-Schlick approximation

      菲涅尔-施利克 近似

  6. Sep 2022
    1. Similar to the networks that distribute fluids throughout an organism, rivers and other bodies of water collect, move, and distribute water throughout a landscape

      水至于地形,类似于血液至于人体。

    2. a Fractal is a pattern that repeats forever, and every part of the Fractal, regardless of how zoomed in, or zoomed out you are, it looks very similar to the whole image.

      Fractal 的每个部分,无论放大还是缩小,它看起来都和整个图像类似。

      例如树枝,树根。

    1. The Processing noise reference tells us that noise is calculated over several “octaves.”

      The following blog simply introduces how "octatives" generate noise

      https://blog.hirnschall.net/perlin-noise/

    1. Tile Height Resolution

      Tile Height Resolution - Height Resolution of the terrain tile we are creating.

      Height Resolution - vertices in a row, vertices in a column. Terrains are generated by sampling heightmap with mesh vertices coordinates.

  7. Jul 2022
    1. When a texture map is filtered, OpenGL uses the texture coordinates to figure out where in the texture map a particular fragment of geometry falls. The texels immediately around that position are then sampled using either the GL_NEAREST or the GL_LINEAR filtering operations.

      采样 Sampling

      // glsl
      col = texture(ourTexture, texcoord)
      // hlsl
      col = tex2D(ourTexture, texcoord)
      

      OpenGL 使用纹理坐标来确定一个几何片段 fragment 在纹理贴图中的位置。然后使用 GL_NEAREST 或 GL_LINEAR 过滤操作对紧邻该位置的纹素进行采样。

  8. Jun 2022
  9. datatracker.ietf.org datatracker.ietf.org
    1. slow start, congestion avoidance, fast retransmit, and fast recovery.

      slow start 慢启动 congestion avoidance 拥塞避免 fast retransmit 快速重传 fast recovery 快速恢复

  10. Mar 2022
    1. A gRPC channel uses a single HTTP/2 connection, and concurrent calls are multiplexed on that connection.

      gRPC 允许在同一个 gRPC 服务端运行多个 gRPC 服务,也允许多个客户端存根(stub)使用同一个客户端连接,这种功能叫做多路复用(multiplexing)。

      https://www.jianshu.com/p/d8a6c7805717

  11. Feb 2022
    1. ComputeScreenPos

      假设屏幕的宽 width 和高 height(像素)。

      一般来说屏幕坐标的计算大概是这样

      screenPos.x = ((pos.x/ pos.w) * 0.5 + 0.5) * width screenPos.y = ((pos.y/ pos.w) * 0.5 + 0.5) * height

      稍微变换一下:

      screenPos.x / width = ((pos.x/ pos.w) * 0.5 + 0.5) screenPos.y / height= ((pos.y/ pos.w) * 0.5 + 0.5)

      两边再乘以 pos.w

      screenPos.x / width * pos.w = (pos.x * 0.5 + pos.w * 0.5) <br/> screenPos.x / height * pos.w = (pos.y * 0.5 + pos.w * 0.5)

      显然,右边的计算与 ComputeScreenPos 的核心计算是一样的。

      也就是说 ComputeScreenPos 返回的坐标 * x: 范围 [0, w] * y: 范围 [0, w] * zw: 值同 pos.zw,因此这里 w 仍然存储着深度值

    1. In this tutorial, we’re going to use a combination of these techniques to recreate a rain effect, using particles for the raindrops and a custom material for puddles on the ground.

    2. Rain Puddles

      Rain Puddles 雨水坑 Puddle 水坑

    1. Flyweight

      享元模式

      共享 intrinsic state 来减少内存占用

      这个翻译也是满怪