feat: add isolated Liam square540 head-chest build preset

This commit is contained in:
zenord
2026-10-15 11:43:38 +08:00
parent f705c27eee
commit 2405026402
16 changed files with 379 additions and 35 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ int main(int argc,char **v) {
glActiveTexture(GL_TEXTURE1);texture(ids[1],pw,ph,v[4]);glUniform1i(glGetUniformLocation(p,"uPatch"),1);
glUniform2f(glGetUniformLocation(p,"uBodySize"),bw,bh);
float zoom=argc==18?atof(v[16]):1,centerY=argc==18?atof(v[17]):.5f;
assert(isfinite(zoom)&&zoom>=1&&zoom<=2&&isfinite(centerY)&&centerY>=.4f&&centerY<=.6f);
assert((isfinite(zoom)&&zoom>=1&&zoom<=2&&isfinite(centerY)&&centerY>=.4f&&centerY<=.6f) || (fabsf(zoom-32.f/9.f)<.000001f && centerY==.128125f && bw*16==bh*9));
float scale=fminf((float)w/bw,(float)h/bh)*zoom,mw=bw*scale,mh=bh*scale,left=(w-mw)/2,top=h/2.f-mh*centerY;
GLfloat pos[]={left/w*2-1,1-(top+mh)/h*2,(left+mw)/w*2-1,1-(top+mh)/h*2,left/w*2-1,1-top/h*2,(left+mw)/w*2-1,1-top/h*2};
GLfloat uv[]={0,0,1,0,0,1,1,1};