head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC5:1.1.1.1
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	netbsd-11:1.1.1.1.0.10
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.8
	netbsd-10-base:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	netbsd-8-2-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	netbsd-9:1.1.1.1.0.6
	netbsd-9-base:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	mesa-demos-8-4-0:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1.2.2
	netbsd-8-0-RELEASE:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1.2.2
	netbsd-7-1-1-RELEASE:1.1.1.1.2.2
	netbsd-8:1.1.1.1.0.4
	netbsd-8-base:1.1.1.1
	netbsd-7-1:1.1.1.1.2.2.0.4
	netbsd-7-1-RELEASE:1.1.1.1.2.2
	netbsd-7-1-RC2:1.1.1.1.2.2
	netbsd-7-1-RC1:1.1.1.1.2.2
	netbsd-7-0-2-RELEASE:1.1.1.1.2.2
	netbsd-7-0-1-RELEASE:1.1.1.1.2.2
	netbsd-7-0:1.1.1.1.2.2.0.2
	netbsd-7-0-RELEASE:1.1.1.1.2.2
	netbsd-7-0-RC3:1.1.1.1.2.2
	netbsd-7-0-RC2:1.1.1.1.2.2
	netbsd-7-0-RC1:1.1.1.1.2.2
	netbsd-7:1.1.1.1.0.2
	mesa-demos-8-2-0:1.1.1.1
	xorg:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2014.12.16.06.01.19;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	JHkLWGb9LgMxce2y;

1.1.1.1
date	2014.12.16.06.01.19;	author mrg;	state Exp;
branches
	1.1.1.1.2.1;
next	;
commitid	JHkLWGb9LgMxce2y;

1.1.1.1.2.1
date	2014.12.16.06.01.19;	author snj;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	HBvt2MfSKnG9W63y;

1.1.1.1.2.2
date	2014.12.23.02.55.07;	author snj;	state Exp;
branches;
next	;
commitid	HBvt2MfSKnG9W63y;


desc
@@


1.1
log
@Initial revision
@
text
@#version 120
const int KernelSize = 16;
uniform float KernelValue1f[KernelSize];


float add_two(float a, float b)
{
    if (a > b)
        return a - b;
    else
        return a + b;
}

vec4 myfunc(vec4 x, vec4 mult, vec4 c)
{
   if (x.x >= 0.5) {
      return mult * c;
   } else {
      return mult + c;
   }
}

vec4 func2(vec4 x)
{
    int i;
    vec4 color = vec4(0);
       for (i = 0; i < KernelSize; ++i) {
           vec4 tmp = vec4(1./KernelSize);
           color += myfunc(x, tmp, gl_Color);
       }
    return x * color;
}

vec4 func(vec4 x)
{
    int i;
    vec4 tmp = gl_Color;
    vec4 sum = x;

    for (i = 0; i < KernelSize; ++i) {
        sum = vec4( add_two(sum.x, KernelValue1f[i]) );
    }
    sum = func2(sum);
    return sum;
}

void main(void)
{
    vec4 sum = vec4(0.0);

    sum = func(sum);
    gl_Position = gl_Vertex;
    gl_FrontColor = sum;
}
@


1.1.1.1
log
@initial import of mesa-demos-8.2.0
@
text
@@


1.1.1.1.2.1
log
@file func2.glsl was added on branch netbsd-7 on 2014-12-23 02:55:07 +0000
@
text
@d1 54
@


1.1.1.1.2.2
log
@Apply patch (requested by mrg in ticket 341):
Add split-out versions of glu-9.0.0, glw-8.0.0, and mesa-demos-8.2.0.
@
text
@a0 54
#version 120
const int KernelSize = 16;
uniform float KernelValue1f[KernelSize];


float add_two(float a, float b)
{
    if (a > b)
        return a - b;
    else
        return a + b;
}

vec4 myfunc(vec4 x, vec4 mult, vec4 c)
{
   if (x.x >= 0.5) {
      return mult * c;
   } else {
      return mult + c;
   }
}

vec4 func2(vec4 x)
{
    int i;
    vec4 color = vec4(0);
       for (i = 0; i < KernelSize; ++i) {
           vec4 tmp = vec4(1./KernelSize);
           color += myfunc(x, tmp, gl_Color);
       }
    return x * color;
}

vec4 func(vec4 x)
{
    int i;
    vec4 tmp = gl_Color;
    vec4 sum = x;

    for (i = 0; i < KernelSize; ++i) {
        sum = vec4( add_two(sum.x, KernelValue1f[i]) );
    }
    sum = func2(sum);
    return sum;
}

void main(void)
{
    vec4 sum = vec4(0.0);

    sum = func(sum);
    gl_Position = gl_Vertex;
    gl_FrontColor = sum;
}
@


