mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix detail mapping on ATI cards.
git-svn-id: https://svn.eduke32.com/eduke32@1309 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c920872753
commit
9152cf3b40
1 changed files with 4 additions and 2 deletions
|
@ -263,20 +263,22 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = {
|
||||||
1 << PR_BIT_DIFFUSE_DETAIL_MAP,
|
1 << PR_BIT_DIFFUSE_DETAIL_MAP,
|
||||||
// vert_def
|
// vert_def
|
||||||
"uniform vec2 detailScale;\n"
|
"uniform vec2 detailScale;\n"
|
||||||
|
"varying vec2 fragDetailScale;\n"
|
||||||
"\n",
|
"\n",
|
||||||
// vert_prog
|
// vert_prog
|
||||||
|
" fragDetailScale = detailScale;\n"
|
||||||
" if (isNormalMapped == 0)\n"
|
" if (isNormalMapped == 0)\n"
|
||||||
" gl_TexCoord[texCoord++] = vec4(detailScale, 1.0, 1.0) * gl_MultiTexCoord0;\n"
|
" gl_TexCoord[texCoord++] = vec4(detailScale, 1.0, 1.0) * gl_MultiTexCoord0;\n"
|
||||||
"\n",
|
"\n",
|
||||||
// frag_def
|
// frag_def
|
||||||
"uniform sampler2D detailMap;\n"
|
"uniform sampler2D detailMap;\n"
|
||||||
"uniform vec2 detailScale;\n"
|
"varying vec2 fragDetailScale;\n"
|
||||||
"\n",
|
"\n",
|
||||||
// frag_prog
|
// frag_prog
|
||||||
" if (isNormalMapped == 0)\n"
|
" if (isNormalMapped == 0)\n"
|
||||||
" result *= texture2D(detailMap, gl_TexCoord[texCoord++].st);\n"
|
" result *= texture2D(detailMap, gl_TexCoord[texCoord++].st);\n"
|
||||||
" else\n"
|
" else\n"
|
||||||
" result *= texture2D(detailMap, commonTexCoord.st * detailScale);\n"
|
" result *= texture2D(detailMap, commonTexCoord.st * fragDetailScale);\n"
|
||||||
" result.rgb *= 2.0;\n"
|
" result.rgb *= 2.0;\n"
|
||||||
"\n",
|
"\n",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue