Mediates resistance to pathogens which are sensitive to stilbenes such as Botrytis cinerea, Eutypa lata and Plasmopora viticola by enhancing the production of phytoalexins. Confers resistance to Phytophthora palmivora when expressed in papaya. 4-coumaroyl-CoA + 3 H(+) + 3 malonyl-CoA = 4 CO2 + 4 CoA + trans-resveratrol Phytoalexin biosynthesis; 3,4',5-trihydroxystilbene biosynthesis; 3,4',5-trihydroxystilbene from trans-4-coumarate: step 2/2. Homodimer. In leaves, expressed in palisade and spongy parenchyma cells and, to a lesser extent, in epidermal cells after induction. By stress, including UV light, ozone and pathogens such as B.cinerea. Strongly induced by ergosterol, a non-specific fungal elicitor. Positively regulated by jasmonate (JA) and methyl-jasmonate (MeJA). Induction by phytopathogen attack decreases with grape berry ripening. Driven by a stress-inducible promoter, stilbene synthase is used to improve resistance to pathogens which are sensitive to stilbenes such as B.cinerea, P.palmivora, E.lata or P.viticola. Expression in heterologous systems (e.g. S.cerevisiae and Populus alba) is used to produce resveratrol for human food and medication. Resveratrol, a product of the chemical reaction catalyzed by stilbene synthase, exhibits several clinical benefits for human diseases, such as cancers, cardiovascular diseases and has positive effects on longevity. Belongs to the thiolase-like superfamily. Chalcone/stilbene synthases family.