New Uniform variables in example GLSL shader

This commit is contained in:
Bruno Herbelin
2024-03-11 00:21:38 +01:00
parent d8d68dcf71
commit b0a042369f
6 changed files with 9 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
// from https://www.shadertoy.com/view/Ms2Xz3
// Adapted by Bruno Herbelin for vimix
float Intensity = 0.6;
uniform float Intensity = 0.6;
vec4 BlurColor (in vec2 Coord, in sampler2D Tex, in float MipBias)
{

View File

@@ -8,7 +8,7 @@
#define GOLDEN_ANGLE 2.39996323
#define ITERATIONS 60
float Radius = 0.3;
uniform float Radius = 0.3;
mat2 rot = mat2(cos(GOLDEN_ANGLE), sin(GOLDEN_ANGLE), -sin(GOLDEN_ANGLE), cos(GOLDEN_ANGLE));

View File

@@ -1,7 +1,7 @@
// Ordered Dithering Shader https://www.shadertoy.com/view/4lSSRR
// by mooglemoogle
// Adapted by Bruno Herbelin for vimix
float Factor = 0.5;
uniform float Factor = 0.5;
const float mult = 1.0 / 17.0;
const mat4 adjustments = (mat4(

View File

@@ -1,6 +1,6 @@
/**
* Earlybird Filter by Ruofei Du (DuRuofei.com)
* Demo: https://www.shadertoy.com/view/4lSyDK
* Demo: https://www.shadertoy.com/view/XlSyWV
* starea @ ShaderToy,License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
* https://creativecommons.org/licenses/by-nc-sa/3.0/
*
@@ -59,6 +59,8 @@ vec3 colorBurn(in vec3 s, in vec3 d )
return 1.0 - (1.0 - d) / s;
}
uniform float Contrast;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
@@ -79,7 +81,7 @@ void mainImage( out vec4 fragColor, in vec2 fragCoord )
col = mix(tint * col, col, gradient);
col = colorBurn(grey, col);
//col *= 0.8;
col *= Contrast + 0.5;
fragColor = vec4(col, 1.0);
}

View File

@@ -1,7 +1,7 @@
// from https://www.shadertoy.com/view/4s2GRR by SanchYESS
// Inspired by http://stackoverflow.com/questions/6030814/add-fisheye-effect-to-images-at-runtime-using-opengl-es
// Adapted by Bruno Herbelin for vimix
float Factor = 0.4;
uniform float Factor = 0.4;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{

View File

@@ -3,7 +3,7 @@
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// Adapted by Bruno Herbelin for vimix
float Factor = 0.5;
uniform float Factor = 0.5;
vec2 hash( vec2 p ) {
p = 2.0 * vec2(dot(p,vec2(127.1,311.7)), dot(p,vec2(269.5,183.3)));