1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0027256: Visualization, Path Tracing - add support of alpha-channel of texture

Regenerate resource files.
This commit is contained in:
dbp
2016-11-17 18:51:38 +03:00
committed by apn
parent 383c6c9fb2
commit f411f94fac
9 changed files with 49 additions and 15 deletions

View File

@@ -972,11 +972,14 @@ static const char Shaders_RaytraceBase_fs[] =
" aTexCoord.st = vec2 (dot (aTrsfRow1, aTexCoord),\n"
" dot (aTrsfRow2, aTexCoord));\n"
"\n"
" vec3 aTexColor = textureLod (\n"
" sampler2D (uTextureSamplers[int(aDiffuse.w)]), aTexCoord.st, 0.f).rgb;\n"
" vec4 aTexColor = textureLod (\n"
" sampler2D (uTextureSamplers[int(aDiffuse.w)]), aTexCoord.st, 0.f);\n"
"\n"
" aDiffuse.rgb *= aTexColor;\n"
" aAmbient.rgb *= aTexColor;\n"
" aDiffuse.rgb *= aTexColor.rgb;\n"
" aAmbient.rgb *= aTexColor.rgb;\n"
"\n"
" // keep refractive index untouched (Z component)\n"
" aOpacity.xy = vec2 (aTexColor.w * aOpacity.x, 1.0f - aTexColor.w * aOpacity.x);\n"
" }\n"
"#endif\n"
"\n"