Switch to modern glsl
This commit is contained in:
parent
e8d7f7d6e4
commit
e26fef7bd9
|
@ -1,3 +1,5 @@
|
|||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -17,15 +19,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -34,7 +36,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -115,7 +117,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -131,7 +133,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -6,23 +8,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -37,15 +39,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#define _AlphaTest
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -18,15 +20,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -35,7 +37,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -116,7 +118,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -132,7 +134,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#define _AlphaTest
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -7,23 +9,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -38,15 +40,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -19,15 +21,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -36,7 +38,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -117,7 +119,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -133,7 +135,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -8,23 +10,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -39,15 +41,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Instancing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Instancing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -24,15 +26,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -41,7 +43,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -122,7 +124,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -138,7 +140,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -13,23 +15,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -44,15 +46,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Instancing
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Instancing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Billboard
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Billboard
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -19,15 +21,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -36,7 +38,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -117,7 +119,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -133,7 +135,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -8,23 +10,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -39,15 +41,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -23,15 +25,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -40,7 +42,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -121,7 +123,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -137,7 +139,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -12,23 +14,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -43,15 +45,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _NormalMapping
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _NormalMapping
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _Skinning
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -22,15 +24,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -39,7 +41,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -120,7 +122,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -136,7 +138,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#define _Skinning
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -11,23 +13,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -42,15 +44,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Skinning
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _Texturing
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -21,15 +23,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -38,7 +40,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -119,7 +121,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -135,7 +137,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _Instancing
|
||||
#define _Texturing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -10,23 +12,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -41,15 +43,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@ -20,15 +22,15 @@ uniform bool lighting;
|
|||
uniform bool receiveShadow;
|
||||
uniform float roughness;
|
||||
|
||||
varying vec3 position;
|
||||
in vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
in vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
in vec3 normal;
|
||||
in vec4 lPos;
|
||||
in vec4 matColor;
|
||||
in vec3 lightDir;
|
||||
in vec3 eyeDir;
|
||||
|
||||
float shadowSimple(vec4 lPos) {
|
||||
|
||||
|
@ -37,7 +39,7 @@ float shadowSimple(vec4 lPos) {
|
|||
lPosH.x = (lPosH.x + 1.0) / 2.0;
|
||||
lPosH.y = 1.0 - ((-lPosH.y + 1.0) / (2.0));
|
||||
|
||||
vec4 packedZValue = texture2D(shadowMap, lPosH.st);
|
||||
vec4 packedZValue = texture(shadowMap, lPosH.st);
|
||||
|
||||
float distanceFromLight = packedZValue.z;
|
||||
|
||||
|
@ -118,7 +120,7 @@ void main() {
|
|||
|
||||
float dotNL = 0.0;
|
||||
#ifdef _NormalMapping
|
||||
vec3 tn = normalize(texture2D(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
vec3 tn = normalize(texture(normalMap, texCoord).rgb * 2.0 - 1.0);
|
||||
dotNL = clamp(dot(tn, l), 0.0, 1.0);
|
||||
#else
|
||||
dotNL = clamp(dot(n, l), 0.0, 1.0);
|
||||
|
@ -134,7 +136,7 @@ void main() {
|
|||
}
|
||||
|
||||
#ifdef _Texturing
|
||||
vec4 texel = texture2D(stex, texCoord);
|
||||
vec4 texel = texture(stex, texCoord);
|
||||
|
||||
#ifdef _AlphaTest
|
||||
if(texel.a < 0.4)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#define _AlphaTest
|
||||
#define _Instancing
|
||||
#define _VCols
|
||||
#version 450
|
||||
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
@ -9,23 +11,23 @@ precision highp float;
|
|||
#define _Texturing
|
||||
#endif
|
||||
|
||||
attribute vec3 pos;
|
||||
attribute vec3 nor;
|
||||
in vec3 pos;
|
||||
in vec3 nor;
|
||||
#ifdef _Texturing
|
||||
attribute vec2 tex;
|
||||
in vec2 tex;
|
||||
#endif
|
||||
#ifdef _VCols
|
||||
attribute vec4 col;
|
||||
in vec4 col;
|
||||
#endif
|
||||
#ifdef _NormalMapping
|
||||
attribute vec3 tan;
|
||||
in vec3 tan;
|
||||
#endif
|
||||
#ifdef _Skinning
|
||||
attribute vec4 bone;
|
||||
attribute vec4 weight;
|
||||
in vec4 bone;
|
||||
in vec4 weight;
|
||||
#endif
|
||||
#ifdef _Instancing
|
||||
attribute vec3 off;
|
||||
in vec3 off;
|
||||
#endif
|
||||
|
||||
uniform mat4 M;
|
||||
|
@ -40,15 +42,15 @@ uniform vec3 eye;
|
|||
uniform float skinBones[50 * 12];
|
||||
#endif
|
||||
|
||||
varying vec3 position;
|
||||
out vec3 position;
|
||||
#ifdef _Texturing
|
||||
varying vec2 texCoord;
|
||||
out vec2 texCoord;
|
||||
#endif
|
||||
varying vec3 normal;
|
||||
varying vec4 lPos;
|
||||
varying vec4 matColor;
|
||||
varying vec3 lightDir;
|
||||
varying vec3 eyeDir;
|
||||
out vec3 normal;
|
||||
out vec4 lPos;
|
||||
out vec4 matColor;
|
||||
out vec3 lightDir;
|
||||
out vec3 eyeDir;
|
||||
|
||||
#ifdef _NormalMapping
|
||||
mat3 transpose(mat3 m) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue