@@ -277,7 +277,9 @@ def update(self, positions: ProxyArray, orientations: ProxyArray, intrinsics: Pr
277277 fov_radians_all = 2.0 * torch .atan (self .height / (2.0 * first_focal_length ))
278278
279279 fov_warp = wp .from_torch (fov_radians_all , dtype = wp .float32 )
280- self .camera_rays = self .newton_sensor .utils .compute_pinhole_camera_rays (self .width , self .height , fov_warp )
280+ self .camera_rays = self .newton_sensor .utils .compute_camera_rays_pinhole (
281+ self .width , self .height , camera_fovs = fov_warp
282+ )
281283
282284 @wp .kernel
283285 def _update_transforms (
@@ -329,7 +331,7 @@ def initialize(self) -> None:
329331
330332 self .newton_sensor = newton .sensors .SensorTiledCamera (
331333 self ._newton_model ,
332- config = newton .sensors .SensorTiledCamera .RenderConfig (
334+ default_render_config = newton .sensors .SensorTiledCamera .RenderConfig (
333335 enable_textures = self .cfg .enable_textures ,
334336 enable_shadows = self .cfg .enable_shadows ,
335337 enable_ambient_lighting = self .cfg .enable_ambient_lighting ,
@@ -342,11 +344,13 @@ def initialize(self) -> None:
342344 )
343345
344346 if self .cfg .render_order == "pixel_priority" :
345- self .newton_sensor .render_config .render_order = newton .sensors .SensorTiledCamera .RenderOrder .PIXEL_PRIORITY
347+ self .newton_sensor .default_render_config .render_order = (
348+ newton .sensors .SensorTiledCamera .RenderOrder .PIXEL_PRIORITY
349+ )
346350 elif self .cfg .render_order == "view_priority" :
347- self .newton_sensor .render_config .render_order = newton . sensors . SensorTiledCamera . RenderOrder . VIEW_PRIORITY
348- else :
349- self . newton_sensor . render_config . render_order = newton . sensors . SensorTiledCamera . RenderOrder . TILED
351+ self .newton_sensor .default_render_config .render_order = (
352+ newton . sensors . SensorTiledCamera . RenderOrder . VIEW_PRIORITY
353+ )
350354
351355 # Newton ``v1.2.0rc2`` made shape-BVH construction explicit; ``SensorTiledCamera.update``
352356 # no longer auto-builds when a non-``None`` state is passed, and the underlying
@@ -441,9 +445,8 @@ def render(self, render_data: RenderData):
441445 if self .newton_sensor .model .shape_count > 0 :
442446 newton .geometry .refit_bvh_shape (self .newton_sensor .model , newton_state )
443447
444- # render_config is shared state across all Newton sensors, so set max_distance immediately
445- # before each render call rather than once in create_render_data.
446- self .newton_sensor .render_config .max_distance = (
448+ # Cameras can have different far clipping planes, so update the sensor config before rendering.
449+ self .newton_sensor .default_render_config .max_distance = (
447450 render_data .far_clip if render_data .far_clip is not None else self .cfg .max_distance
448451 )
449452
0 commit comments