mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Separated cursor and glint intensities from their colors, which can now safely reside in their color spaces.
This commit is contained in:
@@ -3,6 +3,8 @@ struct Config {
|
||||
backgroundColor : vec3<f32>,
|
||||
cursorColor : vec3<f32>,
|
||||
glintColor : vec3<f32>,
|
||||
cursorIntensity : f32,
|
||||
glintIntensity : f32,
|
||||
};
|
||||
|
||||
struct Palette {
|
||||
@@ -65,8 +67,8 @@ fn getBrightness(uv : vec2<f32>) -> vec4<f32> {
|
||||
|
||||
textureStore(outputTex, coord, vec4<f32>(
|
||||
palette.colors[paletteIndex]
|
||||
+ min(config.cursorColor * brightness.g, vec3<f32>(1.0))
|
||||
+ min(config.glintColor * brightness.b, vec3<f32>(1.0))
|
||||
+ min(config.cursorColor * config.cursorIntensity * brightness.g, vec3<f32>(1.0))
|
||||
+ min(config.glintColor * config.glintIntensity * brightness.b, vec3<f32>(1.0))
|
||||
+ config.backgroundColor,
|
||||
1.0
|
||||
));
|
||||
|
||||
@@ -3,6 +3,8 @@ struct Config {
|
||||
backgroundColor : vec3<f32>,
|
||||
cursorColor : vec3<f32>,
|
||||
glintColor : vec3<f32>,
|
||||
cursorIntensity : f32,
|
||||
glintIntensity : f32,
|
||||
};
|
||||
|
||||
struct Time {
|
||||
@@ -60,8 +62,8 @@ fn getBrightness(uv : vec2<f32>) -> vec4<f32> {
|
||||
|
||||
textureStore(outputTex, coord, vec4<f32>(
|
||||
color * brightness.r
|
||||
+ min(config.cursorColor * brightness.g, vec3<f32>(1.0))
|
||||
+ min(config.glintColor * brightness.b, vec3<f32>(1.0))
|
||||
+ min(config.cursorColor * config.cursorIntensity * brightness.g, vec3<f32>(1.0))
|
||||
+ min(config.glintColor * config.glintIntensity * brightness.b, vec3<f32>(1.0))
|
||||
+ config.backgroundColor,
|
||||
1.0
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user