dilevin / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
2 stars 5 forks source link

what is the tangent and bitangent #53

Open ConradMS opened 11 months ago

ConradMS commented 11 months ago

how do we calculate the tangent/bitangent vectors in tangent.glsl given a normal vector, since there are an infinite number of tangents/bitangents. Additionally why do we need tangent in bump.fs?

Thanks.

wenzhi-guo commented 11 months ago

There's a section in the assignment write-up called "Bump and normal maps" that explains the procedure. Essentially, the tangent/bitangent are used to calculate the normal vector of the new position after we applied bump mapping.