Sfoglia il codice sorgente

Scaling correction to probes in deferred mode to improve parallax adjustment
Ensure that probes are masked to be rendered during bake passes so they can contribute during a bake allowing multibakes
Adjusted order of the connect data for the forward shaders to fix a mis-port issue

JeffR 3 anni fa
parent
commit
e04f844240

+ 1 - 1
Engine/source/T3D/objectTypes.h

@@ -229,7 +229,7 @@ enum SceneObjectTypeMasks : U32
                                  EnvironmentObjectType ),
 
    SKYLIGHT_CAPTURE_TYPEMASK = (EnvironmentObjectType),
-   REFLECTION_PROBE_CAPTURE_TYPEMASK = (StaticObjectType | StaticShapeObjectType)
+   REFLECTION_PROBE_CAPTURE_TYPEMASK = (StaticObjectType | StaticShapeObjectType | LightObjectType)
 };
 
 #endif

+ 1 - 1
Engine/source/renderInstance/renderProbeMgr.cpp

@@ -328,7 +328,7 @@ void RenderProbeMgr::getBestProbes(const Point3F& objPosition, ProbeDataSet* pro
       MatrixF p2A = curEntry.mProbeInfo->mTransform;
       probeDataSet->probeWorldToObjArray[i] = p2A;
       p2A.inverse();
-      probeDataSet->refScaleArray[i] = curEntry.mProbeInfo->mProbeRefScale / p2A.getScale();
+      probeDataSet->refScaleArray[i] = curEntry.mProbeInfo->mProbeRefScale / (p2A.getScale()*2);
 
       Point3F probePos = curEntry.mProbeInfo->mObject->getPosition();
       Point3F refPos = probePos + curEntry.mProbeInfo->mProbeRefOffset * probeDataSet->refScaleArray[i].asPoint3F();

+ 1 - 1
Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

@@ -2960,9 +2960,9 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
    MultiLine * meta = new MultiLine;
 
    // Now the wsPosition and wsView.
+   Var *wsPosition = getInWsPosition(componentList);
    Var *worldToTangent = getInWorldToTangent(componentList);
    Var *wsNormal = getInWorldNormal(componentList);
-   Var *wsPosition = getInWsPosition(componentList);
    Var *wsView = getWsView(wsPosition, meta);
    
    //Reflection Probe WIP

+ 1 - 1
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -3038,9 +3038,9 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
    MultiLine *meta = new MultiLine;
    
    // Now the wsPosition and wsView.
+   Var* wsPosition = getInWsPosition(componentList);
    Var* worldToTangent = getInWorldToTangent(componentList);
    Var *wsNormal = getInWorldNormal(componentList);
-   Var* wsPosition = getInWsPosition(componentList);
    Var *wsView = getWsView(wsPosition, meta);
    
    //Reflection Probe WIP