Explorar el Código

remving w multiply on the tangent itself

pull/5016/head
sir-irk hace 3 meses
padre
commit
ed509193d9
Se han modificado 3 ficheros con 3 adiciones y 3 borrados
  1. +1
    -1
      examples/shaders/resources/shaders/glsl100/pbr.vs
  2. +1
    -1
      examples/shaders/resources/shaders/glsl120/pbr.vs
  3. +1
    -1
      examples/shaders/resources/shaders/glsl330/pbr.vs

+ 1
- 1
examples/shaders/resources/shaders/glsl100/pbr.vs Ver fichero

@ -62,7 +62,7 @@ void main()
fragTexCoord = vertexTexCoord*2.0;
fragNormal = normalize(normalMatrix*vertexNormal);
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz) * vertexTangent.w;
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz);
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
vec3 fragBinormal = normalize(normalMatrix*vertexBinormal);
fragBinormal = cross(fragNormal, fragTangent);

+ 1
- 1
examples/shaders/resources/shaders/glsl120/pbr.vs Ver fichero

@ -62,7 +62,7 @@ void main()
fragTexCoord = vertexTexCoord*2.0;
fragNormal = normalize(normalMatrix*vertexNormal);
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz) * vertexTangent.w;
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz);
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
vec3 fragBinormal = normalize(normalMatrix*vertexBinormal);
fragBinormal = cross(fragNormal, fragTangent);

+ 1
- 1
examples/shaders/resources/shaders/glsl330/pbr.vs Ver fichero

@ -36,7 +36,7 @@ void main()
fragTexCoord = vertexTexCoord*2.0;
fragNormal = normalize(normalMatrix*vertexNormal);
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz) * vertexTangent.w;
vec3 fragTangent = normalize(normalMatrix*vertexTangent.xyz);
fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
vec3 fragBinormal = normalize(normalMatrix*vertexBinormal);
fragBinormal = cross(fragNormal, fragTangent);

Cargando…
Cancelar
Guardar