游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2514|回复: 0

GPU???Shader???????????

[复制链接]

1万

主题

1万

帖子

3万

积分

论坛元老

Rank: 8Rank: 8

积分
36572
发表于 2019-7-29 15:39:35 | 显示全部楼层 |阅读模式
v2-bc35135ca9ab56f300fde2421cf0a5bd_1200x500.jpg

????????GPU Gems 2??????????????????????????????????Perlin?????????

??

???????????????????????????????????????Cry Engine?Cry Engine?????????????????????????????????????????????????Cry Engine???????????

1.jpg

????6??Cry Engine 3????????????????????????????

????Cry Engine 5????????????

???????Cry Engine?????????????shader???????Cry Engine???????????????Water.cfx??????????????????

CRYTEK/CRYENGINEgithub.com

???????????????????????????Cry Engine 5??????????????

OK????????

????????Highlight

????????????GPU Gems 2??????????

???????????????????Using Vertex Texture Displacement for

Realistic Water Rendering?

??????????GPU Gems 2??????????

?????????????????????Efficient Soft-Edged Shadows Using Pixel Shader Branching?

??????????Generic Refraction?

???????????Fast Third-Order Texture Filtering?

?????????????High-Quality Antialiased Rasterization?

??????????Fast Prefiltered Lines?

??Nalu Demo??????????Hair Animation and Rendering in the Nalu Demo?

??????????????Using Lookup Tables to Accelerate Color Transformations?

???????Perlin???Implementing Improved Perlin Noise?

??????????Advanced High-Quality Filtering?

???Mipmap?????Mipmap-Level Measurement?

I????????

???????????????????Using Vertex Texture Displacement for Realistic Water Rendering?

??????

???????????????????????????????????????????????????????????????????????????????????

2.jpg
??????????????

??????

1.1?????????

Gems2??????????2005??????????????????????????????????FFT?[Tessendorf 2001],????????????????????????????

?????????????????????????????????????????????????????????????????????????????????

????????????????????????????????FFT??????????

1.2??????

???????????????????????????????????????????????????????????????????????????????????????????????

1.3???????

????????????????Height maps?????????????????????????????????harmonic?????octave?????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

3.jpg
?18-2????????????

?????????????????????????????????????

4.jpg

??A?B??????????????????????????????????????????????????????4???????????????????????????????????????????????????10cm?40km?10???40??????

1.4??????

??????????????????

??????
????

??????????????????????????????????????????????????????????????????????????????????????????

1.5??????

????????????????????????????????????????????????????????????????radial grid???????????????????????????????

5.jpg

????????????????????????

6.jpg

???i=[0..N-1],j=[0..M-1]???a0?a1??

7.jpg

??????????????????????????????????LOD?????????ROAM?SOAR??????????????????????CPU??????????????????????????????GPU???????????????

???????????????????????????????????

00000000

1.6????????????????

1.6.1???????????

?????????????????GeForce 6???????????????????????????????????????????????????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????

1.6.2????????????

?????????????????????????????????????????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????

00000000000

???????????????????????????????????????????????????????

1.6.3??????????Render-to-Texture?

????????????????????????????????????????pass??????????????????????????????????????????????????????16??????????????????????????????????????????????????

?????????????????????pass?

?1??????????????32?????????????????????????????????????????????

?2??????????????????????????

1.6.4???????

?????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????????????????????????

8.jpg
????????

??????????????????????????????????????????????????

?????????????????????????????????????????????????????????????

1.7?????????

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

1.7.1????????Analytical Deformation Model?

????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????

9.jpg

???r????????????????b??????I_0???k??????????????????

?????????????????????????????????

1.7.2???????Dynamic Displacement Mapping?

?????????????????????????????????GPU?????GPGPU??????????????pass????????????pass???????????????????????????????????????????????octaves?????????????????????????

???????????????????????????????????cellular-automata??????????????????????????????????????????

10.jpg

????????????????????????????????

1.7.3??????Foam Generation?

?????????????????????????????????????????????????H0????????????????????????????

11.jpg

???H_max??????????H_0??????H??????

?????????????????????????????????????????????????????

????????

????????????????????????????????????????????Height maps???????????????????????????????????????????????????????????????radial grid???????????????

1.??????????????

1????????????:???????????????????????????????????????????????

2????????????????????????????????????????????????????????????

3???????????Render-to-Texture?

4????????????????????????????????????????????????????????

2.?????????

1?????????Analytical Deformation Model?

2.???????Dynamic Displacement Mapping?

3.??????????????????????H0????????????????????????????

???????

??????????????????????????

QianMo/GPU-Gems-Book-Source-Codegithub.com

??shader????fpWaterDM.cg?vpWaterDM.cg????????????????demo exe?????????

12.gif

13.jpg



?????

????Water Rendering?

???????Vertex Texture Displacement?

?????Height Mapping?

??????Bilinear Filtering?

II?????????

?????????????????????Efficient Soft-Edged Shadows Using Pixel Shader Branching?

??????

???????????????????????????????soft

shadow?????????????????????????????????????????

????????????????PCF????????????????????????

??????

?????????????????????????/????Stencil Shadow/Shadow volume???????Shadow Map??

???????????????????????????????????????

??????????????????????????????????????????????????????Percentage-Loser Filtering,PCF??????????????????????????????????????????????????????????????????????

14.jpg

???????????????????

?????

????Soft Shadows?

???????Soft-Edged Shadows?

????/????Stencil Shadow/Shadow volume?

?????Shadow Map?

????????Percentage-Loser Filtering,PCF?

??????????Generic Refraction?

??????

??????????????????????????????????????????????????????????????????????????????????????????

??????

???Refraction???????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????

??????????????????????????????pass????????????????????pass??????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

15.jpg

???????????a????b????????c??????

???????????????????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????alpha????????

?????

???Refraction?

?????Water Rendering?

??????Glass Rendering?

???????????Fast Third-Order Texture Filtering?

??????

?????????????????????????????????????????????cubic????[Bjorke 2004]???????????????????????????????mipmap???????????

??????????????????????????????????????1D?2D?3D??????B???B-spline???????????????????????????

??????

???????????????????????????????????????????????Repeated Nearest-Neighbor?????????????????????????????????????????????????2D?3D?????????8???????????????64??????????tricubic?????????????

16.jpg
???B???Cubic B-Spline?????

?a?f_1??????w_i?x????

?b??????????????c????????????

????????????????????????????????????????????????????????????????????????????????????B????????????????????????????????

????????????????????????????????????????

?????

?????Texture Filtering?

?????Higher-Order Filtering?

B?????B-Spline Filtering?

??B???Cubic B-Spline?

?????????Fast Recursive Cubic Convolution?

?????????????High-Quality Antialiased Rasterization?

??????

??????????????supersampling????????????????????????????????????????????????????

??????

???????????????????supersampling??????????????????tiles????buckers???????????????????downsample???????????????????????????????????????????????????????????????????????????????????????????????????????????????

17.jpg
???????tiles

????????????????????

?1???????????????????????????????????3D?????????????????

?2??????????????????????????????????????????????????????????

?3????????????????????????????????CPU??????????????????????????

?????

???????Antialiased Rasterization?

??????tiled supersampling?

????downsample?

??????????Fast Prefiltered Lines?

??????

?????????????????????????????

??????

?????????Prefiltered??????McNamara,McCormack,?Jouppi?2000??????????????????????????????????????????????????????????????????????????????????????????????????????????GPU?????????????

18.jpg
??????????????

???????????????????????????????????????????????????????

?????????????????????????????????????CPU?GPU?????????????????????????????????????????????????????????????

?????

??????Prefiltered Lines?

???/????Antialiasing?

???????Antialiasing Lines?

??Nalu Demo??????????Hair Animation and Rendering in the Nalu Demo?

??????

?????NVIDIA???Nalu Demo????????????

19.jpg
?Nalu???

??????

NVIDIA?Nalu demo????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?Nalu?????????????????????????????????????????????????????/??????

??????4095?????????????????????????????123000???????????????????????????????????????control hair?????????????Nalu???????????????????????????????????????????

???????????????Marschner?????2003?????????????????????????????????????????Opacity shadow maps?(Kim and Neumann 2001)?

20.jpg
???Marschner?????????

21.jpg
?Marschner??????????Lookup Textures?

?????

?????Hair Rendering?

?????Hair Animation?

Marschner?????Marschner Reflectance Model?

???????Opacity Shadow Maps?

??????????????Using Lookup Tables to Accelerate Color Transformations?

??????

??????????????????????????????????

??????

???????????????????????????????????Lookup

Table???LUT???????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????GPU??????????????????????????????????

22.jpg
?????????

23.jpg

?????????????????????????????????????????????????????????????????

?????

????Lookup Table?LUT?

?????Color Transformations?

???????Perlin???Implementing Improved Perlin Noise?

??????

?????GPU Gems 1?????????Ken Perlin??????[Perlin

2004]??GPU Gems 1??Ken Perlin???????????3D????????????????????????????GPU??????????CPU?????

??????

Perlin????????????

?????3D????????x?y?z?????????????????????????????Perlin????????????????????????????0~255????????????????????????????????????????????????x????????y????????????????????????????????z???????????z??????????????????x?y?z??????????

?????????????????????????3D??????????????????8??????????????????????????????????????????????8???????????

Perlin?????????CPU?????????????????????????????????????????????????????????????????????????????????????????????????????????CPU??????

???????????????????????????????????????????????????????????

24.jpg
??????????pixel?????

?????

Perlin???Improved Perlin Noise?

???Perlin???Improved Perlin Noise?

??????????Advanced High-Quality Filtering?

??????

?????????GPU????????????????????????????????

??????

?????????????????????????????????????????????????????????????????????????????3D?????????????????????????????

????????????????????????????????????????????????????????????????????????????????????????????????3D???????????????????????????????

?????????????????????????????????????Shock Filtering?????????????????????

25.jpg
??????Shock Filtering???

?????

GPU?????GPU-based texture-filter?

?????texture interpolation?

???/????antialiasing?

?????Shock Filtering?

???Mipmap?????Mipmap-Level Measurement?

??????

???????????false-colored??mipmap???????????????????????mipmap????????????????????GPU?????????????

??????

????false-colored??mipmap?????GPU?????????????????????mip????????????????????????????????????????????????????????????Climax?Leviathan????????????????????????80%????????????????????

27.jpg
???????????mipmap??

??a???????Climax?Leviathan?????b?????????????????????mipmap????????????????????????

28.jpg
?????

?????

?????texture management?

????false-colored?

Mipmap???Mipmap-Level?

???GitHub?

????????GitHub????????????

???MarkDown????????????????????????????????GitHub??????????????????????????????????Git?????????????????????,???????????????GitHub?Repo????

????GitHub???????

QianMo/Game-Programmer-Study-Notesgithub.com

?????????????

?????????GPU Gems 2???????????????????

PS:?????????????????????????????exe?????????????????

?GPU Gems 2????Web???

GPU Gemsdeveloper.nvidia.com

????????GPU-Gems-Book-Source-Code?GitHub???????GPU

Gems??????????????GPU Gems 2????CD?????????????

https://link.zhihu.com/?target=https%3A//github.com/QianMo/GPU-Gems-Book-Source-Code

??????
?????https://zhuanlan.zhihu.com/p/40288273

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-2-19 07:04

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表