Player now has 2 cameras (one true, one masked), each with a viewport, which the shader alternates between based on the Pill factor.
11 lines
314 B
GLSL
11 lines
314 B
GLSL
shader_type canvas_item;
|
|
|
|
uniform sampler2D true_view;
|
|
uniform sampler2D masked_view;
|
|
|
|
uniform float mask_factor;
|
|
|
|
void fragment() {
|
|
// Add the masked view and the true view depending on the factor
|
|
COLOR = (1.0f - mask_factor) * texture(true_view, SCREEN_UV) + mask_factor * texture(masked_view, SCREEN_UV);
|
|
} |