Hi guys,
this is a exam question regarding alpha blending, however there is no official solution, so i am wondering whether my solution is right or not... thanks in advance...
my idea:
BS1:
since BS1 with BlendEnable set as false, just write value into back buffer.
-A : (0.4, 0.4, 0.0, 0.5)
-B : (0.2, 0.4, 0.8, 0.5)
BS2:
backbuffer.RGB: = (0.4, 0.0, 0.0) * 1 + (0.0, 0.0, 0.0) * (1-0.5) = ( 0.4, 0.0, 0.0)
backbuffer.Alpha = 1*1 + 0*0 =1
A.RGB = (0.4, 0.4, 0.0)* 0.5 + (0.4, 0.0, 0.0)* ( 1-0.5) = (0.4,0.2,0.0)
A.Alpha=0.5*1+1*(1-0.5) = 1
B.RGB = (0.2, 0.4, 0.8) * 0.5 + (0.4, 0.2, 0.0) * (1-0.5) = (0.3, 0.3, 0.4)
B.Alpha = 0.5 * 1 + 1*(1-0.5) = 1
==========================
BS3:
backbuffer.RGB = (0.4, 0.0, 0.0) + (0.0, 0.0, 0.0) = (0.4, 0.0, 0.0)
backbuffer.Alpha = 0
A.RGB = (0.4, 0.4, 0.0) + (0.4, 0.0, 0.0) = (0.8, 0.4, 0.0)
A.Alpha = 0
B.RGB = (0.2, 0.4, 0.8) + (0.8, 0.4, 0.0) = (1.0, 0.8, 0.8)
B.Alpha = 0
↧