Merge pull request #4232 from aws-lumberyard-dev/Atom/amzn-tommy/ATOM-16504_StandardMultilayerPBR_Displacement_nil
Modify CalcOverallHeightRange to not return nil
This commit is contained in:
@@ -104,6 +104,7 @@ option bool o_layer3_enabled;
|
||||
enum class DebugDrawMode { None, BlendMask, Displacement, FinalBlendWeights };
|
||||
option DebugDrawMode o_debugDrawMode;
|
||||
|
||||
// If you modify this enum, you must update the BlendSourceUsesDisplacement function in StandardMultilayerPBR_Displacement.lua
|
||||
enum class LayerBlendSource { BlendMaskTexture, BlendMaskVertexColors, Displacement, Displacement_With_BlendMaskTexture, Displacement_With_BlendMaskVertexColors, Fallback };
|
||||
option LayerBlendSource o_layerBlendSource;
|
||||
|
||||
|
||||
+3
-2
@@ -88,7 +88,7 @@ end
|
||||
-- @return a table with two values {min,max}. Negative values are below the surface and positive values are above the surface.
|
||||
function CalcOverallHeightRange(context)
|
||||
|
||||
local heightMinMax = {nil, nil}
|
||||
local heightMinMax = {}
|
||||
|
||||
local function GetMergedHeightRange(heightMinMax, offset, factor)
|
||||
top = offset
|
||||
@@ -138,7 +138,8 @@ function CalcOverallHeightRange(context)
|
||||
if(enableLayer3) then GetMergedHeightRange(heightMinMax, offsetLayer3, factorLayer3) end
|
||||
|
||||
else
|
||||
heightMinMax = {0,0}
|
||||
heightMinMax[0] = 0
|
||||
heightMinMax[1] = 0
|
||||
end
|
||||
|
||||
return heightMinMax
|
||||
|
||||
Reference in New Issue
Block a user