|
|
|
|
|
|
#include "ShaderLibrary/Common.hlsl" |
|
|
|
#include "ShaderLibrary/ImageBasedLighting.hlsl" |
|
|
|
#include "GGXConvolution.cs.hlsl" |
|
|
|
#include "../../ShaderVariables.hlsl" |
|
|
|
SAMPLER(sampler_MainTex); |
|
|
|
|
|
|
|
TEXTURE2D_FLOAT(_GgxIblSamples); |
|
|
|
|
|
|
|
|
|
|
uint sampleCount = GetIBLRuntimeFilterSampleCount(_Level); |
|
|
|
|
|
|
|
#ifdef USE_MIS |
|
|
|
float4 val = IntegrateLD_MIS(TEXTURECUBE_PARAM(_MainTex, sampler_MainTex), |
|
|
|
float4 val = IntegrateLD_MIS(TEXTURECUBE_PARAM(_MainTex, s_trilinear_clamp_sampler), |
|
|
|
_MarginalRowDensities, _ConditionalDensities, |
|
|
|
V, N, |
|
|
|
roughness, |
|
|
|
|
|
|
1024, |
|
|
|
false); |
|
|
|
#else |
|
|
|
float4 val = IntegrateLD(TEXTURECUBE_PARAM(_MainTex, sampler_MainTex), |
|
|
|
float4 val = IntegrateLD(TEXTURECUBE_PARAM(_MainTex, s_trilinear_clamp_sampler), |
|
|
|
_GgxIblSamples, |
|
|
|
V, N, |
|
|
|
roughness, |
|
|
|