|
|
|
|
|
|
{ |
|
|
|
if (m_ReflectionTexture) |
|
|
|
DestroyImmediate(m_ReflectionTexture); |
|
|
|
|
|
|
|
bool useHDR10 = Application.isMobilePlatform && |
|
|
|
SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.ARGB2101010); |
|
|
|
RenderTextureFormat hdrFormat = (useHDR10) ? RenderTextureFormat.ARGB2101010 : RenderTextureFormat.DefaultHDR; |
|
|
|
|
|
|
|
currentCamera.allowHDR ? RenderTextureFormat.DefaultHDR : RenderTextureFormat.Default); |
|
|
|
currentCamera.allowHDR ? hdrFormat : RenderTextureFormat.Default); |
|
|
|
m_ReflectionTexture.useMipMap = m_ReflectionTexture.autoGenerateMips = false; |
|
|
|
m_ReflectionTexture.autoGenerateMips = false; // no need for mips(unless wanting cheap roughness)
|
|
|
|
m_ReflectionTexture.name = "_PlanarReflection" + GetInstanceID(); |
|
|
|