How much does your undergrad school's reputation/rank affect your chances at a top law school?

I ask this because I currently attend University of Maryland, and am heavily considering transferring to Texas Tech University. My reasoning is that it is much closer to home, closer to where I want to attend law school, and closer to where I want to live in the future and have a career. The thing is, TTU is obviously a much worse school than UMD. I am confident I will have a good gpa at either school and for argument’s sake I’ll say I think I will get a competitive LSAT score. How much weight does the reputation/prestige of where I graduate affect my chances, and will it look even worse that I’m transferring from the number 57 school in the country to the #168 school?
[side note, if you were planning on asking why I don’t transfer to a better school close to home, I was originally a pre med student, and only recently switched, so while my gpa by the time I graduate will be at least a 3.8 if I do as well as I have been in non-med classes, organic chem and chem brought my gpa down and it’s currently a 3.3 so I could not transfer in to UT or A&M.]

What top law schools are you considering? If TTU is closer to where you want to have a career then why don’t you just attend go to TTU for the rest of undergrad then apply and attend TTU law school?

UT Law School is T15. I think that’s the only top law school in Texas.

Well by close I mean I want to have a career somewhere in the S/W, like CA or Austin, TX or CO or somewhere more in this region, definitely not the NE

I wouldn’t try to go to HYP or S, probably more like UT or UCLA, and my reach goal would be Berkeley

Your GPA and LSAT, and to a lesser extent, LORs + ECs, will matter tremendously more than the prestige of your undergraduate institution.