lightFullbrightShinyF.glsl
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:1k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2.  * @file lightFullbrightShinyF.glsl
  3.  *
  4.  * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
  5.  * $License$
  6.  */
  7. uniform sampler2D diffuseMap;
  8. uniform samplerCube environmentMap;
  9. vec3 fullbrightShinyAtmosTransport(vec3 light);
  10. vec3 fullbrightScaleSoftClip(vec3 light);
  11. void fullbright_shiny_lighting()
  12. {
  13. vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
  14. color.rgb *= gl_Color.rgb;
  15. vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
  16. color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
  17. color.rgb = fullbrightShinyAtmosTransport(color.rgb);
  18. color.rgb = fullbrightScaleSoftClip(color.rgb);
  19. color.a = max(color.a, gl_Color.a);
  20. gl_FragColor = color;
  21. }