@@ -66,32 +66,32 @@ rs_get_inverse_matrix_space_time(OSL::OpaqueExecContextPtr ec,
6666 using OSL ::Matrix44;
6767
6868
69- auto rs = OSL ::get_rs<RenderState>(ec)->context ;
69+ auto rc = OSL ::get_rs<RenderState>(ec)->context ;
7070 if (to == OSL ::Hashes::camera || to == OSL ::Hashes::screen
7171 || to == OSL ::Hashes::NDC || to == RS ::Hashes::raster) {
72- Matrix44 M { rs ->world_to_camera };
72+ Matrix44 M { rc ->world_to_camera };
7373
7474 if (to == OSL ::Hashes::screen || to == OSL ::Hashes::NDC
7575 || to == RS ::Hashes::raster) {
76- float depthrange = (double )rs ->yon - (double )rs ->hither ;
77- OSL ::ustringhash proj = rs ->projection ;
76+ float depthrange = (double )rc ->yon - (double )rc ->hither ;
77+ OSL ::ustringhash proj = rc ->projection ;
7878
7979 if (proj == RS ::Hashes::perspective) {
80- float tanhalffov = OIIO::fast_tan (0 .5f * rs ->fov * M_PI
80+ float tanhalffov = OIIO::fast_tan (0 .5f * rc ->fov * M_PI
8181 / 180.0 );
8282 // clang-format off
8383 Matrix44 camera_to_screen (1 /tanhalffov, 0 , 0 , 0 ,
8484 0 , 1 /tanhalffov, 0 , 0 ,
85- 0 , 0 , rs ->yon /depthrange, 1 ,
86- 0 , 0 , -(rs ->yon *rs ->hither )/depthrange, 0 );
85+ 0 , 0 , rc ->yon /depthrange, 1 ,
86+ 0 , 0 , -(rc ->yon *rc ->hither )/depthrange, 0 );
8787 // clang-format on
8888 M = M * camera_to_screen;
8989 } else {
9090 // clang-format off
9191 Matrix44 camera_to_screen (1 , 0 , 0 , 0 ,
9292 0 , 1 , 0 , 0 ,
9393 0 , 0 , 1 /depthrange, 0 ,
94- 0 , 0 , -(rs ->hither )/depthrange, 1 );
94+ 0 , 0 , -(rc ->hither )/depthrange, 1 );
9595 // clang-format on
9696 M = M * camera_to_screen;
9797 }
@@ -107,8 +107,8 @@ rs_get_inverse_matrix_space_time(OSL::OpaqueExecContextPtr ec,
107107 M = M * screen_to_ndc;
108108 if (to == RS ::Hashes::raster) {
109109 // clang-format off
110- Matrix44 ndc_to_raster (rs ->xres , 0 , 0 , 0 ,
111- 0 , rs ->yres , 0 , 0 ,
110+ Matrix44 ndc_to_raster (rc ->xres , 0 , 0 , 0 ,
111+ 0 , rc ->yres , 0 , 0 ,
112112 0 , 0 , 1 , 0 ,
113113 0 , 0 , 0 , 1 );
114114 M = M * ndc_to_raster;
@@ -500,7 +500,7 @@ rs_get_attribute(OSL::OpaqueExecContextPtr oec, OSL::ustringhash_pod object_,
500500 auto object = OSL::ustringhash_from (object_);
501501 auto name = OSL::ustringhash_from (name_);
502502 const OSL ::TypeDesc type = OSL::TypeDesc_from (_type);
503- auto rs = OSL ::get_rs<RenderState>(oec)->context ;
503+ auto rc = OSL ::get_rs<RenderState>(oec)->context ;
504504
505505 // The many branches in the code below handle the case where we don't know
506506 // the attribute name at compile time. In the case it is known, dead-code
@@ -509,38 +509,38 @@ rs_get_attribute(OSL::OpaqueExecContextPtr oec, OSL::ustringhash_pod object_,
509509 return rs_get_attribute_constant_int (OSL_VERSION , result);
510510 if (name == RS ::Hashes::camera_resolution
511511 && type == OSL::TypeDesc (OSL ::TypeDesc::INT , 2 ))
512- return rs_get_attribute_constant_int2 (rs ->xres , rs ->yres , result);
512+ return rs_get_attribute_constant_int2 (rc ->xres , rc ->yres , result);
513513 if (name == RS ::Hashes::camera_projection && type == OSL ::TypeString)
514- return rs_get_attribute_constant_string (rs ->projection , result);
514+ return rs_get_attribute_constant_string (rc ->projection , result);
515515 if (name == RS ::Hashes::camera_pixelaspect && type == OSL ::TypeFloat)
516- return rs_get_attribute_constant_float (rs ->pixelaspect , derivatives,
516+ return rs_get_attribute_constant_float (rc ->pixelaspect , derivatives,
517517 result);
518518 if (name == RS ::Hashes::camera_screen_window
519519 && type == OSL::TypeDesc (OSL ::TypeDesc::FLOAT , 4 ))
520- return rs_get_attribute_constant_float4 (rs ->screen_window [0 ],
521- rs ->screen_window [1 ],
522- rs ->screen_window [2 ],
523- rs ->screen_window [3 ],
520+ return rs_get_attribute_constant_float4 (rc ->screen_window [0 ],
521+ rc ->screen_window [1 ],
522+ rc ->screen_window [2 ],
523+ rc ->screen_window [3 ],
524524 derivatives, result);
525525 if (name == RS ::Hashes::camera_fov && type == OSL ::TypeFloat)
526- return rs_get_attribute_constant_float (rs ->fov , derivatives, result);
526+ return rs_get_attribute_constant_float (rc ->fov , derivatives, result);
527527 if (name == RS ::Hashes::camera_clip
528528 && type == OSL::TypeDesc (OSL ::TypeDesc::FLOAT , 2 ))
529- return rs_get_attribute_constant_float2 (rs ->hither , rs ->yon ,
529+ return rs_get_attribute_constant_float2 (rc ->hither , rc ->yon ,
530530 derivatives, result);
531531 if (name == RS ::Hashes::camera_clip_near && type == OSL ::TypeFloat)
532- return rs_get_attribute_constant_float (rs ->hither , derivatives, result);
532+ return rs_get_attribute_constant_float (rc ->hither , derivatives, result);
533533 if (name == RS ::Hashes::camera_clip_far && type == OSL ::TypeFloat)
534- return rs_get_attribute_constant_float (rs ->yon , derivatives, result);
534+ return rs_get_attribute_constant_float (rc ->yon , derivatives, result);
535535 if (name == RS ::Hashes::camera_shutter
536536 && type == OSL::TypeDesc (OSL ::TypeDesc::FLOAT , 2 ))
537- return rs_get_attribute_constant_float2 (rs ->shutter [0 ], rs ->shutter [1 ],
537+ return rs_get_attribute_constant_float2 (rc ->shutter [0 ], rc ->shutter [1 ],
538538 derivatives, result);
539539 if (name == RS ::Hashes::camera_shutter_open && type == OSL ::TypeFloat)
540- return rs_get_attribute_constant_float (rs ->shutter [0 ], derivatives,
540+ return rs_get_attribute_constant_float (rc ->shutter [0 ], derivatives,
541541 result);
542542 if (name == RS ::Hashes::camera_shutter_close && type == OSL ::TypeFloat)
543- return rs_get_attribute_constant_float (rs ->shutter [1 ], derivatives,
543+ return rs_get_attribute_constant_float (rc ->shutter [1 ], derivatives,
544544 result);
545545
546546 if (name == RS ::Hashes::shading_index && type == OSL ::TypeInt)
@@ -652,9 +652,9 @@ rs_errorfmt(OSL::OpaqueExecContextPtr ec, OSL::ustringhash fmt_specification,
652652 int32_t arg_count, const OSL ::EncodedType* argTypes,
653653 uint32_t argValuesSize, uint8_t * argValues)
654654{
655- auto rs = OSL ::get_rs<RenderState>(ec)->context ;
655+ auto rc = OSL ::get_rs<RenderState>(ec)->context ;
656656
657- OSL ::journal::Writer jw { rs ->journal_buffer };
657+ OSL ::journal::Writer jw { rc ->journal_buffer };
658658 jw.record_errorfmt (OSL::get_thread_index (ec), OSL::get_shade_index (ec),
659659 fmt_specification, arg_count, argTypes, argValuesSize,
660660 argValues);
@@ -665,9 +665,9 @@ rs_warningfmt(OSL::OpaqueExecContextPtr ec, OSL::ustringhash fmt_specification,
665665 int32_t arg_count, const OSL ::EncodedType* argTypes,
666666 uint32_t argValuesSize, uint8_t * argValues)
667667{
668- auto rs = OSL ::get_rs<RenderState>(ec)->context ;
668+ auto rc = OSL ::get_rs<RenderState>(ec)->context ;
669669
670- OSL ::journal::Writer jw { rs ->journal_buffer };
670+ OSL ::journal::Writer jw { rc ->journal_buffer };
671671 jw.record_warningfmt (OSL::get_max_warnings_per_thread (ec),
672672 OSL::get_thread_index (ec), OSL::get_shade_index (ec),
673673 fmt_specification, arg_count, argTypes, argValuesSize,
@@ -680,9 +680,9 @@ rs_printfmt(OSL::OpaqueExecContextPtr ec, OSL::ustringhash fmt_specification,
680680 int32_t arg_count, const OSL ::EncodedType* argTypes,
681681 uint32_t argValuesSize, uint8_t * argValues)
682682{
683- auto rs = OSL ::get_rs<RenderState>(ec)->context ;
683+ auto rc = OSL ::get_rs<RenderState>(ec)->context ;
684684
685- OSL ::journal::Writer jw { rs ->journal_buffer };
685+ OSL ::journal::Writer jw { rc ->journal_buffer };
686686 jw.record_printfmt (OSL::get_thread_index (ec), OSL::get_shade_index (ec),
687687 fmt_specification, arg_count, argTypes, argValuesSize,
688688 argValues);
@@ -695,9 +695,9 @@ rs_filefmt(OSL::OpaqueExecContextPtr ec, OSL::ustringhash filename_hash,
695695 const OSL ::EncodedType* argTypes, uint32_t argValuesSize,
696696 uint8_t * argValues)
697697{
698- auto rs = OSL ::get_rs<RenderState>(ec)->context ;
698+ auto rc = OSL ::get_rs<RenderState>(ec)->context ;
699699
700- OSL ::journal::Writer jw { rs ->journal_buffer };
700+ OSL ::journal::Writer jw { rc ->journal_buffer };
701701 jw.record_filefmt (OSL::get_thread_index (ec), OSL::get_shade_index (ec),
702702 filename_hash, fmt_specification, arg_count, argTypes,
703703 argValuesSize, argValues);
0 commit comments