aesthetics: change bloom

This commit is contained in:
FMS-Cat
2021-03-14 11:24:11 +09:00
parent 654d864f47
commit 033ff1d945
4 changed files with 8 additions and 4 deletions

View File

@@ -221,7 +221,7 @@ dog.root.children.push( rings.entity );
const flickyParticles = new FlickyParticles( {
particlesSqrt: 8,
textureRandom: randomTexture.texture,
textureRandomStatic: randomTextureStatic.texture
textureRandomStatic: randomTextureStatic.texture,
} );
dog.root.children.push( flickyParticles.entity );

View File

@@ -9,8 +9,12 @@ out vec4 fragColor;
uniform sampler2D sampler0;
void main() {
vec3 tex = texture( sampler0, vUv ).xyz;
float brightness = dot( tex, vec3( 0.299, 0.587, 0.114 ) );
vec3 normalized = brightness < 0.01 ? vec3( brightness ) : tex / brightness;
fragColor = vec4(
max( vec3( 0.0 ), ( texture( sampler0, vUv ).xyz - 1.0 ) * 1.0 ),
max( 0.0, brightness - 1.0 ) * normalized,
1.0
);
}

View File

@@ -18,6 +18,6 @@ uniform float time;
void main() {
fragPosition = vPosition;
fragNormal = vec4( vNormal, 1.0 );
fragColor = vec4( 0.6, 1.0, 4.0, 1.0 );
fragColor = vec4( 0.6, 1.8, 1.2, 1.0 );
fragWTF = vec4( vec3( 0.0, 0.0, 0.0 ), MTL_UNLIT );
}

View File

@@ -34,7 +34,7 @@ mat2 rotate2D( float _t ) {
void main() {
if ( vColor.a < 0.0 ) { discard; }
float emissive = 4.0;
float emissive = 7.0;
// emissive *= 0.5 + 0.5 * sin( TAU * vRandom.z + 20.0 * time );
fragPosition = vPosition;