mirror of
https://github.com/marinho/godot-visual-effects.git
synced 2025-09-19 04:06:15 +08:00
Updated images for Camera Effects
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 //
|
||||
|
@ -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;
|
||||
|
13
camera-effects/monocolor.gdshader
Normal file
13
camera-effects/monocolor.gdshader
Normal 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;
|
||||
}
|
17
camera-effects/monocolor.tscn
Normal file
17
camera-effects/monocolor.tscn
Normal 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
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user