{"id":797,"date":"2012-03-24T01:06:43","date_gmt":"2012-03-23T22:06:43","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=797"},"modified":"2015-11-24T01:29:20","modified_gmt":"2015-11-23T22:29:20","slug":"the-return-of-the-fake-vertex-shadow","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2012\/03\/24\/the-return-of-the-fake-vertex-shadow\/","title":{"rendered":"The Return Of The Fake Vertex Shadow"},"content":{"rendered":"<p><a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/mFakeVertexShadows2\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"799\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/03\/24\/the-return-of-the-fake-vertex-shadow\/yet_another_fake_shadow_vertex1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?fit=680%2C480&amp;ssl=1\" data-orig-size=\"680,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"yet_another_fake_shadow_vertex1\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?fit=300%2C211&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?fit=680%2C480&amp;ssl=1\" class=\"alignnone size-full wp-image-799\" title=\"yet_another_fake_shadow_vertex1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?resize=680%2C480\" alt=\"\" width=\"680\" height=\"480\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?resize=300%2C211&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>Yay..more realtime fake shadows, using similar technique like this <a title=\"http:\/\/unitycoder.com\/blog\/2011\/08\/21\/mvertexshadows-1-0\/\" href=\"http:\/\/unitycoder.com\/blog\/2011\/08\/21\/mvertexshadows-1-0\/\" target=\"_blank\">old fake vertex shadows test<\/a><\/p>\n<p><strong>Features:<\/strong><br \/>\n&#8211; VertexLit shader with texture<br \/>\n&#8211; Linecast each vertex towards light, if we can reach light, then lets shine, otherwise stay dark..<br \/>\n&#8211; In the webplayer, 15 vertices are scanned per update loop, per wall object.. (it works with just 1 scan per loop also, just slower to update if objects are moving..)<br \/>\n&#8211; small exp2 fog added, to give some depth to the room..<\/p>\n<p><strong>Ideas:<\/strong><br \/>\n&#8211; bounced lights? multiple lights? colored lights\/shadows?<br \/>\n&#8211; smoother shadows, take average color from neighbour vertices?<br \/>\n&#8211; instead of scanning from each vertex, scan from middle of each triangle?<br \/>\n&#8211; optimize, if nothing has moved, dont scan..?<br \/>\n&#8211; semi-transparent\/colored windows?<br \/>\n&#8211; use highres box\/walls?<\/p>\n<p><strong>Webplayer:<\/strong><br \/>\n<a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/mFakeVertexShadows2\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/mFakeVertexShadows2\/<\/a><\/p>\n<p><strong>Download Source:<\/strong><br \/>\n<a title=\"Download\" href=\"http:\/\/unitycoder.com\/download\/index2.php?link=240&amp;uid=un1t3c0d5r\" target=\"_blank\">FakeVertexShadows10.unityPackage<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yay..more realtime fake shadows, using similar technique like this old fake vertex shadows test Features: &#8211; VertexLit shader with texture &#8211; Linecast each vertex towards light, if we can reach light, then lets shine, otherwise stay dark.. &#8211; In the webplayer, 15 vertices are scanned [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":799,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,3],"tags":[7,154,48,40,33],"class_list":["post-797","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-demos","category-unity3d","tag-fake","tag-free","tag-realtime","tag-shadow","tag-vertex"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/03\/yet_another_fake_shadow_vertex1.jpg?fit=680%2C480&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-cR","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=797"}],"version-history":[{"count":9,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/797\/revisions"}],"predecessor-version":[{"id":4073,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/797\/revisions\/4073"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/799"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}