Neil McKay was giving evidence at the trial of David Scott, 33, who denies murdering Mr Johnston, 26, by repeatedly discharging a firearm at him in Glasgow.
The incident is alleged to have happened at the junction of Shields Road and Scotland Street on 15 November 2016.
Mr McKay told prosecutor Alex Prentice QC that three 9mm bullets were fired at Mr Johnston as he sat in the drivers’ seat of his Audi RS4 around 11:40pm.
The forensic scientist told the jury the bullets could have been fired from a self-loading pistol, a carbine or a rifle.
Mr McKay said: “Three shots were fired at the vehicle, two through the driver’s window and one into the door seal on the driver’s door.”
The jury was shown a computer generated image of the catastrophic head injuries sustained by Mr Johnston.
There were two gunshots wounds – one above his right ear and the other at his right temple – and another wound that may have been caused by a spent cartridge hitting his head.
Mr Prentice asked: “What caused these penetrating injuries?” Mr McKay replied: “Two bullets and the third injury could have been caused by a spinning bullet jacket having been discharged and striking the deceased’s head base first.”
The court was told Mr McKay was present when the post-mortem examination was carried out on Mr Johnston by pathologists Dr Marjorie Turner and Dr Julie McAdam.
The High Court in Glasgow heard a computer generated model was later produced in order to work out where the bullets had been fired from.
Mr McKay said this suggested the shots were fired from a slightly elevated position.
Mr Prentice asked: “Could that include a person standing and shooting?” Mr McKay replied: “Yes.”
The forensic scientist was then asked if his findings were also consistent with the shots being fired from a “slightly higher vehicle” and he responded: “Yes.”
The court heard a spent bullet cartridge was found in Shields Road and another in a burned out Audi Q5, which prosecutors claim was used in the shooting.
Mr McKay said he examined both cartridge casings and told the jury: “Microscopic marks show they have both been discharged from the same firearm.”
The court was told that the cartridge case in the Audi Q5 was found under melted plastic near the front seat.
The trial before judge Lady Stacey continues.