dev #84

Merged
ksenia_mikhailova merged 141 commits from dev into main 2024-10-03 15:30:24 +03:00
2 changed files with 3 additions and 12 deletions
Showing only changes of commit 7dbcecacdc - Show all commits

View File

@ -7,7 +7,7 @@ export const contrastColor = (color: ralTypes) => {
if (hex) {
const hsl = { h: 0, s: 0, l: 0 }
new Color(hex).getHSL(hsl)
if (hsl.l < 0.5) {
if (hsl.l < 0.45) {
return '#fff'
} else {
return '#000'

View File

@ -82,22 +82,13 @@ const m_onBeforeCompile = (shader) => {
}
${shader.fragmentShader}
`
// .replace(
// `#include <map_fragment>`,
// `
// float noise_v = noise(diffuseColor.rg);
// float clamped_noise = clamp(noise_v, -0.15, 0.15);
// diffuseColor.rgb *= clamped_noise;
// #include <map_fragment>
// `
// )
.replace(
`#include <dithering_fragment>`,
`#include <dithering_fragment>
float noise_v = noise(gl_FragColor.rg);
float clamped_noise = clamp(noise_v, -0.05, 0.05);
gl_FragColor.rgb -= clamp(vec3(clamped_noise), 0.0, 1.0);
float clamped_noise = clamp(noise_v, 0.85, 1.0);
gl_FragColor.rgb *= vec3(clamped_noise);
`
);
};