D3DXFRESNELTERM function

xiaoxiao2021-03-06  65

D3DXFRESNELTERM function

Calculate the Fresnel coefficient.

definition:

FLOAT WINAPI D3DXFRESNELTERM

Float costa,

Float RefractionIndex

);

parameter:

Costheta

[in] This value must be between 0 and 1.

RefractionIndex

The Refraction Index of a Material. The Value Must Be Greater Than 1.

return value:

This function returns the number of non-polarized Fresnel. Costheta is the COS value of the incident angle.

Description:

Hereinafter, how to calculate the non-polarized Fresnel Cogens (f):

If A is an incident angle, B is a refraction angle, then calculates with the following formula.

F = 0.5 * [TAN2 (A - B) / TAN2 (A B) SIN2 (A - B) / SIN2 (A B)]

= 0.5 * sin2 (a - b) / sin2 (A B) * [COS2 (A B) / COS2 (A - B) 1]

Let R = Sina (a) / sin (b) (refractive factor)

Let C = Cos (a)

Let G = (R2 C2 - 1) 1/2

Then make the following formula after simplifying operations:

F = 0.5 * (G C) 2 / (g - c) 2 * ([C (G C) - 1] 2 / [C (G - C) 1] 2 1)

Function information:

HEADER

D3DX9Math.h

Import Library

D3DX9.LIB

Minimum operation systems

WINDOWS 98

转载请注明原文地址:https://www.9cbs.com/read-111361.html

New Post(0)