{"id":484,"date":"2009-08-15T01:24:32","date_gmt":"2009-08-15T01:24:32","guid":{"rendered":"http:\/\/shultays.wordpress.com\/?p=210"},"modified":"2009-08-15T01:24:32","modified_gmt":"2009-08-15T01:24:32","slug":"left4dead-tarzi-glow-efekti","status":"publish","type":"post","link":"http:\/\/enginmercan.com\/?p=484","title":{"rendered":"Left4Dead tarz\u0131 Glow efekti"},"content":{"rendered":"<p>Oynam\u0131\u015f olanlar neden bahsetti\u011fimi biliyordur herhalde, oynamam\u0131\u015flarda kesinlikle denemesini \u00f6neririm.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/pcmedia.ign.com\/pc\/image\/article\/930\/930763\/left-4-dead-20081117111607870_640w.jpg\" alt=\"\" \/><\/p>\n<p>Buradaki glow efektini directx \u00fczerinde shader kullanarak yapmaya karar vermi\u015ftim. Sonu\u00e7 yeterli gibi oldu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/enginmercan.com\/wp-content\/uploads\/2009\/08\/test.jpg?w=300\" alt=\"test\" title=\"test\" width=\"300\" height=\"233\" class=\"alignnone size-medium wp-image-211\" \/><\/p>\n<p>Kullanmas\u0131 olduk\u00e7a kolay.  K\u00fct\u00fcphanemizi y\u00fckl\u00fcyoruz. Effect i haz\u0131rlamak icin<br \/>\nvoid setupEffect(LPDIRECT3DDEVICE9 d3ddev, int w, int h);<br \/>\nfonksiyonu ca\u011f\u0131r\u0131l\u0131yor. w ve h ekran boyutlar\u0131 oluyor.<\/p>\n<p>Daha sonradan da<br \/>\nvoid drawGlowMesh(ID3DXMesh* mesh, D3DXVECTOR3 color);<br \/>\nile mesh i color ile ekrana \u00e7iziyoruz.<\/p>\n<p>Kullanabilmek icin bir kac seye ihtiyac\u0131m\u0131z var. d3ddev olusturulurken back buffer boyutlar\u0131n\u0131 vermek zorunday\u0131z.<br \/>\nd3dpp.BackBufferHeight = SCREEN_HEIGHT;<br \/>\nd3dpp.BackBufferWidth = SCREEN_WIDTH;<\/p>\n<p>Ayr\u0131ca stencil buffer destekleyen bir depth&amp;stencil format kullanmal\u0131y\u0131z. En \u00e7ok kullan\u0131lan D3DFMT_D24S8 san\u0131r\u0131m.<\/p>\n<p>Son olarakta alpha blending a\u00e7\u0131k olmal\u0131.<br \/>\n<a href=\"http:\/\/www.shultays.com\/gloweffect.rar\"><br \/>\n.h ve .fx dosyam\u0131z<\/a><\/p>\n<p>Ayr\u0131ca <a href=\"http:\/\/www.directxtutorial.com\/Tutorial9\/C-Direct3DMeshes\/dx9C1.aspx\">\u015fu link<\/a>teki \u00f6rnek \u00fczerine ekledim. main.cpp \u00f6rnek teki kod. kendi ekledi\u011fim ve de\u011fi\u015ftirdi\u011fim sat\u0131rlar \/\/*** ile comment lendi ve a\u00e7\u0131klama yaz\u0131ld\u0131.<\/p>\n<p><a href=\"http:\/\/www.shultays.com\/gloweffecttest.rar\">\u00d6rnek program<\/a> (Ad\u0131 postprocess oldu\u011funa bakmay\u0131n, \u00fc\u015fendim \u015fimdi d\u00fczeltmeye =))<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oynam\u0131\u015f olanlar neden bahsetti\u011fimi biliyordur herhalde, oynamam\u0131\u015flarda kesinlikle denemesini \u00f6neririm. Buradaki glow efektini directx \u00fczerinde shader kullanarak yapmaya karar vermi\u015ftim. Sonu\u00e7 yeterli gibi oldu. Kullanmas\u0131 olduk\u00e7a kolay. K\u00fct\u00fcphanemizi y\u00fckl\u00fcyoruz. Effect i haz\u0131rlamak icin void setupEffect(LPDIRECT3DDEVICE9 d3ddev, int w, int h); fonksiyonu ca\u011f\u0131r\u0131l\u0131yor. w ve h ekran boyutlar\u0131 oluyor. Daha sonradan da void drawGlowMesh(ID3DXMesh* mesh, D3DXVECTOR3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/enginmercan.com\/index.php?rest_route=\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/enginmercan.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/enginmercan.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/enginmercan.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/enginmercan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=484"}],"version-history":[{"count":0,"href":"http:\/\/enginmercan.com\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions"}],"wp:attachment":[{"href":"http:\/\/enginmercan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/enginmercan.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/enginmercan.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}