Minor adjustments
This commit is contained in:
parent
6b17a8e023
commit
7dbeb2127c
6 changed files with 11 additions and 14 deletions
|
|
@ -16,15 +16,15 @@ fn fragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|||
|
||||
let backgroundColor = vec3(0.9) + 0.075 * random.r;
|
||||
|
||||
let speciesAStrength = traces.r;
|
||||
let speciesBStrength = traces.g;
|
||||
let speciesAStrength = clamp(pow(traces.r, settings.clarity), 0, 1);
|
||||
let speciesBStrength = clamp(pow(traces.g, settings.clarity), 0, 1);
|
||||
let brushStrength = traces.a;
|
||||
|
||||
let rgbColor = sqrt(vec3(
|
||||
settings.speciesColorA * clamp(pow(speciesAStrength, settings.clarity), 0, 1) +
|
||||
settings.speciesColorB * clamp(pow(speciesBStrength, settings.clarity), 0, 1) +
|
||||
settings.brushColor * brushStrength
|
||||
));
|
||||
|
||||
let rgbColor = sqrt(
|
||||
settings.speciesColorA * speciesAStrength +
|
||||
settings.speciesColorB * speciesBStrength +
|
||||
settings.brushColor * brushStrength
|
||||
);
|
||||
return vec4(backgroundColor - rgbColor, 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue