forked from id-Software/Quake-III-Arena
-
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into game/eliteforce
- Loading branch information
Showing
31 changed files
with
281 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,12 @@ | ||
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(RGBM_LIGHTMAP) | ||
color2.rgb *= color2.a; | ||
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; | ||
} | ||
|
||
//color = color * (u_Texture1Env.xxxx + color2 * u_Texture1Env.z) + color2 * u_Texture1Env.y; | ||
#endif | ||
|
||
gl_FragColor = color * var_Color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.