Debug.Assert(bFoundAvailOrExistingSlice,"The texture cache doesn't have enough space to store all textures. Please either increase the size of the texture cache, or use fewer unique textures.");
if(bSwapSlice)// if this was a miss
{
#if UNITY_EDITOR
m_SliceArray[sliceIndex].hash=hash;
#endif
// transfer new slice to sliceIndex from source texture
publicstaticGUIContentppdMinSamplesText=newGUIContent("Minimum steps","Minimum steps (texture sample) to use with per pixel displacement mapping");
publicstaticGUIContentppdMaxSamplesText=newGUIContent("Maximum steps","Maximum steps (texture sample) to use with per pixel displacement mapping");
publicstaticGUIContentppdLodThresholdText=newGUIContent("Fading mip level start","Starting heightmap mipmap lod number where the parallax occlusion mapping effect start to disappear");
publicstaticGUIContentperPixelDisplacementObjectScaleText=newGUIContent("Lock with object scale","Per Pixel displacement will take into account the tiling scale - Only work with uniform positive scale");
publicstaticGUIContentperPixelDisplacementObjectScaleText=newGUIContent("Lock with object scale","Per Pixel displacement will take into account the tiling scale - Only work with uniform positive scale");
publicreadonlyGUIContentsssTransmittancePreview1=newGUIContent("Shows the fraction of light passing through the object for thickness values from the remap.");
publicreadonlyGUIContentsssTransmittancePreview2=newGUIContent("Can be viewed as a cross section of a slab of material illuminated by white light from the left.");
publicreadonlyGUIContentsssProfileScatteringDistance=newGUIContent("Scattering Distance","Determines the shape of the profile, and the blur radius of the filter per color channel. Alpha is ignored.");
publicreadonlyGUIContentsssProfileTransmissionTint=newGUIContent("Transmission tint","Color which tints transmitted light. Alpha is ignored.");
publicreadonlyGUIContentsssProfileMaxRadius=newGUIContent("Max Radius","Effective radius of the filter (in millimeters). The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Reducing the distance increases the sharpness of the result.");
publicreadonlyGUIContentsssTexturingMode=newGUIContent("Texturing Mode","Specifies when the diffuse texture should be applied.");
newGUIContent("Pre- and post-scatter","Texturing is performed during both the lighting and the SSS passes. Slightly blurs the diffuse texture. Choose this mode if your diffuse texture contains little to no SSS lighting."),
newGUIContent("Post-scatter","Texturing is performed only during the SSS pass. Effectively preserves the sharpness of the diffuse texture. Choose this mode if your diffuse texture already contains SSS lighting (e.g. a photo of skin).")
};
publicreadonlyGUIContentsssProfileTransmissionMode=newGUIContent("Transmission Mode","Configures the simulation of light passing through thin objects. Depends on the thickness value (which is applied in the normal direction).");
newGUIContent("None","Disables transmission. Choose this mode for completely opaque, or very thick translucent objects."),
newGUIContent("Thin Object","Choose this mode for thin objects, such as paper or leaves. Transmitted light reuses the shadowing state of the surface."),
newGUIContent("Regular","Choose this mode for moderately thick objects. For performance reasons, transmitted light ignores occlusion (shadows).")
};
publicreadonlyGUIContentsssProfileMinMaxThickness=newGUIContent("Min-Max Thickness","Shows the values of the thickness remap below (in millimeters).");
publicreadonlyGUIContentsssProfileThicknessRemap=newGUIContent("Thickness Remap","Remaps the thickness parameter from [0, 1] to the desired range (in millimeters).");
publicreadonlyGUIContentsssProfileWorldScale=newGUIContent("World Scale","Size of the world unit in meters.");
// Old SSS Model >>>
publicreadonlyGUIContentsssProfileScatterDistance1=newGUIContent("Scattering Distance #1","The radius (in centimeters) of the 1st Gaussian filter, one per color channel. Alpha is ignored. The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Smaller values increase the sharpness.");
publicreadonlyGUIContentsssProfileScatterDistance2=newGUIContent("Scattering Distance #2","The radius (in centimeters) of the 2nd Gaussian filter, one per color channel. Alpha is ignored. The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Smaller values increase the sharpness.");
publicreadonlyGUIContentsssProfileLerpWeight=newGUIContent("Filter Interpolation","Controls linear interpolation between the two Gaussian filters.");
publicreadonlyGUIContenttransmittancePreview1=newGUIContent("Shows the fraction of light passing through the object for thickness values from the remap.");
publicreadonlyGUIContenttransmittancePreview2=newGUIContent("Can be viewed as a cross section of a slab of material illuminated by white light from the left.");
publicreadonlyGUIContentprofileScatteringDistance=newGUIContent("Scattering Distance","Determines the shape of the profile, and the blur radius of the filter per color channel. Alpha is ignored.");
publicreadonlyGUIContentprofileTransmissionTint=newGUIContent("Transmission tint","Color which tints transmitted light. Alpha is ignored.");
publicreadonlyGUIContentprofileMaxRadius=newGUIContent("Max Radius","Effective radius of the filter (in millimeters). The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Reducing the distance increases the sharpness of the result.");
publicreadonlyGUIContenttexturingMode=newGUIContent("Texturing Mode","Specifies when the diffuse texture should be applied.");
newGUIContent("Pre- and post-scatter","Texturing is performed during both the lighting and the SSS passes. Slightly blurs the diffuse texture. Choose this mode if your diffuse texture contains little to no SSS lighting."),
newGUIContent("Post-scatter","Texturing is performed only during the SSS pass. Effectively preserves the sharpness of the diffuse texture. Choose this mode if your diffuse texture already contains SSS lighting (e.g. a photo of skin).")
};
publicreadonlyGUIContentprofileTransmissionMode=newGUIContent("Transmission Mode","Configures the simulation of light passing through thin objects. Depends on the thickness value (which is applied in the normal direction).");
newGUIContent("None","Disables transmission. Choose this mode for completely opaque, or very thick translucent objects."),
newGUIContent("Thin Object","Choose this mode for thin objects, such as paper or leaves. Transmitted light reuses the shadowing state of the surface."),
newGUIContent("Regular","Choose this mode for moderately thick objects. For performance reasons, transmitted light ignores occlusion (shadows).")
};
publicreadonlyGUIContentprofileMinMaxThickness=newGUIContent("Min-Max Thickness","Shows the values of the thickness remap below (in millimeters).");
publicreadonlyGUIContentprofileThicknessRemap=newGUIContent("Thickness Remap","Remaps the thickness parameter from [0, 1] to the desired range (in millimeters).");
publicreadonlyGUIContentprofileWorldScale=newGUIContent("World Scale","Size of the world unit in meters.");
// Old SSS Model >>>
publicreadonlyGUIContentprofileScatterDistance1=newGUIContent("Scattering Distance #1","The radius (in centimeters) of the 1st Gaussian filter, one per color channel. Alpha is ignored. The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Smaller values increase the sharpness.");
publicreadonlyGUIContentprofileScatterDistance2=newGUIContent("Scattering Distance #2","The radius (in centimeters) of the 2nd Gaussian filter, one per color channel. Alpha is ignored. The blur is energy-preserving, so a wide filter results in a large area with small contributions of individual samples. Smaller values increase the sharpness.");
publicreadonlyGUIContentprofileLerpWeight=newGUIContent("Filter Interpolation","Controls linear interpolation between the two Gaussian filters.");