Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c267948
  • /
  • glvu
  • /
  • shader
  • /
  • dpScreen.fs
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:8be8a3a5963f481b6a97e1972d59fa52a85d944a
directory badge
swh:1:dir:1a03f71d0563c2ec923564ee7b73162a114dbae1

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
dpScreen.fs
#version 330
out vec4 FragColor;
in vec2 TexCoord;

uniform sampler2D tex0;
uniform sampler2D tex1;
uniform sampler2D tex2;


uniform int num_color_layer;

void main()

{
	vec2 texelSize = 1.0 / textureSize(tex0, 0);
	vec3 rgb = vec3(0.0);

	/*ssaa (Super Sample Anti-aliasing)*/
	for(int i = 0; i < 2; i++)
		for(int j = 0; j < 2; j++)
		{
			vec2 TexCoord1 = TexCoord + vec2(i, j) * texelSize;

			
			float front_alpha = 0;
			float back_alpha = 0;
			float alpha = 0;
			
			alpha = texture(tex0, TexCoord1).a;
			back_alpha = front_alpha + (1 - front_alpha) * alpha;
			rgb += texture(tex0, TexCoord1).rgb * (1 - front_alpha) * alpha;
			
			front_alpha = back_alpha;
			alpha = texture(tex1, TexCoord1).a;
			back_alpha = front_alpha + (1 - front_alpha) * alpha;
			rgb += texture(tex1, TexCoord1).rgb * (1 - front_alpha) * alpha;
			
			front_alpha = back_alpha;
			alpha = texture(tex2, TexCoord1).a;
			back_alpha = front_alpha + (1 - front_alpha) * alpha;
			rgb += texture(tex2, TexCoord1).rgb * (1 - front_alpha) * alpha;
			/*for(int k = 0; k < num_color_layer; k++)
			{
				alpha = alpha + (1 - alpha) * texture(tex[k], TexCoord1).a;
				rgb += texture(tex[k], TexCoord1).rgb * alpha;		
			}*/				
		}
	rgb /= 4.0;
	FragColor = vec4(min(rgb,vec3(1.0, 1.0, 1.0)), 1.0);
}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API