|
|
|
|
|
|
// Construct a right-handed view-dependent orthogonal basis around the normal |
|
|
|
preLightData.orthoBasisViewNormal[0] = normalize(V - N * NdotV); |
|
|
|
preLightData.orthoBasisViewNormal[2] = N; |
|
|
|
preLightData.orthoBasisViewNormal[1] = normalize(cross(preLightData.orthoBasisViewNormal[2], preLightData.orthoBasisViewNormal[0])); |
|
|
|
preLightData.orthoBasisViewNormal[1] = cross(preLightData.orthoBasisViewNormal[2], preLightData.orthoBasisViewNormal[0]); |
|
|
|
|
|
|
|
float3 ltcMagnitude = SAMPLE_TEXTURE2D_ARRAY_LOD(_LtcData, s_linear_clamp_sampler, uv, LTC_MULTI_GGX_FRESNEL_DISNEY_DIFFUSE_INDEX, 0).rgb; |
|
|
|
float ltcGGXFresnelMagnitudeDiff = ltcMagnitude.r; // The difference of magnitudes of GGX and Fresnel |
|
|
|