Commit 9a77f09d authored by cutealien's avatar cutealien

Fix shader example (thx @ Yoran for finding & fixing)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4097 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5d18ec92
......@@ -105,12 +105,15 @@ public:
if (UseHighLevelShaders)
{
services->setVertexShaderConstant("mTransWorld", world.pointer(), 16);
if(driver->getDriverType() == video::EDT_OPENGL)
{
// set texture
f32 TextureLayerID = 0.0f;
if (UseHighLevelShaders)
services->setVertexShaderConstant("myTexture",
services->setPixelShaderConstant("myTexture",
reinterpret_cast<f32*>(&TextureLayerID), 1);
}
}
else
services->setVertexShaderConstant(world.pointer(), 10, 4);
}
......
......@@ -65,7 +65,7 @@ struct PS_OUTPUT
};
sampler2D myTexture;
sampler2D myTexture : register(s0);
PS_OUTPUT pixelMain(float2 TexCoord : TEXCOORD0,
float4 Position : POSITION,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment