1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2024-10-06 02:50:50 +01:00

Bloom is applied after rasterization instead of before.

This commit is contained in:
Filippo Scognamiglio 2014-07-11 01:20:14 +02:00
parent 7b84ae2794
commit d1a5f2a774
2 changed files with 5 additions and 5 deletions

View File

@ -304,7 +304,7 @@ Item{
}
ListElement{
text: "Default Pixelated"
obj_string: '{"background_color":"#000000","bloom_strength":0.65,"brightness_flickering":0.1,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.1,"jitter":0,"motion_blur":0.45,"noise_strength":0.14,"rasterization":2,"screen_distortion":0.05}'
obj_string: '{"background_color":"#000000","bloom_strength":0.4,"brightness_flickering":0.1,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.1,"jitter":0,"motion_blur":0.45,"noise_strength":0.14,"rasterization":2,"screen_distortion":0.05}'
builtin: true
}
ListElement{

View File

@ -29,7 +29,7 @@ ShaderEffect {
property variant rasterizationSource: terminal.rasterizationSource
property variant noiseSource: terminal.staticNoiseSource
property size txt_Size: Qt.size(frame.sourceRect.width, frame.sourceRect.height)
property real bloom: shadersettings.bloom_strength
property real bloom: shadersettings.bloom_strength * 2.5
property int rasterization: shadersettings.rasterization
@ -165,12 +165,12 @@ ShaderEffect {
(glowing_line_strength !== 0 ? "
color += randomPass(coords) * glowing_line_strength;" : "") +
(bloom !== 0 ? "
color += texture2D(bloomSource, coords).r *" + str(2.5 * bloom) + ";" : "") +
"vec3 finalColor = mix(background_color, font_color, color).rgb;" +
"finalColor *= texture2D(rasterizationSource, coords).a;" +
(bloom !== 0 ? "
finalColor += font_color.rgb * texture2D(bloomSource, coords).r *" + str(bloom) + ";" : "") +
(brightness_flickering !== 0 ? "
finalColor *= brightness;" : "") +