- Reestructuración de ficheros y directorios general
- merge v0.01 --> Añadido fileselector - Añadidas fuentes de Gem y Pure Data - pix2jpg incluído en Gem. Archivos de construcción de Gem modificados. - Añadido fichero ompiling.txt con instrucciones de compilación
BIN
Gem/examples/data/64shade.tif
Normal file
89
Gem/examples/data/COPYING.txt
Normal file
|
@ -0,0 +1,89 @@
|
|||
COPYRIGHT issues of the examples data files
|
||||
===========================================
|
||||
|
||||
This data is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
--------------------------------------------
|
||||
|
||||
The contents of the examples/data folder provides data-files for
|
||||
showcase use within the pd/Gem environment.
|
||||
|
||||
I try to only include files that are free to use (as in Free Speech
|
||||
and Free Beer).
|
||||
However, for legacy reasons some of the files here may have non-free
|
||||
clauses in their license agreements.
|
||||
These files will be removed from this package as soon as their
|
||||
problematic state is discovered.
|
||||
|
||||
If you notice such a problematic case, please contact me
|
||||
(zmoelnig[AT]iem[DOT]at) immediately, so i can remove it and replace it
|
||||
by a free alternative.
|
||||
|
||||
|
||||
===========================================
|
||||
|
||||
|
||||
vera.ttf
|
||||
--------------------------------------------
|
||||
|
||||
Bitstream Vera Fonts Copyright
|
||||
|
||||
The fonts have a generous copyright, allowing derivative works (as
|
||||
long as "Bitstream" or "Vera" are not in the names), and full
|
||||
redistribution (so long as they are not *sold* by themselves). They
|
||||
can be be bundled, redistributed and sold with any software.
|
||||
|
||||
The fonts are distributed under the following copyright:
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
|
||||
Vera is a trademark of Bitstream, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute
|
||||
the Font Software, including without limitation the rights to use,
|
||||
copy, merge, publish, distribute, and/or sell copies of the Font
|
||||
Software, and to permit persons to whom the Font Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Bitstream" or the word "Vera".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Bitstream Vera" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
|
||||
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
|
||||
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font
|
||||
Software without prior written authorization from the Gnome Foundation
|
||||
or Bitstream Inc., respectively. For further information, contact:
|
||||
fonts at gnome dot org.
|
||||
|
61
Gem/examples/data/Toon.frag
Normal file
|
@ -0,0 +1,61 @@
|
|||
//
|
||||
// Fragment shader for cartoon-style shading
|
||||
//
|
||||
// Author: Philip Rideout
|
||||
//
|
||||
// Copyright (c) 2005 3Dlabs Inc. Ltd.
|
||||
//
|
||||
/************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2002-2006 3Dlabs Inc. Ltd. *
|
||||
* *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use in source and binary forms, with or without *
|
||||
* modification, are permitted provided that the following conditions *
|
||||
* are met: *
|
||||
* *
|
||||
* Redistributions of source code must retain the above copyright *
|
||||
* notice, this list of conditions and the following disclaimer. *
|
||||
* *
|
||||
* Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the following *
|
||||
* disclaimer in the documentation and/or other materials provided *
|
||||
* with the distribution. *
|
||||
* *
|
||||
* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
|
||||
* contributors may be used to endorse or promote products derived *
|
||||
* from this software without specific prior written permission. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
|
||||
* POSSIBILITY OF SUCH DAMAGE. *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
const vec3 DiffuseColor= vec3( 0.1,0.1,0.1);
|
||||
const vec3 PhongColor = vec3( 0.5,0.5,0.5);
|
||||
const float Edge= 0.2;
|
||||
uniform float Phong;
|
||||
varying vec3 Normal;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
vec3 color = DiffuseColor;
|
||||
float f = dot(vec3(0,0,1),Normal);
|
||||
if (abs(f) < Edge)
|
||||
color = vec3(0);
|
||||
if (f > Phong)
|
||||
color = PhongColor;
|
||||
|
||||
gl_FragColor = vec4(color, 1);
|
||||
}
|
54
Gem/examples/data/Toon.vert
Normal file
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// Vertex shader for cartoon-style shading
|
||||
//
|
||||
// Author: Philip Rideout
|
||||
//
|
||||
// Copyright (c) 2005 3Dlabs Inc. Ltd.
|
||||
//
|
||||
//
|
||||
//
|
||||
/************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2002-2006 3Dlabs Inc. Ltd. *
|
||||
* *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use in source and binary forms, with or without *
|
||||
* modification, are permitted provided that the following conditions *
|
||||
* are met: *
|
||||
* *
|
||||
* Redistributions of source code must retain the above copyright *
|
||||
* notice, this list of conditions and the following disclaimer. *
|
||||
* *
|
||||
* Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the following *
|
||||
* disclaimer in the documentation and/or other materials provided *
|
||||
* with the distribution. *
|
||||
* *
|
||||
* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
|
||||
* contributors may be used to endorse or promote products derived *
|
||||
* from this software without specific prior written permission. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
|
||||
* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
|
||||
* POSSIBILITY OF SUCH DAMAGE. *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
varying vec3 Normal;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
Normal = normalize(gl_NormalMatrix * gl_Normal);
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
}
|
BIN
Gem/examples/data/alea.mpg
Normal file
BIN
Gem/examples/data/anim-1.mov
Normal file
BIN
Gem/examples/data/bitmap_font_6x8.bmp
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Gem/examples/data/blob0.tif
Normal file
BIN
Gem/examples/data/blob1.tif
Normal file
BIN
Gem/examples/data/blob2.tif
Normal file
BIN
Gem/examples/data/dancer.JPG
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
Gem/examples/data/ducks.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
Gem/examples/data/fractal.JPG
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
Gem/examples/data/fractalAlpha.TIF
Normal file
BIN
Gem/examples/data/homer.avi
Normal file
111
Gem/examples/data/random.fp
Normal file
|
@ -0,0 +1,111 @@
|
|||
!!ARBfp1.0
|
||||
# Based on an algorithm described by Francois Grieu, sci.crypt, 5th February 2004
|
||||
#ATTRIB tex0 = fragment.texcoord[0];
|
||||
ATTRIB tex0 = fragment.position;
|
||||
ATTRIB col = fragment.color;
|
||||
|
||||
#PARAM bounds = program.local[1];
|
||||
#PARAM seed = program.local[2];
|
||||
PARAM bounds = 10.0;
|
||||
PARAM seed = 1234;
|
||||
PARAM coordsOffset = { -100, 100, 0, 0 };
|
||||
PARAM cMult = 0.0001002707309736288;
|
||||
PARAM aSubtract = 0.2727272727272727;
|
||||
PARAM coordMult0 = { 0.67676, 0.000058758, 0, 0 };
|
||||
PARAM coordMult1 = { 0.0000696596, 0.797976, 0, 0 };
|
||||
PARAM coordMult2 = { 0.587976, 0.0000233443, 0, 0 };
|
||||
|
||||
TEMP tableCoord, a, b, c, floorA, seedCoords, res;
|
||||
|
||||
ADD seedCoords, tex0, coordsOffset;
|
||||
|
||||
# gFastRngA = (((currentX*multX)/(currentY*multY))+
|
||||
MUL tableCoord, seedCoords, coordMult0;
|
||||
RCP tableCoord.y, tableCoord.y;
|
||||
MUL a.x, tableCoord.x, tableCoord.y;
|
||||
|
||||
# (((height-currentY)*multX2)/((width-currentX)*multY2))+
|
||||
SUB tableCoord, bounds, seedCoords;
|
||||
MUL tableCoord, tableCoord, coordMult1;
|
||||
RCP tableCoord.x, tableCoord.x;
|
||||
MAD a.x, tableCoord.x, tableCoord.y, a.x;
|
||||
|
||||
# (((height-currentX)*multX3)/((width-currentY)*multY3)));
|
||||
SUB tableCoord.x, bounds.y, seedCoords.x;
|
||||
SUB tableCoord.y, bounds.x, seedCoords.y;
|
||||
MUL tableCoord, tableCoord, coordMult2;
|
||||
RCP tableCoord.y, tableCoord.y;
|
||||
MAD a.x, tableCoord.x, tableCoord.y, a.x;
|
||||
|
||||
# gFastRngA = fmod(gFastRngA,1);
|
||||
FRC a.x, a.x;
|
||||
ADD a.x, a.x, seed;
|
||||
|
||||
MOV c.x, 0;
|
||||
MOV b.x, 0;
|
||||
|
||||
# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
|
||||
FRC floorA.x, a.x;
|
||||
SUB floorA.x, a.x, floorA.x;
|
||||
SUB floorA.x, aSubtract.x, floorA.x;
|
||||
ADD floorA.x, floorA.x, a.x;
|
||||
MAD a.x, c.x, cMult.x, floorA.x;
|
||||
|
||||
# (gFastRngB += (gFastRngA *= gFastRngA))
|
||||
MUL a.x, a.x, a.x;
|
||||
ADD b.x, b.x, a.x;
|
||||
|
||||
# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
|
||||
FRC b.x, b.x;
|
||||
ADD c.x, c.x, b.x;
|
||||
|
||||
# (gFastRngC -= floor(gFastRngC))
|
||||
FRC c.x, c.x;
|
||||
|
||||
# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
|
||||
FRC floorA.x, a.x;
|
||||
SUB floorA.x, a.x, floorA.x;
|
||||
SUB floorA.x, aSubtract.x, floorA.x;
|
||||
ADD floorA.x, floorA.x, a.x;
|
||||
MAD a.x, c.x, cMult.x, floorA.x;
|
||||
|
||||
# (gFastRngB += (gFastRngA *= gFastRngA))
|
||||
MUL a.x, a.x, a.x;
|
||||
ADD b.x, b.x, a.x;
|
||||
|
||||
# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
|
||||
FRC b.x, b.x;
|
||||
ADD c.x, c.x, b.x;
|
||||
|
||||
# (gFastRngC -= floor(gFastRngC))
|
||||
FRC c.x, c.x;
|
||||
|
||||
# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
|
||||
FRC floorA.x, a.x;
|
||||
SUB floorA.x, a.x, floorA.x;
|
||||
SUB floorA.x, aSubtract.x, floorA.x;
|
||||
ADD floorA.x, floorA.x, a.x;
|
||||
MAD a.x, c.x, cMult.x, floorA.x;
|
||||
|
||||
# (gFastRngB += (gFastRngA *= gFastRngA))
|
||||
MUL a.x, a.x, a.x;
|
||||
ADD b.x, b.x, a.x;
|
||||
|
||||
# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
|
||||
FRC b.x, b.x;
|
||||
ADD c.x, c.x, b.x;
|
||||
|
||||
# (gFastRngC -= floor(gFastRngC))
|
||||
FRC c.x, c.x;
|
||||
|
||||
|
||||
MOV res, c.x;
|
||||
MOV res.a, 1;
|
||||
|
||||
MUL res, res, -0.5;
|
||||
|
||||
ADD res, res, col;
|
||||
|
||||
MOV result.color, res;
|
||||
|
||||
END
|
BIN
Gem/examples/data/temp0.JPG
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
Gem/examples/data/temp1.JPG
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
Gem/examples/data/temp2.JPG
Normal file
After Width: | Height: | Size: 18 KiB |
36
Gem/examples/data/toon.vp
Normal file
|
@ -0,0 +1,36 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
# Toon Shader by James A. McCombe, Tue Jun 17 2003
|
||||
#
|
||||
# Implements a very crude toon shader. Basically, a simple dot product between a
|
||||
# light direction vector and the vertex normal is performed. The output of this is
|
||||
# used to set the texture coordinates to lookup inside a special texture which
|
||||
# effectively quantises the light intensity into 3 bands.
|
||||
#
|
||||
# Parameters:
|
||||
# program.env[0] - Light direction vector
|
||||
|
||||
ATTRIB vPosition = vertex.position;
|
||||
ATTRIB vNormal = vertex.normal;
|
||||
|
||||
PARAM lightDirection = program.env[0];
|
||||
|
||||
TEMP t0, transVertex;
|
||||
|
||||
DP4 result.position.x, state.matrix.mvp.row[0], vPosition;
|
||||
DP4 result.position.y, state.matrix.mvp.row[1], vPosition;
|
||||
DP4 result.position.z, state.matrix.mvp.row[2], vPosition;
|
||||
DP4 result.position.w, state.matrix.mvp.row[3], vPosition;
|
||||
|
||||
DP3 t0.x, state.matrix.modelview[0].invtrans.row[0], vNormal;
|
||||
DP3 t0.z, state.matrix.modelview[0].invtrans.row[1], vNormal;
|
||||
DP3 t0.y, state.matrix.modelview[0].invtrans.row[2], vNormal;
|
||||
|
||||
# Dot product of normal and light vector to do tone lookup
|
||||
DP3 t0, t0, lightDirection;
|
||||
SWZ result.texcoord[0], t0, x,1,1,1;
|
||||
|
||||
# Write the primary vertex color
|
||||
MOV result.color, vertex.color;
|
||||
|
||||
END
|
6
Gem/examples/data/valcolor.tab
Normal file
|
@ -0,0 +1,6 @@
|
|||
0. 0. 0.
|
||||
1. 1. 1.
|
||||
.5 .0 1.
|
||||
0. 1. 0.
|
||||
1. 1. 1.
|
||||
0. 0. 0.
|
8
Gem/examples/data/valmotion.tab
Normal file
|
@ -0,0 +1,8 @@
|
|||
0. 0. 0.
|
||||
0. 0. 0.
|
||||
2. 2. -2.
|
||||
-3. -1. .5
|
||||
-2. 4. -1.
|
||||
.5 -.5 0.
|
||||
0. 0. 0.
|
||||
0. 0. 0.
|
9
Gem/examples/data/venus.mtl
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# venus.mtl
|
||||
#
|
||||
|
||||
newmtl vskin
|
||||
Ka 0.6 0.6 0.45
|
||||
Kd 0.6 0.6 0.45
|
||||
Ks 0.2 0.1 0.1
|
||||
Ns 5.0
|