Group Group Group Group Group Group Group Group Group

Ch11: Normals for the surface

#1

Im trying to integrate the tessellation code into the game engine of Ch9. For the lights I need to compute the normal vectors, I found an article (https://www.gamedev.net/forums/topic/698230-smooth-normals-and-tessellation/), which they are utilizing a domain shader in D3D. Is there another way in Metal?

Thanks in advance

1 Like
#2

I haven’t done the math, but you should be able to do it in the vertex shader.

From the Apple docs on tessellation: “The Metal post-tessellation vertex function performs the equivalent computations of the DirectX 11 domain shader”.

If you come up with a solution, I’d be very interested to know.