【GPU精粹系列还原】GPU Pro7_II_4 实时体积云(初次尝试)

尝试还原了地平线的体积云,还有很多地方需要改进

在这里插入图片描述

细节部分请去读原书,这里主要对书中一带而过的部分做一下补充

关于Density-Height Functions

在这里插入图片描述
这里我的做法是用Sin苟
在这里插入图片描述

 fixed4 frag (v2f i) : SV_Target
 {
   
      fixed4 col = tex2D(_MainTex, i.uv);
      if(_B <= 0.6){
   
          i.uv.y = reMap(i.uv.y,0.0,1.0,0.0,1+(_B*2.0));
      }
      //加快缩减
      else{
   
          i.uv.y = reMap(i.uv.y
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hardcover: 320 pages Publisher: A K Peters/CRC Press (March 18, 2016) Language: English ISBN-10: 149874253X ISBN-13: 978-1498742535 The latest edition of this bestselling game development reference offers proven tips and techniques for the real-time rendering of special effects and visualization data that are useful for beginners and seasoned game and graphics programmers alike. Exploring recent developments in the rapidly evolving field of real-time rendering, GPU Pro 7: Advanced Rendering Techniques assembles a high-quality collection of cutting-edge techniques for advanced graphics processing unit (GPU) programming. It incorporates contributions from more than 30 experts who cover the latest developments in graphics programming for games and movies. The book covers advanced rendering techniques that run on the DirectX or OpenGL runtimes, as well as on any other runtime with any language available. It details the specific challenges involved in creating games across the most common consumer software platforms such as PCs, video consoles, and mobile devices. The book includes coverage of geometry manipulation; rendering techniques, handheld devices programming, effects in image space, lighting, 3D engine design, graphics-related tools, and environmental effects. It also includes a dedicated section on general purpose GPU programming that covers CUDA and DirectCompute examples. In color throughout, GPU Pro 7 presents ready-to-use ideas and procedures that can help solve many of your daily graphics programming challenges. Example programs with downloadable source code are also provided on the book’s CRC Press web page.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值