{"id":46,"date":"2015-06-07T03:24:37","date_gmt":"2015-06-07T03:24:37","guid":{"rendered":"http:\/\/www.redcavestudios.com\/devblog\/?p=46"},"modified":"2015-06-07T03:24:37","modified_gmt":"2015-06-07T03:24:37","slug":"shaders-full-screen","status":"publish","type":"post","link":"http:\/\/www.redcavestudios.com\/devblog\/?p=46","title":{"rendered":"Shaders Full Screen"},"content":{"rendered":"<p>Using Gamemaker:Studio, I spent several hours this week working on my full screen shader affect for my latest game.\u00a0 When I developed it, I had a problem with the way it displayed when I tested my game outside of windowed mode.\u00a0 Once in full screen, the effect contained the entire screen , but shrunk in the corner with an overlay of the existing screen.\u00a0 This definitely was not the desirable effect.<\/p>\n<p>After reading up about drawing surfaces, I realized the problem was that my room has a smaller area (1280X704)\u00a0 than the actual display dimensions (1600*900).\u00a0 So the fix is to stretch the screen size to the display size.<\/p>\n<p>Original Call &#8211;<\/p>\n<p>if full_screen_effect draw_surface(application_surface,0,0);<\/p>\n<p><a href=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-48\" src=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple2-300x169.png\" alt=\"snake_poisonapple2\" width=\"300\" height=\"169\" srcset=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple2-300x169.png 300w, http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple2.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Fixed Call-<\/p>\n<p>if full_screen_effect draw_surface_stretched(application_surface,0,0,var_resolution_x,var_resolution_y);<\/p>\n<p><a href=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-47\" src=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple-300x169.png\" alt=\"snake_poisonapple\" width=\"300\" height=\"169\" srcset=\"http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple-300x169.png 300w, http:\/\/www.redcavestudios.com\/devblog\/wp-content\/uploads\/2015\/06\/snake_poisonapple.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Gamemaker:Studio, I spent several hours this week working on my full screen shader affect for my latest game.\u00a0 When I developed it, I had a problem with the way it displayed when I tested my game outside of windowed mode.\u00a0 Once in full screen, the effect contained the entire screen , but shrunk in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-game-dev-art"],"_links":{"self":[{"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=46"}],"version-history":[{"count":1,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":49,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts\/46\/revisions\/49"}],"wp:attachment":[{"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.redcavestudios.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}