Browse Source

Merge branch 'Preview4_0_w_translucencyWIP' of https://github.com/Azaezel/Torque3D into Preview4_0_w_translucencyWIP

Areloch 6 years ago
parent
commit
2f68fdae5e

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

@@ -639,8 +639,8 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
          probeWorldToObjArray[effectiveProbeCount] = curEntry.getTransform();
          probeWorldToObjArray[effectiveProbeCount] = curEntry.getTransform();
 
 
          Point3F refPos = curEntry.getPosition() + curEntry.mProbeRefOffset;
          Point3F refPos = curEntry.getPosition() + curEntry.mProbeRefOffset;
-         Point3F refBoxMin = refPos - curEntry.mProbeRefScale/2 * curEntry.getTransform().getScale();
-         Point3F refBoxMax = refPos + curEntry.mProbeRefScale/2 * curEntry.getTransform().getScale();
+         Point3F refBoxMin = refPos - curEntry.mProbeRefScale * curEntry.getTransform().getScale();
+         Point3F refBoxMax = refPos + curEntry.mProbeRefScale * curEntry.getTransform().getScale();
 
 
          refBoxMinArray[effectiveProbeCount] = Point4F(refBoxMin.x, refBoxMin.y, refBoxMin.z, 0);
          refBoxMinArray[effectiveProbeCount] = Point4F(refBoxMin.x, refBoxMin.y, refBoxMin.z, 0);
          refBoxMaxArray[effectiveProbeCount] = Point4F(refBoxMax.x, refBoxMax.y, refBoxMax.z, 0);
          refBoxMaxArray[effectiveProbeCount] = Point4F(refBoxMax.x, refBoxMax.y, refBoxMax.z, 0);

+ 2 - 6
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -848,10 +848,6 @@ Var* ShaderFeatureHLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
       meta->addStatement(new GenOp("   @ = float4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct matinfo, no ao darkening
       meta->addStatement(new GenOp("   @ = float4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct matinfo, no ao darkening
    }
    }
 
 
-   Var* inTex = getInTexCoord("texCoord", "float2", componentList);
-   if (!inTex)
-      return nullptr;
-
    Var* wsNormal = (Var*)LangElement::find("wsNormal");
    Var* wsNormal = (Var*)LangElement::find("wsNormal");
    Var* normal = (Var*)LangElement::find("normal");
    Var* normal = (Var*)LangElement::find("normal");
    if (!normal)
    if (!normal)
@@ -878,8 +874,8 @@ Var* ShaderFeatureHLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
    if (!surface)
    if (!surface)
    {
    {
       surface = new Var("surface", "Surface");
       surface = new Var("surface", "Surface");
-      meta->addStatement(new GenOp("  @ = createForwardSurface(@,@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, normal, matinfo,
-         inTex, wsPosition, wsEyePos, wsView));
+      meta->addStatement(new GenOp("  @ = createForwardSurface(@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, normal, matinfo,
+         wsPosition, wsEyePos, wsView));
    }
    }
 
 
    return surface;
    return surface;

+ 1 - 2
Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl

@@ -122,8 +122,7 @@ inline Surface createSurface(float4 gbuffer0, TORQUE_SAMPLER2D(gbufferTex1), TOR
 	return surface;
 	return surface;
 }
 }
 
 
-inline Surface createForwardSurface(float4 baseColor, float3 normal, float4 pbrProperties, in float2 uv, 
-                            in float3 wsPosition, in float3 wsEyePos, in float3 wsEyeRay)
+inline Surface createForwardSurface(float4 baseColor, float3 normal, float4 pbrProperties, in float3 wsPosition, in float3 wsEyePos, in float3 wsEyeRay)
 {
 {
 	Surface surface = (Surface)0;
 	Surface surface = (Surface)0;