Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Advanced CRT Shader for GameMaker

A highly flexible post processing shader for GameMaker games · By SittingDuck

Black Screen Error

A topic by tayfuntuna created 40 days ago Views: 74 Replies: 1
Viewing posts 1 to 2

I was getting a black screen with the shaders, using V2 (v3 didn't work for me). After an hour of examination with AI, this is how it worked. If you get the same error, change the crt_appy function in the crt object create event like this:

crt_apply = function() {


    if (!surface_exists(game_surface)) {

        resize_surfaces();

    }


    shader_set(shader);

    update_uniforms();


    var sampler_id = shader_get_sampler_index(shader, "u_mask_sampler");

    texture_set_stage(sampler_id, sprite_get_texture(mask_type, mask_rgbx_repeat_on_threes));

    

    sampler_id = shader_get_sampler_index(shader, "u_slot_sampler");

    texture_set_stage(sampler_id, sprite_get_texture(spr_slot, mask_slot_height));


    draw_surface_stretched(application_surface, 0, 0, output_width, output_height);

    

    shader_reset();

}

Developer

hi tayfuntuna,

It looks like you replaced the view surface code with simply drawing the application surface; this solves the common issue in version 2 that occurs when developers don’t use the GameMaker viewport system. I’m glad you made it work for you!


If you don’t mind, I would love to hear your experiences regarding version 3; I want to ensure the extension is easy to use and free of bugs that prevent people from making good use of it. Would you be willing to shoot me an email at sitringduckgamesco@gmail.com? I would be happy to patch any issues you might be having or provide better documentation.

Thank you!