Skip to content

Instantly share code, notes, and snippets.

@Sponk
Created October 27, 2014 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sponk/bd209066ef50527c8521 to your computer and use it in GitHub Desktop.
Save Sponk/bd209066ef50527c8521 to your computer and use it in GitHub Desktop.
Simple spheremapping GLSL fragment shader for Neo
uniform vec4 FogColor;
uniform float FogEnd;
uniform float FogScale;
uniform vec3 MaterialEmit;
uniform float MaterialShininess;
uniform float MaterialOpacity;
uniform vec4 LightPosition[4];
uniform vec3 LightDiffuseProduct[4];
uniform vec3 LightSpecularProduct[4];
uniform float LightConstantAttenuation[4];
uniform float LightQuadraticAttenuation[4];
uniform bool LightActive[4];
uniform sampler2D Texture[8];
varying vec3 position, normal;
void main()
{
vec4 env = texture2D(Texture[0], gl_TexCoord[1].st);
env.a = 0.5;
gl_FragColor = env;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment