mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-09 11:35:21 +01:00
Port most shaders to GLSL ES 3.0 (#16639)
This commit is contained in:
@@ -3,17 +3,12 @@ uniform vec3 dayLight;
|
||||
uniform float animationTimer;
|
||||
uniform lowp vec4 materialColor;
|
||||
|
||||
varying vec3 vNormal;
|
||||
varying vec3 vPosition;
|
||||
varying vec3 worldPosition;
|
||||
varying lowp vec4 varColor;
|
||||
#ifdef GL_ES
|
||||
varying mediump vec2 varTexCoord;
|
||||
varying float varTexLayer;
|
||||
#else
|
||||
centroid varying vec2 varTexCoord;
|
||||
centroid varying float varTexLayer; // actually int
|
||||
#endif
|
||||
VARYING_ vec3 vNormal;
|
||||
VARYING_ vec3 vPosition;
|
||||
VARYING_ vec3 worldPosition;
|
||||
VARYING_ lowp vec4 varColor;
|
||||
CENTROID_ VARYING_ mediump vec2 varTexCoord;
|
||||
CENTROID_ VARYING_ float varTexLayer; // actually int
|
||||
|
||||
#ifdef ENABLE_DYNAMIC_SHADOWS
|
||||
// shadow uniforms
|
||||
@@ -25,18 +20,18 @@ centroid varying float varTexLayer; // actually int
|
||||
uniform float f_timeofday;
|
||||
uniform vec4 CameraPos;
|
||||
|
||||
varying float cosLight;
|
||||
varying float adj_shadow_strength;
|
||||
varying float f_normal_length;
|
||||
varying vec3 shadow_position;
|
||||
varying float perspective_factor;
|
||||
VARYING_ float cosLight;
|
||||
VARYING_ float adj_shadow_strength;
|
||||
VARYING_ float f_normal_length;
|
||||
VARYING_ vec3 shadow_position;
|
||||
VARYING_ float perspective_factor;
|
||||
#endif
|
||||
|
||||
varying highp vec3 eyeVec;
|
||||
varying float nightRatio;
|
||||
VARYING_ highp vec3 eyeVec;
|
||||
VARYING_ float nightRatio;
|
||||
// Color of the light emitted by the light sources.
|
||||
const vec3 artificialLight = vec3(1.04, 1.04, 1.04);
|
||||
varying float vIDiff;
|
||||
VARYING_ float vIDiff;
|
||||
const float e = 2.718281828459;
|
||||
const float BS = 10.0;
|
||||
uniform float xyPerspectiveBias0;
|
||||
|
||||
Reference in New Issue
Block a user