mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Really fixes #6. At least I hope...
This commit is contained in:
		| @@ -192,6 +192,8 @@ ShaderEffect { | |||||||
|         (brightness_flickering !== 0 ? " |         (brightness_flickering !== 0 ? " | ||||||
|             finalColor = mix(finalColor, vec3(0.0), brightness);" : "") + |             finalColor = mix(finalColor, vec3(0.0), brightness);" : "") + | ||||||
|  |  | ||||||
|         "gl_FragColor = vec4(finalColor *"+brightness+", 1.0); |         "gl_FragColor = vec4(finalColor *"+brightness+", qt_Opacity); | ||||||
|     }" |     }" | ||||||
|  |  | ||||||
|  |      onStatusChanged: console.log(log) //Print warning messages | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||||
| <!DOCTYPE QtCreatorProject> | <!DOCTYPE QtCreatorProject> | ||||||
| <!-- Written by QtCreator 3.0.1, 2014-04-03T17:43:20. --> | <!-- Written by QtCreator 3.0.1, 2014-04-04T01:31:42. --> | ||||||
| <qtcreator> | <qtcreator> | ||||||
|  <data> |  <data> | ||||||
|   <variable>ProjectExplorer.Project.ActiveTarget</variable> |   <variable>ProjectExplorer.Project.ActiveTarget</variable> | ||||||
|   | |||||||
| @@ -43,6 +43,7 @@ ShaderEffect{ | |||||||
|                             uniform sampler2D normals; |                             uniform sampler2D normals; | ||||||
|                             uniform highp float screen_distorsion; |                             uniform highp float screen_distorsion; | ||||||
|                             uniform highp float ambient_light; |                             uniform highp float ambient_light; | ||||||
|  |                             uniform highp float qt_Opacity; | ||||||
|  |  | ||||||
|                             uniform vec4 reflection_color; |                             uniform vec4 reflection_color; | ||||||
|                             varying lowp float brightness; |                             varying lowp float brightness; | ||||||
| @@ -62,8 +63,10 @@ ShaderEffect{ | |||||||
|                                 vec3 normal = normalize(txt_normal.rgb * 2.0 - 1.0); |                                 vec3 normal = normalize(txt_normal.rgb * 2.0 - 1.0); | ||||||
|                                 vec3 light_dir = normalize(vec3(0.5,0.5, 0.0) - vec3(qt_TexCoord0, 0.0)); |                                 vec3 light_dir = normalize(vec3(0.5,0.5, 0.0) - vec3(qt_TexCoord0, 0.0)); | ||||||
|                                 float reflection = (dot(normal, light_dir) * 0.4 + 0.2) * brightness; |                                 float reflection = (dot(normal, light_dir) * 0.4 + 0.2) * brightness; | ||||||
|                                 vec3 final_color = reflection_color * reflection * 0.5; |                                 vec3 final_color = reflection_color.rgb * reflection * 0.5; | ||||||
|                                 final_color += txt_color * ambient_light; |                                 final_color += txt_color.rgb * ambient_light; | ||||||
|                                 gl_FragColor = vec4(final_color * txt_normal.a, txt_color.a); |                                 gl_FragColor = vec4(final_color * txt_normal.a, txt_color.a * qt_Opacity); | ||||||
|                             }" |                             }" | ||||||
|  |  | ||||||
|  |     onStatusChanged: console.log(log) //Print warning messages | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user