Starting from:

$25

Computer Graphics-Assignment 16 BRDF Models Solved

In this assignment you have to complete the Fragment Shader contained in file

shaders/BRDFShader.frag , to implement the diffuse and specular component of several standard BRDFs. The file must be compiled into shaders/BRDFFrag.spv as seen in Assignment 10. For each light model, function ending with …_BRDF() should return a vec3 vector containing the RGB color computed by the model. Each function receives the following parameters:

 

•       vec3 L : the direction of the light (unitary vector)

•       vec3 N : the direction of the normal vector (unitary vector)

•       vec3 V : the direction of the view vector (unitary vector)

•       vec3 C : the main color required by the model

 

If needed, BRDF receive in input also other parameters relevant to the particular model. Refer to the comment in the code for them. The following GLSL standard procedures can be helpful in solving this exercise: dot()  pow()  reflect()  max()  min()  acos()  sin()  tan() 

 

The expect results should be similar to the following:

 

More products