I'm trying to solve an issue I'm having with SkyBox/SkyLine with the PBRDX11 branch and I found something which look not correct in the new shaders. I'm really not an expert in shaders but I'm starting to understand a little more how they work.
In shaders/common/planarReflectV.hlsl there's this:
Code: Select all
TORQUE_UNIFORM_SAMPLER2D(texMap, 0);
TORQUE_UNIFORM_SAMPLER2D(refractMap, 0);
I don't think this is ok, right?
From the torqueScript shader, it's set like this:
Code: Select all
new ShaderData( Reflect )
{
DXVertexShaderFile = "shaders/common/planarReflectV.hlsl";
DXPixelShaderFile = "shaders/common/planarReflectP.hlsl";
OGLVertexShaderFile = "shaders/common/gl/planarReflectV.glsl";
OGLPixelShaderFile = "shaders/common/gl/planarReflectP.glsl";
samplerNames[0] = "$diffuseMap";
samplerNames[1] = "$refractMap";
pixVersion = 1.4;
};
I don't think it's what cause my issue but should it be diffuseMap or texMap used?
ReflectBump shader seem wrong also but maybe it's ok to send diffuseMap sampler and set is as textMap in the shader code...
Code: Select all
samplerNames[0] = "$diffuseMap";
samplerNames[1] = "$refractMap";
samplerNames[2] = "$bumpMap";
Code: Select all
TORQUE_UNIFORM_SAMPLER2D(texMap, 0);
TORQUE_UNIFORM_SAMPLER2D(refractMap, 1);
TORQUE_UNIFORM_SAMPLER2D(bumpMap, 2);
Does this works or diffuseMap/texMap should be the same?