Updated images for Camera Effects

This commit is contained in:
Mario Brandao
2023-12-15 23:58:06 +01:00
parent 69226310dd
commit ecbc717f32
35 changed files with 549 additions and 216 deletions

View File

@ -1,6 +1,6 @@
shader_type canvas_item;
// inspired by: https://godotshaders.com/shader/simple-blur-mixed-with-a-color/
// based on https://godotshaders.com/shader/simple-blur-mixed-with-a-color/
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;

View File

@ -1,6 +1,6 @@
shader_type canvas_item;
// inspired by: https://www.youtube.com/watch?v=aVzY6n3e19A
// based on https://www.youtube.com/watch?v=aVzY6n3e19A
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear;
uniform float strength = 20.0;

View File

@ -2,7 +2,7 @@ shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear;
// source: https://godotshaders.com/shader/world-environment-adjustments-for-viewporttextures/
// based on: https://godotshaders.com/shader/world-environment-adjustments-for-viewporttextures/
uniform float brightness : hint_range(0.0,8.0) = 1.0;
uniform float contrast : hint_range(0.0,8.0) = 1.0;

View File

@ -4,7 +4,7 @@ shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
// source: https://godotshaders.com/shader/2d-radial-distortion-fisheye-barrel/
// based on: https://godotshaders.com/shader/2d-radial-distortion-fisheye-barrel/
/////////////////////////////////
// 2D Radial Distortion Shader //

View File

@ -1,6 +1,6 @@
shader_type canvas_item;
// source: https://docs.godotengine.org/en/4.0/tutorials/shaders/custom_postprocessing.html
// based on: https://docs.godotengine.org/en/4.0/tutorials/shaders/custom_postprocessing.html
uniform vec2 size = vec2(32.0, 28.0);
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;

View File

@ -0,0 +1,13 @@
shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
uniform vec4 colorDarkness : source_color = vec4(0.0, 0.0, 0.0, 1.0);
uniform vec4 colorLight : source_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform float colorDivider : hint_range(0.0, 1.0) = .5;
void fragment() {
vec4 pixelColor = texture(SCREEN_TEXTURE, SCREEN_UV);
float grayscaleValue = dot(pixelColor.rgb, vec3(0.299, 0.587, 0.114));
COLOR = grayscaleValue < colorDivider ? colorDarkness : colorLight;
}

View File

@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://0f6ab8y0i26l"]
[ext_resource type="Shader" path="res://camera-effects/monocolor.gdshader" id="1_7iccl"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_d571q"]
shader = ExtResource("1_7iccl")
shader_parameter/colorDarkness = Color(0, 0, 0, 1)
shader_parameter/colorLight = Color(1, 1, 1, 1)
shader_parameter/colorDivider = 0.5
[node name="Monocolor" type="ColorRect"]
material = SubResource("ShaderMaterial_d571q")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

View File

@ -4,7 +4,7 @@ uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear;
uniform int pixel_size = 1;
uniform float alpha = 0.1;
// inspired by https://www.youtube.com/watch?v=77F4ZjmQ07U
// based on https://www.youtube.com/watch?v=77F4ZjmQ07U
void fragment() {
vec2 VIEWPORT_SIZE = 1.0 / SCREEN_PIXEL_SIZE;

View File

@ -1,6 +1,6 @@
shader_type canvas_item;
// inspired by: https://www.shadertoy.com/view/Xl3cDn
// based on: https://www.shadertoy.com/view/Xl3cDn
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear;

View File

@ -9,7 +9,7 @@ uniform int maximumIterations : hint_range(0, 10) = 5;
uniform bool showTiling = false;
uniform bool showYellowLine = false;
// source: https://www.shadertoy.com/view/MdlXz8
// based on: https://www.shadertoy.com/view/MdlXz8
#define TAU 6.28318530718