Created
May 3, 2015 23:07
-
-
Save eodabash/db7a20b47214a232ef66 to your computer and use it in GitHub Desktop.
Adreno LinkProgram crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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