Question: Using C++ and OpenGl : 2. (15 points) Calculate the result of blending the following colors, assuming that source blending factor is equal to source

Using C++ and OpenGl :

Using C++ and OpenGl : 2. (15 points) Calculate the result of

2. (15 points) Calculate the result of blending the following colors, assuming that source blending factor is equal to source color's alpha value and sum of source and destination blending factors is one (write down the calculation steps). (a) (5 points) destination = glColor4f(0.1, 0.2, 0.8, 0.5), source = glColor4f(0.7, 0.3, 0.1, 0.3) (b) (10 points) There are four layers: 1, 2, 3, and 4. The ith layer is the destination for (i + 1)st layer. Layer 1 = glColor4f(0.3, 0.3, 0.3, 0.1) Layer 2 = glColor4f(0.7, 0.1, 1.0, 0.8) Layer 3 = glColor4f(0.1, 0.3, 0.5, 0.6) Layer 4 = glColor4f(0.9, 0.6, 0.4, 0.4) 2. (15 points) Calculate the result of blending the following colors, assuming that source blending factor is equal to source color's alpha value and sum of source and destination blending factors is one (write down the calculation steps). (a) (5 points) destination = glColor4f(0.1, 0.2, 0.8, 0.5), source = glColor4f(0.7, 0.3, 0.1, 0.3) (b) (10 points) There are four layers: 1, 2, 3, and 4. The ith layer is the destination for (i + 1)st layer. Layer 1 = glColor4f(0.3, 0.3, 0.3, 0.1) Layer 2 = glColor4f(0.7, 0.1, 1.0, 0.8) Layer 3 = glColor4f(0.1, 0.3, 0.5, 0.6) Layer 4 = glColor4f(0.9, 0.6, 0.4, 0.4)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!