File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
com.unity.perception/Runtime/GroundTruth Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,14 @@ public bool SetLensDistortionShaderParameters()
130130 if ( targetCamera == null )
131131 return false ;
132132
133- if ( targetCamera . GetUniversalAdditionalCameraData ( ) . renderPostProcessing == false && lensDistortionOverride . HasValue == false )
133+ var UACD = targetCamera . GetUniversalAdditionalCameraData ( ) ;
134+
135+ if ( UACD . renderPostProcessing == false && lensDistortionOverride . HasValue == false )
136+ return false ;
137+
138+ if ( m_lensDistortion . active == false )
134139 return false ;
140+
135141 #else
136142 return false ;
137143 #endif
@@ -153,6 +159,10 @@ public bool SetLensDistortionShaderParameters()
153159 mult . y = Mathf . Max ( m_lensDistortion . yMultiplier . value , 1e-4f ) ;
154160 scale = 1.0f / m_lensDistortion . scale . value ;
155161 }
162+ else
163+ {
164+ return false ;
165+ }
156166 }
157167
158168 float amount = 1.6f * Mathf . Max ( Mathf . Abs ( intensity * 100.0f ) , 1.0f ) ;
You can’t perform that action at this time.
0 commit comments