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
|
|
@ -1987,11 +1987,11 @@ void ReflectCubeFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
|||
|
||||
if (roughness) //try to grab roughness directly
|
||||
{
|
||||
texCube = new GenOp("@.SampleLevel( @, float3(@).rgb, min((1.0 - @)*@ + 1.0, @))", cubeMapTex, cubeMap, reflectVec, roughness, cubeMips, cubeMips);
|
||||
texCube = new GenOp("@.SampleLevel( @, float3(@).rgb, min(@*@ + 1.0, @))", cubeMapTex, cubeMap, reflectVec, roughness, cubeMips, cubeMips);
|
||||
}
|
||||
else if (glossColor)//failing that, try and find color data
|
||||
{
|
||||
texCube = new GenOp("@.SampleLevel( @, float3(@).rgb, min((1.0 - @.b)*@ + 1.0, @))", cubeMapTex, cubeMap, reflectVec, glossColor, cubeMips, cubeMips);
|
||||
texCube = new GenOp("@.SampleLevel( @, float3(@).rgb, min(@.b*@ + 1.0, @))", cubeMapTex, cubeMap, reflectVec, glossColor, cubeMips, cubeMips);
|
||||
}
|
||||
else //failing *that*, just draw the cubemap
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue