sharing is fun 2fer – Reflection / Refraction

Sep 14, 2007 at 3:33am

sharing is fun 2fer – Reflection / Refraction

Here’s today’s bonus patch showing how to do reflection and refraction
with shaders. The shader implements a basic Fresnel model which is
controllable via bias, scale and falloff parameters. These control
the ratio of the reflection and refraction colors based on surface
orientation to the camera. The texture lookup is done using a
sphere-map so the quality is not as good as it would be with a cube
map. Still, it’s quite nice.

http://www.mat.ucsb.edu/~whsmith/ReflectRefract.zip

enjoy.
wes

#33671
Sep 14, 2007 at 2:25pm

thx Wes
great as usual

Quote: wesley.hoke@gmail.com wrote on Fri, 14 September 2007 05:33
—————————————————-
> Here’s today’s bonus patch showing how to do reflection and refraction
> with shaders. The shader implements a basic Fresnel model which is
> controllable via bias, scale and falloff parameters. These control
> the ratio of the reflection and refraction colors based on surface
> orientation to the camera. The texture lookup is done using a
> sphere-map so the quality is not as good as it would be with a cube
> map. Still, it’s quite nice.
>
> http://www.mat.ucsb.edu/~whsmith/ReflectRefract.zip
>
> enjoy.
> wes
>
—————————————————-

#112477

You must be logged in to reply to this topic.