fix dynamicCubemaps on objects

This commit is contained in:
AzaezelX 2024-04-18 13:57:29 -05:00
parent e5aa6e4a95
commit 824b9a9cd5
5 changed files with 15 additions and 13 deletions

View file

@ -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
{