Gpu gems 3 chapter 13 volumetric light scattering as a post process
This presentation is the property of its rightful owner.
Sponsored Links
1 / 12

GPU Gems 3 Chapter 13. Volumetric Light Scattering as a Post-Process PowerPoint PPT Presentation


  • 127 Views
  • Uploaded on
  • Presentation posted in: General

GPU Gems 3 Chapter 13. Volumetric Light Scattering as a Post-Process. http://www.kindnap.pe.kr http://cafe.naver.com/shader. introduction. 간단한 후처리 방법으로 대기중의 그림자에 반응하는 volumetric light scattering 효과를 구현해본다 . Figure 13-1 Volumetric Light Scattering on a Highly Animated Scene in Real Time.

Download Presentation

GPU Gems 3 Chapter 13. Volumetric Light Scattering as a Post-Process

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Gpu gems 3 chapter 13 volumetric light scattering as a post process

GPU Gems 3Chapter 13. Volumetric Light Scattering as a Post-Process

http://www.kindnap.pe.kr

http://cafe.naver.com/shader


Introduction

introduction

  • 간단한 후처리 방법으로 대기중의 그림자에 반응하는 volumetric light scattering 효과를 구현해본다.

Figure 13-1 Volumetric Light Scattering on a Highly Animated Scene in Real Time


Introduction1

introduction

  • 대기중의 차폐물에 반응하여 산란하는 효과를 보이는 빛을 만드는 것이 목표

  • 정밀한 산란공식을 적용하기 보단, 단순화된 공식을 적용 근사한 효과를 얻어냄


Shader code

Shader Code

Example 13-1. Post-Process Shader Implementation of Additive Sampling

   float4 main(float2 texCoord : TEXCOORD0) : COLOR0   

{   

  // Calculate vector from pixel to light source in screen space.   

   half2 deltaTexCoord = (texCoord - ScreenLightPos.xy);   

  // Divide by number of samples and scale by control factor.   

deltaTexCoord *= 1.0f / NUM_SAMPLES * Density;   

  // Store initial sample.   

   half3 color = tex2D(frameSampler, texCoord);   

  // Set up illumination decay factor.   

   half illuminationDecay = 1.0f;   

  // Evaluate summation from Equation 3 NUM_SAMPLES iterations.   

   for (inti = 0; i < NUM_SAMPLES; i++)   

  {   

    // Step sample location along ray.   

texCoord -= deltaTexCoord;   

    // Retrieve sample at new location.   

   half3 sample = tex2D(frameSampler, texCoord);   

    // Apply sample attenuation scale/decay factors.   

    sample *= illuminationDecay * Weight;   

    // Accumulate combined color.   

    color += sample;   

    // Update exponential decay factor.   

illuminationDecay *= Decay;   

  }   

  // Output final color with a further scale control factor.   

  return float4( color * Exposure, 1);   

}  


Implementation

Implementation

  • 화면을 구성합니다.


Implementation1

Implementation

  • 새로운 RT를 생성하여 태양을 그림

  • 스텐실을 사용하여 보이는 부분만을 걸려냄

  • 다운 사이즈 (Next Pass)


Implementation2

Implementation

  • Shader적용


Implementation3

Implementation

  • 화면과 결과물의 조합

    - 동영상 -


Other solution

Other Solution

  • 언리얼


Other solution1

Other Solution

  • Crysis


Other solution2

Other Solution

  • unigine


Screen space sun shafts in crysis

Screen Space Sun Shafts in Crysis

  • S6172i1.pdf 문서 참조


  • Login