Ver a proveniência

Update gbuffer.fs for GLES3

pull/4706/head
MikiZX1 há 1 ano
committed by GitHub
ascendente
cometimento
8e7e9feb64
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: B5690EEEBB952194
1 ficheiros alterados com 6 adições e 4 eliminações
  1. +6
    -4
      examples/shaders/resources/shaders/glsl100/gbuffer.fs

+ 6
- 4
examples/shaders/resources/shaders/glsl100/gbuffer.fs Ver ficheiro

@ -11,8 +11,10 @@ in vec2 fragTexCoord;
in vec3 fragNormal;
in vec4 fragColor;
uniform sampler2D diffuseTexture;
uniform sampler2D specularTexture;
uniform vec4 colDiffuse;
uniform sampler2D texture0;
uniform sampler2D texture1;
void main() {
// store the fragment position vector in the first gbuffer texture
@ -20,7 +22,7 @@ void main() {
// also store the per-fragment normals into the gbuffer
gNormal = vec4(normalize(fragNormal),1.0);
// and the diffuse per-fragment color
gAlbedoSpec.rgb = texture(diffuseTexture, fragTexCoord).rgb;
gAlbedoSpec.rgb = texture(texture0, fragTexCoord).rgb * colDiffuse.rgb;
// store specular intensity in gAlbedoSpec's alpha component
gAlbedoSpec.a = texture(specularTexture, fragTexCoord).r;
gAlbedoSpec.a = pow(texture(texture1, fragTexCoord).r*1.6,16.0);
}

Carregando…
Cancelar
Guardar