I am working on a shader and I’d like to use 2 environment cubemaps (hlsl pixel shader, forward render path). I’ve got the first one in using the regular sEnvCubeMap, but I can’t seem to figure out how to either add a new cube map uniform or how to use an existing one.
This is what my technique looks like:
<?xml version="1.0" encoding="utf-8"?>
<technique vs="Lux" ps="Lux" psdefines="DIFFMAP ENVCUBEMAP">
<pass name="base" />
<pass name="litbase" />
<pass name="light" depthtest="equal" depthwrite="false" blend="add" />
<pass name="prepass" psdefines="PREPASS" />
<pass name="material" psdefines="MATERIAL" depthtest="equal" depthwrite="false" />
<pass name="deferred" psdefines="DEFERRED" />
<pass name="depth" vs="Depth" ps="Depth" />
<pass name="shadow" vs="Shadow" ps="Shadow" />
</technique>
This is what my material looks like:
<?xml version="1.0"?>
<material>
<technique name="Techniques/Lux/BumpedDiffuse.xml" quality="0" loddistance="0" />
<texture unit="diffuse" name="Textures/Cloth_Unity_Immortal_diffuse.tga" />
<texture unit="normal" name="Textures/Cloth_Unity_Immortal_normal.tga" />
<texture unit="specular" name="Textures/Cloth_Unity_Immortal_specular.tga" />
<texture unit="environment" name="Textures/diffcube.dds" />
<texture unit="13" name="Textures/speccube.dds" />
<parameter name="UOffset" value="10 0 0 0" />
<parameter name="VOffset" value="0 10 0 0" />
<parameter name="MatDiffColor" value="1 1 1 1" />
<parameter name="MatEmissiveColor" value="0 0 0" />
<parameter name="MatEnvMapColor" value="1 1 1" />
<parameter name="MatSpecColor" value="0 0 0 1" />
<cull value="ccw" />
<shadowcull value="ccw" />
<depthbias constant="0" slopescaled="0" />
</material>