Merge pull request #188 from aws-lumberyard-dev/Atom/santorac/CavityMaps-ATOM-14040
ATOM-14040 Add Support for Cavity Maps Replace the "Ambient Occlusion" property groups with "Occlusion" property groups that contain settings for "Diffuse AO" and "Specular Cavity" maps. Pre-multiplied diffuseAmbientOcclusion into the m_albedo.rgb gbuffer, making room for specularOcclusion to be stored in m_albedo.a Added new render pipeline connections to connect the albedo gbuffer to the fullscreen reflection passes. Also fixed ATOM-15297 "StandardPBR_ForwardPass.shadervariantlist Job Fails With Obscure Error"
This commit is contained in:
@@ -405,12 +405,20 @@ namespace AZ
|
||||
void ShaderVariantAssetBuilder::ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const
|
||||
{
|
||||
const auto& jobParameters = request.m_jobDescription.m_jobParameters;
|
||||
|
||||
if (jobParameters.find(ShaderVariantLoadErrorParam) != jobParameters.end())
|
||||
{
|
||||
AZ_Error(ShaderVariantAssetBuilderName, false, "Error during CreateJobs: %s", jobParameters.at(ShaderVariantLoadErrorParam).c_str());
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed;
|
||||
return;
|
||||
}
|
||||
|
||||
if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end())
|
||||
{
|
||||
AZ_TracePrintf(ShaderVariantAssetBuilderName, "Doing nothing on behalf of [%s] because it's been overridden by game project.", jobParameters.at(ShaderVariantLoadErrorParam).c_str());
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success;
|
||||
return;
|
||||
}
|
||||
|
||||
if (jobParameters.find(ShouldExitEarlyFromProcessJobParam) != jobParameters.end())
|
||||
{
|
||||
|
||||
-32
@@ -401,38 +401,6 @@
|
||||
"step": 0.1
|
||||
}
|
||||
],
|
||||
"ambientOcclusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMap"
|
||||
}
|
||||
}
|
||||
],
|
||||
"emissive": [
|
||||
{
|
||||
"id": "enable",
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
"description": "Properties for configuring UV transforms."
|
||||
},
|
||||
{
|
||||
"id": "ambientOcclusion",
|
||||
"displayName": "Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "occlusion",
|
||||
"displayName": "Occlusion",
|
||||
"description": "Properties for baked textures that represent geometric occlusion of light."
|
||||
},
|
||||
{
|
||||
"id": "emissive",
|
||||
@@ -780,47 +780,89 @@
|
||||
"step": 0.1
|
||||
}
|
||||
],
|
||||
"ambientOcclusion": [
|
||||
"occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMap"
|
||||
"id": "m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumValues": [ "UV0", "UV1" ],
|
||||
"defaultValue": "UV0",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1641,17 +1683,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
// See the comment above for details.
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "ambientOcclusion.textureMap",
|
||||
"dependentProperties": ["ambientOcclusion.textureMapUv"],
|
||||
"useTextureProperty": "ambientOcclusion.enable",
|
||||
"shaderTags": [
|
||||
"ForwardPass",
|
||||
"ForwardPass_EDS"
|
||||
],
|
||||
"shaderOption": "o_ambientOcclusion_useTexture"
|
||||
"textureProperty": "occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["occlusion.diffuseTextureMapUv", "occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "occlusion.specularTextureMap",
|
||||
"useTextureProperty": "occlusion.specularUseTexture",
|
||||
"dependentProperties": ["occlusion.specularTextureMapUv", "occlusion.specularFactor"],
|
||||
"shaderOption": "o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1712,31 +1758,6 @@
|
||||
"shaderOption": "o_transmission_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
// Controls visibility for properties in the editor.
|
||||
// @param actions - a list of actions that are executed in order. visibility will be set when triggerProperty hits the triggerValue.
|
||||
// @param affectedProperties - the properties that are affected by actions.
|
||||
"type": "UpdatePropertyVisibility",
|
||||
"args": {
|
||||
"actions": [
|
||||
{
|
||||
"triggerProperty": "ambientOcclusion.enable",
|
||||
"triggerValue": true,
|
||||
"visibility": "Enabled"
|
||||
},
|
||||
{
|
||||
"triggerProperty": "ambientOcclusion.enable",
|
||||
"triggerValue": false,
|
||||
"visibility": "Disabled"
|
||||
}
|
||||
],
|
||||
"affectedProperties": [
|
||||
"ambientOcclusion.factor",
|
||||
"ambientOcclusion.textureMap",
|
||||
"ambientOcclusion.textureMapUv"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
// Controls visibility for properties in the editor.
|
||||
// @param actions - a list of actions that are executed in order. visibility will be set when triggerProperty hits the triggerValue.
|
||||
|
||||
@@ -213,9 +213,9 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
float3 emissive = GetEmissiveInput(MaterialSrg::m_emissiveMap, MaterialSrg::m_sampler, emissiveUv, MaterialSrg::m_emissiveIntensity, MaterialSrg::m_emissiveColor.rgb, o_emissiveEnabled, o_emissive_useTexture);
|
||||
|
||||
// ------- Occlusion -------
|
||||
|
||||
float2 occlusionUv = IN.m_uv[MaterialSrg::m_ambientOcclusionMapUvIndex];
|
||||
float occlusion = GetOcclusionInput(MaterialSrg::m_ambientOcclusionMap, MaterialSrg::m_sampler, occlusionUv, MaterialSrg::m_ambientOcclusionFactor, o_ambientOcclusion_useTexture);
|
||||
|
||||
float diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_diffuseOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_diffuseOcclusionMapUvIndex], MaterialSrg::m_diffuseOcclusionFactor, o_diffuseOcclusion_useTexture);
|
||||
float specularOcclusion = GetOcclusionInput(MaterialSrg::m_specularOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_specularOcclusionMapUvIndex], MaterialSrg::m_specularOcclusionFactor, o_specularOcclusion_useTexture);
|
||||
|
||||
// ------- Subsurface -------
|
||||
|
||||
@@ -252,7 +252,7 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN,
|
||||
baseColor, metallic, roughness, specularF0Factor,
|
||||
normal, IN.m_tangent, IN.m_bitangent, anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
emissive, diffuseAmbientOcclusion, specularOcclusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
|
||||
// ------- Opacity -------
|
||||
|
||||
|
||||
@@ -12,19 +12,23 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// This file provides utilities for common handling of inputs for ambient occlusion maps for PBR materials.
|
||||
// This file provides utilities for common handling of inputs for baked occlusion maps for PBR materials.
|
||||
|
||||
// These macros can be used to declare common shader inputs for this feature.
|
||||
// Use the COMMON_SRG_INPUTS_* macro in your material SRG definition, and use the COMMON_OPTIONS_* macro at the global scope in your shader. Then you can pass these variables to the Get*Input() function below.
|
||||
// You can optionally provide a prefix for the set of inputs which corresponds to a prefix string supplied by the .materialtype file. This is common for multi-layered material types.
|
||||
|
||||
#define COMMON_SRG_INPUTS_OCCLUSION(prefix) \
|
||||
float prefix##m_ambientOcclusionFactor; \
|
||||
Texture2D prefix##m_ambientOcclusionMap; \
|
||||
uint prefix##m_ambientOcclusionMapUvIndex;
|
||||
float prefix##m_diffuseOcclusionFactor; \
|
||||
Texture2D prefix##m_diffuseOcclusionMap; \
|
||||
uint prefix##m_diffuseOcclusionMapUvIndex; \
|
||||
float prefix##m_specularOcclusionFactor; \
|
||||
Texture2D prefix##m_specularOcclusionMap; \
|
||||
uint prefix##m_specularOcclusionMapUvIndex;
|
||||
|
||||
#define COMMON_OPTIONS_OCCLUSION(prefix) \
|
||||
option bool prefix##o_ambientOcclusion_useTexture;
|
||||
option bool prefix##o_diffuseOcclusion_useTexture; \
|
||||
option bool prefix##o_specularOcclusion_useTexture;
|
||||
|
||||
float GetOcclusionInput(Texture2D map, sampler mapSampler, float2 uv, float factor, bool useTexture)
|
||||
{
|
||||
|
||||
@@ -272,6 +272,11 @@ PbrLightingOutput SkinPS_Common(VSOutput IN)
|
||||
float roughness = GetRoughnessInput(MaterialSrg::m_roughnessMap, MaterialSrg::m_sampler, roughnessUv, MaterialSrg::m_roughnessFactor,
|
||||
MaterialSrg::m_roughnessLowerBound, MaterialSrg::m_roughnessUpperBound, o_roughness_useTexture);
|
||||
|
||||
// ------- Occlusion -------
|
||||
|
||||
float diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_diffuseOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_diffuseOcclusionMapUvIndex], MaterialSrg::m_diffuseOcclusionFactor, o_diffuseOcclusion_useTexture);
|
||||
float specularOcclusion = GetOcclusionInput(MaterialSrg::m_specularOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_specularOcclusionMapUvIndex], MaterialSrg::m_specularOcclusionFactor, o_specularOcclusion_useTexture);
|
||||
|
||||
// ------- Specular -------
|
||||
|
||||
float2 specularUv = IN.m_uv[MaterialSrg::m_specularF0MapUvIndex];
|
||||
@@ -300,7 +305,6 @@ PbrLightingOutput SkinPS_Common(VSOutput IN)
|
||||
|
||||
float metallic = 0;
|
||||
float3 emissive = float3(0,0,0);
|
||||
float occlusion = 1;
|
||||
float2 anisotropy = float2(0,0);
|
||||
float clearCoatFactor = 0.0;
|
||||
float clearCoatRoughness = 0.0;
|
||||
@@ -309,7 +313,7 @@ PbrLightingOutput SkinPS_Common(VSOutput IN)
|
||||
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN, baseColor, metallic, roughness, specularF0Factor,
|
||||
normalWS, tangents[0], bitangents[0], anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
emissive, diffuseAmbientOcclusion, specularOcclusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
|
||||
// ------- Preparing output -------
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
"description": "Properties related to configuring surface normal."
|
||||
},
|
||||
{
|
||||
"id": "ambientOcclusion",
|
||||
"displayName": "Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "occlusion",
|
||||
"displayName": "Occlusion",
|
||||
"description": "Properties for baked textures that represent geometric occlusion of light."
|
||||
},
|
||||
{
|
||||
"id": "subsurfaceScattering",
|
||||
@@ -383,48 +383,89 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"ambientOcclusion": [
|
||||
"occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMap"
|
||||
"id": "m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Unwrapped",
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionFactor"
|
||||
"id": "m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1021,9 +1062,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Lua",
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"file": "StandardPBR_AoState.lua"
|
||||
"textureProperty": "occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["occlusion.diffuseTextureMapUv", "occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "occlusion.specularTextureMap",
|
||||
"useTextureProperty": "occlusion.specularUseTexture",
|
||||
"dependentProperties": ["occlusion.specularTextureMapUv", "occlusion.specularFactor"],
|
||||
"shaderOption": "o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+240
-87
@@ -73,9 +73,9 @@
|
||||
"description": "Properties for configuring gloss clear coat"
|
||||
},
|
||||
{
|
||||
"id": "layer1_ambientOcclusion",
|
||||
"displayName": "Layer 1: Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "layer1_occlusion",
|
||||
"displayName": "Layer 1: Occlusion",
|
||||
"description": "Properties for baked textures for diffuse and specular occlusion of ambient lighting."
|
||||
},
|
||||
{
|
||||
"id": "layer1_emissive",
|
||||
@@ -126,9 +126,9 @@
|
||||
"description": "Properties for configuring gloss clear coat"
|
||||
},
|
||||
{
|
||||
"id": "layer2_ambientOcclusion",
|
||||
"displayName": "Layer 2: Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "layer2_occlusion",
|
||||
"displayName": "Layer 2: Occlusion",
|
||||
"description": "Properties for baked textures for diffuse and specular occlusion of ambient lighting."
|
||||
},
|
||||
{
|
||||
"id": "layer2_emissive",
|
||||
@@ -179,9 +179,9 @@
|
||||
"description": "Properties for configuring gloss clear coat"
|
||||
},
|
||||
{
|
||||
"id": "layer3_ambientOcclusion",
|
||||
"displayName": "Layer 3: Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "layer3_occlusion",
|
||||
"displayName": "Layer 3: Occlusion",
|
||||
"description": "Properties for baked textures for diffuse and specular occlusion of ambient lighting."
|
||||
},
|
||||
{
|
||||
"id": "layer3_emissive",
|
||||
@@ -1169,47 +1169,89 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"layer1_ambientOcclusion": [
|
||||
"layer1_occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_ambientOcclusionMap"
|
||||
"id": "m_layer1_m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_layer1_m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_ambientOcclusionFactor"
|
||||
"id": "m_layer1_m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer1_m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1820,47 +1862,89 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"layer2_ambientOcclusion": [
|
||||
"layer2_occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_ambientOcclusionMap"
|
||||
"id": "m_layer2_m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_layer2_m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_ambientOcclusionFactor"
|
||||
"id": "m_layer2_m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer2_m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -2471,47 +2555,89 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"layer3_ambientOcclusion": [
|
||||
"layer3_occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_ambientOcclusionMap"
|
||||
"id": "m_layer3_m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_layer3_m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_ambientOcclusionFactor"
|
||||
"id": "m_layer3_m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_layer3_m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -2894,12 +3020,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Lua",
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"file": "StandardPBR_AoState.lua",
|
||||
"propertyNamePrefix": "layer1_",
|
||||
"srgNamePrefix": "m_layer1_",
|
||||
"optionsNamePrefix": "o_layer1_"
|
||||
"textureProperty": "layer1_occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "layer1_occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["layer1_occlusion.diffuseTextureMapUv", "layer1_occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_layer1_o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "layer1_occlusion.specularTextureMap",
|
||||
"useTextureProperty": "layer1_occlusion.specularUseTexture",
|
||||
"dependentProperties": ["layer1_occlusion.specularTextureMapUv", "layer1_occlusion.specularFactor"],
|
||||
"shaderOption": "o_layer1_o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -3022,12 +3157,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Lua",
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"file": "StandardPBR_AoState.lua",
|
||||
"propertyNamePrefix": "layer2_",
|
||||
"srgNamePrefix": "m_layer2_",
|
||||
"optionsNamePrefix": "o_layer2_"
|
||||
"textureProperty": "layer2_occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "layer2_occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["layer2_occlusion.diffuseTextureMapUv", "layer2_occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_layer2_o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "layer2_occlusion.specularTextureMap",
|
||||
"useTextureProperty": "layer2_occlusion.specularUseTexture",
|
||||
"dependentProperties": ["layer2_occlusion.specularTextureMapUv", "layer2_occlusion.specularFactor"],
|
||||
"shaderOption": "o_layer2_o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -3150,12 +3294,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Lua",
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"file": "StandardPBR_AoState.lua",
|
||||
"propertyNamePrefix": "layer3_",
|
||||
"srgNamePrefix": "m_layer3_",
|
||||
"optionsNamePrefix": "o_layer3_"
|
||||
"textureProperty": "layer3_occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "layer3_occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["layer3_occlusion.diffuseTextureMapUv", "layer3_occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_layer3_o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "layer3_occlusion.specularTextureMap",
|
||||
"useTextureProperty": "layer3_occlusion.specularUseTexture",
|
||||
"dependentProperties": ["layer3_occlusion.specularTextureMapUv", "layer3_occlusion.specularFactor"],
|
||||
"shaderOption": "o_layer3_o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+10
-5
@@ -268,10 +268,15 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
|
||||
// ------- Occlusion -------
|
||||
|
||||
float layer1_occlusion = GetOcclusionInput(MaterialSrg::m_layer1_m_ambientOcclusionMap, MaterialSrg::m_sampler, uvLayer1[MaterialSrg::m_layer1_m_ambientOcclusionMapUvIndex], MaterialSrg::m_layer1_m_ambientOcclusionFactor, o_layer1_o_ambientOcclusion_useTexture);
|
||||
float layer2_occlusion = GetOcclusionInput(MaterialSrg::m_layer2_m_ambientOcclusionMap, MaterialSrg::m_sampler, uvLayer2[MaterialSrg::m_layer2_m_ambientOcclusionMapUvIndex], MaterialSrg::m_layer2_m_ambientOcclusionFactor, o_layer2_o_ambientOcclusion_useTexture);
|
||||
float layer3_occlusion = GetOcclusionInput(MaterialSrg::m_layer3_m_ambientOcclusionMap, MaterialSrg::m_sampler, uvLayer3[MaterialSrg::m_layer3_m_ambientOcclusionMapUvIndex], MaterialSrg::m_layer3_m_ambientOcclusionFactor, o_layer3_o_ambientOcclusion_useTexture);
|
||||
float occlusion = BlendLayers(layer1_occlusion, layer2_occlusion, layer3_occlusion, blendMaskValues);
|
||||
float layer1_diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_layer1_m_diffuseOcclusionMap, MaterialSrg::m_sampler, uvLayer1[MaterialSrg::m_layer1_m_diffuseOcclusionMapUvIndex], MaterialSrg::m_layer1_m_diffuseOcclusionFactor, o_layer1_o_diffuseOcclusion_useTexture);
|
||||
float layer2_diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_layer2_m_diffuseOcclusionMap, MaterialSrg::m_sampler, uvLayer2[MaterialSrg::m_layer2_m_diffuseOcclusionMapUvIndex], MaterialSrg::m_layer2_m_diffuseOcclusionFactor, o_layer2_o_diffuseOcclusion_useTexture);
|
||||
float layer3_diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_layer3_m_diffuseOcclusionMap, MaterialSrg::m_sampler, uvLayer3[MaterialSrg::m_layer3_m_diffuseOcclusionMapUvIndex], MaterialSrg::m_layer3_m_diffuseOcclusionFactor, o_layer3_o_diffuseOcclusion_useTexture);
|
||||
float diffuseAmbientOcclusion = BlendLayers(layer1_diffuseAmbientOcclusion, layer2_diffuseAmbientOcclusion, layer3_diffuseAmbientOcclusion, blendMaskValues);
|
||||
|
||||
float layer1_specularOcclusion = GetOcclusionInput(MaterialSrg::m_layer1_m_specularOcclusionMap, MaterialSrg::m_sampler, uvLayer1[MaterialSrg::m_layer1_m_specularOcclusionMapUvIndex], MaterialSrg::m_layer1_m_specularOcclusionFactor, o_layer1_o_specularOcclusion_useTexture);
|
||||
float layer2_specularOcclusion = GetOcclusionInput(MaterialSrg::m_layer2_m_specularOcclusionMap, MaterialSrg::m_sampler, uvLayer2[MaterialSrg::m_layer2_m_specularOcclusionMapUvIndex], MaterialSrg::m_layer2_m_specularOcclusionFactor, o_layer2_o_specularOcclusion_useTexture);
|
||||
float layer3_specularOcclusion = GetOcclusionInput(MaterialSrg::m_layer3_m_specularOcclusionMap, MaterialSrg::m_sampler, uvLayer3[MaterialSrg::m_layer3_m_specularOcclusionMapUvIndex], MaterialSrg::m_layer3_m_specularOcclusionFactor, o_layer3_o_specularOcclusion_useTexture);
|
||||
float specularOcclusion = BlendLayers(layer1_specularOcclusion, layer2_specularOcclusion, layer3_specularOcclusion, blendMaskValues);
|
||||
|
||||
// ------- Subsurface -------
|
||||
|
||||
@@ -350,7 +355,7 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN,
|
||||
baseColor, metallic, roughness, specularF0Factor,
|
||||
normalWS, tangents[0], bitangents[0], anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
emissive, diffuseAmbientOcclusion, specularOcclusion, transmissionTintThickness, MaterialSrg::m_transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, o_opacity_mode);
|
||||
|
||||
// ------- Opacity -------
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
"description": "Properties for configuring UV transforms."
|
||||
},
|
||||
{
|
||||
"id": "ambientOcclusion",
|
||||
"displayName": "Ambient Occlusion",
|
||||
"description": "Properties for baked AO texture."
|
||||
"id": "occlusion",
|
||||
"displayName": "Occlusion",
|
||||
"description": "Properties for baked textures that represent geometric occlusion of light."
|
||||
},
|
||||
{
|
||||
"id": "emissive",
|
||||
@@ -724,47 +724,89 @@
|
||||
"step": 0.1
|
||||
}
|
||||
],
|
||||
"ambientOcclusion": [
|
||||
"occlusion": [
|
||||
{
|
||||
"id": "enable",
|
||||
"displayName": "Enable",
|
||||
"description": "Whether to enable the ambient occlusion feature.",
|
||||
"type": "Bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "textureMap",
|
||||
"displayName": "Texture Map",
|
||||
"description": "Texture map for defining ambient occlusion area.",
|
||||
"id": "diffuseTextureMap",
|
||||
"displayName": "Diffuse AO",
|
||||
"description": "Texture map for defining occlusion area for diffuse ambient lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMap"
|
||||
"id": "m_diffuseOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "textureMapUv",
|
||||
"displayName": "UV",
|
||||
"description": "Ambient occlusion texture map UV set",
|
||||
"id": "diffuseUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Diffuse AO texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "diffuseTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Diffuse AO texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionMapUvIndex"
|
||||
"id": "m_diffuseOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "factor",
|
||||
"displayName": "Factor",
|
||||
"description": "Strength factor for scaling the values",
|
||||
"id": "diffuseFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Diffuse AO",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"max": 2.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_ambientOcclusionFactor"
|
||||
"id": "m_diffuseOcclusionFactor"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMap",
|
||||
"displayName": "Specular Cavity",
|
||||
"description": "Texture map for defining occlusion area for specular lighting.",
|
||||
"type": "Image",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMap"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularUseTexture",
|
||||
"displayName": " Use Texture",
|
||||
"description": "Whether to use the Specular Cavity texture map.",
|
||||
"type": "Bool",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"id": "specularTextureMapUv",
|
||||
"displayName": " UV",
|
||||
"description": "Specular Cavity texture map UV set.",
|
||||
"type": "Enum",
|
||||
"enumIsUv": true,
|
||||
"defaultValue": "Tiled",
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionMapUvIndex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "specularFactor",
|
||||
"displayName": " Factor",
|
||||
"description": "Strength factor for scaling the values of Specular Cavity",
|
||||
"type": "Float",
|
||||
"defaultValue": 1.0,
|
||||
"min": 0.0,
|
||||
"softMax": 2.0,
|
||||
"connection": {
|
||||
"type": "ShaderInput",
|
||||
"id": "m_specularOcclusionFactor"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -1270,9 +1312,21 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Lua",
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"file": "StandardPBR_AoState.lua"
|
||||
"textureProperty": "occlusion.diffuseTextureMap",
|
||||
"useTextureProperty": "occlusion.diffuseUseTexture",
|
||||
"dependentProperties": ["occlusion.diffuseTextureMapUv", "occlusion.diffuseFactor"],
|
||||
"shaderOption": "o_diffuseOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UseTexture",
|
||||
"args": {
|
||||
"textureProperty": "occlusion.specularTextureMap",
|
||||
"useTextureProperty": "occlusion.specularUseTexture",
|
||||
"dependentProperties": ["occlusion.specularTextureMapUv", "occlusion.specularFactor"],
|
||||
"shaderOption": "o_specularOcclusion_useTexture"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
--------------------------------------------------------------------------------------
|
||||
--
|
||||
-- All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
-- its licensors.
|
||||
--
|
||||
-- For complete copyright and license terms please see the LICENSE at the root of this
|
||||
-- distribution (the "License"). All use of this software is governed by the License,
|
||||
-- or, if provided, by the license below or the license accompanying this file. Do not
|
||||
-- remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
--
|
||||
--
|
||||
----------------------------------------------------------------------------------------------------
|
||||
|
||||
function GetMaterialPropertyDependencies()
|
||||
return {"ambientOcclusion.enable", "ambientOcclusion.textureMap"}
|
||||
end
|
||||
|
||||
function GetShaderOptionDependencies()
|
||||
return {"o_ambientOcclusion_useTexture"}
|
||||
end
|
||||
|
||||
function Process(context)
|
||||
local enableAo = context:GetMaterialPropertyValue_bool("ambientOcclusion.enable")
|
||||
local textureMap = context:GetMaterialPropertyValue_image("ambientOcclusion.textureMap")
|
||||
|
||||
context:SetShaderOptionValue_bool("o_ambientOcclusion_useTexture", enableAo and textureMap ~= nil)
|
||||
end
|
||||
|
||||
function ProcessEditor(context)
|
||||
local enableAo = context:GetMaterialPropertyValue_bool("ambientOcclusion.enable")
|
||||
|
||||
if(not enableAo) then
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.factor", MaterialPropertyVisibility_Hidden)
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.textureMap", MaterialPropertyVisibility_Hidden)
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.textureMapUv", MaterialPropertyVisibility_Hidden)
|
||||
else
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.textureMap", MaterialPropertyVisibility_Enabled)
|
||||
local textureMap = context:GetMaterialPropertyValue_image("ambientOcclusion.textureMap")
|
||||
if(textureMap == nil) then
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.factor", MaterialPropertyVisibility_Hidden)
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.textureMapUv", MaterialPropertyVisibility_Hidden)
|
||||
else
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.factor", MaterialPropertyVisibility_Enabled)
|
||||
context:SetMaterialPropertyVisibility("ambientOcclusion.textureMapUv", MaterialPropertyVisibility_Enabled)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -212,9 +212,9 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
lightingData.emissiveLighting = GetEmissiveInput(MaterialSrg::m_emissiveMap, MaterialSrg::m_sampler, emissiveUv, MaterialSrg::m_emissiveIntensity, MaterialSrg::m_emissiveColor.rgb, o_emissiveEnabled, o_emissive_useTexture);
|
||||
|
||||
// ------- Occlusion -------
|
||||
|
||||
float2 occlusionUv = IN.m_uv[MaterialSrg::m_ambientOcclusionMapUvIndex];
|
||||
lightingData.occlusion = GetOcclusionInput(MaterialSrg::m_ambientOcclusionMap, MaterialSrg::m_sampler, occlusionUv, MaterialSrg::m_ambientOcclusionFactor, o_ambientOcclusion_useTexture);
|
||||
|
||||
lightingData.diffuseAmbientOcclusion = GetOcclusionInput(MaterialSrg::m_diffuseOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_diffuseOcclusionMapUvIndex], MaterialSrg::m_diffuseOcclusionFactor, o_diffuseOcclusion_useTexture);
|
||||
lightingData.specularOcclusion = GetOcclusionInput(MaterialSrg::m_specularOcclusionMap, MaterialSrg::m_sampler, IN.m_uv[MaterialSrg::m_specularOcclusionMapUvIndex], MaterialSrg::m_specularOcclusionFactor, o_specularOcclusion_useTexture);
|
||||
|
||||
// ------- Clearcoat -------
|
||||
|
||||
|
||||
@@ -180,6 +180,13 @@
|
||||
"Attachment": "SpecularF0Output"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "AlbedoInput",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ForwardMSAAPass",
|
||||
"Attachment": "AlbedoOutput"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "ClearCoatNormalInput",
|
||||
"AttachmentRef": {
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
"SlotType": "Input",
|
||||
"ScopeAttachmentUsage": "Shader"
|
||||
},
|
||||
{
|
||||
// This is needed for the alpha channel which has specularOcclusion factor
|
||||
"Name": "AlbedoInput",
|
||||
"SlotType": "Input",
|
||||
"ScopeAttachmentUsage": "Shader"
|
||||
},
|
||||
{
|
||||
"Name": "ClearCoatNormalInput",
|
||||
"SlotType": "Input",
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"SlotType": "Input",
|
||||
"ScopeAttachmentUsage": "Shader"
|
||||
},
|
||||
{
|
||||
"Name": "AlbedoInput",
|
||||
"SlotType": "Input",
|
||||
"ScopeAttachmentUsage": "Shader"
|
||||
},
|
||||
{
|
||||
"Name": "ClearCoatNormalInput",
|
||||
"SlotType": "Input",
|
||||
@@ -127,6 +132,13 @@
|
||||
"Attachment": "SpecularF0Input"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "AlbedoInput",
|
||||
"AttachmentRef": {
|
||||
"Pass": "Parent",
|
||||
"Attachment": "AlbedoInput"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "ClearCoatNormalInput",
|
||||
"AttachmentRef": {
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
|
||||
struct ForwardPassOutput
|
||||
{
|
||||
// m_diffuseColor.a should be encoded with subsurface scattering's strength factor and quality factor if enabled
|
||||
float4 m_diffuseColor : SV_Target0;
|
||||
float4 m_specularColor : SV_Target1;
|
||||
float4 m_albedo : SV_Target2;
|
||||
float4 m_specularF0 : SV_Target3;
|
||||
float4 m_normal : SV_Target4;
|
||||
float4 m_clearCoatNormal : SV_Target5;
|
||||
float4 m_diffuseColor : SV_Target0; //!< RGB = Diffuse Lighting, A = Blend Alpha (for blended surfaces) OR A = special encoding of surfaceScatteringFactor, m_subsurfaceScatteringQuality, o_enableSubsurfaceScattering
|
||||
float4 m_specularColor : SV_Target1; //!< RGB = Specular Lighting, A = Unused
|
||||
float4 m_albedo : SV_Target2; //!< RGB = Surface albedo pre-multiplied by other factors that will be multiplied later by diffuse GI, A = specularOcclusion
|
||||
float4 m_specularF0 : SV_Target3; //!< RGB = Specular F0, A = roughness
|
||||
float4 m_normal : SV_Target4; //!< RGB10 = EncodeNormalSignedOctahedron(worldNormal), A2 = multiScatterCompensationEnabled
|
||||
float4 m_clearCoatNormal : SV_Target5; //!< RG = EncodeNormalSphereMap(clearCoatNormal), B = clearCoatFactor, A = clearCoatRoughness
|
||||
float3 m_scatterDistance : SV_Target6;
|
||||
};
|
||||
|
||||
struct ForwardPassOutputWithDepth
|
||||
{
|
||||
// m_diffuseColor.a should be encoded with subsurface scattering's strength factor and quality factor if enabled
|
||||
// See above for descriptions of special encodings
|
||||
|
||||
float4 m_diffuseColor : SV_Target0;
|
||||
float4 m_specularColor : SV_Target1;
|
||||
float4 m_albedo : SV_Target2;
|
||||
|
||||
+6
-2
@@ -47,8 +47,10 @@ class LightingData
|
||||
// Normal . View
|
||||
float NdotV;
|
||||
|
||||
// Occlusion factors
|
||||
// 0 = dark, 1 = light
|
||||
float occlusion;
|
||||
float diffuseAmbientOcclusion;
|
||||
float specularOcclusion;
|
||||
|
||||
void Init(float3 positionWS, float3 normal, float roughnessLinear);
|
||||
void CalculateMultiscatterCompensation(float3 specularF0, bool enabled);
|
||||
@@ -62,7 +64,8 @@ void LightingData::Init(float3 positionWS, float3 normal, float roughnessLinear)
|
||||
translucentBackLighting = 0;
|
||||
multiScatterCompensation = 1.0f;
|
||||
emissiveLighting = float3(0.0f, 0.0f, 0.0f);
|
||||
occlusion = 1.0f;
|
||||
diffuseAmbientOcclusion = 1.0f;
|
||||
specularOcclusion = 1.0f;
|
||||
|
||||
dirToCamera = normalize(ViewSrg::m_worldPosition.xyz - positionWS);
|
||||
|
||||
@@ -79,6 +82,7 @@ void LightingData::CalculateMultiscatterCompensation(float3 specularF0, bool ena
|
||||
|
||||
void LightingData::FinalizeLighting(float3 transmissionTint)
|
||||
{
|
||||
specularLighting *= specularOcclusion;
|
||||
specularLighting += emissiveLighting;
|
||||
|
||||
// Transmitted light
|
||||
|
||||
+2
-5
@@ -45,8 +45,8 @@ PbrLightingOutput GetPbrLightingOutput(Surface surface, LightingData lightingDat
|
||||
|
||||
// albedo, specularF0, roughness, and normals for later passes (specular IBL, Diffuse GI, SSR, AO, etc)
|
||||
lightingOutput.m_specularF0 = float4(surface.specularF0, surface.roughnessLinear);
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse;
|
||||
lightingOutput.m_albedo.a = lightingData.occlusion;
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse * lightingData.diffuseAmbientOcclusion;
|
||||
lightingOutput.m_albedo.a = lightingData.specularOcclusion;
|
||||
lightingOutput.m_normal.rgb = EncodeNormalSignedOctahedron(surface.normal);
|
||||
lightingOutput.m_normal.a = o_specularF0_enableMultiScatterCompensation ? 1.0f : 0.0f;
|
||||
|
||||
@@ -58,6 +58,3 @@ PbrLightingOutput GetPbrLightingOutput(Surface surface, LightingData lightingDat
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ PbrLightingOutput PbrLighting( VSOutput IN,
|
||||
float3 vtxBitangent,
|
||||
float2 anisotropy, // angle and factor
|
||||
float3 emissive,
|
||||
float occlusion,
|
||||
float diffuseAmbientOcclusion,
|
||||
float specularOcclusion,
|
||||
float4 transmissionTintThickness,
|
||||
float4 transmissionParams,
|
||||
float clearCoatFactor,
|
||||
@@ -108,7 +109,8 @@ PbrLightingOutput PbrLighting( VSOutput IN,
|
||||
lightingData.Init(surface.position, surface.normal, surface.roughnessLinear);
|
||||
|
||||
lightingData.emissiveLighting = emissive;
|
||||
lightingData.occlusion = occlusion;
|
||||
lightingData.diffuseAmbientOcclusion = diffuseAmbientOcclusion;
|
||||
lightingData.specularOcclusion = specularOcclusion;
|
||||
|
||||
// Directional light shadow coordinates
|
||||
lightingData.shadowCoords = shadowCoords;
|
||||
@@ -191,7 +193,7 @@ PbrLightingOutput MakeDebugOutput(VSOutput IN, float3 debugColor, float3 normalW
|
||||
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN, baseColor, metallic, roughness, specularF0Factor,
|
||||
normal, IN.m_tangent, IN.m_bitangent, anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
emissive, occlusion, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
|
||||
return lightingOutput;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void ApplyIBL(Surface surface, inout LightingData lightingData)
|
||||
|
||||
// Adjust IBL lighting by exposure.
|
||||
float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure);
|
||||
lightingData.diffuseLighting += (iblDiffuse * iblExposureFactor * lightingData.occlusion);
|
||||
lightingData.diffuseLighting += (iblDiffuse * iblExposureFactor * lightingData.diffuseAmbientOcclusion);
|
||||
lightingData.specularLighting += (iblSpecular * iblExposureFactor);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-8
@@ -24,7 +24,7 @@ ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
Texture2DMS<float4> m_downsampledProbeIrradiance;
|
||||
Texture2DMS<float> m_downsampledDepth;
|
||||
Texture2DMS<float4> m_downsampledNormal;
|
||||
Texture2DMS<float4> m_albedo; // RGB8 = Albedo, A = Occlusion
|
||||
Texture2DMS<float4> m_albedo; // RGB8 = Albedo with pre-multiplied factors, A = Unused here
|
||||
Texture2DMS<float4> m_normal; // RGB10 = Normal (Encoded), A2 = Flags
|
||||
Texture2DMS<float> m_depth;
|
||||
|
||||
@@ -118,7 +118,7 @@ float3 SampleProbeIrradiance(uint sampleIndex, uint2 probeIrradianceCoords, floa
|
||||
}
|
||||
|
||||
// retrieve irradiance from the global IBL diffuse cubemap
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal, float3 albedo)
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal)
|
||||
{
|
||||
uint2 dimensions;
|
||||
uint samples;
|
||||
@@ -160,23 +160,19 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
float4 encodedNormal = PassSrg::m_normal.Load(screenCoords, sampleIndex);
|
||||
float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb);
|
||||
float4 albedo = PassSrg::m_albedo.Load(screenCoords, sampleIndex);
|
||||
float occlusion = albedo.a;
|
||||
float useProbeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(probeIrradianceCoords, sampleIndex).a;
|
||||
|
||||
float3 diffuse = float3(0.0f, 0.0f, 0.0f);
|
||||
if (useProbeIrradiance > 0.0f)
|
||||
{
|
||||
float3 irradiance = SampleProbeIrradiance(sampleIndex, probeIrradianceCoords, depth, normal, albedo, ImageScale);
|
||||
diffuse = (albedo.rgb / PI) * irradiance * occlusion;
|
||||
diffuse = (albedo.rgb / PI) * irradiance;
|
||||
}
|
||||
else
|
||||
{
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal, albedo);
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal);
|
||||
diffuse = albedo * irradiance;
|
||||
|
||||
// apply ambient occlusion to indirect diffuse
|
||||
diffuse *= occlusion;
|
||||
|
||||
// adjust IBL lighting by exposure.
|
||||
float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure);
|
||||
diffuse *= iblExposureFactor;
|
||||
|
||||
+4
-8
@@ -27,7 +27,7 @@ ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
Texture2D<float4> m_downsampledProbeIrradiance;
|
||||
Texture2D<float> m_downsampledDepth;
|
||||
Texture2D<float4> m_downsampledNormal;
|
||||
Texture2D<float4> m_albedo; // RGB8 = Albedo, A = Occlusion
|
||||
Texture2D<float4> m_albedo; // RGB8 = Albedo with pre-multiplied factors, A = Unused here
|
||||
Texture2D<float4> m_normal; // RGB10 = Normal (Encoded), A2 = Flags
|
||||
Texture2D<float> m_depth;
|
||||
|
||||
@@ -121,7 +121,7 @@ float3 SampleProbeIrradiance(uint2 probeIrradianceCoords, float depth, float3 no
|
||||
}
|
||||
|
||||
// retrieve irradiance from the global IBL diffuse cubemap
|
||||
float3 SampleGlobalIBL(uint2 screenCoords, float depth, float3 normal, float3 albedo)
|
||||
float3 SampleGlobalIBL(uint2 screenCoords, float depth, float3 normal)
|
||||
{
|
||||
uint2 dimensions;
|
||||
PassSrg::m_depth.GetDimensions(dimensions.x, dimensions.y);
|
||||
@@ -162,23 +162,19 @@ PSOutput MainPS(VSOutput IN)
|
||||
float4 encodedNormal = PassSrg::m_normal.Load(int3(screenCoords, 0));
|
||||
float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb);
|
||||
float4 albedo = PassSrg::m_albedo.Load(int3(screenCoords, 0));
|
||||
float occlusion = albedo.a;
|
||||
float useProbeIrradiance = PassSrg::m_downsampledProbeIrradiance.Load(int3(probeIrradianceCoords,0)).a;
|
||||
|
||||
float3 diffuse = float3(0.0f, 0.0f, 0.0f);
|
||||
if (useProbeIrradiance > 0.0f)
|
||||
{
|
||||
float3 irradiance = SampleProbeIrradiance(probeIrradianceCoords, depth, normal, albedo, ImageScale);
|
||||
diffuse = (albedo.rgb / PI) * irradiance * occlusion;
|
||||
diffuse = (albedo.rgb / PI) * irradiance;
|
||||
}
|
||||
else
|
||||
{
|
||||
float3 irradiance = SampleGlobalIBL(screenCoords, depth, normal, albedo);
|
||||
float3 irradiance = SampleGlobalIBL(screenCoords, depth, normal);
|
||||
diffuse = albedo * irradiance;
|
||||
|
||||
// apply ambient occlusion to indirect diffuse
|
||||
diffuse *= occlusion;
|
||||
|
||||
// adjust IBL lighting by exposure.
|
||||
float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure);
|
||||
diffuse *= iblExposureFactor;
|
||||
|
||||
+3
-7
@@ -21,7 +21,7 @@
|
||||
|
||||
ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
{
|
||||
Texture2DMS<float4> m_albedo; // RGB8 = Albedo, A = Occlusion
|
||||
Texture2DMS<float4> m_albedo; // RGB8 = Albedo with pre-multiplied factors, A = Unused here
|
||||
Texture2DMS<float4> m_normal; // RGB10 = Normal (Encoded), A2 = Flags
|
||||
Texture2DMS<float> m_depth;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ VSOutput MainVS(VSInput input)
|
||||
}
|
||||
|
||||
// retrieve irradiance from the global IBL diffuse cubemap
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal, float3 albedo)
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal)
|
||||
{
|
||||
uint2 dimensions;
|
||||
uint samples;
|
||||
@@ -76,14 +76,10 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
float4 encodedNormal = PassSrg::m_normal.Load(screenCoords, sampleIndex);
|
||||
float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb);
|
||||
float4 albedo = PassSrg::m_albedo.Load(screenCoords, sampleIndex);
|
||||
float occlusion = albedo.a;
|
||||
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal, albedo);
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal);
|
||||
float3 diffuse = albedo * irradiance;
|
||||
|
||||
// apply ambient occlusion to indirect diffuse
|
||||
diffuse *= occlusion;
|
||||
|
||||
// adjust IBL lighting by exposure.
|
||||
float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure);
|
||||
diffuse *= iblExposureFactor;
|
||||
|
||||
+3
-7
@@ -24,7 +24,7 @@
|
||||
|
||||
ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
{
|
||||
Texture2D<float4> m_albedo; // RGB8 = Albedo, A = Occlusion
|
||||
Texture2D<float4> m_albedo; // RGB8 = Albedo with pre-multiplied factors, A = Unused here
|
||||
Texture2D<float4> m_normal; // RGB10 = Normal (Encoded), A2 = Flags
|
||||
Texture2D<float> m_depth;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ VSOutput MainVS(VSInput input)
|
||||
}
|
||||
|
||||
// retrieve irradiance from the global IBL diffuse cubemap
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal, float3 albedo)
|
||||
float3 SampleGlobalIBL(uint sampleIndex, uint2 screenCoords, float depth, float3 normal)
|
||||
{
|
||||
uint2 dimensions;
|
||||
PassSrg::m_depth.GetDimensions(dimensions.x, dimensions.y);
|
||||
@@ -78,14 +78,10 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
float4 encodedNormal = PassSrg::m_normal.Load(int3(screenCoords, 0));
|
||||
float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb);
|
||||
float4 albedo = PassSrg::m_albedo.Load(int3(screenCoords, 0));
|
||||
float occlusion = albedo.a;
|
||||
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal, albedo);
|
||||
float3 irradiance = SampleGlobalIBL(sampleIndex, screenCoords, depth, normal);
|
||||
float3 diffuse = albedo * irradiance;
|
||||
|
||||
// apply ambient occlusion to indirect diffuse
|
||||
diffuse *= occlusion;
|
||||
|
||||
// adjust IBL lighting by exposure.
|
||||
float iblExposureFactor = pow(2.0, SceneSrg::m_iblExposure);
|
||||
diffuse *= iblExposureFactor;
|
||||
|
||||
@@ -43,8 +43,9 @@
|
||||
ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
{
|
||||
Texture2DMS<float> m_depth;
|
||||
Texture2DMS<float4> m_normal; // RGB10 = Normal (Encoded), A2 = Flags
|
||||
Texture2DMS<float4> m_normal; // RGB10 = EncodeNormalSignedOctahedron(worldNormal), A2 = multiScatterCompensationEnabled
|
||||
Texture2DMS<float4> m_specularF0; // RGB8 = SpecularF0, A8 = Roughness
|
||||
Texture2DMS<float4> m_albedo; // RGB = Not used here, A = specularOcclusion
|
||||
Texture2DMS<float4> m_clearCoatNormal; // R16G16 = Normal (Packed), B16A16 = (factor, perceptual roughness)
|
||||
Texture2DMS<float> m_blendWeight;
|
||||
Texture2D<float2> m_brdfMap;
|
||||
@@ -80,6 +81,9 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
float4 encodedNormal = PassSrg::m_normal.Load(IN.m_position.xy, sampleIndex);
|
||||
float3 normal = DecodeNormalSignedOctahedron(encodedNormal.rgb);
|
||||
bool multiScatterCompensationEnabled = (encodedNormal.a > 0.0f);
|
||||
|
||||
float4 albedo = PassSrg::m_albedo.Load(IN.m_position.xy, sampleIndex);
|
||||
float specularOcclusion = albedo.a;
|
||||
|
||||
// reconstruct world space position from the depth at this location in screenspace
|
||||
float3 positionWS = ReconstructWorldPositionFromDepth(IN.m_position.xy, sampleIndex).xyz;
|
||||
@@ -136,6 +140,9 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
// apply exposure setting
|
||||
specular *= pow(2.0, SceneSrg::m_iblExposure);
|
||||
|
||||
// maybe attenuate the specular
|
||||
specular *= specularOcclusion;
|
||||
|
||||
PSOutput OUT;
|
||||
OUT.m_color = float4(specular, 1.0f);
|
||||
return OUT;
|
||||
|
||||
@@ -41,7 +41,6 @@ set(FILES
|
||||
Materials/Types/StandardMultilayerPBR_Shadowmap_WithPS.azsl
|
||||
Materials/Types/StandardMultilayerPBR_Shadowmap_WithPS.shader
|
||||
Materials/Types/StandardPBR.materialtype
|
||||
Materials/Types/StandardPBR_AoState.lua
|
||||
Materials/Types/StandardPBR_ClearCoatEnableFeature.lua
|
||||
Materials/Types/StandardPBR_ClearCoatState.lua
|
||||
Materials/Types/StandardPBR_Common.azsli
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "Materials/Presets/PBR/default_grid.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_AmbientOcclusion.jpg"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/Rock030_2K_AmbientOcclusion.jpg"
|
||||
},
|
||||
"baseColor": {
|
||||
"textureMap": "TestData/Textures/cc0/Rock030_2K_Color.jpg"
|
||||
|
||||
+12
-14
@@ -4,11 +4,6 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"layer1_ambientOcclusion": {
|
||||
"enable": true,
|
||||
"factor": 1.6399999856948853,
|
||||
"textureMap": "TestData/Textures/cc0/bark1_disp.jpg"
|
||||
},
|
||||
"layer1_baseColor": {
|
||||
"color": [
|
||||
0.3495536744594574,
|
||||
@@ -32,6 +27,10 @@
|
||||
"flipY": true,
|
||||
"textureMap": "TestData/Textures/cc0/bark1_norm.jpg"
|
||||
},
|
||||
"layer1_occlusion": {
|
||||
"diffuseFactor": 1.6399999856948853,
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/bark1_disp.jpg"
|
||||
},
|
||||
"layer1_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.02500000037252903,
|
||||
@@ -53,10 +52,6 @@
|
||||
"offsetU": 0.5,
|
||||
"offsetV": 0.25
|
||||
},
|
||||
"layer2_ambientOcclusion": {
|
||||
"factor": 1.2200000286102296,
|
||||
"textureMap": "TestData/Textures/cc0/bark1_disp.jpg"
|
||||
},
|
||||
"layer2_baseColor": {
|
||||
"textureMap": "TestData/Textures/cc0/Lava004_1K_Color.jpg"
|
||||
},
|
||||
@@ -76,6 +71,10 @@
|
||||
"flipY": true,
|
||||
"textureMap": "TestData/Textures/cc0/Lava004_1K_Normal.jpg"
|
||||
},
|
||||
"layer2_occlusion": {
|
||||
"specularFactor": 2.0,
|
||||
"specularTextureMap": "TestData/Textures/cc0/Tiles009_1K_Displacement.jpg"
|
||||
},
|
||||
"layer2_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.01600000075995922,
|
||||
@@ -88,11 +87,6 @@
|
||||
"offsetU": 0.5,
|
||||
"offsetV": 0.25
|
||||
},
|
||||
"layer3_ambientOcclusion": {
|
||||
"enable": true,
|
||||
"factor": 1.0399999618530274,
|
||||
"textureMap": "TestData/Textures/cc0/PaintedMetal003_1K_Displacement.jpg"
|
||||
},
|
||||
"layer3_baseColor": {
|
||||
"color": [
|
||||
0.6315556764602661,
|
||||
@@ -115,6 +109,10 @@
|
||||
"layer3_normal": {
|
||||
"textureMap": "TestData/Textures/cc0/PaintedMetal003_1K_Normal.jpg"
|
||||
},
|
||||
"layer3_occlusion": {
|
||||
"diffuseFactor": 1.0399999618530274,
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/PaintedMetal003_1K_Displacement.jpg"
|
||||
},
|
||||
"layer3_parallax": {
|
||||
"enable": true,
|
||||
"factor": 0.004999999888241291,
|
||||
|
||||
+5
-8
@@ -1,15 +1,12 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials\\Types\\StandardPBR.materialtype",
|
||||
"materialType": "Materials/Types/StandardPBR.materialtype",
|
||||
"parentMaterial": "010_OcclusionBase.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"factor": 1.25,
|
||||
"textureMap": "TestData/Textures/TextureHaven/4k_castle_brick_02_red/4k_castle_brick_02_red_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"textureMap": "TestData/Textures/TextureHaven/4k_castle_brick_02_red/4k_castle_brick_02_red_bc.png"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 2.0,
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/Tiles009_1K_AmbientOcclusion.jpg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials/Types/StandardPBR.materialtype",
|
||||
"parentMaterial": "010_OcclusionBase.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"occlusion": {
|
||||
"diffuseFactor": 2.0,
|
||||
"diffuseTextureMap": "TestData/Textures/cc0/Tiles009_1K_AmbientOcclusion.jpg",
|
||||
"specularFactor": 2.0,
|
||||
"specularTextureMap": "TestData/Textures/cc0/Tiles009_1K_Displacement.jpg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials/Types/StandardPBR.materialtype",
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"baseColor": {
|
||||
"color": [
|
||||
0.06784161180257797,
|
||||
0.2073090672492981,
|
||||
0.29570457339286806,
|
||||
1.0
|
||||
]
|
||||
},
|
||||
"clearCoat": {
|
||||
"enable": true
|
||||
},
|
||||
"normal": {
|
||||
"textureMap": "TestData/Textures/cc0/Tiles009_1K_Normal.jpg"
|
||||
},
|
||||
"roughness": {
|
||||
"factor": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "",
|
||||
"materialType": "Materials/Types/StandardPBR.materialtype",
|
||||
"parentMaterial": "010_OcclusionBase.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"occlusion": {
|
||||
"specularFactor": 2.0,
|
||||
"specularTextureMap": "TestData/Textures/cc0/Tiles009_1K_Displacement.jpg"
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "TestData\\Materials\\StandardPbrTestCases\\UvTilingBase.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "TestData/Objects/cube/cube_diff.tif"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "TestData/Objects/cube/cube_diff.tif"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,8 @@ ForwardPassOutput AutoBrick_ForwardPassPS(VSOutput IN)
|
||||
GetSurfaceShape(IN.m_uv, surfaceDepth, surfaceNormal);
|
||||
const float3 normal = TangentSpaceToWorld(surfaceNormal, normalize(IN.m_normal), normalize(IN.m_tangent), normalize(IN.m_bitangent));
|
||||
|
||||
const float occlusion = 1.0f - surfaceDepth * AutoBrickSrg::m_aoFactor;
|
||||
const float diffuseAmbientOcclusion = 1.0f - surfaceDepth * AutoBrickSrg::m_aoFactor;
|
||||
const float specularOcclusion = 1;
|
||||
const float metallic = 0;
|
||||
const float roughness = 1;
|
||||
const float specularF0Factor = 0.5;
|
||||
@@ -179,7 +180,7 @@ ForwardPassOutput AutoBrick_ForwardPassPS(VSOutput IN)
|
||||
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN, baseColor, metallic, roughness, specularF0Factor,
|
||||
normal, IN.m_tangent, IN.m_bitangent, anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
emissive, diffuseAmbientOcclusion, specularOcclusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
|
||||
OUT.m_diffuseColor = lightingOutput.m_diffuseColor;
|
||||
OUT.m_diffuseColor.w = -1; // Subsurface scattering is disabled
|
||||
|
||||
@@ -77,7 +77,7 @@ ForwardPassOutput MinimalPBR_MainPassPS(VSOutput IN)
|
||||
|
||||
PbrLightingOutput lightingOutput = PbrLighting(IN, baseColor, metallic, roughness, specularF0Factor,
|
||||
normal, IN.m_tangent, IN.m_bitangent, anisotropy,
|
||||
emissive, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
emissive, occlusion, occlusion, transmissionTintThickness, transmissionParams, clearCoatFactor, clearCoatRoughness, clearCoatNormal, alpha, OpacityMode::Opaque);
|
||||
|
||||
OUT.m_diffuseColor = lightingOutput.m_diffuseColor;
|
||||
OUT.m_diffuseColor.w = -1; // Subsurface scattering is disabled
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:de6b49c1c4965896a190ed5f40c7d91f9deb942d859fd96264828df768098a83
|
||||
size 45257
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0172df6b91bb42bf6c41d18a6fdb7088397663d71f0c2d3ee504a4e91a7e5e98
|
||||
size 426462
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9de0bb2f58936658e8bd3599e487cbd6af3394c772d3132cd77a73774cfb5994
|
||||
size 230692
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:48a8690b74141da4e7e06cd10b47f0eb787b5333a915cd1e048ab24bec485ad0
|
||||
size 759052
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ddd79ef9962100cd5a9eec686bdcfb98db19ab410329e50df53d6781f9d8b441
|
||||
size 421004
|
||||
+2
-3
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
+3
-4
@@ -4,10 +4,9 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"factor": 0.30000001192092898,
|
||||
"textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 0.30000001192092898,
|
||||
"diffuseTextureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_AmbientOcclusion.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"textureMap": "Materials/PaintedPlaster015_8K/PaintedPlaster015_8K_BaseColor.png"
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"textureMap": "Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
0.496940553188324,
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"textureMap": "Materials/Bricks038_8K/Bricks038_8K_AmbientOcclusion.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
0.496940553188324,
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/arch_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/arch_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/background_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/background_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/bricks_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/bricks_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/ceiling_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/ceiling_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"textureBlendMode": "Lerp",
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/columnA_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/columnA_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/columnB_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/columnB_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/columnC_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/columnC_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/curtain_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/curtain_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/curtain_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/curtain_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/curtain_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/curtain_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/details_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/details_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/fabric_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/fabric_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/fabric_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/fabric_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/fabric_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/fabric_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/flagpole_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/flagpole_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/floor_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/floor_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/lion_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/lion_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/roof_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/roof_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/vase_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/vase_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/vaseHanging_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/vaseHanging_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Textures/vaseRound_1k_ao.png"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Textures/vaseRound_1k_ao.png"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "Materials/Presets/PBR/metal_brass.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Objects/Lucy/Lucy_ao.tif"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Objects/Lucy/Lucy_ao.tif"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
"parentMaterial": "Materials/Presets/PBR/metal_brass.material",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"enable": true,
|
||||
"textureMap": "Objects/Lucy/Lucy_ao.tif"
|
||||
"occlusion": {
|
||||
"diffuseTextureMap": "Objects/Lucy/Lucy_ao.tif"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
+3
-4
@@ -4,10 +4,9 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": true,
|
||||
"textureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseTextureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [ 1.0, 1.0, 1.0 ],
|
||||
|
||||
+3
-4
@@ -4,10 +4,9 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": true,
|
||||
"textureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseTextureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [ 1.0, 1.0, 1.0 ],
|
||||
|
||||
+7
-4
@@ -7,10 +7,13 @@
|
||||
"general": {
|
||||
"texcoord": 0
|
||||
},
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": false,
|
||||
"textureMap": ""
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseUseTexture": false,
|
||||
"diffuseTextureMap": "",
|
||||
"specularFactor": 1.0,
|
||||
"specularUseTexture": false,
|
||||
"specularTextureMap": ""
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
+7
-4
@@ -7,10 +7,13 @@
|
||||
"general": {
|
||||
"texcoord": 0
|
||||
},
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": false,
|
||||
"textureMap": ""
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseUseTexture": false,
|
||||
"diffuseTextureMap": "",
|
||||
"specularFactor": 1.0,
|
||||
"specularUseTexture": false,
|
||||
"specularTextureMap": ""
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [
|
||||
|
||||
+7
-4
@@ -4,10 +4,13 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": true,
|
||||
"textureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseUseTexture": true,
|
||||
"diffuseTextureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif",
|
||||
"specularFactor": 1.0,
|
||||
"specularUseTexture": true,
|
||||
"specularTextureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [ 1.0, 1.0, 1.0 ],
|
||||
|
||||
+7
-4
@@ -4,10 +4,13 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"ambientOcclusion": {
|
||||
"factor": 1.0,
|
||||
"useTexture": true,
|
||||
"textureMap": "EngineAssets/TextureMsg/DefaultNoUVs.tif"
|
||||
"occlusion": {
|
||||
"diffuseFactor": 1.0,
|
||||
"diffuseUseTexture": false,
|
||||
"diffuseTextureMap": "",
|
||||
"specularFactor": 1.0,
|
||||
"specularUseTexture": false,
|
||||
"specularTextureMap": ""
|
||||
},
|
||||
"baseColor": {
|
||||
"color": [ 1.0, 1.0, 1.0 ],
|
||||
|
||||
Reference in New Issue
Block a user