mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
missed a few conversions
This commit is contained in:
parent
01f6938746
commit
4d714091b7
5 changed files with 22 additions and 26 deletions
|
|
@ -786,8 +786,8 @@ void RenderProbeMgr::render( SceneRenderState *state )
|
||||||
mProbeArrayEffect->setShaderConst("$inProbePosArray", probePositionsData);
|
mProbeArrayEffect->setShaderConst("$inProbePosArray", probePositionsData);
|
||||||
mProbeArrayEffect->setShaderConst("$inRefPosArray", probeRefPositionsData);
|
mProbeArrayEffect->setShaderConst("$inRefPosArray", probeRefPositionsData);
|
||||||
mProbeArrayEffect->setShaderConst("$worldToObjArray", probeWorldToObjData);
|
mProbeArrayEffect->setShaderConst("$worldToObjArray", probeWorldToObjData);
|
||||||
mProbeArrayEffect->setShaderConst("$bbMinArray", refBoxMinData);
|
mProbeArrayEffect->setShaderConst("$refBoxMinArray", refBoxMinData);
|
||||||
mProbeArrayEffect->setShaderConst("$bbMaxArray", refBoxMaxData);
|
mProbeArrayEffect->setShaderConst("$refBoxMaxArray", refBoxMaxData);
|
||||||
mProbeArrayEffect->setShaderConst("$probeConfigData", probeConfigData);
|
mProbeArrayEffect->setShaderConst("$probeConfigData", probeConfigData);
|
||||||
|
|
||||||
// Make sure the effect is gonna render.
|
// Make sure the effect is gonna render.
|
||||||
|
|
|
||||||
|
|
@ -2927,15 +2927,15 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
|
||||||
inRefPosArray->uniform = true;
|
inRefPosArray->uniform = true;
|
||||||
inRefPosArray->constSortPos = cspPotentialPrimitive;
|
inRefPosArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var * bbMinArray = new Var("inRefBoxMin", "vec4");
|
Var * refBoxMinArray = new Var("inRefBoxMin", "vec4");
|
||||||
bbMinArray->arraySize = MAX_FORWARD_PROBES;
|
refBoxMinArray->arraySize = MAX_FORWARD_PROBES;
|
||||||
bbMinArray->uniform = true;
|
refBoxMinArray->uniform = true;
|
||||||
bbMinArray->constSortPos = cspPotentialPrimitive;
|
refBoxMinArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var * bbMaxArray = new Var("inRefBoxMax", "vec4");
|
Var * refBoxMaxArray = new Var("inRefBoxMax", "vec4");
|
||||||
bbMaxArray->arraySize = MAX_FORWARD_PROBES;
|
refBoxMaxArray->arraySize = MAX_FORWARD_PROBES;
|
||||||
bbMaxArray->uniform = true;
|
refBoxMaxArray->uniform = true;
|
||||||
bbMaxArray->constSortPos = cspPotentialPrimitive;
|
refBoxMaxArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var * probeConfigData = new Var("probeConfigData", "vec4");
|
Var * probeConfigData = new Var("probeConfigData", "vec4");
|
||||||
probeConfigData->arraySize = MAX_FORWARD_PROBES;
|
probeConfigData->arraySize = MAX_FORWARD_PROBES;
|
||||||
|
|
@ -3043,7 +3043,7 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
|
||||||
computeForwardProbes += String("@, @, \r\n\t\t");
|
computeForwardProbes += String("@, @, \r\n\t\t");
|
||||||
computeForwardProbes += String("@,@).rgb; \r\n");
|
computeForwardProbes += String("@,@).rgb; \r\n");
|
||||||
|
|
||||||
meta->addStatement(new GenOp(computeForwardProbes.c_str(), albedo, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, bbMinArray, bbMaxArray, inRefPosArray,
|
meta->addStatement(new GenOp(computeForwardProbes.c_str(), albedo, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refBoxMinArray, refBoxMaxArray, inRefPosArray,
|
||||||
hasSkylight, BRDFTexture,
|
hasSkylight, BRDFTexture,
|
||||||
skylightIrradMap, skylightSpecularMap,
|
skylightIrradMap, skylightSpecularMap,
|
||||||
irradianceCubemapAR, specularCubemapAR));
|
irradianceCubemapAR, specularCubemapAR));
|
||||||
|
|
|
||||||
|
|
@ -3002,15 +3002,15 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
|
||||||
inRefPosArray->uniform = true;
|
inRefPosArray->uniform = true;
|
||||||
inRefPosArray->constSortPos = cspPotentialPrimitive;
|
inRefPosArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var *bbMinArray = new Var("inRefBoxMin", "float4");
|
Var * refBoxMinArray = new Var("inRefBoxMin", "float4");
|
||||||
bbMinArray->arraySize = MAX_FORWARD_PROBES;
|
refBoxMinArray->arraySize = MAX_FORWARD_PROBES;
|
||||||
bbMinArray->uniform = true;
|
refBoxMinArray->uniform = true;
|
||||||
bbMinArray->constSortPos = cspPotentialPrimitive;
|
refBoxMinArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var *bbMaxArray = new Var("inRefBoxMax", "float4");
|
Var * refBoxMaxArray = new Var("inRefBoxMax", "float4");
|
||||||
bbMaxArray->arraySize = MAX_FORWARD_PROBES;
|
refBoxMaxArray->arraySize = MAX_FORWARD_PROBES;
|
||||||
bbMaxArray->uniform = true;
|
refBoxMaxArray->uniform = true;
|
||||||
bbMaxArray->constSortPos = cspPotentialPrimitive;
|
refBoxMaxArray->constSortPos = cspPotentialPrimitive;
|
||||||
|
|
||||||
Var *probeConfigData = new Var("probeConfigData", "float4");
|
Var *probeConfigData = new Var("probeConfigData", "float4");
|
||||||
probeConfigData->arraySize = MAX_FORWARD_PROBES;
|
probeConfigData->arraySize = MAX_FORWARD_PROBES;
|
||||||
|
|
@ -3112,7 +3112,7 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
|
||||||
computeForwardProbes += String::String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
computeForwardProbes += String::String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
||||||
computeForwardProbes += String::String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@)).rgb; \r\n");
|
computeForwardProbes += String::String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@)).rgb; \r\n");
|
||||||
|
|
||||||
meta->addStatement(new GenOp(computeForwardProbes.c_str(), diffuseColor, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, bbMinArray, bbMaxArray, inRefPosArray,
|
meta->addStatement(new GenOp(computeForwardProbes.c_str(), diffuseColor, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refBoxMinArray, refBoxMaxArray, inRefPosArray,
|
||||||
skylightCubemapIdx, BRDFTexture,
|
skylightCubemapIdx, BRDFTexture,
|
||||||
irradianceCubemapAR, specularCubemapAR));
|
irradianceCubemapAR, specularCubemapAR));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -444,8 +444,6 @@ float4 computeForwardProbes(Surface surface,
|
||||||
if (contribution[i] > 0.0)
|
if (contribution[i] > 0.0)
|
||||||
probehits++;
|
probehits++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
continue;
|
|
||||||
|
|
||||||
contribution[i] = max(contribution[i], 0);
|
contribution[i] = max(contribution[i], 0);
|
||||||
|
|
||||||
|
|
@ -524,7 +522,7 @@ float4 computeForwardProbes(Surface surface,
|
||||||
if (contrib != 0)
|
if (contrib != 0)
|
||||||
{
|
{
|
||||||
int cubemapIdx = probeConfigData[i].a;
|
int cubemapIdx = probeConfigData[i].a;
|
||||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz);
|
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refBoxMinArray[i].xyz, refBoxMaxArray[i].xyz, inRefPosArray[i].xyz);
|
||||||
|
|
||||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, cubemapIdx, 0).xyz * contrib;
|
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, cubemapIdx, 0).xyz * contrib;
|
||||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, dir, cubemapIdx, lod).xyz * contrib;
|
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, dir, cubemapIdx, lod).xyz * contrib;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ uniform float4 inProbePosArray[MAX_PROBES];
|
||||||
uniform float4 inRefPosArray[MAX_PROBES];
|
uniform float4 inRefPosArray[MAX_PROBES];
|
||||||
uniform float4x4 worldToObjArray[MAX_PROBES];
|
uniform float4x4 worldToObjArray[MAX_PROBES];
|
||||||
uniform float4 refBoxMinArray[MAX_PROBES];
|
uniform float4 refBoxMinArray[MAX_PROBES];
|
||||||
uniform float4 refBoxArray[MAX_PROBES];
|
uniform float4 refBoxMaxArray[MAX_PROBES];
|
||||||
uniform float4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
|
uniform float4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
|
||||||
|
|
||||||
#if DEBUGVIZ_CONTRIB
|
#if DEBUGVIZ_CONTRIB
|
||||||
|
|
@ -80,8 +80,6 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
||||||
if (contribution[i]>0.0)
|
if (contribution[i]>0.0)
|
||||||
probehits++;
|
probehits++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
continue;
|
|
||||||
|
|
||||||
contribution[i] = max(contribution[i],0);
|
contribution[i] = max(contribution[i],0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue