{'fraction_non_alphanumeric': 0.01866251944012442, 'fraction_numerical': 0.003110419906687403, 'mean_word_length': 5.042253521126761, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Quick image-based lighting of hair

We model each hair curve using a set of control points that define a spline in world space. Each control point carries attributes that include world-space position and four floats needed by our occlusion model. Other attributes, such as thickness and color, are useful but not relevant to our technique. Our lighting model is based on [Kajiya and Kay 1989], which treats each hair as an infinite cylinder. Because image-based lighting must consider numerous light directions, our diffuse and specular models are summations of the Phong diffuse and specular model over multiple shading normals, distributed orthogonally to the curve tangent. Whereas Kajiya analytically folds these summations into simple functions of the tangent, we cannot do so because each element in our summations is occlusion-weighted. For each diffuse and specular shading sample, we perform multiple lookups into the IBL texture, with an occlusion approximation per lookup. We restrict diffuse and specular sampling to a plane and cone of directions around the tangent by prefiltering the IBL texture using a pair of cosine kernels. This strategy eliminates cosine weighting at render time and vastly reduces the number of shading samples, with an acceptable loss in accuracy.