[SOLVED] Computer Graphics-Assignment 16 BRDF Models

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

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:

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.