KTX Texture compression fixed for opaque textures without an alpha channel.
KTX Texture mipmaps now loading correctly. --HG-- branch : nfb
This commit is contained in:
@@ -25,11 +25,11 @@
|
||||
// or implied, of Kearwood Gilbert.
|
||||
//
|
||||
|
||||
// #extension GL_EXT_shadow_samplers : require
|
||||
//#extension GL_EXT_shadow_samplers : require
|
||||
|
||||
#if ENABLE_RIM_COLOR == 1
|
||||
uniform lowp vec3 rim_color;
|
||||
uniform mediump float rim_power;
|
||||
uniform lowp vec3 rim_color;
|
||||
uniform mediump float rim_power;
|
||||
#endif
|
||||
|
||||
#if FOG_TYPE > 0
|
||||
@@ -116,18 +116,27 @@ uniform mediump float rim_power;
|
||||
uniform sampler2D reflectionTexture;
|
||||
#endif
|
||||
|
||||
#if ENABLE_RIM_COLOR == 1
|
||||
#define NEED_EYEVEC
|
||||
#endif
|
||||
|
||||
#if HAS_REFLECTION_CUBE_MAP == 1
|
||||
uniform lowp vec3 material_reflection;
|
||||
uniform samplerCube reflectionCubeTexture;
|
||||
#if HAS_NORMAL_MAP == 1
|
||||
varying highp mat3 tangent_to_world_matrix;
|
||||
varying mediump vec3 eyeVec;
|
||||
#define NEED_EYEVEC
|
||||
|
||||
uniform highp mat4 model_matrix;
|
||||
#else
|
||||
varying mediump vec3 reflectionVec;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NEED_EYEVEC
|
||||
varying mediump vec3 eyeVec;
|
||||
#endif
|
||||
|
||||
|
||||
#if SHADOW_QUALITY >= 1
|
||||
#ifdef GL_EXT_shadow_samplers
|
||||
@@ -398,4 +407,14 @@ void main()
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLE_RIM_COLOR == 1
|
||||
lowp float rim = 1.0 - clamp(dot(normalize(eyeVec), normal), 0.0, 1.0);
|
||||
|
||||
gl_FragColor += vec4(rim_color, 1.0) * pow(rim, rim_power);
|
||||
#endif
|
||||
|
||||
#if BONE_COUNT > 0
|
||||
gl_FragColor.b = 1.0;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user