增加视锥判断
This commit is contained in:
parent
e09d8137e5
commit
c05697070e
@ -165,7 +165,7 @@ namespace X.Rendering.Feature
|
||||
var rdr = renderers[i];
|
||||
if (rdr && cullResult.ResultArray.IsCreated)
|
||||
{
|
||||
bool needCull = cullResult.ResultArray[i] > 0;
|
||||
bool needCull = cullResult.ResultArray[i] > 0.5f;
|
||||
#if UNITY_EDITOR
|
||||
if (ShowDebug && rdr.GetComponent<CullDebug>() is CullDebug cullDebug && cullDebug)
|
||||
{
|
||||
|
||||
@ -107,12 +107,12 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
float4 boxUVs = float4(minXY, maxXY);
|
||||
if(maxXY.x < 0 || maxXY.y < 0 || minXY.x > 1 || minXY.y > 1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// if( boxUVs.x < 0 || boxUVs.y < 0 || boxUVs.x > 1 || boxUVs.y > 1 || boxUVs.z >1 || boxUVs.z<0)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
float4 boxUVs = float4(minXY, maxXY);
|
||||
|
||||
float2 size = (boxUVs.zw - boxUVs.xy) * _Mip0Size.xy;
|
||||
float mip = (log2(max(size.x, size.y)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user