BACKGROUND Many algorithms on a graphics processing unit (GPU) may benefit from doing a query in a hierarchical tree structure (including quad-trees, oct-trees, kd-trees, R-trees, and so forth). However, these trees can be very deep, whereby traversi…
Welcome back to what’s going to be the last “official” part of this series – I’ll do more GPU-related posts in the future, but this series is long enough already. We’ve been touring all the regular parts of the graphics pipeline, down to different le…
In this installment, I’ll be talking about the (early) Z pipeline and how it interacts with rasterization. Like the last part, the text won’t proceed in actual pipeline order; again, I’ll describe the underlying algorithms first, and then fill in the…
Welcome back! This time, we’ll look into what is perhaps the “poster boy” feature introduced with the D3D11 / Shader 5.x hardware generation: Tessellation. This one is interesting both because it’s a fun topic, and because it marks the first time in…
Welcome back.     Last time, we dove into bottom end of the pixel pipeline. This time, we’ll switch back to the middle of the pipeline to look at what is probably the most visible addition that came with D3D10: Geometry Shaders.     But first, some m…
A graphics pipeline consists of shader stages, a pipeline layout, a render pass, and fixed-function pipeline stages. Dynamic State A dynamic pipeline state is a state that can be changed by a command buffer command during the execution of a command b…
LeetCode: Binary Tree Traversal 题目:树的先序和后序. 后序地址:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/ 先序地址:https://oj.leetcode.com/problems/binary-tree-preorder-traversal/ 后序算法:利用栈的非递归算法.初始时,先从根节点一直往左走到底,并把相应的元素进栈:在循环里每次都取出栈顶元素,如果该栈顶元素的右…
1.总结:Graphics pipeline 主要分为两部分工作 把3D坐标转换成2D坐标 把2D坐标转换成真实的有颜色的像素 2.下图就是一个顶点数据经过几个步骤后转化成显示在屏幕上像素的过程(一般也叫做GLSL的流水线工作流程),蓝色图形部分是我们可以通过写shader文件参与的,目前参与比较多的主要是顶点和片段shader. 3. 对上图每个步骤进行解析 3.1 Vertex Data[]传到顶点shader程序 3.2 顶点着色程序对顶点数据进行转换,把Vertex Data中的3D坐标…
Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, given inorder = [9,3,15,20,7] postorder = [9,15,7,20,3] Return the following binary tree: 3 / \ 9 2…
Several techniques have been proposed to reduce the number of pipeline stages. We categorize them into two types based on their design philosophy: stage merging and stage bypassing. Stage merging combines multiple stages of the traditional design int…