Skip to content

Instantly share code, notes, and snippets.

@eodabash
Created May 3, 2015 23:07
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 eodabash/db7a20b47214a232ef66 to your computer and use it in GitHub Desktop.
Save eodabash/db7a20b47214a232ef66 to your computer and use it in GitHub Desktop.
Adreno LinkProgram crash
// vertex shader:
#version 100
precision mediump float;
attribute vec3 Position;
attribute vec3 Normal;
varying vec3 nor;
varying vec3 pos;
void main()
{
nor = Normal;
pos = Position;
gl_Position = vec4(0,0,0,1);
}
// fragment shader:
#version 100
precision mediump float;
struct Material
{
vec4 DiffuseColor;
vec3 SpecularColor;
float SpecularPower;
float SpecularLevel;
float Reflectivity;
float Roughness;
};
struct Camera
{
mat4 ViewProj;
mat4 ViewMatrix;
mat4 ViewInverse;
mat4 Projection;
vec3 EyePos;
float ZFar;
};
uniform Camera _camera;
uniform Material _material;
varying vec3 nor;
varying vec3 pos;
void main()
{
Material material = _material;
vec3 eyePos = _camera.EyePos;
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment