|
|
|
|
|
|
|
|
|
|
|
|
|
|
UNITY_DECLARE_TEXCUBEARRAY(_reflCubeTextures); |
|
|
|
UNITY_DECLARE_TEXCUBE(_reflRootCubeTexture); |
|
|
|
//uniform int _reflRootSliceIndex; |
|
|
|
uniform float _reflRootHdrDecodeMult; |
|
|
|
uniform float _reflRootHdrDecodeExp; |
|
|
|
|
|
|
|
|
|
|
|
half3 Unity_GlossyEnvironment (UNITY_ARGS_TEXCUBEARRAY(tex), int sliceIndex, half4 hdr, Unity_GlossyEnvironmentData glossIn); |
|
|
|
|
|
|
|
|
|
|
light.dir = 0; |
|
|
|
|
|
|
|
float3 ints = 0; |
|
|
|
|
|
|
|
// root ibl begin |
|
|
|
{ |
|
|
|
Unity_GlossyEnvironmentData g; |
|
|
|
g.roughness = percRoughness; |
|
|
|
g.reflUVW = worldNormalRefl; |
|
|
|
|
|
|
|
half3 env0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBE(_reflRootCubeTexture), float4(_reflRootHdrDecodeMult, _reflRootHdrDecodeExp, 0.0, 0.0), g); |
|
|
|
//half3 env0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBEARRAY(_reflCubeTextures), _reflRootSliceIndex, float4(_reflRootHdrDecodeMult, _reflRootHdrDecodeExp, 0.0, 0.0), g); |
|
|
|
|
|
|
|
UnityIndirect ind; |
|
|
|
ind.diffuse = 0; |
|
|
|
ind.specular = env0;// * data.occlusion; |
|
|
|
ints = EvalIndirectSpecular(light, ind); |
|
|
|
} |
|
|
|
// root ibl end |
|
|
|
|
|
|
|
uint l=0; |
|
|
|
// don't need the outer loop since the probes are sorted by volume type (currently one type in fact) |
|
|
|