@@ -101,8 +101,8 @@ static ShaderGroupRef shadergroup;
101101static std::string archivegroup;
102102static int exprcount = 0 ;
103103static bool shadingsys_options_set = false ;
104- static float sscale = 1 , tscale = 1 ;
105- static float soffset = 0 , toffset = 0 ;
104+ static float uscale = 1 , vscale = 1 ;
105+ static float uoffset = 0 , voffset = 0 ;
106106
107107
108108
@@ -496,8 +496,10 @@ getargs (int argc, const char *argv[])
496496 " --shadeimage" , &use_shade_image, " Use shade_image utility" ,
497497 " --noshadeimage %!" , &use_shade_image, " Don't use shade_image utility" ,
498498 " --expr %@ %s" , &specify_expr, NULL , " Specify an OSL expression to evaluate" ,
499- " --offsetst %f %f" , &soffset, &toffset, " Offset s & t texture coordinates (default: 0 0)" ,
500- " --scalest %f %f" , &sscale, &tscale, " Scale s & t texture lookups (default: 1, 1)" ,
499+ " --offsetuv %f %f" , &uoffset, &voffset, " Offset s & t texture coordinates (default: 0 0)" ,
500+ " --offsetst %f %f" , &uoffset, &voffset, " " , // old name
501+ " --scaleuv %f %f" , &uscale, &vscale, " Scale s & t texture lookups (default: 1, 1)" ,
502+ " --scalest %f %f" , &uscale, &vscale, " " , // old name
501503 " --userdata_isconnected" , &userdata_isconnected, " Consider lockgeom=0 to be isconnected()" ,
502504 " -v" , &verbose, " Verbose output" ,
503505 NULL );
@@ -587,17 +589,17 @@ setup_shaderglobals (ShaderGlobals &sg, ShadingSystem *shadingsys,
587589 if (pixelcenters) {
588590 // Our patch is like an "image" with shading samples at the
589591 // centers of each pixel.
590- sg.u = sscale * (float )(x+0 .5f ) / xres + soffset ;
591- sg.v = tscale * (float )(y+0 .5f ) / yres + toffset ;
592- sg.dudx = sscale / xres;
593- sg.dvdy = tscale / yres;
592+ sg.u = uscale * (float )(x+0 .5f ) / xres + uoffset ;
593+ sg.v = vscale * (float )(y+0 .5f ) / yres + voffset ;
594+ sg.dudx = uscale / xres;
595+ sg.dvdy = vscale / yres;
594596 } else {
595597 // Our patch is like a Reyes grid of points, with the border
596598 // samples being exactly on u,v == 0 or 1.
597- sg.u = sscale * ((xres == 1 ) ? 0 .5f : (float ) x / (xres - 1 )) + soffset ;
598- sg.v = tscale * ((yres == 1 ) ? 0 .5f : (float ) y / (yres - 1 )) + toffset ;
599- sg.dudx = sscale / std::max (1 , xres-1 );
600- sg.dvdy = tscale / std::max (1 , yres-1 );
599+ sg.u = uscale * ((xres == 1 ) ? 0 .5f : (float ) x / (xres - 1 )) + uoffset ;
600+ sg.v = vscale * ((yres == 1 ) ? 0 .5f : (float ) y / (yres - 1 )) + voffset ;
601+ sg.dudx = uscale / std::max (1 , xres-1 );
602+ sg.dvdy = vscale / std::max (1 , yres-1 );
601603 }
602604
603605 // Assume that position P is simply (u,v,1), that makes the patch lie
0 commit comments