git-svn-id: svn://db.shs.com.ru/libs@698 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -57,7 +57,7 @@ const char qgl_fragment_head[] =
|
|||||||
" vec4 t = texture(qgl_texture_array[qgl_material[qgl_MaterialIndex].map[type].array_index],\n"
|
" vec4 t = texture(qgl_texture_array[qgl_material[qgl_MaterialIndex].map[type].array_index],\n"
|
||||||
" vec3(coord, qgl_material[qgl_MaterialIndex].map[type].map_index));\n"
|
" vec3(coord, qgl_material[qgl_MaterialIndex].map[type].map_index));\n"
|
||||||
" t += tex_shift;\n"
|
" t += tex_shift;\n"
|
||||||
" t = t * qgl_material[qgl_MaterialIndex].map[type].amount + qgl_material[qgl_MaterialIndex].map[type].offset;\n"
|
" t.rgb = t.rgb * qgl_material[qgl_MaterialIndex].map[type].amount + qgl_material[qgl_MaterialIndex].map[type].offset;\n"
|
||||||
" return t;\n"
|
" return t;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"#define qgl_FragColor qgl_FragData[0]\n"
|
"#define qgl_FragColor qgl_FragData[0]\n"
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ const float _pe = 2.4e-7;
|
|||||||
void main(void) {
|
void main(void) {
|
||||||
vec2 tc = qgl_FragTexture.xy;
|
vec2 tc = qgl_FragTexture.xy;
|
||||||
|
|
||||||
vec4 diffuse = qgl_materialTexture(QGL_MAP_DIFFUSE, tc, vec4(0)) * qgl_material[qgl_MaterialIndex].color_diffuse * object_color;
|
vec4 diffuse = qgl_materialTexture(QGL_MAP_DIFFUSE, tc, vec4(0)) * object_color;
|
||||||
|
diffuse.rgb *= qgl_material[qgl_MaterialIndex].color_diffuse.rgb;
|
||||||
diffuse.a *= (1.f - qgl_material[qgl_MaterialIndex].transparency);
|
diffuse.a *= (1.f - qgl_material[qgl_MaterialIndex].transparency);
|
||||||
|
|
||||||
vec3 normal, dn;
|
vec3 normal, dn;
|
||||||
|
|||||||
Reference in New Issue
Block a user