Implementation of reflection and skylight probes.

Moves lighting math to the diffuse/specular two-channel logic.
This commit is contained in:
Areloch 2018-09-16 22:15:07 -05:00
parent 83dd55e851
commit 2be32ad737
102 changed files with 12346 additions and 1911 deletions

View file

@ -98,7 +98,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
uvScene->setName( "uvScene" );
LangElement *uvSceneDecl = new DecOp( uvScene );
String rtParamName = String::ToString( "rtParams%s", "directLightingBuffer" );
String rtParamName = String::ToString( "rtParams%s", "diffuseLightingBuffer" );
Var *rtParams = (Var*) LangElement::find( rtParamName );
if( !rtParams )
{
@ -121,7 +121,7 @@ void DeferredRTLightingFeatGLSL::processPix( Vector<ShaderComponent*> &component
// create texture var
Var *lightInfoBuffer = new Var;
lightInfoBuffer->setType( "sampler2D" );
lightInfoBuffer->setName( "directLightingBuffer" );
lightInfoBuffer->setName( "diffuseLightingBuffer" );
lightInfoBuffer->uniform = true;
lightInfoBuffer->sampler = true;
lightInfoBuffer->constNum = Var::getTexUnitNum(); // used as texture unit num here
@ -207,7 +207,7 @@ void DeferredRTLightingFeatGLSL::setTexData( Material::StageData &stageDat,
mLastTexIndex = texIndex;
passData.mTexType[ texIndex ] = Material::TexTarget;
passData.mSamplerNames[ texIndex ]= "directLightingBuffer";
passData.mSamplerNames[ texIndex ]= "diffuseLightingBuffer";
passData.mTexSlot[ texIndex++ ].texTarget = texTarget;
}
}