I tried to create ScriptableCullingParameters
by myself, but after calling renderContext.Cull()
I get an error A valid camera must be specified to provide for per-camera intermediate renderers & LOD fade.
I also tried to copy some minimum params (isOrthographic, cullingMatrix, origin, cullingOptions, cullingPlaneCount, SetCullingPlane()) from ScriptableCullingParameters
from my camera after TryGetCullingParameters()
of course, just for test.
Then I decided to get these params from ctx.hdCamera.camera
and change some params there like: cameraPosition, isOrthographic, cullingMatrix.
But I found a crash and reported it: CASE IN-90931.
It’s when you try to call renderContext.Cull()
with ScriptableCullingParameters
from ctx.hdCamera.camera
in custom pass without changing any parameters there:
if (ctx.hdCamera.camera.TryGetCullingParameters(out ScriptableCullingParameters paramsTest))
ctx.renderContext.Cull(paramsTest);
Is it possible to use ctx.renderContext.Cull()
without additional camera in scene?
If I can create ScriptableCullingParameters
by myself, how should i do this?