tessellation shaders

13
Tessellation Shaders

Upload: justus

Post on 14-Feb-2016

104 views

Category:

Documents


0 download

DESCRIPTION

Tessellation Shaders. Bezier Surface. similar to Bezier curve, except need two parameters u and v 16 control points instead of 4 parametric matrix equation see Dr. Bailey’s tessellation shader slides 27-35. Whole-Sphere Subdivision. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Tessellation  Shaders

Tessellation Shaders

Page 2: Tessellation  Shaders

Bezier Surface similar to Bezier curve, except

need two parameters u and v 16 control points instead of 4 parametric matrix equation

see Dr. Bailey’s tessellation shader slides 27-35

Page 3: Tessellation  Shaders

Whole-Sphere Subdivision a tessellation shader can easily be used to

create a sphere given only its location and radius a sphere can be parameterized using two angles just use a quad

22

10

u

10 v

Page 4: Tessellation  Shaders

Whole-Sphere Subdivision the outer tessellation levels are useful here

low tessellation on the two outer edges at the poles

high tessellation on the two outer edges that are meridians see Dr. Bailey’s tessellation shader slides 36-40

22

10

u

10 v

Page 5: Tessellation  Shaders

Adapting to Screen Coverage so far we have been using inner and outer

tessellation levels that are passed in as uniform variables

this is somewhat inflexible it would be useful if the tessellation shader

could determine an “optimal” level of tessellation

one idea adjust tessellation based on the area of the screen

covered TCS needs to be able to compute or guess what

the final patch will look like on the screen for this to work

Page 6: Tessellation  Shaders

Adapting to Screen Coverage for the whole-sphere example this is

straightforward compute the extents of the three axes of the

sphere in NDC or screen coordinates use the extents to set the number of outer

tessellation levels for the meridian edges see Dr. Bailey’s tessellation shader slides 41-

44

Page 7: Tessellation  Shaders

Adapting to Screen Coverage

Page 8: Tessellation  Shaders

Adapting to Screen Coverage

Page 9: Tessellation  Shaders

Adapting to Screen Coverage

Page 10: Tessellation  Shaders

Adapting to Screen Coverage

Page 11: Tessellation  Shaders

PN Triangles a method of tessellating objects made up of

triangles where the per-vertex normal vectors are known (or can be calculated)

useful when your models are made up of triangles instead of smooth patches (like Bezier or B spline surfaces)

basic idea use the vertices and normal vectors of the input

triangle to compute a displacement field that produces a “Bezier triangle”

see Dr. Bailey’s tessellation shader slides 45-51 see jdupuy’s blog posting

Page 12: Tessellation  Shaders

Phong Tessellation essentially a geometric version of Phong

normal interpolation where the vertex positions are interpolated (instead of the normal vectors)

http://perso.telecom-paristech.fr/~boubek/papers/PhongTessellation/

Page 13: Tessellation  Shaders

Phong Tessellation simpler than PN triangles and produces similar

results see jdupuy’s blog posting for a shader see original paper for full details

http://perso.telecom-paristech.fr/~boubek/papers/PhongTessellation/