Realtime Rendering 6

Realtime Rendering 6

1、Lighting computations occur in two phases:

  1)light phase.

    used to compute the light’s direction vector l and irradiance contribution  E^L.

  2)material phaes.

    In the material phase, the BRDF parameters and surface normal.

  The result of the BRDF evaluation is multiplied by a cosine factor and by to produce the outgoing radiance EL.

  Both phases are repeated for each light source and the results are summed to produce the total outgoing radiance for the fragment.

  每个 surface对每个 light source 依次执行上面两个 phase,所有 light source 的计算结果结果最终汇总到一起。

2、 每一个material需要配合各种 light source组合,导致shader非常多。

  Valve抯 Half-Life 2 has 1920 pixel shader combinations.

3、让每个material处理所有的 light 会导致效率非常低。

  A long hallway, which is lit by twenty spaced light sources.  if dynamic branches are not employed, then all twenty light sources need to be computed for every pixel.

  loop优化方式是:

  loop over light sources dynamically in the pixel shader. Unfortunately, dynamic branches in the pixel shader perform poorly on many GPUs.

  ubershader、supershader 优化方式:

  write a single large shader that is compiled multiple times, using language features or code preprocessors to create a different specialized version of the shader each time.

  只写一个通用Shader,通过mactro为每一种 light source组合生成相应shader。

4、一种常用策略。

  

原文地址:https://www.cnblogs.com/tekkaman/p/9190234.html

时间: 2024-10-07 16:35:17

Realtime Rendering 6的相关文章

【《Real-Time Rendering 3rd》 提炼总结】(一) 全书知识点总览

本文由@浅墨_毛星云 出品,转载请注明出处.   文章链接:http://blog.csdn.net/poem_qianmo/article/details/69849858 一.<Real-Time Rendering 3rd>其书 在实时渲染和计算机图形学领域,<Real-Time Rendering 3rd>这本书一直备受推崇.有人说,它实时渲染的圣经.也有人说,它是绝世武功的目录. 诚然,<Real-Time Rendering 3rd>这本书的世界观架构宏大,

[图形学] 《Real-Time Rendering》碰撞检测(一)

原文有35页,容我慢慢翻译,第一部分翻译了10页 reference:<Real-Time Rendering> 目录 17   前言 17.1 和射线的碰撞检测 17.2 使用BSP树的动态碰撞检测 17.3 一般层次的碰撞检测 17.3.1 分层的构建 17.3.2 不同层之间的碰撞检测 17.3.3 代价函数 17.4 OBB树 17.5 多重物体碰撞检测系统 17.5.1 广阶段的碰撞检测 17.5.2 总结 17.6 更多样的话题 17.6.1 及时碰撞检测 17.6.2 距离查询

【《Real-Time Rendering 3rd》 提炼总结】(二) 第二章 图形渲染管线 The Graphics Rendering Pipeline

本文由@浅墨_毛星云 出品,转载请注明出处.   文章链接:http://blog.csdn.net/poem_qianmo/article/details/70544201 这篇文章是解析计算机图形学界"九阴真经总纲"一般存在的<Real-Time Rendering 3rd>系列文章的第二篇.将带来RTR3第二章内容"Chapter 2 The Graphics Rendering Pipeline 图形渲染管线"的总结.概括与提炼. 文章分为全文内

Realtime Rendering 1.1

[Realtime Rendering 1.1] 1.A linear transform is one that preserves vector addition and scalar multiplication. Specifically, 24.Combining linear transforms and translations can be done using an affine transform. An affine transform is one that perfor

Shaders(读书笔记4 --- Real-Time rendering)

1. vertex,pixel以及geometry shaders共享一个programming model,即common-shader core,在GPU架构中的unified shader可以和这个core很好的契合. common-shader core是API,支持unified shader是GPU的特性. 2. shaders是用类C的语言如HLSL,Cg,GLSL等编写的,程序被编译为不依赖于机器的assembly language,即intermediate language(

Real-Time Rendering读书辩疑琐记

At Page 707,5th paragrah.it write:If a normal vector is stored as three 32-bit floats,it has enough accuracy to point from Earth to a rock on Mars with sub-centimeter precision. I think the float vector can represent the distance from Earth to Mars,b

读 Real-Time Rendering 收获

chapter 4. Transform p54 affine transform p57 all rotation matrices have a determinant of one and are orthogonal p59 scale,reflection matrix p62 Rigid-Body Transform

Graphics-Processing Architecture Based on Approximate Rendering

BACKGROUND The present invention generally relates to the processing of graphics data, and particularly relates to methods and apparatus for controlling approximation errors in the rendering of three-dimensional graphics data. State-of-the-art three-

Unity3D光照前置知识——Rendering Paths(渲染路径)及LightMode(光照模式)译解

简述 Unity supports different Rendering Paths. You should choose which one you use depending on your game content and target platform / hardware. Different rendering paths have different performance characteristics that mostly affect Lights and Shadows