Volume Shaders PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
Transcript and Presenter's Notes

Title: Volume Shaders


1
Volume Shaders
  • Now you see them, now you dont

2
Volume Shader Paradigm
Light
Eye
I
P
Regular Geometry (surface shaders)
3
Volume Shader Paradigm
Volume Shader
Light
Eye
I
P
Regular Geometry (surface shaders)
4
Simple Volume Shader
volume fog ( float distance 1 color
background color(.5,.5,.5)) float d 1
exp(-length(I)/distance) Ci mix(Ci,
background, d) Oi mix(Oi, color(1,1,1),
d)
5
Ray Marching
  • Step along the ray starting at the eye
  • At each step calculate the density of the
    volume and anything else that might attenuate
    the original color and opacity returned by
    incident ray, I

6
Ray Marching
Volume Shader
Light
Eye
I
P
Regular Geometry (surface shaders)
7
Ray Marching
  • Step along the ray starting at the eye
  • At each step calculate the density of the
    volume and anything else that might attenuate
    the original color and opacity return by incident
    ray I
  • Taking the values calculated attenuate Ci and Oi
Write a Comment
User Comments (0)
About PowerShow.com