Real Time Rendering 1

1、RTR是一本导论。官网:http://www.realtimerendering.com。

2、At around 6 fps, a sense of interactivity starts to grow.

An application displaying at 15 fps is certainly real-time;  the user focuses on action and reaction.

There is a useful limit, however. From about 72 fps and up, differences in the display rate are effectively undetectable.

3、The plane π is said to divide the space into 2 spaces:

  1) a positive half-space, where n · x + d > 0,

  2) anegative half-space, where n · x + d < 0.

  All other points are said to lie in the plane.

4、(x,y) 垂直于 (-y, x).

  

5、-PI/2 < arctan(x) < PI/2,0<=atan2(y, x)<2*PI. x = y/x, except when x =0

  

6、A chain is no stronger than its weakest link.

7、It is possible to have several model transforms associated with a single model. This allows several copies (called instances) of the same model to have different locations, orientations, and sizes in the same scene, without requiring replication of the basic geometry.

  Some of the tasks traditionally performed on the CPU include collision detection, global acceleration algorithms, animationphysics simulation, and many others.

8、几何阶段

  

  

  OpenGL has always used this scheme, and DirectX 10 and its successors use it. The center of this pixel is at 0.5.

  Primitives are clipped against the unit cube.

  how integer and floating point values relate to pixel (and texture) coordinates?

    DirectX 9 and its predecessors use a coordinate system where 0.0 is the center of the pixel, meaning that a range of pixels [0, 9] cover a span from [−0.5, 9.5).

  OpenGL and Dx10:center of this pixel is at 0.5.  The center of this pixel is at 0.5. So a range of pixels [0, 9] cover a span from [0.0, 10.0).

    

  OpenGL 左下角为原点,DX左上角为原点。

9、光栅化阶段

  

  Finding which samples or pixels are inside a triangle is often called triangle traversal or scan conversion.

  Partially transparent primitives cannot be rendered in just any order.

9、Stencil Buffer typically contains eight bits per pixel.

  All of these functions(Alpha Blend、Alpha Test、Stencil Buffer) at the end of the pipeline are called raster operations (ROP) or blend operations.

  Accumulation buffe, A set of images showing an object in motion can be accumulated and averaged in order to generate motion blur.  Other effects that can be generated include depth of fieldantialiasing, soft shadows.

10、The geometry shader is an optional, fully programmable stage that operates on the vertices of a primitive (point, line or triangle). It can be used to perform per-primitive shading operations, to destroy primitives, or to create new ones.

  The geometry shader is an optional, fully programmable stage that operates on the vertices of a primitive (point, line or triangle). It can be used to perform per-primitive shading operations, to destroy primitives, or to create new ones.

3.2 The Programmable Shader Stage

11、We differentiate in this book between the common-shader core, the functional description seen by the applications programmer, and unified shaders, a GPU architecture that maps well to this core.

  1)common-shader core,程序员看见的,比较 ShaderLab。

  2)unified shaders,GPU执行的shader。

  Shaders are compiled to a machine-independent assembly language, also called the intermediate language (IL)This assembly language is converted to the actual machine language in a separatestep, usually in the drivers.

  

12、Each programmable shader stage has two types of inputs: uniform inputs, with values that remain constant throughout a draw call (but can be changed between draw calls),  and varying inputs, which are different for each vertex or pixel processed by the shader.

  The number of available constant registers is much larger than the number of registers available for varying inputs or outputs.

13、Shaders support two types of flow control. Static flow control branches are based on the values of uniform inputs. This means that the flow of the code is constant over the draw call.

   Dynamic flow control is based on the values of varying inputs. This is much more powerful than static flow control but is more costly, especially if the code flow changes erratically between shader invocations.

14、a shader is evaluated on a number of vertices or pixels at a time. If the flow selects the “if” branch for some elements and the “else” branch for others, both branches must be evaluated for all elements.

  在一次渲染中,如果有些pixel执行if,而另一些pixel执行else,那么所有的pixel将会执行两次shader。

3.3 The Evolution of Programmable Shading

15、In early 2001, NVIDIA’s GeForce 3 was the first GPU to support programmable vertex shaders [778], exposed through DirectX 8.0. DirectX defined the concept of a Shader Model to distinguish hardware with different shader capabilities. The GeForce 3 supported vertex shader model 1.1 and pixel shader model. 1.1

16、The year 2002 saw the release of DirectX 9.0 including Shader Model 2.0, which featured truly programmable vertex and pixel shaders.  DirectX 9.0 also included a new shader programming language called HLSL (High Level Shading Language).  HLSL was developed by Microsoft in collaboration with NVIDIA, which released a cross-platform variant called Cg.

17、Shader Model 3.0 was introduced in 2004.  When a new generation of game consoles was introduced in late 2005 (Microsoft’s Xbox 360) and 2006 (Sony Computer Entertainment’s PLAYSTATION R⃝ 3 system), they were equipped with Shader Model 3.0–level GPUs.  The fixed-function pipeline is not entirely dead: Nintendo’s Wii console shipped in late 2006 with a fixed-function GPU). However, this is almost certainly the last console of this type.

18、In 2007. Shader Model 4.0  introduced several major features, such as the geometry shader and stream output.

19、 Besides new versions of existing APIs, new programming models such as NVIDIA’s CUDA [211] and AMD’s CTM [994] have been targeted at non-graphics applications.

3.5 The Geometry Shader

20、The geometry shader was added to the hardware-accelerated graphics pipeline with the release of DirectX 10, in late 2006. and its use is optional.  The input to the geometry shader is a single object and its associated vertices.  The object is typically a triangle in a mesh, a line segment, or simply a point. three additional vertices outside of a triangle can be passed in, and the two adjacent vertices on a polyline can be used. The geometry shader processes this primitive and outputs zero or more primitives. The geometry shader is guaranteed to output results from primitives in the same order as they are input.

  

  The geometry shader program is set to input one type of object and output one type of object, and these types do not have to match.

  The geometry shader is guaranteed to output results from primitives in the same order as they are input.

3.5.1 Stream Output

21、Stream Output Stage as introduced in Shader Model 4.0.

    

22、In SM 2.0 and on, a pixel shader can also discard incoming fragment data, i.e., generate no output. Such operations can cost performance, as optimizations normally performed by the GPU cannot then be used. See Section 18.3.7 for details.

  fog computation and alpha testing have moved from being merge operations to being pixel shader computations in SM 4.0.

23、The one case in which the pixel shader can access information for adjacent pixels (albeit indirectly) is the computation of gradient or derivative information. 

  The pixel shader has the ability to take any value and compute the amount by which it changes per pixel along the x and y screen axes.

  也即 ddx / ddy.

  The ability to access gradient information is a unique capability of the pixel shader, not shared by any of the other programmable shader stages.

  只有 ps 才能访问渐变纹理。通过访问纹理,使得ps拥有访问相邻元素部分信息(纹理)的能力。

Real Time Rendering 1的更多相关文章

  1. 【原】实时渲染中常用的几种Rendering Path

    [原]实时渲染中常用的几种Rendering Path 本文转载请注明出处 —— polobymulberry-博客园 本文为我的图形学大作业的论文部分,介绍了一些Rendering Path,比较简 ...

  2. Forward+ Rendering Framework

    近几天啃各种新技术时又一个蛋疼的副产品...额,算是把AMD的Forward+ Sample抄了一遍吧. 其实个人感觉这个AMD大肆宣传的Forward+跟Intel很早之前提的Tiled-Based ...

  3. Thinking in Unity3D:渲染管线中的Rendering Path

      关于<Thinking in Unity3D> 笔者在研究和使用Unity3D的过程中,获得了一些Unity3D方面的信息,同时也感叹Unity3D设计之精妙.不得不说,笔者最近几年的 ...

  4. CSharpGL(30)用条件渲染(Conditional Rendering)来提升OpenGL的渲染效率

    CSharpGL(30)用条件渲染(Conditional Rendering)来提升OpenGL的渲染效率 当场景中有比较复杂的模型时,条件渲染能够加速对复杂模型的渲染. 条件渲染(Conditio ...

  5. CSharpGL(8)使用3D纹理渲染体数据 (Volume Rendering) 初探

    CSharpGL(8)使用3D纹理渲染体数据 (Volume Rendering) 初探 2016-08-13 由于CSharpGL一直在更新,现在这个教程已经不适用最新的代码了.CSharpGL源码 ...

  6. Unity性能优化(4)-官方教程Optimizing graphics rendering in Unity games翻译

    本文是Unity官方教程,性能优化系列的第四篇<Optimizing graphics rendering in Unity games>的翻译. 相关文章: Unity性能优化(1)-官 ...

  7. 几大主流浏览器内核(Rendering Engine)

    "浏览器内核",英文为"Rendering Engine",也叫"渲染引擎",作用是帮助浏览器来渲染网页的内容,将页面内容和排版代码转换为用 ...

  8. 各大浏览器内核介绍(Rendering Engine)

    在介绍各大浏览器的内核之前,我们先来了解一下什么是浏览器内核. 所谓浏览器内核就是指浏览器最重要或者说核心的部分"Rendering Engine",译为"渲染引擎&qu ...

  9. OpenCascade Chinese Text Rendering

    OpenCascade Chinese Text Rendering eryar@163.com Abstract. OpenCascade uses advanced text rendering ...

  10. Tutorial - Deferred Rendering Shadow Mapping 转

    http://www.codinglabs.net/tutorial_opengl_deferred_rendering_shadow_mapping.aspx Tutorial - Deferred ...

随机推荐

  1. java类库 collection与collections (转)

    http://www.cnblogs.com/dashi/p/3597937.html Java中Collection和Collections的区别 1.java.util.Collection 是一 ...

  2. android 开发 RecyclerView 横排列列表布局

    1.写一个一竖的自定义布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xml ...

  3. 16.Mongodb安装

    Mongodb是由c++编写的非关系型数据库,是一个基于分布式文件存储的开源数据库系统,其内容存储形式类似JSON对象,它的字段值可以包含其他文档.数组及文档数组,非常灵活. 1.相关链接: http ...

  4. leetcode1024

    class Solution(object): def videoStitching(self, clips: 'List[List[int]]', T: int) -> int: li = s ...

  5. leetcode998

    class Solution: def __init__(self): self.prelist = list() def preTree(self,root:TreeNode): if root ! ...

  6. 开源项目几点心得,Java架构必会几大技术点

    关于学习架构,必须会的几点技术 1. java反射技术     2. xml文件处理     3. properties属性文件处理     4. 线程安全机制     5. annocation注解 ...

  7. 【JEECG技术文档】Jeecg高级查询器

    1. 背景 对于用户来讲查询功能按易用性分三个层次: 1)最简单查询操作是一个输入框,全文检索,如百度,后台实现技术使用搜索引擎,需要设计和建立索引,技术较为复杂,适用于文档和信息数据库检索,但是结果 ...

  8. day03-数据类型

    数据类型 一.介绍 存储引擎决定了表的类型,而表内存放的数据也要有不同的类型,每种数据类型都有自己的宽度,但宽度是可选的 mysql常用数据类型概括:#1. 数字: 整型:tinyint.int.bi ...

  9. css:清楚浮动

    这个清楚浮动的方法最常用,给浮动字元素的父盒子,也就是不浮动元素,添加一个lhearfix的类,其类的css样式为: .clearfix:after{ /*必须要写这三句话*/ content:''; ...

  10. 尚硅谷redis学习10-复制

    是什么? 能干嘛? 怎么玩? 1) 初始情况 设置slave 日志查看 主机查看 备机日志 复制状态 觉见问题 1 切入点问题?slave1.slave2是从头开始复制还是从切入点开始复制?比如从k4 ...