Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Code from an old svn, still working
  • Loading branch information
Théo committed Feb 8, 2017
0 parents commit d4acfac
Show file tree
Hide file tree
Showing 132 changed files with 14,850 additions and 0 deletions.
23 changes: 23 additions & 0 deletions shaders/shader.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//varying vec3 normal, lightDir;
uniform sampler2D tex;

void main()
{
vec4 color;
vec4 texel;
float alpha,r,g,b ;

texel = texture2D(tex,gl_TexCoord[0].st);
alpha = texel.a;

r = ((-(alpha-1.0)*(alpha-1.0)/0.1)+1.0);
g = (5.0*(-((alpha-0.5)*(alpha-0.5))/0.4)+1.0);
b = ((-(alpha * alpha)/0.15)+1.0);

if (r<0) r=0 ;
if (g<0) g=0 ;
if (b<0) b=0 ;

color = vec4(r,g,b,alpha);
gl_FragColor = color;
}
6 changes: 6 additions & 0 deletions shaders/shader.vert
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
}
22 changes: 22 additions & 0 deletions shaders/shader3D.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
uniform sampler3D tex;

void main()
{
vec4 color;
vec4 texel;
float alpha,r,g,b ;

texel = texture3D(tex,gl_TexCoord[0].xyz);
alpha = texel.a;

r = ((-(alpha-1.0)*(alpha-1.0)/0.1)+1.0);
g = (5.0*(-((alpha-0.5)*(alpha-0.5))/0.4)+1.0);
b = ((-(alpha * alpha)/0.15)+1.0);

if (r<0) r=0 ;
if (g<0) g=0 ;
if (b<0) b=0 ;

color = vec4(r,g,b,alpha);
gl_FragColor = color;
}
Loading

0 comments on commit d4acfac

Please sign in to comment.