Oops, fix line endings in new files in previous commit
This commit is contained in:
parent
edb414b34a
commit
736e1d5170
28 changed files with 1957 additions and 1957 deletions
|
@ -1,43 +1,43 @@
|
|||
uniform sampler2D u_DiffuseMap;
|
||||
|
||||
#if defined(USE_LIGHTMAP)
|
||||
uniform sampler2D u_LightMap;
|
||||
|
||||
uniform int u_Texture1Env;
|
||||
#endif
|
||||
|
||||
varying vec2 var_DiffuseTex;
|
||||
|
||||
#if defined(USE_LIGHTMAP)
|
||||
varying vec2 var_LightTex;
|
||||
#endif
|
||||
|
||||
varying vec4 var_Color;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
|
||||
#if defined(USE_LIGHTMAP)
|
||||
vec4 color2 = texture2D(u_LightMap, var_LightTex);
|
||||
#if defined(RGBE_LIGHTMAP)
|
||||
color2.rgb *= exp2(color2.a * 255.0 - 128.0);
|
||||
color2.a = 1.0;
|
||||
#endif
|
||||
|
||||
if (u_Texture1Env == TEXENV_MODULATE)
|
||||
{
|
||||
color *= color2;
|
||||
}
|
||||
else if (u_Texture1Env == TEXENV_ADD)
|
||||
{
|
||||
color += color2;
|
||||
}
|
||||
else if (u_Texture1Env == TEXENV_REPLACE)
|
||||
{
|
||||
color = color2;
|
||||
}
|
||||
#endif
|
||||
|
||||
gl_FragColor = color * var_Color;
|
||||
}
|
||||
uniform sampler2D u_DiffuseMap;
|
||||
|
||||
#if defined(USE_LIGHTMAP)
|
||||
uniform sampler2D u_LightMap;
|
||||
|
||||
uniform int u_Texture1Env;
|
||||
#endif
|
||||
|
||||
varying vec2 var_DiffuseTex;
|
||||
|
||||
#if defined(USE_LIGHTMAP)
|
||||
varying vec2 var_LightTex;
|
||||
#endif
|
||||
|
||||
varying vec4 var_Color;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
|
||||
#if defined(USE_LIGHTMAP)
|
||||
vec4 color2 = texture2D(u_LightMap, var_LightTex);
|
||||
#if defined(RGBE_LIGHTMAP)
|
||||
color2.rgb *= exp2(color2.a * 255.0 - 128.0);
|
||||
color2.a = 1.0;
|
||||
#endif
|
||||
|
||||
if (u_Texture1Env == TEXENV_MODULATE)
|
||||
{
|
||||
color *= color2;
|
||||
}
|
||||
else if (u_Texture1Env == TEXENV_ADD)
|
||||
{
|
||||
color += color2;
|
||||
}
|
||||
else if (u_Texture1Env == TEXENV_REPLACE)
|
||||
{
|
||||
color = color2;
|
||||
}
|
||||
#endif
|
||||
|
||||
gl_FragColor = color * var_Color;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue