SANTA CLARA – The 49ers’ passing game has ranked 29th or lower in each of the past four seasons.

If two practices against last year’s No. 1-ranked pass defense are any indication, the 49ers could be vastly improved under coach Kyle Shanahan and quarterback Brian Hoyer.

“I think our guys were expecting to do good,” Shanahan said on Thursday after a second joint practice against the Denver Broncos in two days. “There’s a lot of stuff we can clean up. A lot of stuff we can do better. But I think our guys were happy with how they competed and, hopefully, that can continue to carry over.”

Hoyer hit more higher-percentage passes on Thursday. He teamed up with rookie Victor Bolden on his deepest completion -- down the left sideline against first-team All-Pro cornerback Chris Harris. After completing better than 80 percent of his passes against the Broncos a day earlier, Hoyer was 12 of 19 passing on Thursday.

Pierre Garçon, who figures to be Hoyer’s top target, was not as active during Thursday’s practice. But he did find himself in the middle of the action with a tussle against Harris.

Hoyer’s red-zone pass intended for slot receiver Jeremy Kerley was tipped and intercepted by safety Justin Simmons. Away from the action, Aqib Talib blocked Garçon, who retaliated by tossing him to the ground.

“That’s part of the game,” Garçon said. ‘You always expect one scuffle in joint practices. But it ended and you move on. It was nothing personal at all.”

Hoyer was especially sharp during the practices to strengthen his grasp on the team’s staring job. Meanwhile, rookie C.J. Beathard had a solid showing on Thursday. He will enter Saturday’s game after Hoyer and could play through the rest of the first half and open the third quarter.

The 49ers exited the field after their two most-significant practices feeling optimistic about where things stand.

“We did good the first day,” Garçon said. “We could’ve done better the second day. But we’re still learning each other and getting better. We still have a lot to do to get ready for the regular season, but we’re moving in the right direction.”

QUICK SLANTS

--Linebacker Reuben Foster wore shoulder pads and took part in all but the contact drills due to what the team described as a “mild AC joint sprain” of his right shoulder. That did not prevent Foster from getting into the middle of a skirmish that appeared to involve Broncos tackle Menelik Watson and 49ers linebacker Eli Harold.

The 49ers expect Foster to play Saturday night, Shanahan said.

--Linebacker NaVorro Bowman was pulled from practice on Thursday after experiencing soreness in his shoulder. Shanahan said Bowman's shoulder soreness is similar to what Foster experienced.

--The Broncos’ offense, which struggled to complete passes on Wednesday, made a lot more plays down the field on Thursday with Paxton Lynch at quarterback.

--Tight end Vance McDonald made an outstanding catch of a Hoyer pass at the sideline against tight coverage from safety Will Parks.

--The 49ers’ practice Thursday brought an official end to the team’s training camp. They will transition to a regular-season type of schedule next week leading up to the team’s third exhibition game, which is scheduled for Sunday at the Minnesota Vikings.

“Training camp is over, and what that means is we’re not all staying in dorms together and we’re not having night walk-throughs,” Shanahan said.