浏览代码

Remove potentially unitialized variable message

/main
sebastienlagarde 7 年前
当前提交
360cf23b
共有 2 个文件被更改,包括 24 次插入17 次删除
  1. 22
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Debug.hlsl
  2. 19
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl

22
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Debug.hlsl


}
return GetDebugMipColor(originalColor, tex, texelSize, uv);
}
// mipInfo :
// x = quality setings minStreamingMipLevel
// y = original mip count for texture
// z = desired on screen mip level
// w = 0
float3 GetDebugMipReductionColor(Texture2D tex, float4 mipInfo)
{
float3 outColor = float3(1.0, 0.0, 1.0); // Can't calculate without original mip count - return magenta
float3 GetDebugMipReductionColor(Texture2D tex, float4 mipInfo)
{
// mipInfo :
// x = quality setings minStreamingMipLevel
// y = original mip count for texture
// z = desired on screen mip level
// w = 0
return float3(0, mipCol, 0);
outColor = float3(0, mipCol, 0);
// Can't calculate without original mip count - return magenta
return float3(1.0, 0.0, 1.0);
return outColor;
}
// Convert an arbitrary range to color base on threshold provide to the function, threshold must be in growing order

19
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl


float3 GetTextureDataDebug(uint paramId, float2 uv, Texture2D tex, float4 texelSize, float4 mipInfo, float3 originalColor)
{
float3 outColor = originalColor;
return GetDebugMipColorIncludingMipReduction(originalColor, tex, texelSize, uv, mipInfo);
outColor = GetDebugMipColorIncludingMipReduction(originalColor, tex, texelSize, uv, mipInfo);
break;
return GetDebugMipCountColor(originalColor, tex);
outColor = GetDebugMipCountColor(originalColor, tex);
break;
return GetDebugMipReductionColor(tex, mipInfo);
outColor = GetDebugMipReductionColor(tex, mipInfo);
break;
return GetDebugStreamingMipColor(tex, mipInfo);
outColor = GetDebugStreamingMipColor(tex, mipInfo);
break;
return GetDebugStreamingMipColorBlended(originalColor, tex, mipInfo);
outColor = GetDebugStreamingMipColorBlended(originalColor, tex, mipInfo);
break;
return originalColor;
return outColor;
}
// DebugFont code assume black and white font with texture size 256x128 with bloc of 16x16

正在加载...
取消
保存