1 / 12

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

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.

lula
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GPU Gems 3Chapter 13. Volumetric Light Scattering as a Post-Process http://www.kindnap.pe.kr http://cafe.naver.com/shader

  2. introduction • 간단한 후처리 방법으로 대기중의 그림자에 반응하는 volumetric light scattering 효과를 구현해본다. Figure 13-1 Volumetric Light Scattering on a Highly Animated Scene in Real Time

  3. introduction • 대기중의 차폐물에 반응하여 산란하는 효과를 보이는 빛을 만드는 것이 목표 • 정밀한 산란공식을 적용하기 보단, 단순화된 공식을 적용 근사한 효과를 얻어냄

  4. 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);    }  

  5. Implementation • 화면을 구성합니다.

  6. Implementation • 새로운 RT를 생성하여 태양을 그림 • 스텐실을 사용하여 보이는 부분만을 걸려냄 • 다운 사이즈 (Next Pass)

  7. Implementation • Shader적용

  8. Implementation • 화면과 결과물의 조합 - 동영상 -

  9. Other Solution • 언리얼

  10. Other Solution • Crysis

  11. Other Solution • unigine

  12. Screen Space Sun Shafts in Crysis • S6172i1.pdf 문서 참조

More Related