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

https://github.com/sylvainthery/procedural_micro_patterns
09 January 2023, 09:01:37 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • cb9187d
  • /
  • mipmap_compact.frag
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

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
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:50c55052e65fe9f905617f1a1c053edee652697c
origin badgedirectory badge Iframe embedding
swh:1:dir:cb9187d2b0589a2aab4ebc94781e690c18c7a26e
origin badgerevision badge
swh:1:rev:a26bd38e4abcbfd6bf58e9a5fa424d9ceb959960
origin badgesnapshot badge
swh:1:snp:e0709176be0f75f889c92d5bf3c708601dd371a5
Citations

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
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: a26bd38e4abcbfd6bf58e9a5fa424d9ceb959960 authored by Sylvain Thery on 02 December 2022, 14:10:09 UTC
update README
Tip revision: a26bd38
mipmap_compact.frag
#version 300 es

precision highp float;
uniform sampler2D TU_in1;
uniform sampler2D TU_in2;
uniform int l;
uniform int lp2;  // 2^l

out vec4 frag_out;
void main()
{
	ivec2 p = ivec2(gl_FragCoord.xy);
	float El1 = texelFetch(TU_in1,p,l).r;
	float El2 = texelFetch(TU_in2,p,l).r;
	p *= lp2; // for level 0 access
	float var1 = 0.0;
	float var2 = 0.0;
	for (int j=0; j<lp2; ++j)
		for (int i=0; i<lp2; ++i)
		{
			ivec2 q = p + ivec2(i,j);
			float v1 = texelFetch(TU_in1,q,0).r - El1;
			var1 += v1*v1;
			float v2 = texelFetch(TU_in2,q,0).r - El2;
			var2 += v2*v2;
		}
	// /16 car var*16 pour pour étaler sur 8bits
	float nb = float(lp2*lp2)/16.0;
	frag_out = vec4(El1,El2,var1/nb,var2/nb);
}

Software Heritage — Copyright (C) 2015–2025, 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— Contact— JavaScript license information— Web API

back to top