shader model 3

nv's shader_model_3_unleased.pdf笔记
1,硬性指标的提升:
vertex shader:
constant register >=256,
temp reg:  32
instructions  65535
pixel shader:
constant reg:  224
temp reg  32
interpolated reg: 10

2,dynamic/static flow control
它们重要的应用是shader lod,近处或者吸引目光的地方使用复杂shader,否则就用简单的;

static flow control是指通过constant reg来控制branch;
dynamic flow control是指用函数里生成的数据来做flow branch;
在vertex shader里,branch flow control需要2个cycle,static会更少;

pixel shader里面branch更贵一些,dynamic比static贵,这个就比较和具体情况相关,需要profile来给与
参照,但是如果通过branch可以省掉大量计算,取消parallax mapping,阴影的sample,当然不需要过多考虑了;

3,vertex texture,instancing
vertex texture:这个是很牛x的特性,作为数据存储介质的texture可以加入到vertex shader之后,赋予了vertex变化的极大弹性,
在vertex shader中做的诸如animation,skin,particle可以变得更加复杂梦幻。
另外也可以提供如水体模拟这样的更胜pixel shader端的做法;

instancing:一个model可以通过多个stream非常便宜的变成多个,对于大量简单类似模型的渲染非常有帮助;
当然它会给pixelshader加负担,所以这种模型的渲染就不能太费pixel shaderl了;

4,shader pipeline
[vertex shader]: fp32 vector unit,fp32 scalar unit,vertex texture fetch, branch unit,primitive assembly,viewport processing;
[pixel shader]: fp texture processor,texture cache,fp32 shader unit1,fp32 shader unit2,branch processor,fog alu;

[fp32 shader unit1]: 4fp ops/pixel,dual/co-issue,texture addr calc,free fp 16 normalize+mini alu;
[fp32 shader unit2]: 4fp ops/pixel,dual/co-issue+mini alu;

[texture filter]:bi/tri/aniso filter;fp tex filter;
[co-issue]: 2 independent instruction work on the sample shader unit;
[dual-issue]: 2 independent instruction work on different shader units;

5,sm3 in shader map
[dynamic flow branch]:检测边缘,是的话就多sample一些,ps:但是只是边缘的话就做blur好了呀;
[float texture]fp32,fp16,更高的精度,更好的效果;
[texture filter option]bilinear,trilinear,aniso,可以帮助更好的sample shadow map
[fast z-only rendering] 两倍的速度构造z buffer,可以用来做shadow,也可以做z cull;

6,multiple render target:
可以输出到多个render target;
用来做deferred shading是很好的选择;

7,float texture filtering;
更高的精度,对hdr帮助极大; 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Cesium Shader is a set of shader programs and techniques used to render 3D graphics in the Cesium JavaScript library. These shaders are designed to run on the GPU (graphics processing unit) and provide high-performance rendering of various types of visual effects such as lighting, shadows, reflections, and more. The Cesium Shader system is built on top of WebGL, a standard API for rendering 3D graphics in web browsers. Cesium Shader uses a combination of vertex shaders and fragment shaders to render 3D models with high fidelity and realism. The vertex shader is responsible for transforming the 3D model's vertices into screen space coordinates. It also calculates lighting and other effects based on the position and orientation of the camera and other factors. The fragment shader is responsible for rendering each pixel of the 3D model based on the lighting and other effects calculated by the vertex shader. This includes determining the color and intensity of each pixel, as well as handling transparency and other visual effects. Cesium Shader also includes advanced techniques such as deferred shading, which allows for complex lighting effects with multiple light sources and shadows. This technique involves rendering the scene in multiple passes, with each pass generating a separate buffer of information that is then combined to produce the final image. Overall, Cesium Shader provides a powerful and flexible system for rendering 3D graphics in web-based applications. Its use of WebGL and GPU acceleration allows for high-performance rendering of complex scenes and effects, making it a popular choice for a wide range of applications, from games and simulations to scientific data visualization and more.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值