diff --git a/libraries/gpu/src/gpu/TextureTable.slh b/libraries/gpu/src/gpu/TextureTable.slh index bedbff954b..f8cc4b0599 100644 --- a/libraries/gpu/src/gpu/TextureTable.slh +++ b/libraries/gpu/src/gpu/TextureTable.slh @@ -22,7 +22,7 @@ struct GPUTextureTable { #define tableTex(name, slot) sampler2D(name._textures[slot].xy) #define tableTexMinLod(name, slot) float(name._textures[slot].z) -#define tableTexValue(name, slot, uv) tableTexValueLod(tableTex(matTex, albedoMap), tableTexMinLod(matTex, albedoMap), uv) +#define tableTexValue(name, slot, uv) tableTexValueLod(tableTex(matTex, slot), tableTexMinLod(matTex, slot), uv) vec4 tableTexValueLod(sampler2D sampler, float minLod, vec2 uv) { float queryLod = textureQueryLod(sampler, uv).x; diff --git a/libraries/graphics/src/graphics/BufferViewHelpers.cpp b/libraries/graphics/src/graphics/BufferViewHelpers.cpp index 2fd0d90da3..4c57abdfd4 100644 --- a/libraries/graphics/src/graphics/BufferViewHelpers.cpp +++ b/libraries/graphics/src/graphics/BufferViewHelpers.cpp @@ -38,7 +38,7 @@ QMap ATTRIBUTES{ {"position", gpu::Stream::POSITION }, {"normal", gpu::Stream::NORMAL }, {"color", gpu::Stream::COLOR }, - {"tangent", gpu::Stream::TEXCOORD0 }, + {"tangent", gpu::Stream::TANGENT }, {"skin_cluster_index", gpu::Stream::SKIN_CLUSTER_INDEX }, {"skin_cluster_weight", gpu::Stream::SKIN_CLUSTER_WEIGHT }, {"texcoord0", gpu::Stream::TEXCOORD0 }, diff --git a/libraries/graphics/src/graphics/MaterialTextures.slh b/libraries/graphics/src/graphics/MaterialTextures.slh index a01eb5dcd0..555bfa9cf0 100644 --- a/libraries/graphics/src/graphics/MaterialTextures.slh +++ b/libraries/graphics/src/graphics/MaterialTextures.slh @@ -208,7 +208,7 @@ float fetchScatteringMap(vec2 uv) { <@if occlusion@> float <$occlusion$> = (((<$matKey$> & OCCLUSION_MAP_BIT) != 0) ? fetchOcclusionMap(<$texcoord1$>) : 1.0); <@endif@> -<@if lightmapVal@> +<@if lightmap@> vec3 <$lightmap$> = fetchLightmapMap(<$texcoord1$>); <@endif@> <@endfunc@> diff --git a/libraries/render-utils/src/model_lightmap.slf b/libraries/render-utils/src/model_lightmap.slf index ada49fdd08..1be247e3e9 100644 --- a/libraries/render-utils/src/model_lightmap.slf +++ b/libraries/render-utils/src/model_lightmap.slf @@ -42,7 +42,7 @@ void main(void) { packDeferredFragmentLightmap( normalize(_normalWS), - evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedo.a), + evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedoTex.a), albedo, roughness, metallic, diff --git a/libraries/render-utils/src/model_lightmap_fade.slf b/libraries/render-utils/src/model_lightmap_fade.slf index 3819c4d4fa..61568463a7 100644 --- a/libraries/render-utils/src/model_lightmap_fade.slf +++ b/libraries/render-utils/src/model_lightmap_fade.slf @@ -51,7 +51,7 @@ void main(void) { packDeferredFragmentLightmap( normalize(_normalWS), - evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedo.a), + evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedoTex.a), albedo, roughness, metallic, diff --git a/libraries/render-utils/src/model_lightmap_normal_map.slf b/libraries/render-utils/src/model_lightmap_normal_map.slf index adeff463b5..3d961584c2 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map.slf @@ -47,7 +47,7 @@ void main(void) { packDeferredFragmentLightmap( normalize(fragNormal), - evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedo.a), + evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedoTex.a), albedo, roughness, metallic, diff --git a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf index c46308fcf3..f873847474 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf @@ -56,7 +56,7 @@ void main(void) { packDeferredFragmentLightmap( normalize(fragNormal), - evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedo.a), + evalOpaqueFinalAlpha(getMaterialOpacity(mat), albedoTex.a), albedo, roughness, metallic,