mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-11 14:03:23 -05:00
Bytes taken from the shipped applications rather than a normalised copy.
28 lines
818 B
V Shell
28 lines
818 B
V Shell
uniform mat4 uMatrix;
|
|
uniform mat4 uMatrixMV;
|
|
uniform vec3 uColor;
|
|
uniform float uAmbIntensity;
|
|
uniform bool uIsPrimitive;
|
|
attribute vec4 aPosition;
|
|
attribute vec3 aNormal;
|
|
attribute vec3 aColorData;
|
|
attribute vec2 aMaterial;
|
|
varying vec3 vColor;
|
|
varying vec3 vNormal;
|
|
varying float vIsReflect;
|
|
varying float vAmbIntensity;
|
|
|
|
const float COLOR_UNIT = 1.0 / 255.0;
|
|
void main() {
|
|
gl_Position = uMatrix * aPosition;
|
|
vNormal = mat3(uMatrixMV) * aNormal;
|
|
if (uIsPrimitive) {
|
|
vColor = uColor.r < -0.5 ? vec3(aColorData * COLOR_UNIT) : uColor;
|
|
vIsReflect = 1.0;
|
|
vAmbIntensity = uAmbIntensity;
|
|
} else {
|
|
vColor = vec3(aColorData * COLOR_UNIT);
|
|
vIsReflect = aMaterial[1];
|
|
vAmbIntensity = aMaterial[0] > 0.5 ? uAmbIntensity : -1.0;
|
|
}
|
|
} |