Tweak: projection screen pixels are opaque
This commit is contained in:
parent
0e9deaa161
commit
0dc61d12d9
@ -55,10 +55,7 @@ void main() {
|
|||||||
float mask = 1.0 - smoothstep(0.35 - edgeSoftness, 0.45 + edgeSoftness, dist);
|
float mask = 1.0 - smoothstep(0.35 - edgeSoftness, 0.45 + edgeSoftness, dist);
|
||||||
mask = mix(mask, 1.0, blurFactor);
|
mask = mix(mask, 1.0, blurFactor);
|
||||||
|
|
||||||
float brightness = max(color.r, max(color.g, color.b));
|
gl_FragColor = vec4(color.rgb, mask);
|
||||||
float contentAlpha = smoothstep(0.05, 0.15, brightness);
|
|
||||||
|
|
||||||
gl_FragColor = vec4(color.rgb, contentAlpha * mask * u_opacity);
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -101,9 +98,7 @@ void main() {
|
|||||||
|
|
||||||
float hue = fract(u_time * 0.1 + d * 0.2);
|
float hue = fract(u_time * 0.1 + d * 0.2);
|
||||||
float val = 0.5 + 0.5 * sin(wave + beatWave);
|
float val = 0.5 + 0.5 * sin(wave + beatWave);
|
||||||
float contentAlpha = smoothstep(0.1, 0.3, val);
|
gl_FragColor = vec4(hsv2rgb(vec3(hue, 0.8, val)), mask);
|
||||||
|
|
||||||
gl_FragColor = vec4(hsv2rgb(vec3(hue, 0.8, val)), contentAlpha * mask * u_opacity);
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -175,8 +170,8 @@ export class ProjectionScreen extends SceneFeature {
|
|||||||
this.screens.push({ mesh, originalPositions: sideGeometry.attributes.position.clone(), resolution: new THREE.Vector2(resX, resY) });
|
this.screens.push({ mesh, originalPositions: sideGeometry.attributes.position.clone(), resolution: new THREE.Vector2(resX, resY) });
|
||||||
};
|
};
|
||||||
|
|
||||||
createSideScreen(-9.5, 3.5, -16.6, 0.4, 100); // Left (Lower resolution)
|
createSideScreen(-11, 4.0, -15.6, 0.4, 100); // Left (Lower resolution)
|
||||||
createSideScreen(9.5, 3.5, -16.5, -0.4, 100); // Right (Lower resolution)
|
createSideScreen(11, 4.0, -15.5, -0.4, 100); // Right (Lower resolution)
|
||||||
|
|
||||||
state.tvScreen = this.mesh;
|
state.tvScreen = this.mesh;
|
||||||
this.setAllVisible(false);
|
this.setAllVisible(false);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user