摘要:
转自:http://www.cnblogs.com/clayman/archive/2011/10/09/2203177.html这是一系列关于DirectX 11的文章中的第一篇,部分内容来自于<<Practical Rendering & Computation with Direct3D 11>>一书(我没有电子版,不要找我要电子版@_@!!如果你感兴趣,这里可以找到此书的源码),但不是翻译。文章不会介绍常见的基本概念,并且假定读者已经有DirectX9/10或者xna使用经验,并对图形学有一定了解。此外,也不会有太多示例代码,我将会着重介绍DirectX 阅读全文
posted @ 2012-09-09 19:43
ActionFG
阅读(195)
评论(0)
推荐(0)
摘要:
1 I think Cg uses a half float (fp16) data type. Also while loading the fp16 texture data into the graphics card, I can save some PCI-Ex bus bandwidth when compared to loading a fp32 texture data. Bus bandwidth and data transfer time is very critical for my application. Also if I use fp16 texture in 阅读全文
posted @ 2012-09-09 18:06
ActionFG
阅读(669)
评论(0)
推荐(0)
摘要:
一般来说, 定位渲染通道瓶颈的方法就是改变渲染通道每个步骤的工作量, 如果吞吐量也改变了, 那个步骤就是瓶颈.。找到了瓶颈就要想办法消除瓶颈, 可以减少该步骤的工作量, 增加其他步骤的工作量。 一般在光栅化之前的瓶颈称作”transform bound”, 三角形设置处理后的瓶颈称作”fill bound”定位瓶颈的办法: 1.改变帧缓冲或者渲染目标(Render Target)的颜色深度(16 到 32 位), 如果帧速改变了, 那么瓶颈应该在帧缓冲(RenderTarget)的填充率上。 ... 阅读全文
posted @ 2012-09-09 18:03
ActionFG
阅读(351)
评论(0)
推荐(0)
摘要:
GPU虽是多处理器平行处理,但基本次序还是按照indexBuffer的顺序或者VertexBuffer的存储顺序(indexBuffer不存在时)。 阅读全文
posted @ 2012-09-09 17:58
ActionFG
阅读(271)
评论(0)
推荐(0)
摘要:
#define SUB_TEXTURE_SIZE 512.0 #define SUB_TEXTURE_MIPCOUNT 10 float MipLevel( float2 uv ) { float2 dx = ddx( uv * SUB_TEXTURE_SIZE ); float2 dy = ddy( uv * SUB_TEXTURE_SIZE ); float d = max( dot( dx, dx ), dot( dy, dy )... 阅读全文
posted @ 2012-09-09 17:57
ActionFG
阅读(1179)
评论(0)
推荐(0)
摘要:
一、基础技术将光源作为相机,渲染场景,将lightWorldViewProjectPos——处于光源相机透视坐标系下的 z/w 值写入深度图中注意此时光源相机的projectMatrix应为: D3DXMatrixPerspectiveFovLH(&mLightProjection, D3DX_PI / 2, 1, 0.01, 4000);采用正常相机,利用深度图再次渲染场景。将此时场景的顶点先变换到光源相机的ProjectSpace中,并与深度图数据进行比较,若被遮挡,则为黑色二、VSM技术(资料vsm_paper.pdf)同样将光源作为相机,渲染场景,不过此时得存入(lightDe 阅读全文
posted @ 2012-09-09 17:53
ActionFG
阅读(246)
评论(0)
推荐(0)
摘要:
1、It is expected that graphics hardware will have a small number of fixed vector locations for passing vertex inputs. Therefore, the OpenGL Shading language defines each non-matrix input variable as taking up one such vector location. There is an implementation dependent limit on the number of locat 阅读全文
posted @ 2012-09-09 17:52
ActionFG
阅读(474)
评论(0)
推荐(0)
摘要:
Shader model comparison(详见:http://en.wikipedia.org/wiki/High_Level_Shader_Language)Pixel shader comparisonPixel shader version1.0 to 1.31.42.02.0a2.0b3.0[2]4.0[3]Dependent texture limit468Unlimited8UnlimitedUnlimitedTexture instruction limit46*232UnlimitedUnlimitedUnlimitedUnlimitedPosition register 阅读全文
posted @ 2012-09-09 17:51
ActionFG
阅读(466)
评论(0)
推荐(0)
摘要:
计算反射光向量R = R1 + R2R = R1 + R1 - (- L)R = -2 * dot( L, N) * N + LR = L - 2 * dot( L, N ) * N; 阅读全文
posted @ 2012-09-09 17:49
ActionFG
阅读(359)
评论(0)
推荐(0)
摘要:
微软DirectX自带profile工具,位于Microsoft DirectX SDK (June 2010)\Utilities\bin\x86\pixWin.exe(DX11可能有些许不同)NVIDIA PerfHUD (要求Nvidia显卡及DX9以上)和AMD PerfStudio(暂未发现亮点)常见用例:查看渲染流程中生成的RenderTargetTexture。打开ObjectView窗口,将Type选择为Texture2D;Created by选择为Application;Format选择为对应格式;最后将Usage选择为RendetTarget 对单个像素进行shader d 阅读全文
posted @ 2012-09-09 17:46
ActionFG
阅读(712)
评论(0)
推荐(0)
浙公网安备 33010602011771号