Skip to content

Applying the CRT Effect causes the shrink down of scene #2775

@JackIsGoofingOff

Description

@JackIsGoofingOff

Hi, maybe this question is stupid. I am using the arcade 3.3.2 CRT filter feature on a project, but it causes a shrink down of the size of the original scene and offsets the scene to bottom left corner. Would like to know if there are any solutions? Thanks.

def __init__(self):
        super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE, resizable=False)
        # Set the background color
        arcade.set_background_color(arcade.color.BLACK)
        
        # Create the CRT filter
        self.crt_filter = CRTFilter(
            GAME_WIDTH, GAME_HEIGHT,
            resolution_down_scale=1.5,
            hard_scan=-6.0,
            hard_pix=-2.0,
            display_warp=Vec2(1.0 / 16.0, 1.0 / 24.0),
            #mask_dark=0.6,
            #mask_light=1.4
        )

I try to apply cameras to fix it but not working:

def on_draw(self):
        if self.filter_on:
            # Draw our stuff into the CRT filter instead of on screen
            self.crt_filter.use()
            self.crt_filter.clear()

            # Use our camera for proper projection
            self.game_camera.use()
            self._draw_game()
            
            self.use()
            self.clear()

            with self.gui_camera.activate():
                self.crt_filter.draw()
        else:
            # Draw our stuff directly to the screen
            self.use()
            self.clear()
            self.game_camera.use()
            self._draw_game()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions