mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
fix dynamicCubemaps on objects
This commit is contained in:
parent
e5aa6e4a95
commit
824b9a9cd5
5 changed files with 15 additions and 13 deletions
|
|
@ -1922,9 +1922,9 @@ void ReflectCubeFeatGLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
Var* matinfo = (Var*) LangElement::find( getOutputTargetVarName(ShaderFeature::RenderTarget2) );
|
||||
Var *roughness = (Var*)LangElement::find("roughness");
|
||||
if (roughness) //try to grab roughness directly
|
||||
texCube = new GenOp("textureLod( @, @, min((1.0 - @)*@ + 1.0, @))", cubeMap, reflectVec, roughness, cubeMips, cubeMips);
|
||||
texCube = new GenOp("textureLod( @, @, min(@*@ + 1.0, @))", cubeMap, reflectVec, roughness, cubeMips, cubeMips);
|
||||
else if (glossColor) //failing that, try and find color data
|
||||
texCube = new GenOp("textureLod( @, @, min((1.0 - @.b)*@ + 1.0, @))", cubeMap, reflectVec, glossColor, cubeMips, cubeMips);
|
||||
texCube = new GenOp("textureLod( @, @, min(@.b*@ + 1.0, @))", cubeMap, reflectVec, glossColor, cubeMips, cubeMips);
|
||||
else //failing *that*, just draw the cubemap
|
||||
texCube = new GenOp("texture( @, @)", cubeMap, reflectVec);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue