œęœ°5.5.1f1ţ˙˙˙˙˙Č0ĹňĂôL.`?^Ů0D7€˙˙˙˙€Ś€˛€ЀŚ€Ś€Ś€#Ś€+H€3˙˙˙˙€1€1€˙˙˙˙@ހ€ Q€j€ ™€< Ś€H H€Z˙˙˙˙ €1€1€˙˙˙˙@ހ€Q€j€ЀgŚ€Ś€Ś€#Ś€+v~ € €– €Ÿ €¨ €ą €ş €Ă €Ě €Ő €Ţ  €ç! €ń" €ű# €$ €% €&Ő€#˙˙˙˙'€1€1€˙˙˙˙(€ހ€)H€j€˙˙˙˙*€1€1€˙˙˙˙+@ހ€,Q€j€-™€*.ހ8/AssetMetaDataguiddata[0]data[1]data[2]data[3]pathNametimeCreatedoriginalChangesetoriginalNameoriginalParentHash128originalDigestbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]labelsassetStoreReflicenseTypeď˙˙2ƒ…>”KËĽŁMźHîÁƒ#{7€˙˙˙˙€Ś€˛€Ő€ ހ%.€.†€Ä€ ހ%.€.H€Ť€˙˙˙˙€1€1€˙˙˙˙ @ހ€ Q€j€ Ő€7˙˙˙˙ Ŕ1€1€˙˙˙˙ €ހ€€j€˙˙˙˙€H€›€˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€°€ € ހ%.€.H€I˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€H€T˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€H€f˙˙˙˙€1€1€˙˙˙˙ @ހ€!Q€j€"ShaderImporterPPtrm_FileIDm_PathIDm_DefaultTexturesm_UserDatam_AssetBundleNamem_AssetBundleVariant0˙˙şěŻu`Aă•\á|^FďYŹü 7€˙˙˙˙€Ś€˛€Ő€ ހ.€&†€Ä€ ހ.€&H€Ť€˙˙˙˙€1€1€˙˙˙˙ @ހ€ Q€j€ /@˙˙˙˙ €Mb˙˙˙˙ €Ő€m˙˙˙˙€1€1€˙˙˙˙€ހ€uj€˙˙˙˙€H€Ť€˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€H€ˆ˙˙˙˙€1€1€˙˙˙˙@ހ€Q€j€Ő€–˙˙˙˙€1€1€˙˙˙˙€ހ€H€j€˙˙˙˙€ 1€1€˙˙˙˙@ ހ€ Q€j€ ހ€!Ś€Ł"Ą€Ť#Ą€š$Ą€Ç%Ą€Ő&ăý˙˙˙˙'€H€ ˙˙˙˙(€1€1€˙˙˙˙)@ ހ€* Q€j€+ހ,Ő€!˙˙˙˙-€1€1€˙˙˙˙.€ހ€/.j€˙˙˙˙0€Ő€B˙˙˙˙1€1€1€˙˙˙˙2€ހ€3Kj€˙˙˙˙4€ń€Z˙˙˙˙5€ 1€1€˙˙˙˙6€ ހ€7 €j€˙˙˙˙8€ H€›€˙˙˙˙9€ 1€1€˙˙˙˙:@ ހ€; Q€j€< ހ €=ހ€>h~˙˙˙˙?€ H€Ť€˙˙˙˙@€ 1€1€˙˙˙˙A@ ހ€B Q€j€C †Ł˙˙˙˙D€ ŹÇ˙˙˙˙E€ Ą€ĐF Š€Ô˙˙˙˙G€ H€Ô˙˙˙˙H€ 1€1€˙˙˙˙I@ހ€JQ€j€K ŹŮ˙˙˙˙L€ Ą€ĐM Š€Ô˙˙˙˙N€ H€Ô˙˙˙˙O€ 1€1€˙˙˙˙P@ހ€QQ€j€R Źă˙˙˙˙S€ Ą€ĐT Š€Ô˙˙˙˙U€ H€Ô˙˙˙˙V€ 1€1€˙˙˙˙W@ހ€XQ€j€Y Źń˙˙˙˙Z€ Ą€Đ[ Š€Ô˙˙˙˙\€ H€Ô˙˙˙˙]€ 1€1€˙˙˙˙^@ހ€_Q€j€` Ź˙˙˙˙a€ Ą€Đb Š€Ô˙˙˙˙c€ H€Ô˙˙˙˙d€ 1€1€˙˙˙˙e@ހ€fQ€j€g Ź˙˙˙˙h€ Ą€Đi Š€Ô˙˙˙˙j€ H€Ô˙˙˙˙k€ 1€1€˙˙˙˙l@ހ€mQ€j€n Ź˙˙˙˙o€ Ą€Đp Š€Ô˙˙˙˙q€ H€Ô˙˙˙˙r€ 1€1€˙˙˙˙s@ހ€tQ€j€u †˙˙˙˙v€ ŹÇ˙˙˙˙w€ Ą€Đx Š€Ô˙˙˙˙y€ H€Ô˙˙˙˙z€ 1€1€˙˙˙˙{@ހ€|Q€j€} ŹŮ˙˙˙˙~€ Ą€Đ Š€Ô˙˙˙˙€€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙‚@ހ€ƒQ€j€„ Źă˙˙˙˙…€ Ą€Đ† Š€Ô˙˙˙˙‡€ H€Ô˙˙˙˙ˆ€ 1€1€˙˙˙˙‰@ހ€ŠQ€j€‹ Źń˙˙˙˙Œ€ Ą€Đ Š€Ô˙˙˙˙Ž€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€‘Q€j€’ Ź˙˙˙˙“€ Ą€Đ” Š€Ô˙˙˙˙•€ H€Ô˙˙˙˙–€ 1€1€˙˙˙˙—@ހ€˜Q€j€™ Ź˙˙˙˙š€ Ą€Đ› Š€Ô˙˙˙˙œ€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙ž@ހ€ŸQ€j€  Ź˙˙˙˙Ą€ Ą€Đ˘ Š€Ô˙˙˙˙Ł€ H€Ô˙˙˙˙¤€ 1€1€˙˙˙˙Ľ@ހ€ŚQ€j€§ †&˙˙˙˙¨€ ŹÇ˙˙˙˙Š€ Ą€ĐŞ Š€Ô˙˙˙˙Ť€ H€Ô˙˙˙˙Ź€ 1€1€˙˙˙˙­@ހ€ŽQ€j€Ż ŹŮ˙˙˙˙°€ Ą€Đą Š€Ô˙˙˙˙˛€ H€Ô˙˙˙˙ł€ 1€1€˙˙˙˙´@ހ€ľQ€j€ś Źă˙˙˙˙ˇ€ Ą€Đ¸ Š€Ô˙˙˙˙š€ H€Ô˙˙˙˙ş€ 1€1€˙˙˙˙ť@ހ€źQ€j€˝ Źń˙˙˙˙ž€ Ą€Đż Š€Ô˙˙˙˙Ŕ€ H€Ô˙˙˙˙Á€ 1€1€˙˙˙˙Â@ހ€ĂQ€j€Ä Ź˙˙˙˙ŀ Ą€ĐĆ Š€Ô˙˙˙˙ǀ H€Ô˙˙˙˙Ȁ 1€1€˙˙˙˙É@ހ€ĘQ€j€Ë Ź˙˙˙˙̀ Ą€ĐÍ Š€Ô˙˙˙˙΀ H€Ô˙˙˙˙π 1€1€˙˙˙˙Đ@ހ€ŃQ€j€Ň Ź˙˙˙˙Ӏ Ą€ĐÔ Š€Ô˙˙˙˙Հ H€Ô˙˙˙˙ր 1€1€˙˙˙˙×@ހ€ŘQ€j€Ů †/˙˙˙˙ڀ ŹÇ˙˙˙˙ۀ Ą€ĐÜ Š€Ô˙˙˙˙݀ H€Ô˙˙˙˙ހ 1€1€˙˙˙˙ß@ހ€ŕQ€j€á ŹŮ˙˙˙˙†Ą€Đă Š€Ô˙˙˙˙ä€ H€Ô˙˙˙˙ĺ€ 1€1€˙˙˙˙ć@ހ€çQ€j€č Źă˙˙˙˙é€ Ą€Đę Š€Ô˙˙˙˙ë€ H€Ô˙˙˙˙ě€ 1€1€˙˙˙˙í@ހ€îQ€j€ď Źń˙˙˙˙đ€ Ą€Đń Š€Ô˙˙˙˙ň€ H€Ô˙˙˙˙ó€ 1€1€˙˙˙˙ô@ހ€őQ€j€ö Ź˙˙˙˙÷€ Ą€Đř Š€Ô˙˙˙˙ů€ H€Ô˙˙˙˙ú€ 1€1€˙˙˙˙ű@ހ€üQ€j€ý Ź˙˙˙˙ţ€ Ą€Đ˙ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ Ź˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙ @ހ€ Q€j€  †8˙˙˙˙ € ŹÇ˙˙˙˙ € Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ ŹŮ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ Źă˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€ Q€j€! Źń˙˙˙˙"€ Ą€Đ# Š€Ô˙˙˙˙$€ H€Ô˙˙˙˙%€ 1€1€˙˙˙˙&@ހ€'Q€j€( Ź˙˙˙˙)€ Ą€Đ* Š€Ô˙˙˙˙+€ H€Ô˙˙˙˙,€ 1€1€˙˙˙˙-@ހ€.Q€j€/ Ź˙˙˙˙0€ Ą€Đ1 Š€Ô˙˙˙˙2€ H€Ô˙˙˙˙3€ 1€1€˙˙˙˙4@ހ€5Q€j€6 Ź˙˙˙˙7€ Ą€Đ8 Š€Ô˙˙˙˙9€ H€Ô˙˙˙˙:€ 1€1€˙˙˙˙;@ހ€<Q€j€= †A˙˙˙˙>€ ŹÇ˙˙˙˙?€ Ą€Đ@ Š€Ô˙˙˙˙A€ H€Ô˙˙˙˙B€ 1€1€˙˙˙˙C@ހ€DQ€j€E ŹŮ˙˙˙˙F€ Ą€ĐG Š€Ô˙˙˙˙H€ H€Ô˙˙˙˙I€ 1€1€˙˙˙˙J@ހ€KQ€j€L Źă˙˙˙˙M€ Ą€ĐN Š€Ô˙˙˙˙O€ H€Ô˙˙˙˙P€ 1€1€˙˙˙˙Q@ހ€RQ€j€S Źń˙˙˙˙T€ Ą€ĐU Š€Ô˙˙˙˙V€ H€Ô˙˙˙˙W€ 1€1€˙˙˙˙X@ހ€YQ€j€Z Ź˙˙˙˙[€ Ą€Đ\ Š€Ô˙˙˙˙]€ H€Ô˙˙˙˙^€ 1€1€˙˙˙˙_@ހ€`Q€j€a Ź˙˙˙˙b€ Ą€Đc Š€Ô˙˙˙˙d€ H€Ô˙˙˙˙e€ 1€1€˙˙˙˙f@ހ€gQ€j€h Ź˙˙˙˙i€ Ą€Đj Š€Ô˙˙˙˙k€ H€Ô˙˙˙˙l€ 1€1€˙˙˙˙m@ހ€nQ€j€o †J˙˙˙˙p€ ŹÇ˙˙˙˙q€ Ą€Đr Š€Ô˙˙˙˙s€ H€Ô˙˙˙˙t€ 1€1€˙˙˙˙u@ހ€vQ€j€w ŹŮ˙˙˙˙x€ Ą€Đy Š€Ô˙˙˙˙z€ H€Ô˙˙˙˙{€ 1€1€˙˙˙˙|@ހ€}Q€j€~ Źă˙˙˙˙€ Ą€Đ€ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙‚€ 1€1€˙˙˙˙ƒ@ހ€„Q€j€… Źń˙˙˙˙†€ Ą€Đ‡ Š€Ô˙˙˙˙ˆ€ H€Ô˙˙˙˙‰€ 1€1€˙˙˙˙Š@ހ€‹Q€j€Œ Ź˙˙˙˙€ Ą€ĐŽ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙‘@ހ€’Q€j€“ Ź˙˙˙˙”€ Ą€Đ• Š€Ô˙˙˙˙–€ H€Ô˙˙˙˙—€ 1€1€˙˙˙˙˜@ހ€™Q€j€š Ź˙˙˙˙›€ Ą€Đœ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙ž€ 1€1€˙˙˙˙Ÿ@ހ€ Q€j€Ą †S˙˙˙˙˘€ ŹÇ˙˙˙˙Ł€ Ą€Đ¤ Š€Ô˙˙˙˙Ľ€ H€Ô˙˙˙˙Ś€ 1€1€˙˙˙˙§@ހ€¨Q€j€Š ŹŮ˙˙˙˙Ş€ Ą€ĐŤ Š€Ô˙˙˙˙Ź€ H€Ô˙˙˙˙­€ 1€1€˙˙˙˙Ž@ހ€ŻQ€j€° Źă˙˙˙˙ą€ Ą€Đ˛ Š€Ô˙˙˙˙ł€ H€Ô˙˙˙˙´€ 1€1€˙˙˙˙ľ@ހ€śQ€j€ˇ Źń˙˙˙˙¸€ Ą€Đš Š€Ô˙˙˙˙ş€ H€Ô˙˙˙˙ť€ 1€1€˙˙˙˙ź@ހ€˝Q€j€ž Ź˙˙˙˙ż€ Ą€ĐŔ Š€Ô˙˙˙˙Á€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙Ă@ހ€ÄQ€j€Ĺ Ź˙˙˙˙Ć€ Ą€ĐÇ Š€Ô˙˙˙˙Č€ H€Ô˙˙˙˙É€ 1€1€˙˙˙˙Ę@ހ€ËQ€j€Ě Ź˙˙˙˙Í€ Ą€ĐÎ Š€Ô˙˙˙˙Ď€ H€Ô˙˙˙˙Đ€ 1€1€˙˙˙˙Ń@ހ€ŇQ€j€Ó L€\Ô@ Źl˙˙˙˙Ő€ Ą€ĐÖ Š€Ô˙˙˙˙×€ H€Ô˙˙˙˙Ř€ 1€1€˙˙˙˙Ů@ ހ€Ú Q€j€Ű Źr˙˙˙˙Ü€ Ą€ĐÝ Š€Ô˙˙˙˙Ţ€ H€Ô˙˙˙˙߀ 1€1€˙˙˙˙ŕ@ ހ€á Q€j€â Źy˙˙˙˙〠Ą€Đä Š€Ô˙˙˙˙ĺ€ H€Ô˙˙˙˙ć€ 1€1€˙˙˙˙ç@ ހ€č Q€j€é Ź˙˙˙˙ę€ Ą€Đë Š€Ô˙˙˙˙ě€ H€Ô˙˙˙˙í€ 1€1€˙˙˙˙î@ ހ€ď Q€j€đ ŹŽ˙˙˙˙ń€ Ą€Đň Š€Ô˙˙˙˙ó€ H€Ô˙˙˙˙ô€ 1€1€˙˙˙˙ő@ ހ€ö Q€j€÷ Źš˙˙˙˙ř€ Ą€Đů Š€Ô˙˙˙˙ú€ H€Ô˙˙˙˙ű€ 1€1€˙˙˙˙ü@ ހ€ý Q€j€ţ Śş˙˙˙˙˙€ ŹÄ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ ŹÉ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙ € H€Ô˙˙˙˙ € 1€1€˙˙˙˙ @ހ€ Q€j€  ŹÎ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ ŹÔ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙€ 1€1€˙˙˙˙@ހ€Q€j€ ŚŮ˙˙˙˙€ ŹÄ˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙ € 1€1€˙˙˙˙!@ހ€"Q€j€# ŹÉ˙˙˙˙$€ Ą€Đ% Š€Ô˙˙˙˙&€ H€Ô˙˙˙˙'€ 1€1€˙˙˙˙(@ހ€)Q€j€* ŹÎ˙˙˙˙+€ Ą€Đ, Š€Ô˙˙˙˙-€ H€Ô˙˙˙˙.€ 1€1€˙˙˙˙/@ހ€0Q€j€1 ŹÔ˙˙˙˙2€ Ą€Đ3 Š€Ô˙˙˙˙4€ H€Ô˙˙˙˙5€ 1€1€˙˙˙˙6@ހ€7Q€j€8 Śč˙˙˙˙9€ ŹÄ˙˙˙˙:€ Ą€Đ; Š€Ô˙˙˙˙<€ H€Ô˙˙˙˙=€ 1€1€˙˙˙˙>@ހ€?Q€j€@ ŹÉ˙˙˙˙A€ Ą€ĐB Š€Ô˙˙˙˙C€ H€Ô˙˙˙˙D€ 1€1€˙˙˙˙E@ހ€FQ€j€G ŹÎ˙˙˙˙H€ Ą€ĐI Š€Ô˙˙˙˙J€ H€Ô˙˙˙˙K€ 1€1€˙˙˙˙L@ހ€MQ€j€N ŹÔ˙˙˙˙O€ Ą€ĐP Š€Ô˙˙˙˙Q€ H€Ô˙˙˙˙R€ 1€1€˙˙˙˙S@ހ€TQ€j€U Źö˙˙˙˙V€ Ą€ĐW Š€Ô˙˙˙˙X€ H€Ô˙˙˙˙Y€ 1€1€˙˙˙˙Z@ ހ€[ Q€j€\ Ź˙˙˙˙]€ Ą€Đ^ Š€Ô˙˙˙˙_€ H€Ô˙˙˙˙`€ 1€1€˙˙˙˙a@ ހ€b Q€j€c Ź˙˙˙˙d€ Ą€Đe Š€Ô˙˙˙˙f€ H€Ô˙˙˙˙g€ 1€1€˙˙˙˙h@ ހ€i Q€j€j Ź"˙˙˙˙k€ Ą€Đl Š€Ô˙˙˙˙m€ H€Ô˙˙˙˙n€ 1€1€˙˙˙˙o@ ހ€p Q€j€q Ź+˙˙˙˙r€ Ą€Đs Š€Ô˙˙˙˙t€ H€Ô˙˙˙˙u€ 1€1€˙˙˙˙v@ ހ€w Q€j€x Ź2˙˙˙˙y€ Ą€Đz Š€Ô˙˙˙˙{€ H€Ô˙˙˙˙|€ 1€1€˙˙˙˙}@ ހ€~ Q€j€ =Y˙˙˙˙€€ Źb˙˙˙˙€ Ą€Đ‚ Š€Ô˙˙˙˙ƒ€ H€Ô˙˙˙˙„€ 1€1€˙˙˙˙…@ހ€†Q€j€‡ Źd˙˙˙˙ˆ€ Ą€Đ‰ Š€Ô˙˙˙˙Š€ H€Ô˙˙˙˙‹€ 1€1€˙˙˙˙Œ@ހ€Q€j€Ž Źf˙˙˙˙€ Ą€Đ Š€Ô˙˙˙˙‘€ H€Ô˙˙˙˙’€ 1€1€˙˙˙˙“@ހ€”Q€j€• Źh˙˙˙˙–€ Ą€Đ— Š€Ô˙˙˙˙˜€ H€Ô˙˙˙˙™€ 1€1€˙˙˙˙š@ހ€›Q€j€œ Š€Ô˙˙˙˙€ H€Ô˙˙˙˙ž€ 1€1€˙˙˙˙Ÿ@ ހ€  Q€j€Ą ހj˘ ހrŁ ˙˙˙˙¤€ ń€—˙˙˙˙Ľ€ 1€1€˙˙˙˙Ś€ ހ€§ €j€˙˙˙˙¨€ H€›€˙˙˙˙Š€1€1€˙˙˙˙Ş@ހ€ŤQ€j€Ź H€ €˙˙˙˙­€1€1€˙˙˙˙Ž@ހ€ŻQ€j€° ހœą L€˘˛@Ś€ŤłšË˙˙˙˙´€ Ő€Ö˙˙˙˙ľ€ 1€1€˙˙˙˙ś€ ހ€ˇ äj€˙˙˙˙¸€ Ś€ůš ˙˙˙˙ş€ Ő€˙˙˙˙ť@1€1€˙˙˙˙źހ€˝#j€ž5€5ż5€<Ŕ Ś€CÁ Ő€O˙˙˙˙ 1€1€˙˙˙˙Ăހ€Ä‹€j€Ĺ 5€`Ć 5€uÇ@ Ő€†˙˙˙˙Č€ 1€1€˙˙˙˙É€ހ€Ę•j€Ë€ހĽĚހƒ€ÍހąÎ5€€Ď5€˝Đ@ Ő€Ă˙˙˙˙Ń€ 1€1€˙˙˙˙Ň€ހ€ÓŇj€Ô€ހĽŐހƒ€Öހą×5€€Ř5€âŮ@ Ő€í˙˙˙˙Ú€ 1€1€˙˙˙˙Ű€ހ€Üýj€ Ý€ހĽŢހƒ€ßހŕ5€˝á@ Ő€˙˙˙˙â 1€1€˙˙˙˙ăހ€ä,j€ĺހĽćހƒ€ç Ő€:˙˙˙˙č€ 1€1€˙˙˙˙é€ހ€ęLj€˙˙˙˙ë€ހĽěŐ€Ă˙˙˙˙í€1€1€˙˙˙˙î€ހ€ďŇj€đ€ހĽńހƒ€ňހąó5€€ô5€âő@Ő€†˙˙˙˙ö€1€1€˙˙˙˙÷€ހ€ř•j€ů€ހĽúހƒ€űހąü5€€ý5€˝ţ@ހ[˙ Ő€b˙˙˙˙ 1€1€˙˙˙˙ހ€,j€ހĽހƒ€ Ő€{˙˙˙˙ 1€1€˙˙˙˙ހ€‡j€ ހĽ ހƒ€ ހ” š¤˙˙˙˙ € Ő€Ö˙˙˙˙€ 1€1€˙˙˙˙€ ހ€ äj€˙˙˙˙€ Ś€ů ˙˙˙˙€ Ő€˙˙˙˙@1€1€˙˙˙˙ހ€#j€5€55€< Ś€C Ő€O˙˙˙˙ 1€1€˙˙˙˙ހ€‹€j€ 5€` 5€u @ Ő€†˙˙˙˙!€ 1€1€˙˙˙˙"€ހ€#•j€$€ހĽ%ހƒ€&ހą'5€€(5€˝)@ Ő€Ă˙˙˙˙*€ 1€1€˙˙˙˙+€ހ€,Ňj€-€ހĽ.ހƒ€/ހą05€€15€â2@ Ő€í˙˙˙˙3€ 1€1€˙˙˙˙4€ހ€5ýj€ 6€ހĽ7ހƒ€8ހ95€˝:@ Ő€˙˙˙˙; 1€1€˙˙˙˙<ހ€=,j€>ހĽ?ހƒ€@ Ő€:˙˙˙˙A€ 1€1€˙˙˙˙B€ހ€CLj€˙˙˙˙D€ހĽEŐ€Ă˙˙˙˙F€1€1€˙˙˙˙G€ހ€HŇj€I€ހĽJހƒ€KހąL5€€M5€âN@Ő€†˙˙˙˙O€1€1€˙˙˙˙P€ހ€Q•j€R€ހĽSހƒ€TހąU5€€V5€˝W@ހ[X Ő€b˙˙˙˙Y 1€1€˙˙˙˙Zހ€[,j€\ހĽ]ހƒ€^ Ő€{˙˙˙˙_ 1€1€˙˙˙˙`ހ€a‡j€ bހĽcހƒ€dހ”ešą˙˙˙˙f€ Ő€Ö˙˙˙˙g€ 1€1€˙˙˙˙h€ ހ€i äj€˙˙˙˙j€ Ś€ůk ˙˙˙˙l€ Ő€˙˙˙˙m@1€1€˙˙˙˙nހ€o#j€p5€5q5€<r Ś€Cs Ő€O˙˙˙˙t 1€1€˙˙˙˙uހ€v‹€j€w 5€`x 5€uy@ Ő€†˙˙˙˙z€ 1€1€˙˙˙˙{€ހ€|•j€}€ހĽ~ހƒ€ހą€5€€5€˝‚@ Ő€Ă˙˙˙˙ƒ€ 1€1€˙˙˙˙„€ހ€…Ňj€†€ހĽ‡ހƒ€ˆހą‰5€€Š5€â‹@ Ő€í˙˙˙˙Œ€ 1€1€˙˙˙˙€ހ€Žýj€ €ހĽހƒ€‘ހ’5€˝“@ Ő€˙˙˙˙” 1€1€˙˙˙˙•ހ€–,j€—ހĽ˜ހƒ€™ Ő€:˙˙˙˙š€ 1€1€˙˙˙˙›€ހ€œLj€˙˙˙˙€ހĽžŐ€Ă˙˙˙˙Ÿ€1€1€˙˙˙˙ €ހ€ĄŇj€˘€ހĽŁހƒ€¤ހąĽ5€€Ś5€â§@Ő€†˙˙˙˙¨€1€1€˙˙˙˙Š€ހ€Ş•j€Ť€ހĽŹހƒ€­ހąŽ5€€Ż5€˝°@ހ[ą Ő€b˙˙˙˙˛ 1€1€˙˙˙˙łހ€´,j€ľހĽśހƒ€ˇ Ő€{˙˙˙˙¸ 1€1€˙˙˙˙šހ€ş‡j€ ťހĽźހƒ€˝ހ”žšž˙˙˙˙ż€ Ő€Ö˙˙˙˙Ŕ€ 1€1€˙˙˙˙Á€ ހ€Â äj€˙˙˙˙Ă€ Ś€ůÄ ˙˙˙˙Ĺ€ Ő€˙˙˙˙Ć@1€1€˙˙˙˙Çހ€Č#j€É5€5Ę5€<Ë Ś€CĚ Ő€O˙˙˙˙Í 1€1€˙˙˙˙Îހ€Ď‹€j€Đ 5€`Ń 5€uŇ@ Ő€†˙˙˙˙Ó€ 1€1€˙˙˙˙Ô€ހ€Ő•j€Ö€ހĽ×ހƒ€ŘހąŮ5€€Ú5€˝Ű@ Ő€Ă˙˙˙˙Ü€ 1€1€˙˙˙˙Ý€ހ€ŢŇj€ß€ހĽŕހƒ€áހąâ5€€ă5€âä@ Ő€í˙˙˙˙ĺ€ 1€1€˙˙˙˙ć€ހ€çýj€ č€ހĽéހƒ€ęހë5€˝ě@ Ő€˙˙˙˙í 1€1€˙˙˙˙îހ€ď,j€đހĽńހƒ€ň Ő€:˙˙˙˙ó€ 1€1€˙˙˙˙ô€ހ€őLj€˙˙˙˙ö€ހĽ÷Ő€Ă˙˙˙˙ř€1€1€˙˙˙˙ů€ހ€úŇj€ű€ހĽüހƒ€ýހąţ5€€˙5€â@Ő€†˙˙˙˙€1€1€˙˙˙˙€ހ€•j€€ހĽހƒ€ހą5€€5€˝ @ހ[  Ő€b˙˙˙˙  1€1€˙˙˙˙ ހ€ ,j€ހĽހƒ€ Ő€{˙˙˙˙ 1€1€˙˙˙˙ހ€‡j€ ހĽހƒ€ހ”šÇ˙˙˙˙€ Ő€Ö˙˙˙˙€ 1€1€˙˙˙˙€ ހ€ äj€˙˙˙˙€ Ś€ů ˙˙˙˙€ Ő€˙˙˙˙@1€1€˙˙˙˙ ހ€!#j€"5€5#5€<$ Ś€C% Ő€O˙˙˙˙& 1€1€˙˙˙˙'ހ€(‹€j€) 5€`* 5€u+@ Ő€†˙˙˙˙,€ 1€1€˙˙˙˙-€ހ€.•j€/€ހĽ0ހƒ€1ހą25€€35€˝4@ Ő€Ă˙˙˙˙5€ 1€1€˙˙˙˙6€ހ€7Ňj€8€ހĽ9ހƒ€:ހą;5€€<5€â=@ Ő€í˙˙˙˙>€ 1€1€˙˙˙˙?€ހ€@ýj€ A€ހĽBހƒ€CހD5€˝E@ Ő€˙˙˙˙F 1€1€˙˙˙˙Gހ€H,j€IހĽJހƒ€K Ő€:˙˙˙˙L€ 1€1€˙˙˙˙M€ހ€NLj€˙˙˙˙O€ހĽPŐ€Ă˙˙˙˙Q€1€1€˙˙˙˙R€ހ€SŇj€T€ހĽUހƒ€VހąW5€€X5€âY@Ő€†˙˙˙˙Z€1€1€˙˙˙˙[€ހ€\•j€]€ހĽ^ހƒ€_ހą`5€€a5€˝b@ހ[c Ő€b˙˙˙˙d 1€1€˙˙˙˙eހ€f,j€gހĽhހƒ€i Ő€{˙˙˙˙j 1€1€˙˙˙˙kހ€l‡j€ mހĽnހƒ€oހ”pL€Ňq@H€é˙˙˙˙r€ 1€1€˙˙˙˙s@ ހ€t Q€j€uH€Ť€˙˙˙˙v€ 1€1€˙˙˙˙w@ ހ€x Q€j€yH€ó˙˙˙˙z€ 1€1€˙˙˙˙{@ ހ€| Q€j€}˙˙˙˙~€ ń€—˙˙˙˙€ 1€1€˙˙˙˙€€ ހ€ €j€˙˙˙˙‚€ H€›€˙˙˙˙ƒ€ 1€1€˙˙˙˙„@ހ€…Q€j€† H€ €˙˙˙˙‡€ 1€1€˙˙˙˙ˆ@ހ€‰Q€j€Š˙˙˙˙‹€ń€—˙˙˙˙Œ€1€1€˙˙˙˙€ހ€Ž€j€˙˙˙˙€ H€›€˙˙˙˙€ 1€1€˙˙˙˙‘@ ހ€’ Q€j€“ H€ €˙˙˙˙”€ 1€1€˙˙˙˙•@ ހ€– Q€j€—ހœ˜H€Ť€˙˙˙˙™€1€1€˙˙˙˙š@ހ€›Q€j€œH€˙˙˙˙€1€1€˙˙˙˙ž@ހ€ŸQ€j€ H€˙˙˙˙Ą€1€1€˙˙˙˙˘@ހ€ŁQ€j€¤Ő€#˙˙˙˙Ľ€1€1€˙˙˙˙Ś€ހ€§2j€˙˙˙˙¨€H€M˙˙˙˙Š€1€1€˙˙˙˙Ş@ހ€ŤQ€j€ŹH€R˙˙˙˙­€1€1€˙˙˙˙Ž@ހ€ŻQ€j€°L€Uą@Ő€r˙˙˙˙˛1€1€˙˙˙˙łހ€´Ś€j€ľŐ€|˙˙˙˙ś1€1€˙˙˙˙ˇހ€¸Ś€j€šŐ€„˙˙˙˙ş1€1€˙˙˙˙ťހ€źŚ€j€˝Ő€–˙˙˙˙ž1€1€˙˙˙˙żހ€ŔŚ€j€ÁŐ€Ş˙˙˙˙€1€1€˙˙˙˙Ă@ހ€Ä €j€ĹŐ€#˙˙˙˙Ć1€1€˙˙˙˙Çހ€Čšj€ ÉހĘ.€&ËL€ĆĚ@ń€Ö˙˙˙˙Í€1€1€˙˙˙˙΀ހ€Ď€j€˙˙˙˙Đ€H€›€˙˙˙˙Ń€1€1€˙˙˙˙Ň@ހ€ÓQ€j€Ô°€ € ŐހÖ.€&×čţ˙˙˙˙Ř€ń€ ˙˙˙˙Ů€1€1€˙˙˙˙Ú€ހ€Ű€j€˙˙˙˙Ü€ހ›€Ý €˙˙˙˙Ţ€H€%˙˙˙˙߀1€1€˙˙˙˙ŕ@ހ€áQ€j€âH€,˙˙˙˙ă€1€1€˙˙˙˙ä@ހ€ĺQ€j€ćŚ€8猀Gčހb錀nęz‚ë €‘ě €ší €Łî €Źď €ľđ €žń €Çň €Đó €Ůô €âő €ëö €ő÷ €˙ř € ů €ú €űL€'ü@ހ3ýŐ€>˙˙˙˙ţ€1€1€˙˙˙˙˙€ހ€Ő€j€˙˙˙˙€ 1€1€˙˙˙˙€ ހ€ H€j€˙˙˙˙€ 1€1€˙˙˙˙@ ހ€ Q€j€Ő€N˙˙˙˙€1€1€˙˙˙˙ €ހ€ Ő€j€˙˙˙˙ € 1€1€˙˙˙˙ € ހ€  H€j€˙˙˙˙€ 1€1€˙˙˙˙@ ހ€ Q€j€Ő€^˙˙˙˙€1€1€˙˙˙˙€ހ€Ő€j€˙˙˙˙€ 1€1€˙˙˙˙€ ހ€ H€j€˙˙˙˙€ 1€1€˙˙˙˙@ ހ€ Q€j€Ő€n˙˙˙˙€1€1€˙˙˙˙€ހ€Ő€j€˙˙˙˙€ 1€1€˙˙˙˙ € ހ€! H€j€˙˙˙˙"€ 1€1€˙˙˙˙#@ ހ€$ Q€j€%Ő€~˙˙˙˙&€1€1€˙˙˙˙'€ހ€(Ő€j€˙˙˙˙)€ 1€1€˙˙˙˙*€ ހ€+ H€j€˙˙˙˙,€ 1€1€˙˙˙˙-@ ހ€. Q€j€/Ő€Ž˙˙˙˙0€1€1€˙˙˙˙1€ހ€2Ő€j€˙˙˙˙3€ 1€1€˙˙˙˙4€ ހ€5 H€j€˙˙˙˙6€ 1€1€˙˙˙˙7@ ހ€8 Q€j€9Ő€ž˙˙˙˙:€1€1€˙˙˙˙;€ހ€<Ő€j€˙˙˙˙=€ 1€1€˙˙˙˙>€ ހ€? H€j€˙˙˙˙@€ 1€1€˙˙˙˙A@ ހ€B Q€j€CŐ€ą˙˙˙˙D€1€1€˙˙˙˙E€ހ€FŐ€j€˙˙˙˙G€ 1€1€˙˙˙˙H€ ހ€I H€j€˙˙˙˙J€ 1€1€˙˙˙˙K@ ހ€L Q€j€MŐ€Ä˙˙˙˙N€1€1€˙˙˙˙O€ހ€PŐ€j€˙˙˙˙Q€ 1€1€˙˙˙˙R€ ހ€S H€j€˙˙˙˙T€ 1€1€˙˙˙˙U@ ހ€V Q€j€WŐ€×˙˙˙˙X€1€1€˙˙˙˙Y€ހ€ZŐ€j€˙˙˙˙[€ 1€1€˙˙˙˙\€ ހ€] H€j€˙˙˙˙^€ 1€1€˙˙˙˙_@ ހ€` Q€j€aŐ€ę˙˙˙˙b€1€1€˙˙˙˙c€ހ€dŐ€j€˙˙˙˙e€ 1€1€˙˙˙˙f€ ހ€g H€j€˙˙˙˙h€ 1€1€˙˙˙˙i@ ހ€j Q€j€kŐ€ý˙˙˙˙l€1€1€˙˙˙˙m€ހ€nŐ€j€˙˙˙˙o€ 1€1€˙˙˙˙p€ ހ€q H€j€˙˙˙˙r€ 1€1€˙˙˙˙s@ ހ€t Q€j€uހ vŐ€ ˙˙˙˙w€1€1€˙˙˙˙x€ހ€yH€j€˙˙˙˙z€ 1€1€˙˙˙˙{@ ހ€| Q€j€}Ő€+ ˙˙˙˙~€1€1€˙˙˙˙€ހ€€H€j€˙˙˙˙€ 1€1€˙˙˙˙‚@ ހ€ƒ Q€j€„Ő€= ˙˙˙˙…€1€1€˙˙˙˙†€ހ€‡H€j€˙˙˙˙ˆ€ 1€1€˙˙˙˙‰@ ހ€Š Q€j€‹Ő€O ˙˙˙˙Œ€1€1€˙˙˙˙€ހ€ŽH€j€˙˙˙˙€ 1€1€˙˙˙˙@ ހ€‘ Q€j€’Ő€a ˙˙˙˙“€1€1€˙˙˙˙”€ހ€•H€j€˙˙˙˙–€ 1€1€˙˙˙˙—@ ހ€˜ Q€j€™Ő€s ˙˙˙˙š€1€1€˙˙˙˙›€ހ€œH€j€˙˙˙˙€ 1€1€˙˙˙˙ž@ ހ€Ÿ Q€j€ H€… ˙˙˙˙Ą€1€1€˙˙˙˙˘@ހ€ŁQ€j€¤H€Ÿ ˙˙˙˙Ľ€1€1€˙˙˙˙Ś@ހ€§Q€j€¨Ś€ą ŠL€Î ŞL€â ŤShaderPPtrm_FileIDm_PathIDSerializedShaderm_ParsedFormSerializedPropertiesm_PropInfom_PropsSerializedPropertym_Descriptionm_Attributesm_Flagsm_DefValue[0]m_DefValue[1]m_DefValue[2]m_DefValue[3]SerializedTexturePropertym_DefTexturem_DefaultNamem_TexDimm_SubShadersSerializedSubShaderm_PassesSerializedPassm_NameIndicesSerializedShaderStatem_StateSerializedShaderRTBlendStatertBlend0SerializedShaderFloatValuesrcBlendvalnamedestBlendsrcBlendAlphadestBlendAlphablendOpblendOpAlphacolMaskrtBlend1rtBlend2rtBlend3rtBlend4rtBlend5rtBlend6rtBlend7rtSeparateBlendzTestzWritecullingoffsetFactoroffsetUnitsalphaToMaskSerializedStencilOpstencilOppassfailzFailcompstencilOpFrontstencilOpBackstencilReadMaskstencilWriteMaskstencilReffogStartfogEndfogDensitySerializedShaderVectorValuefogColorxyzwfogModegpuProgramIDSerializedTagMapm_Tagstagsm_LODlightingm_ProgramMaskSerializedProgramprogVertexm_SubProgramsSerializedSubProgramm_BlobIndexParserBindChannelsm_ChannelsShaderBindChannelsourcetargetm_SourceMapm_KeywordIndicesm_ShaderHardwareTierm_GpuProgramTypem_VectorParamsVectorParameterm_NameIndexm_ArraySizem_Dimm_MatrixParamsMatrixParameterm_RowCountm_TextureParamsTextureParameterm_SamplerIndexm_BufferParamsBufferBindingm_ConstantBuffersConstantBufferm_Sizem_ConstantBufferBindingsm_UAVParamsUAVParameterm_OriginalIndexprogFragmentprogGeometryprogHullprogDomainm_HasInstancingVariantm_UseNamem_TextureNamem_CustomEditorNamem_FallbackNamem_DependenciesSerializedShaderDependencyfromtom_DisableNoSubshadersMessageplatformsoffsetscompressedLengthsdecompressedLengthscompressedBlobPPtrm_ShaderIsBakedm_DefaultTexturesShaderCompilationInfom_CompileInfom_SnippetsShaderSnippetm_Codem_AssetPathm_PlatformMaskm_HardwareTierVariantsMaskm_StartLinem_TypesMaskHash128m_IncludesHashbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]m_FromOtherm_Languagem_VariantsUser0m_VariantsUser1m_VariantsUser2m_VariantsUser3m_VariantsUser4m_VariantsUser5m_VariantsBuiltin0m_VariantsBuiltin1m_VariantsBuiltin2m_VariantsBuiltin3m_VariantsBuiltin4m_VariantsBuiltin5m_Targetm_TargetVariants0m_TargetVariants1m_TargetVariants2m_TargetVariants3m_TargetVariants4m_TargetVariants5m_NonStrippedUserKeywordsm_BuiltinKeywordsm_MeshComponentsFromSnippetsm_HasSurfaceShadersm_HasFixedFunctionShaders´¸0>IčR{resources/unity_builtin_extra ´°ěáR Ať5ÔË.PŻ\Assets/Standard Assets/Effects/TessellationShaders/Shaders/BumpedSpecularDisplacement.shader_Color Main Color€?€?€?€? _SpecColorSpecular Color???€? _Shininess Shininess =Âő<€? _ParallaxHeight?€?_MainTexBase (RGB) Gloss (A)white_BumpMap Normalmapbump _ParallaxMap Heightmap (A)black _EdgeLength Edge length A@@HBFORWARD€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ €? @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙€˜ LIGHTMODE ForwardBase RenderTypeOpaque SHADOWSUPPORTtrue 6FORWARD€? €? €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙œń LIGHTMODE ForwardAdd RenderTypeOpaque 6PREPASS€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ €? @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙a LIGHTMODE PrePassBase RenderTypeOpaque 6PREPASS€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙’^ LIGHTMODE PrePassFinal RenderTypeOpaque 6DEFERRED€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ €? @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙؂ LIGHTMODEDeferred RenderTypeOpaque 6 SHADOWCASTER€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ €? @ A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙čÇ LIGHTMODE SHADOWCASTER RenderTypeOpaque SHADOWSUPPORTtrue 6META€? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €? €? pA €@ €? A A A C C unity_FogStart unity_FogEndunity_FogDensity unity_FogColor˙˙˙˙F¤ LIGHTMODEMeta RenderTypeOpaque 6 RenderTypeOpaque +Tessellation/Bumped Specular (displacement)Bumped Specular‘U#line 84 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" #line 84 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ #pragma vertex vert #pragma fragment frag #pragma target 2.0 #pragma multi_compile_shadowcaster #include "UnityCG.cginc" struct v2f { V2F_SHADOW_CASTER; }; v2f vert( appdata_base v ) { v2f o; TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) return o; } float4 frag( v2f i ) : SV_Target { SHADOW_CASTER_FRAGMENT(i) } Assets/DefaultResourcesExtra˙˙˙˙V=(´žçˇ‘Šd{´ěy SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONSHADOWS_CUBE SHADOWS_DEPTH€˜+#line 25 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma multi_compile_fog #pragma multi_compile_fwdbase #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data // no lightmaps: #ifndef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD4; // SH #endif SHADOW_COORDS(5) UNITY_FOG_COORDS(6) #if SHADER_TARGET >= 30 float4 lmap : TEXCOORD7; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif // with lightmaps: #ifdef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif // SH/ambient and vertex lights #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; // Approximated illumination from non-important point lights #ifdef VERTEXLIGHT_ON o.sh += Shade4PointLights ( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, worldPos, worldNormal); #endif o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif // !LIGHTMAP_ON TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); // compute lighting & shadowing factor UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // realtime lighting: call lighting function c += LightingBlinnPhong (o, worldViewDir, gi); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚÝôŸÝá*ˇ.eÄp__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2 DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARrDIRECTIONAL DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON SHADOWS_SCREEN VERTEXLIGHT_ONŮ×#line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma multi_compile_fog #pragma multi_compile_fwdbase #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 // vertex-to-fragment interpolation data // no lightmaps: #ifndef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD4; // SH #endif SHADOW_COORDS(5) UNITY_FOG_COORDS(6) #if SHADER_TARGET >= 30 float4 lmap : TEXCOORD7; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif // with lightmaps: #ifdef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif // SH/ambient and vertex lights #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; // Approximated illumination from non-important point lights #ifdef VERTEXLIGHT_ON o.sh += Shade4PointLights ( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, worldPos, worldNormal); #endif o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif // !LIGHTMAP_ON TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); // compute lighting & shadowing factor UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // realtime lighting: call lighting function c += LightingBlinnPhong (o, worldViewDir, gi); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙-qˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2 DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARrDIRECTIONAL DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON SHADOWS_SCREEN VERTEXLIGHT_ONŘë#line 21 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_fwdbase #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } // vertex-to-fragment interpolation data // no lightmaps: #ifndef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex half3 worldNormal : TEXCOORD1; float3 worldPos : TEXCOORD2; #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD3; // SH #endif SHADOW_COORDS(4) UNITY_FOG_COORDS(5) #if SHADER_TARGET >= 30 float4 lmap : TEXCOORD6; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif // with lightmaps: #ifdef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex half3 worldNormal : TEXCOORD1; float3 worldPos : TEXCOORD2; float4 lmap : TEXCOORD3; SHADOW_COORDS(4) UNITY_FOG_COORDS(5) #ifdef DIRLIGHTMAP_COMBINED fixed3 tSpace0 : TEXCOORD6; fixed3 tSpace1 : TEXCOORD7; fixed3 tSpace2 : TEXCOORD8; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; #endif #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #endif o.worldPos = worldPos; o.worldNormal = worldNormal; #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif // SH/ambient and vertex lights #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; // Approximated illumination from non-important point lights #ifdef VERTEXLIGHT_ON o.sh += Shade4PointLights ( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, worldPos, worldNormal); #endif o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif // !LIGHTMAP_ON TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); o.Normal = IN.worldNormal; normalWorldVertex = IN.worldNormal; // call surface function surf (surfIN, o); // compute lighting & shadowing factor UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // realtime lighting: call lighting function c += LightingBlinnPhong (o, worldViewDir, gi); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙qˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2 DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONVERTEXLIGHT_ON DIRECTIONALSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONAL DIRECTIONALDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON DIRECTIONALSHADOWS_SCREEN DIRECTIONALDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONALDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ONSHADOWS_SCREEN SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARrDIRECTIONAL DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON SHADOWS_SCREEN VERTEXLIGHT_ONeJĐ#pragma vertex vert #pragma fragment frag #pragma target 2.0 #include "UnityCG.cginc" #pragma multi_compile_fog #define USING_FOG (defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)) // ES2.0/WebGL/3DS can not do loops with non-constant-expression iteration counts :( #if defined(SHADER_API_GLES) #define LIGHT_LOOP_LIMIT 8 #elif defined(SHADER_API_N3DS) #define LIGHT_LOOP_LIMIT 4 #else #define LIGHT_LOOP_LIMIT unity_VertexLightParams.x #endif #define ENABLE_SPECULAR (!defined(SHADER_API_N3DS)) // Compile specialized variants for when positional (point/spot) and spot lights are present #pragma multi_compile __ POINT SPOT // Compute illumination from one light, given attenuation half3 computeLighting (int idx, half3 dirToLight, half3 eyeNormal, half3 viewDir, half4 diffuseColor, half shininess, half atten, inout half3 specColor) { half NdotL = max(dot(eyeNormal, dirToLight), 0.0); // diffuse half3 color = NdotL * diffuseColor.rgb * unity_LightColor[idx].rgb; // specular if (NdotL > 0.0) { half3 h = normalize(dirToLight + viewDir); half HdotN = max(dot(eyeNormal, h), 0.0); half sp = saturate(pow(HdotN, shininess)); specColor += (atten * sp) * unity_LightColor[idx].rgb; } return color * atten; } // Compute attenuation & illumination from one light half3 computeOneLight(int idx, float3 eyePosition, half3 eyeNormal, half3 viewDir, half4 diffuseColor, half shininess, inout half3 specColor) { float3 dirToLight = unity_LightPosition[idx].xyz; half att = 1.0; #if defined(POINT) || defined(SPOT) dirToLight -= eyePosition * unity_LightPosition[idx].w; // distance attenuation float distSqr = dot(dirToLight, dirToLight); att /= (1.0 + unity_LightAtten[idx].z * distSqr); if (unity_LightPosition[idx].w != 0 && distSqr > unity_LightAtten[idx].w) att = 0.0; // set to 0 if outside of range distSqr = max(distSqr, 0.000001); // don't produce NaNs if some vertex position overlaps with the light dirToLight *= rsqrt(distSqr); #if defined(SPOT) // spot angle attenuation half rho = max(dot(dirToLight, unity_SpotDirection[idx].xyz), 0.0); half spotAtt = (rho - unity_LightAtten[idx].x) * unity_LightAtten[idx].y; att *= saturate(spotAtt); #endif #endif att *= 0.5; // passed in light colors are 2x brighter than what used to be in FFP return min (computeLighting (idx, dirToLight, eyeNormal, viewDir, diffuseColor, shininess, att, specColor), 1.0); } // uniforms half4 _Color; half4 _SpecColor; half4 _Emission; half _Shininess; int4 unity_VertexLightParams; // x: light count, y: zero, z: one (y/z needed by d3d9 vs loop instruction) float4 _MainTex_ST; // vertex shader input data struct appdata { float3 pos : POSITION; float3 normal : NORMAL; float3 uv0 : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; // vertex-to-fragment interpolators struct v2f { fixed4 color : COLOR0; #if ENABLE_SPECULAR fixed3 specColor : COLOR1; #endif float2 uv0 : TEXCOORD0; #if USING_FOG fixed fog : TEXCOORD1; #endif float4 pos : SV_POSITION; UNITY_VERTEX_OUTPUT_STEREO }; // vertex shader v2f vert (appdata IN) { v2f o; UNITY_SETUP_INSTANCE_ID(IN); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); half4 color = half4(0,0,0,1.1); float3 eyePos = mul (UNITY_MATRIX_MV, float4(IN.pos,1)).xyz; half3 eyeNormal = normalize (mul ((float3x3)UNITY_MATRIX_IT_MV, IN.normal).xyz); half3 viewDir = 0.0; viewDir = -normalize (eyePos); // lighting half3 lcolor = _Emission.rgb + _Color.rgb * glstate_lightmodel_ambient.rgb; half3 specColor = 0.0; half shininess = _Shininess * 128.0; for (int il = 0; il < LIGHT_LOOP_LIMIT; ++il) { lcolor += computeOneLight(il, eyePos, eyeNormal, viewDir, _Color, shininess, specColor); } color.rgb = lcolor.rgb; color.a = _Color.a; specColor *= _SpecColor.rgb; o.color = saturate(color); #if ENABLE_SPECULAR o.specColor = saturate(specColor); #endif // compute texture coordinates o.uv0 = IN.uv0.xy * _MainTex_ST.xy + _MainTex_ST.zw; // fog #if USING_FOG float fogCoord = length(eyePos.xyz); // radial fog distance UNITY_CALC_FOG_FACTOR_RAW(fogCoord); o.fog = saturate(unityFogFactor); #endif // transform position o.pos = UnityObjectToClipPos(IN.pos); return o; } // textures sampler2D _MainTex; // fragment shader fixed4 frag (v2f IN) : SV_Target { fixed4 col; fixed4 tex, tmp0, tmp1, tmp2; // SetTexture #0 tex = tex2D (_MainTex, IN.uv0.xy); col.rgb = tex * IN.color; col *= 2; col.a = fixed4(1,1,1,1).a; #if ENABLE_SPECULAR // add specular color col.rgb += IN.specColor; #endif // fog #if USING_FOG col.rgb = lerp (unity_FogColor.rgb, col.rgb, IN.fog); #endif return col; } // texenvs //! TexEnv0: 02010103 01060004 [_MainTex] [ffffffff] ˙˙˙˙_ FOG_LINEARFOG_EXPFOG_EXP2_POINTSPOT_ FOG_LINEARFOG_EXPFOG_EXP2_POINTSPOT&FOG_EXP FOG_EXP2 FOG_LINEAR POINT SPOTlV#line 215 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_fwdadd #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex half3 worldNormal : TEXCOORD1; float3 worldPos : TEXCOORD2; SHADOW_COORDS(3) UNITY_FOG_COORDS(4) }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); o.worldPos = worldPos; o.worldNormal = worldNormal; TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); o.Normal = IN.worldNormal; normalWorldVertex = IN.worldNormal; // call surface function surf (surfIN, o); UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif gi.light.color *= atten; c += LightingBlinnPhong (o, worldViewDir, gi); c.a = 0.0; UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙Ůqˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2POINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEAR6DIRECTIONAL DIRECTIONAL_COOKIE POINT POINT_COOKIE SPOTĺŔ­#line 220 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma multi_compile_fog #pragma multi_compile_fwdadd #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap fixed3 tSpace0 : TEXCOORD1; fixed3 tSpace1 : TEXCOORD2; fixed3 tSpace2 : TEXCOORD3; float3 worldPos : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = fixed3(worldTangent.x, worldBinormal.x, worldNormal.x); o.tSpace1 = fixed3(worldTangent.y, worldBinormal.y, worldNormal.y); o.tSpace2 = fixed3(worldTangent.z, worldBinormal.z, worldNormal.z); o.worldPos = worldPos; TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif gi.light.color *= atten; c += LightingBlinnPhong (o, worldViewDir, gi); c.a = 0.0; UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙Ţqˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2POINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEAR6DIRECTIONAL DIRECTIONAL_COOKIE POINT POINT_COOKIE SPOTœńŹ #line 329 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma multi_compile_fog #pragma multi_compile_fwdadd #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap fixed3 tSpace0 : TEXCOORD1; fixed3 tSpace1 : TEXCOORD2; fixed3 tSpace2 : TEXCOORD3; float3 worldPos : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = fixed3(worldTangent.x, worldBinormal.x, worldNormal.x); o.tSpace1 = fixed3(worldTangent.y, worldBinormal.y, worldNormal.y); o.tSpace2 = fixed3(worldTangent.z, worldBinormal.z, worldNormal.z); o.worldPos = worldPos; TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif gi.light.color *= atten; c += LightingBlinnPhong (o, worldViewDir, gi); c.a = 0.0; UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚKÝôŸÝá*ˇ.eÄp__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2POINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEAR6DIRECTIONAL DIRECTIONAL_COOKIE POINT POINT_COOKIE SPOTaO#line 247 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _BumpMap #define UNITY_PASS_PREPASSBASE #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_BumpMap = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // output normal and specular fixed4 res; res.rgb = o.Normal * 0.5 + 0.5; res.a = o.Specular; return res; } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚů†˜#<ˆ㛓wÇDŘ2K SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONlP#line 138 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _BumpMap #define UNITY_PASS_PREPASSBASE #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_BumpMap = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // output normal and specular fixed4 res; res.rgb = o.Normal * 0.5 + 0.5; res.a = o.Specular; return res; } Assets/DefaultResourcesExtra˙˙˙˙Œ•6žhí~Ž$żĘ‘qDg SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONI­~#pragma vertex vert #pragma fragment frag #pragma target 2.0 #include "UnityCG.cginc" #pragma multi_compile_fog #define USING_FOG (defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)) // uniforms float4 _MainTex_ST; // vertex shader input data struct appdata { float3 pos : POSITION; float3 uv1 : TEXCOORD1; float3 uv0 : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; // vertex-to-fragment interpolators struct v2f { fixed4 color : COLOR0; float2 uv0 : TEXCOORD0; float2 uv1 : TEXCOORD1; #if USING_FOG fixed fog : TEXCOORD2; #endif float4 pos : SV_POSITION; UNITY_VERTEX_OUTPUT_STEREO }; // vertex shader v2f vert (appdata IN) { v2f o; UNITY_SETUP_INSTANCE_ID(IN); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); half4 color = half4(0,0,0,1.1); float3 eyePos = mul (UNITY_MATRIX_MV, float4(IN.pos,1)).xyz; half3 viewDir = 0.0; o.color = saturate(color); // compute texture coordinates o.uv0 = IN.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; o.uv1 = IN.uv0.xy * _MainTex_ST.xy + _MainTex_ST.zw; // fog #if USING_FOG float fogCoord = length(eyePos.xyz); // radial fog distance UNITY_CALC_FOG_FACTOR_RAW(fogCoord); o.fog = saturate(unityFogFactor); #endif // transform position o.pos = UnityObjectToClipPos(IN.pos); return o; } // textures sampler2D _MainTex; fixed4 _Color; // fragment shader fixed4 frag (v2f IN) : SV_Target { fixed4 col; fixed4 tex, tmp0, tmp1, tmp2; // SetTexture #0 tex = UNITY_SAMPLE_TEX2D (unity_Lightmap, IN.uv0.xy); col = tex * _Color; // SetTexture #1 tex = tex2D (_MainTex, IN.uv1.xy); col.rgb = tex * col; col *= 2; col.a = fixed4(1,1,1,1).a; // fog #if USING_FOG col.rgb = lerp (unity_FogColor.rgb, col.rgb, IN.fog); #endif return col; } // texenvs //! TexEnv0: 01010102 01010102 [unity_Lightmap] [_Color] usesLightmapST //! TexEnv1: 02010100 01060004 [_MainTex] [ffffffff] ˙˙˙˙_ FOG_LINEARFOG_EXPFOG_EXP2_ FOG_LINEARFOG_EXPFOG_EXP2FOG_EXP FOG_EXP2 FOG_LINEARŕăx #line 117 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: YES // 0 texcoords actually used #define UNITY_PASS_PREPASSBASE #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; half3 worldNormal : TEXCOORD0; float3 worldPos : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); o.worldPos = worldPos; o.worldNormal = worldNormal; return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); o.Normal = IN.worldNormal; normalWorldVertex = IN.worldNormal; // call surface function surf (surfIN, o); // output normal and specular fixed4 res; res.rgb = o.Normal * 0.5 + 0.5; res.a = o.Specular; return res; } Assets/DefaultResourcesExtra˙˙˙˙w•6žhí~Ž$żĘ‘qDg SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ON2,‘#pragma vertex vert #pragma fragment frag #pragma target 2.0 #include "UnityCG.cginc" #pragma multi_compile_fog #define USING_FOG (defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)) // uniforms float4 unity_Lightmap_ST; float4 _MainTex_ST; // vertex shader input data struct appdata { float3 pos : POSITION; float3 uv1 : TEXCOORD1; float3 uv0 : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; // vertex-to-fragment interpolators struct v2f { fixed4 color : COLOR0; float2 uv0 : TEXCOORD0; float2 uv1 : TEXCOORD1; float2 uv2 : TEXCOORD2; #if USING_FOG fixed fog : TEXCOORD3; #endif float4 pos : SV_POSITION; UNITY_VERTEX_OUTPUT_STEREO }; // vertex shader v2f vert (appdata IN) { v2f o; UNITY_SETUP_INSTANCE_ID(IN); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); half4 color = half4(0,0,0,1.1); float3 eyePos = mul (UNITY_MATRIX_MV, float4(IN.pos,1)).xyz; half3 viewDir = 0.0; o.color = saturate(color); // compute texture coordinates o.uv0 = IN.uv1.xy * unity_LightmapST.xy + unity_LightmapST.zw; o.uv1 = IN.uv1.xy * unity_Lightmap_ST.xy + unity_Lightmap_ST.zw; o.uv2 = IN.uv0.xy * _MainTex_ST.xy + _MainTex_ST.zw; // fog #if USING_FOG float fogCoord = length(eyePos.xyz); // radial fog distance UNITY_CALC_FOG_FACTOR_RAW(fogCoord); o.fog = saturate(unityFogFactor); #endif // transform position o.pos = UnityObjectToClipPos(IN.pos); return o; } // textures sampler2D _MainTex; fixed4 _Color; // fragment shader fixed4 frag (v2f IN) : SV_Target { fixed4 col; fixed4 tex, tmp0, tmp1, tmp2; // SetTexture #0 tex = UNITY_SAMPLE_TEX2D (unity_Lightmap, IN.uv0.xy); col = tex * tex.a; col *= 2; // SetTexture #1 tex = UNITY_SAMPLE_TEX2D (unity_Lightmap, IN.uv1.xy); col = col * _Color; // SetTexture #2 tex = tex2D (_MainTex, IN.uv2.xy); col.rgb = tex * col; col *= 4; col.a = fixed4(1,1,1,1).a; // fog #if USING_FOG col.rgb = lerp (unity_FogColor.rgb, col.rgb, IN.fog); #endif return col; } // texenvs //! TexEnv0: 02010105 02010105 [unity_Lightmap] usesLightmapST //! TexEnv1: 01000102 01000102 [unity_Lightmap] [_Color] //! TexEnv2: 04010100 01060004 [_MainTex] [ffffffff] ˙˙˙˙_ FOG_LINEARFOG_EXPFOG_EXP2_ FOG_LINEARFOG_EXPFOG_EXP2FOG_EXP FOG_EXP2 FOG_LINEAR9R†#line 122 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma multi_compile_fog #pragma multi_compile_prepassfinal #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_PREPASSFINAL #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float3 worldPos : TEXCOORD1; float4 screen : TEXCOORD2; float4 lmap : TEXCOORD3; #ifndef LIGHTMAP_ON float3 vlight : TEXCOORD4; #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD4; #endif #endif UNITY_FOG_COORDS(5) #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 tSpace0 : TEXCOORD6; fixed3 tSpace1 : TEXCOORD7; fixed3 tSpace2 : TEXCOORD8; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; #endif #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #endif o.worldPos = worldPos; o.screen = ComputeScreenPos (o.pos); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; float3 worldN = UnityObjectToWorldNormal(v.normal); o.vlight = ShadeSH9 (float4(worldN,1.0)); #endif UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } sampler2D _LightBuffer; sampler2D _CameraNormalsTexture; #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); half4 light = tex2Dproj (_LightBuffer, UNITY_PROJ_COORD(IN.screen)); #if defined (SHADER_API_MOBILE) light = max(light, half4(0.001, 0.001, 0.001, 0.001)); #endif #ifndef UNITY_HDR_ON light = -log2(light); #endif #ifdef LIGHTMAP_ON #ifdef DIRLIGHTMAP_OFF // single lightmap fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed3 lm = DecodeLightmap (lmtex); light.rgb += lm; #elif DIRLIGHTMAP_COMBINED half4 nspec = tex2Dproj (_CameraNormalsTexture, UNITY_PROJ_COORD(IN.screen)); half3 normal = nspec.rgb * 2 - 1; o.Normal = normalize(normal); // directional lightmaps fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed4 lmIndTex = UNITY_SAMPLE_TEX2D_SAMPLER(unity_LightmapInd, unity_Lightmap, IN.lmap.xy); half4 lm = half4(DecodeDirectionalLightmap (DecodeLightmap(lmtex), lmIndTex, o.Normal), 0); light += lm; #elif DIRLIGHTMAP_SEPARATE // directional with specular - no support #endif // DIRLIGHTMAP_OFF #else light.rgb += IN.vlight; #endif // LIGHTMAP_ON #ifdef DYNAMICLIGHTMAP_ON fixed4 dynlmtex = UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, IN.lmap.zw); light.rgb += DecodeRealtimeLightmap (dynlmtex); #endif half4 c = LightingBlinnPhong_PrePass (o, light); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙|•6žhí~Ž$żĘ‘qDg__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ON’^…&#line 231 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma multi_compile_fog #pragma multi_compile_prepassfinal #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_PREPASSFINAL #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float3 worldPos : TEXCOORD1; float4 screen : TEXCOORD2; float4 lmap : TEXCOORD3; #ifndef LIGHTMAP_ON float3 vlight : TEXCOORD4; #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD4; #endif #endif UNITY_FOG_COORDS(5) #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 tSpace0 : TEXCOORD6; fixed3 tSpace1 : TEXCOORD7; fixed3 tSpace2 : TEXCOORD8; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; #endif #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #endif o.worldPos = worldPos; o.screen = ComputeScreenPos (o.pos); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; float3 worldN = UnityObjectToWorldNormal(v.normal); o.vlight = ShadeSH9 (float4(worldN,1.0)); #endif UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION sampler2D _LightBuffer; sampler2D _CameraNormalsTexture; #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); half4 light = tex2Dproj (_LightBuffer, UNITY_PROJ_COORD(IN.screen)); #if defined (SHADER_API_MOBILE) light = max(light, half4(0.001, 0.001, 0.001, 0.001)); #endif #ifndef UNITY_HDR_ON light = -log2(light); #endif #ifdef LIGHTMAP_ON #ifdef DIRLIGHTMAP_OFF // single lightmap fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed3 lm = DecodeLightmap (lmtex); light.rgb += lm; #elif DIRLIGHTMAP_COMBINED half4 nspec = tex2Dproj (_CameraNormalsTexture, UNITY_PROJ_COORD(IN.screen)); half3 normal = nspec.rgb * 2 - 1; o.Normal = normalize(normal); // directional lightmaps fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed4 lmIndTex = UNITY_SAMPLE_TEX2D_SAMPLER(unity_LightmapInd, unity_Lightmap, IN.lmap.xy); half4 lm = half4(DecodeDirectionalLightmap (DecodeLightmap(lmtex), lmIndTex, o.Normal), 0); light += lm; #elif DIRLIGHTMAP_SEPARATE // directional with specular - no support #endif // DIRLIGHTMAP_OFF #else light.rgb += IN.vlight; #endif // LIGHTMAP_ON #ifdef DYNAMICLIGHTMAP_ON fixed4 dynlmtex = UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, IN.lmap.zw); light.rgb += DecodeRealtimeLightmap (dynlmtex); #endif half4 c = LightingBlinnPhong_PrePass (o, light); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚ醘#<ˆ㛓wÇDŘ2K__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ONź>#line 102 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_prepassfinal #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_PREPASSFINAL #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float3 worldPos : TEXCOORD1; float4 screen : TEXCOORD2; float4 lmap : TEXCOORD3; #ifndef LIGHTMAP_ON float3 vlight : TEXCOORD4; #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD4; #endif #endif UNITY_FOG_COORDS(5) #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 tSpace0 : TEXCOORD6; fixed3 tSpace1 : TEXCOORD7; fixed3 tSpace2 : TEXCOORD8; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; #endif #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #endif o.worldPos = worldPos; o.screen = ComputeScreenPos (o.pos); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; float3 worldN = UnityObjectToWorldNormal(v.normal); o.vlight = ShadeSH9 (float4(worldN,1.0)); #endif UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } sampler2D _LightBuffer; sampler2D _CameraNormalsTexture; #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); half4 light = tex2Dproj (_LightBuffer, UNITY_PROJ_COORD(IN.screen)); #if defined (SHADER_API_MOBILE) light = max(light, half4(0.001, 0.001, 0.001, 0.001)); #endif #ifndef UNITY_HDR_ON light = -log2(light); #endif #ifdef LIGHTMAP_ON #ifdef DIRLIGHTMAP_OFF // single lightmap fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed3 lm = DecodeLightmap (lmtex); light.rgb += lm; #elif DIRLIGHTMAP_COMBINED half4 nspec = tex2Dproj (_CameraNormalsTexture, UNITY_PROJ_COORD(IN.screen)); half3 normal = nspec.rgb * 2 - 1; o.Normal = normalize(normal); // directional lightmaps fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); half4 lm = half4(DecodeLightmap(lmtex), 0); light += lm; #elif DIRLIGHTMAP_SEPARATE // directional with specular - no support #endif // DIRLIGHTMAP_OFF #else light.rgb += IN.vlight; #endif // LIGHTMAP_ON #ifdef DYNAMICLIGHTMAP_ON fixed4 dynlmtex = UNITY_SAMPLE_TEX2D(unity_DynamicLightmap, IN.lmap.zw); light.rgb += DecodeRealtimeLightmap (dynlmtex); #endif half4 c = LightingBlinnPhong_PrePass (o, light); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙h•6žhí~Ž$żĘ‘qDg__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2DYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ON˜D…#line 181 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma exclude_renderers nomrt #pragma multi_compile_prepassfinal #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: YES // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_DEFERRED #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex half3 worldNormal : TEXCOORD1; float3 worldPos : TEXCOORD2; float4 lmap : TEXCOORD3; #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD4; // SH #endif #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD4; #endif #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); o.worldPos = worldPos; o.worldNormal = worldNormal; #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif return o; } #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader void frag_surf (v2f_surf IN, out half4 outGBuffer0 : SV_Target0, out half4 outGBuffer1 : SV_Target1, out half4 outGBuffer2 : SV_Target2, out half4 outEmission : SV_Target3) { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); o.Normal = IN.worldNormal; normalWorldVertex = IN.worldNormal; // call surface function surf (surfIN, o); fixed3 originalNormal = o.Normal; half atten = 1; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = 0; gi.light.dir = half3(0,1,0); // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // call lighting function to output g-buffer outEmission = LightingBlinnPhong_Deferred (o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2); #ifndef UNITY_HDR_ON outEmission.rgb = exp2(-outEmission.rgb); #endif } Assets/DefaultResourcesExtra˙Ű˙˙ˇ•6žhí~Ž$żĘ‘qDgDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ONŔt>#line 190 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma exclude_renderers nomrt #pragma multi_compile_prepassfinal #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_DEFERRED #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD5; // SH #endif #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD5; #endif #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif return o; } #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader void frag_surf (v2f_surf IN, out half4 outGBuffer0 : SV_Target0, out half4 outGBuffer1 : SV_Target1, out half4 outGBuffer2 : SV_Target2, out half4 outEmission : SV_Target3) { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 originalNormal = o.Normal; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; half atten = 1; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = 0; gi.light.dir = half3(0,1,0); // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // call lighting function to output g-buffer outEmission = LightingBlinnPhong_Deferred (o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2); #ifndef UNITY_HDR_ON outEmission.rgb = exp2(-outEmission.rgb); #endif } Assets/DefaultResourcesExtra˙Ű˙˙Ŕ•6žhí~Ž$żĘ‘qDgDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ON؂=)#line 299 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma exclude_renderers nomrt #pragma multi_compile_prepassfinal #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_DEFERRED #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD5; // SH #endif #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD5; #endif #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #ifdef DYNAMICLIGHTMAP_ON o.lmap.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #else o.lmap.zw = 0; #endif #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader void frag_surf (v2f_surf IN, out half4 outGBuffer0 : SV_Target0, out half4 outGBuffer1 : SV_Target1, out half4 outGBuffer2 : SV_Target2, out half4 outEmission : SV_Target3) { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 originalNormal = o.Normal; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; half atten = 1; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = 0; gi.light.dir = half3(0,1,0); // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // call lighting function to output g-buffer outEmission = LightingBlinnPhong_Deferred (o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2); #ifndef UNITY_HDR_ON outEmission.rgb = exp2(-outEmission.rgb); #endif } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚ-†˜#<ˆ㛓wÇDŘ2KDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON LIGHTMAP_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINEDDYNAMICLIGHTMAP_ON UNITY_HDR_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONUDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE DYNAMICLIGHTMAP_ON LIGHTMAP_ON UNITY_HDR_ONčÇl#line 311 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma multi_compile_shadowcaster #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 0 texcoords actually used #define UNITY_PASS_SHADOWCASTER #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION // vertex-to-fragment interpolation data struct v2f_surf { V2F_SHADOW_CASTER; float3 worldPos : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; // vertex shader v2f_surf vert_surf (appdata v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); o.worldPos = worldPos; TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); SHADOW_CASTER_FRAGMENT(IN) } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚ9†˜#<ˆ㛓wÇDŘ2K SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_DEPTH SHADOWS_CUBE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONSHADOWS_CUBE SHADOWS_DEPTHř“ #line 183 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: no // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: no // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_META #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong sampler2D _MainTex; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; } #include "UnityMetaPass.cginc" // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float3 worldPos : TEXCOORD1; }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); o.worldPos = worldPos; return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UnityMetaInput metaIN; UNITY_INITIALIZE_OUTPUT(UnityMetaInput, metaIN); metaIN.Albedo = o.Albedo; metaIN.Emission = o.Emission; return UnityMetaFragment(metaIN); } Assets/DefaultResourcesExtra˙˙˙˙špTŸH­`÷SGšň> SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONšü#line 202 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma target 3.0 #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_META #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 33 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong //#pragma target 3.0 #include "UnityMetaPass.cginc" // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UnityMetaInput metaIN; UNITY_INITIALIZE_OUTPUT(UnityMetaInput, metaIN); metaIN.Albedo = o.Albedo; metaIN.Emission = o.Emission; return UnityMetaFragment(metaIN); } Assets/DefaultResourcesExtra˙˙˙˙ĚpTŸH­`÷SGšň> SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONŒvO#line 53 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_fwdbase nodynlightmap #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDBASE #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap // vertex-to-fragment interpolation data // no lightmaps: #ifndef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD4; // SH #endif SHADOW_COORDS(5) UNITY_FOG_COORDS(6) UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif // with lightmaps: #ifdef LIGHTMAP_ON struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #endif float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif // SH/ambient and vertex lights #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; // Approximated illumination from non-important point lights #ifdef VERTEXLIGHT_ON o.sh += Shade4PointLights ( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, worldPos, worldNormal); #endif o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif // !LIGHTMAP_ON TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); // compute lighting & shadowing factor UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // realtime lighting: call lighting function c += LightingBlinnPhong (o, worldViewDir, gi); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙7qˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2  DIRECTIONAL DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONALSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN DIRECTIONALVERTEXLIGHT_ON DIRECTIONALSHADOWS_SCREENVERTEXLIGHT_ON DIRECTIONAL DIRECTIONAL LIGHTMAP_ON DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINED DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATE DIRECTIONALSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_COMBINEDSHADOWS_SCREEN DIRECTIONAL LIGHTMAP_ONDIRLIGHTMAP_SEPARATESHADOWS_SCREEN SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEAR_DIRECTIONAL DIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE LIGHTMAP_ON SHADOWS_SCREEN VERTEXLIGHT_ONF¤œ#line 210 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex tessvert_surf #pragma fragment frag_surf #pragma hull hs_surf #pragma domain ds_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // vertex modifier: 'disp' // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_META #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 15 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong addshadow vertex:disp tessellate:tessEdge #include "Tessellation.cginc" struct appdata { float4 vertex : POSITION; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; float _EdgeLength; float _Parallax; float4 tessEdge (appdata v0, appdata v1, appdata v2) { return UnityEdgeLengthBasedTessCull (v0.vertex, v1.vertex, v2.vertex, _EdgeLength, _Parallax * 1.5f); } sampler2D _ParallaxMap; void disp (inout appdata v) { float d = tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).a * _Parallax; v.vertex.xyz += v.normal * d; } sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation vertex shader struct InternalTessInterp_appdata { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float2 texcoord : TEXCOORD0; float2 texcoord1 : TEXCOORD1; float2 texcoord2 : TEXCOORD2; }; InternalTessInterp_appdata tessvert_surf (appdata v) { InternalTessInterp_appdata o; o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } // tessellation hull constant shader UnityTessellationFactors hsconst_surf (InputPatch v) { UnityTessellationFactors o; float4 tf; appdata vi[3]; vi[0].vertex = v[0].vertex; vi[0].tangent = v[0].tangent; vi[0].normal = v[0].normal; vi[0].texcoord = v[0].texcoord; vi[0].texcoord1 = v[0].texcoord1; vi[0].texcoord2 = v[0].texcoord2; vi[1].vertex = v[1].vertex; vi[1].tangent = v[1].tangent; vi[1].normal = v[1].normal; vi[1].texcoord = v[1].texcoord; vi[1].texcoord1 = v[1].texcoord1; vi[1].texcoord2 = v[1].texcoord2; vi[2].vertex = v[2].vertex; vi[2].tangent = v[2].tangent; vi[2].normal = v[2].normal; vi[2].texcoord = v[2].texcoord; vi[2].texcoord1 = v[2].texcoord1; vi[2].texcoord2 = v[2].texcoord2; tf = tessEdge(vi[0], vi[1], vi[2]); o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } // tessellation hull shader [UNITY_domain("tri")] [UNITY_partitioning("fractional_odd")] [UNITY_outputtopology("triangle_cw")] [UNITY_patchconstantfunc("hsconst_surf")] [UNITY_outputcontrolpoints(3)] InternalTessInterp_appdata hs_surf (InputPatch v, uint id : SV_OutputControlPointID) { return v[id]; } #endif // UNITY_CAN_COMPILE_TESSELLATION #include "UnityMetaPass.cginc" // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } #ifdef UNITY_CAN_COMPILE_TESSELLATION // tessellation domain shader [UNITY_domain("tri")] v2f_surf ds_surf (UnityTessellationFactors tessFactors, const OutputPatch vi, float3 bary : SV_DomainLocation) { appdata v; v.vertex = vi[0].vertex*bary.x + vi[1].vertex*bary.y + vi[2].vertex*bary.z; v.tangent = vi[0].tangent*bary.x + vi[1].tangent*bary.y + vi[2].tangent*bary.z; v.normal = vi[0].normal*bary.x + vi[1].normal*bary.y + vi[2].normal*bary.z; v.texcoord = vi[0].texcoord*bary.x + vi[1].texcoord*bary.y + vi[2].texcoord*bary.z; v.texcoord1 = vi[0].texcoord1*bary.x + vi[1].texcoord1*bary.y + vi[2].texcoord1*bary.z; v.texcoord2 = vi[0].texcoord2*bary.x + vi[1].texcoord2*bary.y + vi[2].texcoord2*bary.z; disp (v); v2f_surf o = vert_surf (v); return o; } #endif // UNITY_CAN_COMPILE_TESSELLATION // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UnityMetaInput metaIN; UNITY_INITIALIZE_OUTPUT(UnityMetaInput, metaIN); metaIN.Albedo = o.Albedo; metaIN.Emission = o.Emission; return UnityMetaFragment(metaIN); } :Assets/Standard Assets/Effects/TessellationShaders/ShadersÚÔ=šŠ^Ť~Öş ƒfEĽ# SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ON%ň #line 223 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_fwdadd nodynlightmap #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_FORWARDADD #include "UnityCG.cginc" #include "Lighting.cginc" #include "AutoLight.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap fixed3 tSpace0 : TEXCOORD1; fixed3 tSpace1 : TEXCOORD2; fixed3 tSpace2 : TEXCOORD3; float3 worldPos : TEXCOORD4; SHADOW_COORDS(5) UNITY_FOG_COORDS(6) }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = fixed3(worldTangent.x, worldBinormal.x, worldNormal.x); o.tSpace1 = fixed3(worldTangent.y, worldBinormal.y, worldNormal.y); o.tSpace2 = fixed3(worldTangent.z, worldBinormal.z, worldNormal.z); o.worldPos = worldPos; TRANSFER_SHADOW(o); // pass shadow coordinates to pixel shader UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UNITY_LIGHT_ATTENUATION(atten, IN, worldPos) fixed4 c = 0; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; #if !defined(LIGHTMAP_ON) gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; #endif gi.light.color *= atten; c += LightingBlinnPhong (o, worldViewDir, gi); c.a = 0.0; UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙áqˆ ­|!bÔż•­NËüĘ__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2POINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIEPOINT DIRECTIONALSPOT POINT_COOKIEDIRECTIONAL_COOKIE SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEAR6DIRECTIONAL DIRECTIONAL_COOKIE POINT POINT_COOKIE SPOT‹x5#line 147 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _BumpMap #define UNITY_PASS_PREPASSBASE #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_BumpMap = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; // output normal and specular fixed4 res; res.rgb = o.Normal * 0.5 + 0.5; res.a = o.Specular; return res; } Assets/DefaultResourcesExtra˙˙˙˙••6žhí~Ž$żĘ‘qDg SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONŻ. W#line 131 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma multi_compile_fog #pragma multi_compile_prepassfinal nodynlightmap #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_PREPASSFINAL #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA #define WorldReflectionVector(data,normal) data.worldRefl #define WorldNormalVector(data,normal) normal // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float3 worldPos : TEXCOORD1; float4 screen : TEXCOORD2; float4 lmap : TEXCOORD3; #ifndef LIGHTMAP_ON float3 vlight : TEXCOORD4; #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD4; #endif #endif UNITY_FOG_COORDS(5) #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 tSpace0 : TEXCOORD6; fixed3 tSpace1 : TEXCOORD7; fixed3 tSpace2 : TEXCOORD8; #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; #endif #if defined(LIGHTMAP_ON) && defined(DIRLIGHTMAP_COMBINED) o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); #endif o.worldPos = worldPos; o.screen = ComputeScreenPos (o.pos); o.lmap.zw = 0; #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; float3 worldN = UnityObjectToWorldNormal(v.normal); o.vlight = ShadeSH9 (float4(worldN,1.0)); #endif UNITY_TRANSFER_FOG(o,o.pos); // pass fog coordinates to pixel shader return o; } sampler2D _LightBuffer; sampler2D _CameraNormalsTexture; #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = IN.worldPos; #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); half4 light = tex2Dproj (_LightBuffer, UNITY_PROJ_COORD(IN.screen)); #if defined (SHADER_API_MOBILE) light = max(light, half4(0.001, 0.001, 0.001, 0.001)); #endif #ifndef UNITY_HDR_ON light = -log2(light); #endif #ifdef LIGHTMAP_ON #ifdef DIRLIGHTMAP_OFF // single lightmap fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed3 lm = DecodeLightmap (lmtex); light.rgb += lm; #elif DIRLIGHTMAP_COMBINED half4 nspec = tex2Dproj (_CameraNormalsTexture, UNITY_PROJ_COORD(IN.screen)); half3 normal = nspec.rgb * 2 - 1; o.Normal = normalize(normal); // directional lightmaps fixed4 lmtex = UNITY_SAMPLE_TEX2D(unity_Lightmap, IN.lmap.xy); fixed4 lmIndTex = UNITY_SAMPLE_TEX2D_SAMPLER(unity_LightmapInd, unity_Lightmap, IN.lmap.xy); half4 lm = half4(DecodeDirectionalLightmap (DecodeLightmap(lmtex), lmIndTex, o.Normal), 0); light += lm; #elif DIRLIGHTMAP_SEPARATE // directional with specular - no support #endif // DIRLIGHTMAP_OFF #else light.rgb += IN.vlight; #endif // LIGHTMAP_ON half4 c = LightingBlinnPhong_PrePass (o, light); UNITY_APPLY_FOG(IN.fogCoord, c); // apply fog UNITY_OPAQUE_ALPHA(c.a); return c; } Assets/DefaultResourcesExtra˙˙˙˙…•6žhí~Ž$żĘ‘qDg__ FOG_LINEARFOG_EXPFOG_EXP2__ FOG_LINEARFOG_EXPFOG_EXP2 LIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONFOG_EXP FOG_EXP2 FOG_LINEARBDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE LIGHTMAP_ON UNITY_HDR_ONŁă ˛#line 190 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma exclude_renderers nomrt #pragma multi_compile_prepassfinal nodynlightmap #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 2 texcoords actually used // float2 _MainTex // float2 _BumpMap #define UNITY_PASS_DEFERRED #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float4 pack0 : TEXCOORD0; // _MainTex _BumpMap float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; float4 lmap : TEXCOORD4; #ifndef LIGHTMAP_ON #if UNITY_SHOULD_SAMPLE_SH half3 sh : TEXCOORD5; // SH #endif #else #ifdef DIRLIGHTMAP_OFF float4 lmapFadePos : TEXCOORD5; #endif #endif UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; float4 _MainTex_ST; float4 _BumpMap_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { UNITY_SETUP_INSTANCE_ID(v); v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = UnityObjectToClipPos(v.vertex); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); o.pack0.zw = TRANSFORM_TEX(v.texcoord, _BumpMap); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); o.lmap.zw = 0; #ifdef LIGHTMAP_ON o.lmap.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #ifdef DIRLIGHTMAP_OFF o.lmapFadePos.xyz = (mul(unity_ObjectToWorld, v.vertex).xyz - unity_ShadowFadeCenterAndType.xyz) * unity_ShadowFadeCenterAndType.w; o.lmapFadePos.w = (-UnityObjectToViewPos(v.vertex).z) * (1.0 - unity_ShadowFadeCenterAndType.w); #endif #else o.lmap.xy = 0; #if UNITY_SHOULD_SAMPLE_SH o.sh = 0; o.sh = ShadeSHPerVertex (worldNormal, o.sh); #endif #endif return o; } #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif fixed4 unity_Ambient; // fragment shader void frag_surf (v2f_surf IN, out half4 outGBuffer0 : SV_Target0, out half4 outGBuffer1 : SV_Target1, out half4 outGBuffer2 : SV_Target2, out half4 outEmission : SV_Target3) { UNITY_SETUP_INSTANCE_ID(IN); // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; surfIN.uv_BumpMap = IN.pack0.zw; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif fixed3 worldViewDir = normalize(UnityWorldSpaceViewDir(worldPos)); #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); fixed3 originalNormal = o.Normal; fixed3 worldN; worldN.x = dot(IN.tSpace0.xyz, o.Normal); worldN.y = dot(IN.tSpace1.xyz, o.Normal); worldN.z = dot(IN.tSpace2.xyz, o.Normal); o.Normal = worldN; half atten = 1; // Setup lighting environment UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = 0; gi.light.dir = half3(0,1,0); // Call GI (lightmaps/SH/reflections) lighting function UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = worldPos; giInput.worldViewDir = worldViewDir; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.lmap; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH giInput.ambient = IN.sh; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if UNITY_SPECCUBE_BLENDING || UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMin[0] = unity_SpecCube0_BoxMin; // .w holds lerp value for blending #endif #if UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif LightingBlinnPhong_GI(o, giInput, gi); // call lighting function to output g-buffer outEmission = LightingBlinnPhong_Deferred (o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2); #ifndef UNITY_HDR_ON outEmission.rgb = exp2(-outEmission.rgb); #endif } Assets/DefaultResourcesExtra˙Ű˙˙Ŕ•6žhí~Ž$żĘ‘qDg LIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON LIGHTMAP_ON UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_COMBINED UNITY_HDR_ON LIGHTMAP_ONDIRLIGHTMAP_SEPARATE UNITY_HDR_ON SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ONBDIRLIGHTMAP_COMBINED DIRLIGHTMAP_SEPARATE LIGHTMAP_ON UNITY_HDR_ONÚě ‚#line 207 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif // compile directives #pragma vertex vert_surf #pragma fragment frag_surf #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma skip_variants INSTANCING_ON #include "HLSLSupport.cginc" #include "UnityShaderVariables.cginc" // Surface shader code generated based on: // writes to per-pixel normal: YES // writes to emission: no // writes to occlusion: no // needs world space reflection vector: no // needs world space normal vector: no // needs screen space position: no // needs world space position: no // needs view direction: no // needs world space view direction: no // needs world space position for lighting: YES // needs world space view direction for lighting: YES // needs world space view direction for lightmaps: no // needs vertex color: no // needs VFACE: no // passes tangent-to-world matrix to pixel shader: YES // reads from normal: no // 1 texcoords actually used // float2 _MainTex #define UNITY_PASS_META #include "UnityCG.cginc" #include "Lighting.cginc" #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) // Original surface shader snippet: #line 11 sampler2D _MainTex; sampler2D _BumpMap; fixed4 _Color; half _Shininess; struct Input { float2 uv_MainTex; float2 uv_BumpMap; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 tex = tex2D(_MainTex, IN.uv_MainTex); o.Albedo = tex.rgb * _Color.rgb; o.Gloss = tex.a; o.Alpha = tex.a * _Color.a; o.Specular = _Shininess; o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); } #line 43 "" #ifdef DUMMY_PREPROCESSOR_TO_WORK_AROUND_HLSL_COMPILER_LINE_HANDLING #endif /* UNITY: Original start of shader */ //#pragma surface surf BlinnPhong nodynlightmap #include "UnityMetaPass.cginc" // vertex-to-fragment interpolation data struct v2f_surf { float4 pos : SV_POSITION; float2 pack0 : TEXCOORD0; // _MainTex float4 tSpace0 : TEXCOORD1; float4 tSpace1 : TEXCOORD2; float4 tSpace2 : TEXCOORD3; }; float4 _MainTex_ST; // vertex shader v2f_surf vert_surf (appdata_full v) { v2f_surf o; UNITY_INITIALIZE_OUTPUT(v2f_surf,o); o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST); o.pack0.xy = TRANSFORM_TEX(v.texcoord, _MainTex); float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; fixed3 worldNormal = UnityObjectToWorldNormal(v.normal); fixed3 worldTangent = UnityObjectToWorldDir(v.tangent.xyz); fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w; fixed3 worldBinormal = cross(worldNormal, worldTangent) * tangentSign; o.tSpace0 = float4(worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x); o.tSpace1 = float4(worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y); o.tSpace2 = float4(worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z); return o; } // fragment shader fixed4 frag_surf (v2f_surf IN) : SV_Target { // prepare and unpack data Input surfIN; UNITY_INITIALIZE_OUTPUT(Input,surfIN); surfIN.uv_MainTex.x = 1.0; surfIN.uv_BumpMap.x = 1.0; surfIN.uv_MainTex = IN.pack0.xy; float3 worldPos = float3(IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w); #ifndef USING_DIRECTIONAL_LIGHT fixed3 lightDir = normalize(UnityWorldSpaceLightDir(worldPos)); #else fixed3 lightDir = _WorldSpaceLightPos0.xyz; #endif #ifdef UNITY_COMPILER_HLSL SurfaceOutput o = (SurfaceOutput)0; #else SurfaceOutput o; #endif o.Albedo = 0.0; o.Emission = 0.0; o.Specular = 0.0; o.Alpha = 0.0; o.Gloss = 0.0; fixed3 normalWorldVertex = fixed3(0,0,1); // call surface function surf (surfIN, o); UnityMetaInput metaIN; UNITY_INITIALIZE_OUTPUT(UnityMetaInput, metaIN); metaIN.Albedo = o.Albedo; metaIN.Emission = o.Emission; return UnityMetaFragment(metaIN); } Assets/DefaultResourcesExtra˙˙˙˙ŃpTŸH­`÷SGšň> SHADOWS_SOFTDIRLIGHTMAP_COMBINEDDIRLIGHTMAP_SEPARATEDYNAMICLIGHTMAP_ON INSTANCING_ON